/* 청년도약 관리판·기업 관리판 공용 스타일 */
/* 레이아웃: 상단 요약 줄 → 탭 → (캘린더 | 선택한 날 상세) 2단, 모바일은 1단 */
:root {
  --bg: #f4f6fb; --surface: #ffffff; --sunk: #eef1f8; --text: #172033; --muted: #5a6478; --line: #dce2ee;
  --brand: #1846c9; --brand-soft: #e7eeff; --on-brand: #ffffff;
  --alert: #c62828; --alert-bg: #fdecec; --alert-line: #f3b7b7;
  --warn: #9a5b00; --warn-bg: #fff3dc; --ok: #137a52; --ok-bg: #e4f5ec; --info: #3c5aa8; --info-bg: #edf1fb;
  --y25: #7a4fc4; --y25-bg: #f1eafd; --y26: #1846c9; --y26-bg: #e7eeff; --y27: #0f7b78; --y27-bg: #e0f4f3;
  --shadow: 0 8px 28px rgba(18, 34, 80, .10);
  --font: "IBM Plex Sans KR", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --r: 12px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f141d; --surface: #171e2b; --sunk: #121926; --text: #e7ecf5; --muted: #a0abbe; --line: #2a3446;
  --brand: #7a9cff; --brand-soft: #1d2a47; --on-brand: #0f141d;
  --alert: #ff8f8f; --alert-bg: #3b1a1d; --alert-line: #6b2b30;
  --warn: #ffc56b; --warn-bg: #3a2b10; --ok: #63d3a0; --ok-bg: #133126; --info: #9fb5f5; --info-bg: #1b2440;
  --y25: #c4a6ff; --y25-bg: #2a2142; --y26: #8fb0ff; --y26-bg: #1d2a47; --y27: #6fd6cf; --y27-bg: #133533;
  --shadow: 0 8px 28px rgba(0, 0, 0, .4); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0f141d; --surface: #171e2b; --sunk: #121926; --text: #e7ecf5; --muted: #a0abbe; --line: #2a3446;
  --brand: #7a9cff; --brand-soft: #1d2a47; --on-brand: #0f141d;
  --alert: #ff8f8f; --alert-bg: #3b1a1d; --alert-line: #6b2b30;
  --warn: #ffc56b; --warn-bg: #3a2b10; --ok: #63d3a0; --ok-bg: #133126; --info: #9fb5f5; --info-bg: #1b2440;
  --y25: #c4a6ff; --y25-bg: #2a2142; --y26: #8fb0ff; --y26-bg: #1d2a47; --y27: #6fd6cf; --y27-bg: #133533;
  --shadow: 0 8px 28px rgba(0, 0, 0, .4); color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.num, .date { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
h1, h2, h3 { text-wrap: balance; line-height: 1.3; }

/* 상단 */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in, .main { width: min(1240px, 100% - 32px); margin: 0 auto; }
.top-in { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-block: 10px; }
.brand { font-weight: 700; font-size: 17px; display: flex; align-items: baseline; gap: 8px; margin-right: auto; }
.brand small { font-weight: 500; color: var(--muted); font-size: 13px; }
.mode { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); }
.mode.work { background: var(--ok-bg); color: var(--ok); }
.refdate { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.refdate input { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 4px 6px; font-family: var(--mono); font-size: 13px; }
.iconbtn { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 6px 10px; cursor: pointer; font-size: 13px; font-weight: 600; }
.iconbtn:hover { border-color: var(--brand); color: var(--brand); }

.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; width: min(1240px, 100% - 32px); margin: 0 auto; }
.tabs button { border: 0; background: none; padding: 10px 14px 11px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .cnt { font-family: var(--mono); font-size: 12px; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--sunk); }

.main { padding-block: 18px 64px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.main > * { min-width: 0; }

/* 요약 줄 */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; text-align: left; cursor: pointer; }
.stat b { display: block; font-family: var(--mono); font-size: 26px; line-height: 1.1; margin-top: 2px; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat.hot { border-color: var(--alert-line); background: var(--alert-bg); }
.stat.hot b, .stat.hot span { color: var(--alert); }

/* 캘린더 */
.board { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }
.panel h2 { font-size: 17px; margin: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.calnav { display: flex; align-items: center; gap: 6px; }
.calnav input[type="month"] { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; background: var(--surface); font-family: var(--mono); }
.monthtitle { font-size: 20px; font-weight: 700; margin: 0; font-family: var(--mono); letter-spacing: -.02em; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; border: 1px solid var(--line); }
.legend .l-alert { background: var(--alert-bg); border-color: var(--alert-line); }
.legend .l-done { background: var(--ok-bg); }
.legend .l-info { background: var(--info-bg); }

.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.dow { font-size: 12px; font-weight: 700; color: var(--muted); padding: 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--sunk); }
.dow.sun, .day.sun .dn { color: var(--alert); }
.dow.sat, .day.sat .dn { color: var(--info); }
.day { min-height: 98px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 5px 6px; background: var(--surface);
  text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 3px; border-top: 0; border-left: 0; min-width: 0; }
.day:hover { background: var(--sunk); }
.day.out { background: var(--sunk); opacity: .55; }
.day .dn { font-family: var(--mono); font-size: 13px; font-weight: 500; display: flex; justify-content: space-between; align-items: center; }
.day.today .dn span:first-child { background: var(--brand); color: var(--on-brand); border-radius: 999px; padding: 0 7px; }
.day.alert { background: var(--alert-bg); box-shadow: inset 0 0 0 1px var(--alert-line); }
.day.alert:hover { background: color-mix(in srgb, var(--alert-bg) 80%, var(--alert)); }
.day.sel { box-shadow: inset 0 0 0 2px var(--brand); }
.day .badge { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--alert); }
.chip-ev { font-size: 11.5px; line-height: 1.3; padding: 2px 5px; border-radius: 5px; background: var(--info-bg); color: var(--info);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chip-ev b { font-weight: 700; }
.chip-ev.action { background: var(--surface); color: var(--alert); border: 1px solid var(--alert-line); font-weight: 600; }
.chip-ev.done { background: var(--ok-bg); color: var(--ok); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.more { font-size: 11px; color: var(--muted); }

/* 이벤트 목록 */
.evlist { display: grid; gap: 8px; }
.ev { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; border-left: 4px solid var(--info); }
.ev.action { border-left-color: var(--alert); }
.ev.done { border-left-color: var(--ok); opacity: .85; }
.ev-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ev-co { font-weight: 700; }
.ev-co button { all: unset; cursor: pointer; font-weight: 700; color: var(--text); border-bottom: 1px dashed var(--muted); }
.ev-what { font-size: 14px; }
.ev-act { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ev-act select { border: 1px solid var(--line); border-radius: 7px; padding: 3px 6px; background: var(--surface); font-size: 13px; }

.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.pill.alert { background: var(--alert-bg); color: var(--alert); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.info { background: var(--info-bg); color: var(--info); }
.pill.y2025 { background: var(--y25-bg); color: var(--y25); }
.pill.y2026 { background: var(--y26-bg); color: var(--y26); }
.pill.y2027 { background: var(--y27-bg); color: var(--y27); }

.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 7px 12px; font-weight: 600; font-size: 13.5px; cursor: pointer; text-decoration: none; color: var(--text); display: inline-flex; gap: 5px; align-items: center; }
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.primary:hover { filter: brightness(1.08); color: var(--on-brand); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; border-radius: 7px; }
.btn.danger { color: var(--alert); }
.btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* 단계 화면 */
.stage-intro { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: end; }
.stage-intro h2 { font-size: 20px; margin: 0 0 4px; }
.stage-intro p { margin: 0; color: var(--muted); max-width: 70ch; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.cocard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.cocard h3 { margin: 0; font-size: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cocard .meta { font-size: 13px; color: var(--muted); }
.bar { height: 6px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checks li { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; font-size: 13.5px; }
.lv { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; white-space: nowrap; margin-top: 1px; }
.lv.ok { background: var(--ok-bg); color: var(--ok); }
.lv.check { background: var(--warn-bg); color: var(--warn); }
.lv.bad { background: var(--alert-bg); color: var(--alert); }
.lv.info { background: var(--info-bg); color: var(--info); }

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
th { background: var(--sunk); font-size: 12.5px; color: var(--muted); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td.wrap { white-space: normal; min-width: 180px; }
.rnd { display: grid; gap: 3px; justify-items: start; }

/* 마감 단계 */
.yeargrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ycol { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 8px; align-content: start; }
.ycol h4 { margin: 0; display: flex; justify-content: space-between; align-items: center; }
.cmp textarea { width: 100%; min-height: 56px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--surface); font-size: 13px; resize: vertical; }
.cmp th, .cmp td { white-space: normal; min-width: 170px; }
.cmp td:first-child, .cmp th:first-child { min-width: 120px; font-weight: 600; }

/* 폼·모달 */
dialog { border: 1px solid var(--line); border-radius: 16px; padding: 0; width: min(860px, 100% - 24px); max-height: min(92vh, 900px); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(10, 16, 30, .45); }
.dlg-head { position: sticky; top: 0; background: var(--surface); padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; z-index: 2; }
.dlg-head h2 { margin: 0; font-size: 18px; }
.dlg-body { padding: 16px 18px 20px; display: grid; gap: 16px; }
.dlg-body h3 { margin: 0 0 8px; font-size: 15px; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 12px; }
.field { display: grid; gap: 4px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .field .lab { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: var(--surface); min-width: 0; }
.field textarea { min-height: 260px; font-size: 13.5px; line-height: 1.6; resize: vertical; }
.months12 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.months12 input { padding: 6px; text-align: right; font-family: var(--mono); }
.doclist { display: grid; gap: 6px; }
.doc { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; font-size: 13.5px; padding: 6px 8px; border-radius: 8px; }
.doc:hover { background: var(--sunk); }
.doc small { display: block; color: var(--muted); }
.cols2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.note { font-size: 13px; color: var(--muted); background: var(--sunk); border-radius: 10px; padding: 10px 12px; margin: 0; }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; z-index: 99; box-shadow: var(--shadow); max-width: calc(100% - 32px); }

/* 잠금 화면 */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.gate .panel { width: min(440px, 100%); display: grid; gap: 12px; padding: 24px; }
.gate h1 { margin: 0; font-size: 22px; }
.gate p { margin: 0; color: var(--muted); }

.empty { text-align: center; padding: 28px 12px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); }


/* 근로계약서 */
.cgrid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.cpaper { background: #fff; color: #111; border: 1px solid var(--line); border-radius: 6px; padding: 28px 30px; overflow-x: auto; }
.contract { font: 14.5px/1.9 "Batang", "Nanum Myeongjo", serif; color: #111; }
.contract .ct { text-align: center; font-size: 22px; letter-spacing: .3em; margin: 0; }
.contract .cc-sub { text-align: center; margin: 0 0 14px; font-size: 13px; }
.contract .items { padding-left: 1.4em; margin: 10px 0; }
.contract .sub { list-style: "- "; padding-left: 1.2em; margin: 0; }
.contract .cf { font: inherit; color: #111; background: #f3f6ff; border: 0; border-bottom: 1px solid #8a94a8; padding: 0 4px; border-radius: 2px; max-width: 100%; }
.contract select.cf { padding: 0; }
.contract .cv { border-bottom: 1px solid #555; padding: 0 4px; }
.contract .ins label { margin-right: 8px; white-space: nowrap; }
.contract .ins span { margin-right: 10px; }
.contract .cdate { text-align: center; margin: 18px 0; }
.contract .party { width: 100%; border-collapse: collapse; font-size: 14px; }
.contract .party th, .contract .party td { border: 0; padding: 4px 6px; white-space: normal; background: none; color: #111; vertical-align: middle; }
.contract .party th { width: 70px; font-weight: 700; }
.sigslot { display: inline-flex; align-items: center; justify-content: center; width: 130px; height: 52px; border: 1.5px dashed #c62828; border-radius: 6px; background: #fff7f7; color: #c62828; font: 12px/1.2 sans-serif; cursor: pointer; vertical-align: middle; margin-left: 6px; }
.sigslot.signed { border: 1px solid #c9d1e0; background: #fff; }
.sigslot img { max-width: 100%; max-height: 100%; }
.contract.print .sigslot { border: 0; background: none; color: #666; cursor: default; }
.contract .audit { font: 11px/1.5 monospace; color: #555; margin-top: 16px; border-top: 1px solid #ddd; padding-top: 6px; }
.cside h3 { font-size: 15px; margin: 0 0 8px; }
.cside { position: sticky; top: 70px; }
dialog.wide { width: min(1180px, 100% - 24px); }
.padwrap { position: fixed; inset: 0; background: rgba(10, 16, 30, .55); display: grid; place-items: center; z-index: 50; padding: 16px; }
.padbox { background: var(--surface); border-radius: 14px; padding: 16px; display: grid; gap: 10px; max-width: 100%; }
.padbox h3 { margin: 0; font-size: 16px; }
.padc { background: #fff; border: 1px solid var(--line); border-radius: 8px; touch-action: none; cursor: crosshair; max-width: 100%; }
#printArea { display: none; }
@media (max-width: 860px) { .cgrid { grid-template-columns: minmax(0, 1fr); } .cside { position: static; } .cpaper { padding: 18px 14px; } }
@media print {
  body.printing > *:not(#printArea), body.printing dialog { display: none !important; }
  body.printing #printArea { display: block !important; padding: 18mm 16mm; }
  body.printing { background: #fff; }
  @page { size: A4; margin: 0; }
}
@media (max-width: 980px) {
  .board { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day { min-height: 56px; padding: 4px; }
  .day .chip-ev, .day .more { display: none; }
  .day .dn { flex-direction: column; align-items: flex-start; gap: 2px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .months12 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .brand small { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* 임금명세서 (A4 위쪽 절반: 명세표 / 아래쪽: 계산 방법) */
.slip { font: 12px/1.5 "IBM Plex Sans KR", "Malgun Gothic", sans-serif; color: #111; }
.slip table { width: 100%; border-collapse: collapse; }
.slip th, .slip td { border: 1px solid #9aa3b5; padding: 4px 7px; white-space: normal; color: #111; background: none; font-size: 12px; vertical-align: middle; }
.slip th { background: #eef1f7; font-weight: 700; color: #111; }
.slip .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.slip-h { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #111; margin-bottom: 8px; }
.slip-h h2 { margin: 0; font-size: 19px; letter-spacing: .2em; }
.slip-h p { margin: 0; font-weight: 700; }
.slip-meta { margin-bottom: 6px; }
.slip-meta th { width: 15%; }
.slip-main thead th { text-align: center; }
.slip-main td:nth-child(1), .slip-main td:nth-child(3) { width: 25%; }
.slip-main .sum td { background: #f6f7fb; font-weight: 700; }
.slip-main .net td { background: #e8eeff; font-weight: 700; font-size: 13.5px; }
.slip-sub { margin: 5px 0; font-size: 11px; color: #333; }
.slip-calc { margin-top: 14px; padding-top: 10px; border-top: 1px dashed #888; }
.slip-calc h3 { margin: 0 0 4px; font-size: 13px; }
.slip-calc th, .slip-calc td { font-size: 10.5px; padding: 3px 6px; }
.slip-calc td:first-child { width: 7%; text-align: center; }
.slip-calc td:nth-child(2) { width: 16%; }
.slip-foot { font-size: 10px; color: #444; margin: 6px 0 0; }
@media print { body.printing #printArea .slip { font-size: 11px; } }
.tablewrap input:not([type="checkbox"]) { width: 100%; min-width: 90px; border: 1px solid var(--line); border-radius: 7px; padding: 5px 7px; background: var(--surface); color: var(--text); font: inherit; }

/* 직원 화면 (출퇴근) */
.wv { display: grid; gap: 14px; }
.wv-punch { display: grid; gap: 12px; }
.wv-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.wv-top h2 { font-size: 20px; margin: 2px 0 0; }
.wv-clock { display: grid; text-align: right; }
.wv-clock b { font: 700 32px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.wv-clock span { color: var(--muted); font-size: 13px; }
.wv-state { margin: 0; font-weight: 600; color: var(--muted); }
.wv-big { height: 96px; border: 0; border-radius: 20px; font: 700 26px/1 var(--font); background: var(--brand); color: var(--on-brand); cursor: pointer; }
.wv-big.out { background: var(--ok); color: var(--surface); }
.wv-big:disabled { opacity: .6; cursor: progress; }
.wv-test { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 10px; }
.wv-test input[type="datetime-local"] { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; background: var(--surface); font-family: var(--mono); }
.note.ok { background: var(--ok-bg); color: var(--ok); }
.wv-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.wv-stats .panel { display: grid; gap: 4px; padding: 12px 14px; }
.wv-stats b { font: 700 24px/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.bar { position: relative; display: block; height: 5px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.bar.big { height: 8px; overflow: visible; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.bar i.over { background: var(--warn); } .bar i.bad { background: var(--alert); }
.bar em { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--text); opacity: .5; }
.wv-calwrap { border: 0; }
.wv-cal { table-layout: fixed; min-width: 640px; }
.wv-cal th, .wv-cal td { padding: 3px; border: 1px solid var(--line); text-align: center; vertical-align: top; white-space: normal; }
.wv-cal th.sun { color: var(--alert); } .wv-cal th.sat { color: var(--info); }
.wv-cal td.wv-empty { background: var(--sunk); }
.wv-day { width: 100%; min-height: 74px; border: 0; border-radius: 6px; background: none; display: grid; gap: 2px; align-content: start; text-align: left; padding: 4px; cursor: pointer; color: var(--text); font: inherit; }
.wv-day .n { font: 500 12px var(--mono); }
.wv-day .t { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wv-day .h { font: 700 13px var(--mono); }
.wv-day.ok { background: var(--ok-bg); } .wv-day.over { background: var(--warn-bg); } .wv-day.warn { background: color-mix(in srgb, var(--warn-bg) 55%, transparent); }
.wv-day.bad { background: var(--alert-bg); box-shadow: inset 0 0 0 1px var(--alert-line); } .wv-day.bad .t { color: var(--alert); font-weight: 700; }
.wv-day.on { background: var(--info-bg); } .wv-day.miss .t { color: var(--alert); }
.wv-day.today .n { background: var(--brand); color: var(--on-brand); border-radius: 999px; padding: 0 6px; justify-self: start; }
.wv-day.sel { box-shadow: inset 0 0 0 2px var(--brand); }
.wv-cal td.wv-wk { background: var(--sunk); font-size: 12px; display: table-cell; }
.wv-wk b { display: block; font: 700 14px var(--mono); } .wv-wk span { display: block; color: var(--muted); }
.legend .l-over { background: var(--warn-bg); } .legend .l-warn { background: color-mix(in srgb, var(--warn-bg) 55%, transparent); }
.rolebar { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.rolebar button { border: 0; background: var(--surface); padding: 6px 12px; font: 600 13px var(--font); cursor: pointer; color: var(--muted); }
.rolebar button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.rolepick { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.rolepick .panel { display: grid; gap: 10px; align-content: start; }
@media (max-width: 640px) {
  .wv-stats { grid-template-columns: minmax(0, 1fr); } .wv-big { height: 84px; }
  .wv-cal { min-width: 0; } .wv-cal th { font-size: 11px; padding: 3px 1px; } .wv-cal td { padding: 1px; }
  .wv-day { min-height: 50px; padding: 3px 2px; } .wv-day .t { display: none; } .wv-day.bad .t, .wv-day.miss .t { display: block; font-size: 9.5px; }
  .wv-day .h { font-size: 10.5px; } .wv-wk b { font-size: 11px; } .wv-wk span { font-size: 9.5px; }
  .wv-clock b { font-size: 28px; }
}

.lawlink { color: var(--brand); text-decoration: underline dotted; text-underline-offset: 2px; }
.lawlink:hover { text-decoration-style: solid; }
