/* LegalCheck Finance — design system v3 (soft light, flat sections, mobile-first) */
:root{
  --brand:#3323E4; --brand-2:#5B4CFF; --brand-3:#8F86FF; --brand-d:#2418B5; --brand-soft:#EEF0FF; --brand-soft-2:#F6F7FF; --brand-ink:#3323E4;
  --navy:#0B0B1E; --navy-ink:#FFFFFF;
  --bg:#F4F4F6; --surface:#FFFFFF; --sunken:#F4F4F6; --sunken-2:#E9E9EE; --line:rgba(11,11,30,.06); --line-2:rgba(11,11,30,.10);
  --ink:#0B0B1E; --ink-2:#3B3F55; --muted:#6B7185; --faint:#A9ACBA;
  --in:#1B7A3D; --in-bg:#E3F5EA; --ex:#B42318; --ex-bg:#FDECEB;
  --warn:#8A5A00; --warn-bg:#FFF4D6;
  --c-in:#3323E4; --c-ex:#0B0B1E; --c-line:#8F86FF;
  --d1:#3323E4; --d2:#5B4CFF; --d3:#8F86FF; --d4:#C3BEFF; --d5:#0B0B1E; --d6:#6B7185; --d7:#D5D6DE;
  --ring:0 0 0 1px rgba(11,11,30,.06);
  --sh-1:0 1px 2px rgba(11,11,30,.04), 0 0 0 1px rgba(11,11,30,.04);
  --sh-2:0 14px 34px -12px rgba(11,11,30,.16), 0 0 0 1px rgba(11,11,30,.05);
  --sh-3:0 30px 80px -20px rgba(11,11,30,.30);
  --sh-btn:0 1px 2px rgba(11,11,30,.06), 0 0 0 1px rgba(11,11,30,.07);
  --r:22px; --r-s:12px; --r-xs:9px;
  --side:240px; --top:64px; --tab:62px;
  --glass:rgba(244,244,246,.8); --glass-2:rgba(255,255,255,.8); --glass-3:rgba(255,255,255,.9);
  --font:"Pretendard Variable","Pretendard","Apple SD Gothic Neo","Malgun Gothic",system-ui,sans-serif;
  --en:"Poppins","Pretendard Variable","Pretendard",sans-serif;
}
:root[data-theme="dark"]{
  --brand:#8F86FF; --brand-2:#A59DFF; --brand-3:#C3BEFF; --brand-d:#6A5CFF; --brand-soft:#23214A; --brand-soft-2:#1B1A36; --brand-ink:#B4ADFF;
  --navy:#F2F2F7; --navy-ink:#0B0B1E;
  --bg:#0B0B12; --surface:#15151E; --sunken:#1D1D28; --sunken-2:#272734; --line:rgba(255,255,255,.06); --line-2:rgba(255,255,255,.11);
  --ink:#F2F2F7; --ink-2:#C4C6D4; --muted:#8A8DA0; --faint:#4A4C5E;
  --in:#4CC38A; --in-bg:#14301F; --ex:#FF8A80; --ex-bg:#3A1D1D; --warn:#F0B44C; --warn-bg:#352812;
  --c-in:#8F86FF; --c-ex:#E6E6EE; --c-line:#4CC38A;
  --d1:#8F86FF; --d2:#6A5CFF; --d3:#C3BEFF; --d4:#4B43B8; --d5:#E6E6EE; --d6:#8A8DA0; --d7:#3A3B4C;
  --ring:0 0 0 1px rgba(255,255,255,.07);
  --sh-1:0 0 0 1px rgba(255,255,255,.05);
  --sh-2:0 14px 34px -12px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.07);
  --sh-3:0 30px 80px -20px rgba(0,0,0,.8);
  --sh-btn:0 0 0 1px rgba(255,255,255,.09);
  --glass:rgba(11,11,18,.8); --glass-2:rgba(21,21,30,.84); --glass-3:rgba(21,21,30,.92);
  color-scheme:dark;
}
@font-face{font-family:"Pretendard Variable"; font-weight:45 920; font-style:normal; font-display:swap; src:url("/fonts/PretendardVariable.woff2") format("woff2-variations"), url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/woff2/PretendardVariable.woff2") format("woff2-variations")}
@font-face{font-family:"Poppins"; font-weight:500; font-style:normal; font-display:swap; src:url("/fonts/poppins-latin-500-normal.woff2") format("woff2")}
@font-face{font-family:"Poppins"; font-weight:600; font-style:normal; font-display:swap; src:url("/fonts/poppins-latin-600-normal.woff2") format("woff2")}
*{box-sizing:border-box}
[hidden]{display:none !important}
html,body{margin:0;padding:0}
html{-webkit-text-size-adjust:100%; scroll-behavior:smooth}
body{
  background:var(--bg); color:var(--ink); font-family:var(--font);
  font-size:15px; font-weight:450; line-height:1.5; -webkit-font-smoothing:antialiased; letter-spacing:-.01em; word-break:keep-all;
  padding-top:var(--top); padding-left:var(--side); min-height:100vh;
}
body.lock{overflow:hidden}
h1,h2,h3{margin:0; font-weight:650; letter-spacing:-.03em}
b,strong{font-weight:600}
a{color:var(--brand); text-decoration:none}
button{font-family:inherit}
.ic{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round;flex:none}
.ic-s{width:16px;height:16px} .ic-xs{width:13px;height:13px;vertical-align:-2px;margin-right:2px}
.muted{color:var(--muted); font-weight:500; font-size:13px}
.eyebrow{font-size:12.5px; font-weight:550; color:var(--muted); margin-bottom:8px}
.label{font-family:var(--en); font-size:11px; font-weight:600; letter-spacing:2.4px; text-transform:uppercase; color:var(--muted)} .label b{color:var(--brand); font-weight:600}

/* ── 사이드바 (데스크톱) ── */
.side{
  position:fixed; left:0; top:0; bottom:0; width:var(--side); z-index:50; display:flex; flex-direction:column;
  background:var(--surface); box-shadow:1px 0 0 var(--line); padding:18px 14px 14px;
}
.brand{display:flex; align-items:center; gap:10px; flex:none; padding:6px 10px; color:var(--brand)}
.brand .wm{height:34px; width:auto; display:block; color:var(--brand)}
.brand-sub{font-family:var(--en); font-size:10.5px; font-weight:600; letter-spacing:2.4px; text-transform:uppercase; color:var(--ink); padding:3px 0 0 10px; box-shadow:-1px 0 0 var(--line-2); line-height:1.2}
.sidenav{flex:1; overflow:auto; margin-top:18px; scrollbar-width:none}
.sidenav::-webkit-scrollbar{display:none}
.ng{margin-bottom:14px}
.ng-t{font-size:11.5px; font-weight:600; color:var(--muted); padding:8px 12px 6px}
.sidenav a,.ng-grid a{
  display:flex; align-items:center; gap:11px; padding:10px 14px; border-radius:999px; color:var(--ink-2); font-weight:550; font-size:14.5px;
  transition:background .12s, color .12s;
}
.sidenav a .ic,.ng-grid a .ic{width:18px; height:18px; color:var(--muted); stroke-width:1.9}
.sidenav a:hover{background:var(--sunken); color:var(--ink)} .sidenav a:hover .ic{color:var(--ink-2)}
.sidenav a.on{background:var(--ink); color:var(--surface); font-weight:600} .sidenav a.on .ic{color:var(--surface)}
.me{display:flex; align-items:center; gap:10px; border:0; background:var(--sunken); border-radius:16px; padding:10px 12px; cursor:pointer; text-align:left; color:var(--ink); width:100%}
.me:hover{background:var(--sunken-2)}
.av{width:34px; height:34px; border-radius:50%; background:var(--ink); color:var(--surface); font-weight:700; font-size:14px; display:grid; place-items:center; flex:none}
.me .mt{min-width:0; display:flex; flex-direction:column; gap:1px}
.me b{font-size:13.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.me small{font-size:11.5px; color:var(--muted); font-weight:600}

/* ── 상단바 ── */
.topbar{
  position:fixed; top:0; right:0; left:var(--side); height:var(--top); z-index:40;
  background:var(--glass); backdrop-filter:saturate(160%) blur(14px); -webkit-backdrop-filter:saturate(160%) blur(14px);
  display:flex; align-items:center; gap:12px; padding:0 26px;
}
.crumb{flex:1; min-width:0; display:flex; align-items:center; gap:8px; font-size:13.5px; color:var(--muted); font-weight:600; white-space:nowrap; overflow:hidden}
.crumb b{color:var(--ink); font-weight:600}
.crumb-sep{color:var(--faint)}
.topbar-actions{display:flex; align-items:center; gap:8px; flex:none}
.ib{border:0; background:var(--surface); width:40px; height:40px; border-radius:50%; display:grid; place-items:center; cursor:pointer; color:var(--ink-2); box-shadow:var(--sh-btn); position:relative}
.ib:hover{color:var(--ink); box-shadow:var(--sh-2)}
.topbar .menu-btn,.topbar .brand-m,.topbar .me-m{display:none}
.ib .dot{position:absolute; top:7px; right:8px; width:8px; height:8px; border-radius:50%; background:var(--ex); box-shadow:0 0 0 2px var(--surface)}
.chip{
  border:0; cursor:pointer; background:var(--surface); color:var(--ink-2); box-shadow:var(--sh-btn);
  height:40px; padding:0 16px; border-radius:999px; font:inherit; font-size:13.5px; font-weight:600;
  display:flex; align-items:center; gap:7px; position:relative; transition:transform .12s, box-shadow .15s;
}
.chip-approve{background:var(--brand); color:#fff; box-shadow:none}
.chip-approve b{background:rgba(255,255,255,.24); border-radius:999px; padding:1px 8px; font-size:12.5px}
.chip:hover{transform:translateY(-1px)}

/* ── 로그인 ── */
.login{position:fixed; inset:0; z-index:200; display:flex; align-items:center; justify-content:center; padding:20px; background:var(--bg);
  background-image:linear-gradient(var(--line) 1px,transparent 1px),linear-gradient(90deg,var(--line) 1px,transparent 1px); background-size:96px 96px}
.login-box{position:relative; width:100%; max-width:400px; background:var(--surface); border-radius:28px; padding:34px 30px 28px; box-shadow:var(--sh-2)}
.login-brand{margin:0 0 26px -10px}
.login-box h1{font-size:26px; margin:0 0 6px}
.login-box p{margin:0 0 18px}
.login-box select,.login-box input{width:100%; font-size:16px; font-weight:600; padding:13px 14px; border:0; background:var(--sunken); border-radius:14px; margin-top:6px}
.login-box .btn.p{width:100%; margin-top:18px; padding:14px; font-size:16px; justify-content:center}
.login-err{margin-top:12px; color:var(--ex); font-weight:700; font-size:13.5px}
body.viewer .only-write{display:none !important}

/* ── 레이아웃 ── */
#main{max-width:1180px; margin:0 auto; padding:22px 30px 80px}
.head{display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:18px; flex-wrap:wrap}
.head h1{font-size:28px}
.head .sub{margin-top:5px; color:var(--muted); font-size:13.5px; font-weight:500}
.grid{display:grid; gap:14px}
.g2{grid-template-columns:repeat(2,1fr)} .g3{grid-template-columns:repeat(3,1fr)} .g4{grid-template-columns:repeat(4,1fr)}
.split{display:grid; grid-template-columns:1.7fr 1fr; gap:22px; align-items:start}
.sec{background:var(--surface); border-radius:var(--r); box-shadow:var(--sh-1); padding:6px 22px 10px; margin-bottom:18px}
.sec + .sec{margin-top:0}
.sec-h{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 0 10px; flex-wrap:wrap}
.sec-h h2,.sec > h2{font-size:16px; color:var(--ink); font-weight:650; padding:14px 0 10px; display:flex; align-items:center; gap:8px}
.sec-h h2{padding:0}
.sec > h2 + *{margin-top:0}
.sec-h a{font-size:13px; font-weight:600}
.sec .toolbar,.sec .grid,.sec .hint,.sec .warnbox,.sec .tasklist,.sec .wrap{margin-bottom:12px}
.sec > .empty{margin:0}
.empty{padding:36px 16px; text-align:center; color:var(--muted); font-weight:500; font-size:13.5px}
.empty .ic{width:30px;height:30px; color:var(--faint); margin-bottom:8px}
.empty img{width:104px; height:104px; object-fit:contain; display:block; margin:0 auto 4px; opacity:.9}
.skel{padding:6px 0}
.skel i{display:block; border-radius:10px; margin:8px 0; background:linear-gradient(90deg,var(--sunken) 25%,var(--surface) 50%,var(--sunken) 75%); background-size:200% 100%; animation:sk 1.2s infinite}
@keyframes sk{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* ── KPI 스트립 (박스 없음) ── */
.kpis{display:grid; grid-template-columns:repeat(4,1fr); gap:0; margin:0 0 20px; background:var(--surface); border-radius:var(--r); box-shadow:var(--sh-1); overflow:hidden}
.kpis.two{grid-template-columns:repeat(2,1fr)}
.kpi{padding:20px 24px 18px; position:relative}
.kpi + .kpi{box-shadow:-1px 0 0 var(--line)}
.kpi .k{font-size:13px; font-weight:550; color:var(--ink-2); display:flex; align-items:center; gap:7px}
.kpi .k::before{content:""; width:6px; height:6px; border-radius:50%; background:var(--faint); flex:none}
.kpi .v{font-family:var(--en); font-size:28px; font-weight:600; letter-spacing:-.03em; margin-top:10px; line-height:1.1; color:var(--ink)}
.kpi .d{margin-top:6px; font-size:12.5px; color:var(--muted); font-weight:500}
.kpi.in .k::before{background:var(--in)} .kpi.ex .k::before{background:var(--ink)} .kpi.br .k::before{background:var(--brand)} .kpi.wa .k::before{background:var(--warn)}
.kpi .v.neg{color:var(--ex)}
.kpi.clickable{cursor:pointer} .kpi.clickable:hover{background:var(--brand-soft-2)}

/* ── 필터 바 ── */
.bar-f{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px}
.bar-f .toolbar{width:100%}
.chips{display:flex; gap:6px; flex-wrap:wrap; align-items:center}
.chip-f{border:0; background:var(--surface); color:var(--ink-2); font:inherit; font-size:13.5px; font-weight:550; padding:9px 16px; border-radius:999px; cursor:pointer; box-shadow:var(--sh-btn); display:inline-flex; align-items:center; gap:6px}
.chip-f b{background:var(--sunken); color:var(--ink-2); border-radius:999px; padding:0 7px; font-size:11.5px}
.chip-f:hover{color:var(--ink)}
.chip-f.on{background:var(--navy); color:var(--navy-ink)} .chip-f.on b{background:rgba(128,128,160,.25); color:var(--navy-ink)}
.search{position:relative; flex:1; min-width:180px; max-width:340px}
.search .sic{position:absolute; left:11px; top:50%; transform:translateY(-50%); color:var(--muted); display:grid}
.search input{padding-left:34px; background:var(--surface); box-shadow:var(--sh-btn); border-radius:999px; padding-top:9px; padding-bottom:9px}
.bar-f .btn.on{background:var(--brand-soft); color:var(--brand-ink)}
.bar-f .btn.on b{background:var(--brand); color:#fff; border-radius:999px; padding:0 6px; font-size:11px}
.adv{display:grid; grid-template-columns:repeat(6,1fr) auto; gap:10px; align-items:end; background:var(--surface); border-radius:var(--r-s); padding:14px 16px; margin-bottom:14px; box-shadow:var(--sh-1)}
.adv-a{display:flex; gap:6px}
.sums{display:flex; gap:22px; flex-wrap:wrap; align-items:baseline}
.sums span{display:flex; flex-direction:column; gap:2px}
.sums small{font-size:11.5px; color:var(--muted); font-weight:600}
.sums b{font-size:16px}

/* ── 리스트 (표 대체) ── */
.lst{display:flex; flex-direction:column}
.lh,.lr{display:grid; align-items:center; gap:12px; padding:0 4px}
.lh{font-size:11.5px; font-weight:700; color:var(--muted); padding:8px 4px; box-shadow:inset 0 -1px 0 var(--line-2)}
.lr{padding:12px 4px; box-shadow:inset 0 -1px 0 var(--line); cursor:pointer; transition:background .12s; border-radius:8px}
.lr:last-child{box-shadow:none}
.lr:hover{background:var(--brand-soft-2)}
.lr.dim{opacity:.55}
.lr > span{min-width:0}
.lr .c-date{display:flex; flex-direction:column; font-weight:700; font-variant-numeric:tabular-nums; font-size:14px}
.lr .c-date small{font-weight:600; color:var(--muted); font-size:11.5px}
.lr .c-main{display:flex; flex-direction:column; gap:2px}
.lr .c-main b{font-size:14.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.lr .c-main small{color:var(--muted); font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.lr .c-cat{display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:13px; font-weight:600; color:var(--ink-2)}
.lr .c-amt{text-align:right; font-size:15px}
.lr .c-x{display:flex; justify-content:flex-end}
.lst.tx .lh,.lst.tx .lr{grid-template-columns:64px 1.6fr 1.2fr 110px 130px 36px}
.lst.tx.compact .lh,.lst.tx.compact .lr{grid-template-columns:64px 1.5fr 1fr 120px 36px}
.lst.rq .lh,.lst.rq .lr{grid-template-columns:110px 1.8fr 90px 130px 130px 36px}
.lst.cal .lh,.lst.cal .lr{grid-template-columns:90px 1.8fr 90px 92px 190px}
.num{text-align:right; font-variant-numeric:tabular-nums}
.amt{font-variant-numeric:tabular-nums; font-weight:650; letter-spacing:-.01em}
.amt.in{color:var(--in)} .amt.ex{color:var(--ink)} .amt.neg{color:var(--ex)}
.amt.big{font-family:var(--en); font-size:26px; font-weight:600}

/* 결재 대기 항목 (박스 없이 구분선) */
.li{padding:13px 4px; box-shadow:inset 0 -1px 0 var(--line); cursor:pointer; border-radius:8px}
.li:last-child{box-shadow:none}
.li:hover{background:var(--brand-soft-2)}
.li-t{display:flex; justify-content:space-between; gap:12px; align-items:baseline}
.li-t b{font-size:14.5px}
.li-s{font-size:12.5px; color:var(--muted); margin-top:3px}
.li-a{display:flex; gap:6px; flex-wrap:wrap; margin-top:9px; align-items:center}

/* ── 표 (통계·설정용) ── */
.wrap{overflow-x:auto; -webkit-overflow-scrolling:touch}
table{width:100%; border-collapse:separate; border-spacing:0; font-size:13.5px}
th{text-align:left; font-size:11.5px; color:var(--muted); font-weight:700; padding:9px 10px; white-space:nowrap; box-shadow:inset 0 -1px 0 var(--line-2)}
td{padding:11px 10px; font-weight:500; white-space:nowrap; color:var(--ink); box-shadow:inset 0 -1px 0 var(--line)}
tr:last-child td{box-shadow:none}
td b{font-weight:600}
td.num,th.num{text-align:right}
tbody tr:hover td{background:var(--brand-soft-2)}

/* ── 태그·버튼 ── */
.tag,.pill{display:inline-flex; align-items:center; gap:4px; padding:3px 9px; border-radius:999px; font-size:11.5px; font-weight:600; white-space:nowrap; line-height:1.6}
.tag.in,.pill.in{background:var(--in-bg); color:var(--in)} .tag.ex,.pill.ex{background:var(--ex-bg); color:var(--ex)}
.tag.br,.pill.br{background:var(--brand-soft); color:var(--brand-ink)} .tag.wa,.pill.wa{background:var(--warn-bg); color:var(--warn)}
.tag.gy,.pill.gy{background:var(--sunken); color:var(--ink-2)}
.btn{
  border:0; cursor:pointer; font:inherit; font-size:14px; font-weight:600; border-radius:999px;
  padding:10px 18px; background:var(--surface); color:var(--ink); display:inline-flex; align-items:center; gap:7px;
  box-shadow:var(--sh-btn); transition:transform .12s, box-shadow .15s, filter .15s, background .15s; white-space:nowrap;
}
.btn:hover{background:var(--sunken)} .btn:active{transform:none}
.btn .ic{width:17px;height:17px}
.btn.p{background:var(--ink); color:var(--surface); box-shadow:none}
.btn.p:hover{background:var(--ink-2)}
.btn.g{background:var(--brand); color:#fff; box-shadow:none} .btn.g:hover{background:var(--brand-d)}
.btn.r{background:var(--ex-bg); color:var(--ex); box-shadow:none} .btn.r:hover{background:#F9DAD8}
.btn.s{padding:7px 13px; font-size:12.5px}
.btn.ghost{background:transparent; color:var(--ink-2); box-shadow:none} .btn.ghost:hover{background:var(--sunken)}
.btn:disabled{opacity:.45; cursor:not-allowed; transform:none}
.row{display:flex; gap:9px; flex-wrap:wrap; align-items:center}
.clip{border:0; cursor:pointer; width:30px; height:30px; border-radius:50%; background:var(--brand-soft); color:var(--brand); display:inline-grid; place-items:center; padding:0; transition:transform .12s, background .15s}
.clip:hover{background:var(--brand); color:#fff; transform:scale(1.08)}
.progress{margin:0 0 18px; background:var(--surface); border-radius:var(--r-s); padding:14px 18px; box-shadow:var(--sh-1)}

/* ── 첨부 미리보기 ── */
.attach{display:flex; align-items:center; gap:12px; background:var(--sunken); border-radius:var(--r-s); padding:8px; cursor:pointer; max-width:440px; transition:background .15s}
.attach:hover{background:var(--brand-soft)}
.attach img{width:84px; height:84px; object-fit:cover; border-radius:10px; background:var(--surface); flex:none; box-shadow:var(--sh-btn)}
.attach .ph{width:84px; height:84px; border-radius:10px; background:var(--surface); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; color:var(--brand); font-size:11px; font-weight:700; flex:none; box-shadow:var(--sh-btn)}
.attach .ph .ic{width:26px; height:26px}
.attach .an{min-width:0}
.attach .an b{display:block; font-size:13.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.attach .an span{display:block; font-size:12px; color:var(--muted); margin-top:3px}
.viewer-modal .box{padding:0; width:min(960px,100%); background:var(--surface)}
.viewer-modal .grip{display:none}
.viewer .vh{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:14px 18px; box-shadow:0 1px 0 var(--line)}
.viewer .vh b{font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.viewer .vb{background:var(--sunken); display:flex; align-items:center; justify-content:center; min-height:300px; max-height:78vh; overflow:auto}
.viewer .vb img{max-width:100%; max-height:78vh; display:block}
.viewer .vb.pdf{height:78vh}
.viewer .vb iframe{width:100%; height:100%; border:0; background:var(--surface)}

/* ── 폼 ── */
label.f{display:block; font-size:12px; color:var(--ink-2); font-weight:600; margin:0 0 6px 2px}
input,select,textarea{
  width:100%; font:inherit; font-size:14px; font-weight:500; color:var(--ink);
  background:var(--sunken); border:0; border-radius:var(--r-s); padding:11px 13px; outline:none;
  transition:box-shadow .15s, background .15s;
}
input:focus,select:focus,textarea:focus{background:var(--surface); box-shadow:0 0 0 4px var(--brand-soft), 0 0 0 1.5px var(--brand)}
input[type=checkbox]{width:auto; accent-color:var(--brand)}
input[type=file]{padding:9px 12px; font-size:13px}
input:disabled{color:var(--muted)}
.toolbar{display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end}
.toolbar > div{min-width:126px}

/* ── 모달 / 시트 ── */
.modal{position:fixed; inset:0; background:rgba(11,11,30,.42); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); display:grid; place-items:center; padding:18px; z-index:80}
.modal .box{background:var(--surface); border-radius:26px; box-shadow:var(--sh-3); width:min(720px,100%); max-height:90vh; overflow:auto; padding:26px 28px}
.modal h3{font-size:20px; margin-bottom:16px}
.modal .grip{display:none}
.modal .foot{display:flex; gap:9px; justify-content:flex-end; margin-top:22px; flex-wrap:wrap; align-items:center}
.dh{display:flex; justify-content:space-between; align-items:flex-start; gap:14px; margin-bottom:16px}
.dh h3{margin:0}
.kv{display:grid; grid-template-columns:repeat(3,1fr); gap:12px 16px}
.kv > div b{font-size:14px; display:block}
.kv1{margin-top:14px}
.sheet{position:fixed; inset:0; z-index:90}
.sheet-bg{position:absolute; inset:0; background:rgba(11,11,30,.42); backdrop-filter:blur(4px)}
.sheet-box{position:absolute; left:0; right:0; bottom:0; background:var(--surface); border-radius:24px 24px 0 0; padding:8px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow:var(--sh-3); max-height:86vh; overflow:auto}
.grip{width:40px; height:5px; border-radius:999px; background:var(--sunken-2); margin:6px auto 12px}
.sheet-h{display:flex; justify-content:space-between; align-items:center; margin-bottom:6px}
.sheet-h b{font-size:16px}
.ng-grid{display:grid; grid-template-columns:repeat(2,1fr); gap:6px}
.ng-grid a{background:var(--sunken); justify-content:flex-start}
.ng-grid a.on{background:var(--brand-soft); color:var(--brand-ink)}
.sheet-me{display:flex; gap:8px; margin-top:14px}
.sheet-me .btn{flex:1; justify-content:center}

/* ── 결재 스텝 ── */
.step{display:flex; gap:6px; margin:12px 0}
.step div{flex:1; padding:9px 10px; border-radius:var(--r-xs); background:var(--sunken); font-size:12px; font-weight:600; color:var(--muted); text-align:center}
.step div.done{background:var(--in-bg); color:var(--in)}
.step div.now{background:var(--brand-soft); color:var(--brand-ink)}
.step div.rej{background:var(--ex-bg); color:var(--ex)}

/* ── 기타 ── */
.bar{height:9px; border-radius:999px; background:var(--sunken-2); overflow:hidden}
.bar i{display:block; height:100%; background:var(--ink); border-radius:999px}
.chart{width:100%; display:block}
.dl{display:flex; align-items:baseline; justify-content:space-between; padding:10px 0; gap:12px; box-shadow:inset 0 -1px 0 var(--line)}
.dl:last-child{box-shadow:none}
.dl b{font-variant-numeric:tabular-nums; font-size:14.5px}
.dday{display:inline-flex; align-items:center; justify-content:center; min-width:48px; padding:4px 9px; border-radius:var(--r-xs); font-size:12px; font-weight:700}
.dday.soon{background:var(--ex-bg); color:var(--ex)} .dday.near{background:var(--warn-bg); color:var(--warn)}
.dday.far{background:var(--sunken); color:var(--ink-2)} .dday.past{background:var(--navy); color:var(--navy-ink)}
#toast{position:fixed; left:50%; bottom:28px; transform:translateX(-50%); background:var(--navy); color:var(--navy-ink);
  padding:13px 22px; border-radius:var(--r-s); font-weight:600; font-size:14px; box-shadow:var(--sh-3); z-index:100; display:none; max-width:90vw}
.bottomnav{display:none}
.tasklist{display:flex; flex-direction:column}
.taskrow{display:flex; gap:12px; align-items:flex-start; padding:12px 2px; box-shadow:inset 0 -1px 0 var(--line)}
.taskrow:last-child{box-shadow:none}
.taskrow.done{opacity:.5}
.taskrow .tt{flex:1; min-width:0}
.taskrow .tt b{display:block; font-size:14px}
.check{width:24px;height:24px;border-radius:8px;background:var(--surface);box-shadow:inset 0 0 0 1.5px var(--line-2);cursor:pointer;flex:none;display:grid;place-items:center;margin-top:1px}
.check.on{background:var(--ink); box-shadow:none}
.check.on .ic{width:14px;height:14px;color:var(--surface)}
.legend{display:flex; gap:14px; flex-wrap:wrap; margin-top:10px}
.legend span{display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; color:var(--ink-2)}
.legend i{width:10px; height:10px; border-radius:3px; display:block}
.hint{background:var(--brand-soft-2); color:var(--brand-ink); border-radius:var(--r-s); padding:13px 15px; font-size:13px; font-weight:500; line-height:1.6}
.warnbox{background:var(--warn-bg); color:var(--warn); border-radius:var(--r-s); padding:13px 15px; font-size:13px; font-weight:500; line-height:1.6}
.fab span{display:inline}

/* ── 히어로 (홈 인사) ── */
.hero{position:relative; overflow:hidden; border-radius:var(--r); padding:30px 32px; margin-bottom:18px; display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap;
  background:var(--surface); box-shadow:var(--sh-1)}
.hero::before{content:""; position:absolute; inset:0; pointer-events:none;
  background-image:linear-gradient(var(--line) 1px,transparent 1px),linear-gradient(90deg,var(--line) 1px,transparent 1px); background-size:72px 72px;
  -webkit-mask-image:radial-gradient(70% 90% at 85% 50%,#000,transparent); mask-image:radial-gradient(70% 90% at 85% 50%,#000,transparent)}
.hero .hwm{position:absolute; right:-40px; top:-30px; width:300px; height:auto; color:var(--brand); opacity:.05; pointer-events:none}
.hero > *{position:relative}
.hero .label{display:block; margin-bottom:12px}
.hero h1{font-size:30px}
.hero .sub{margin-top:6px; color:var(--ink-2); font-size:14px; font-weight:500}
.hero-a{flex:none}

/* ── 증감 ── */
.delta{display:inline-flex; align-items:center; padding:2px 8px; border-radius:999px; font-size:12px; font-weight:600; margin-right:6px; font-variant-numeric:tabular-nums}
.delta.good{background:var(--in-bg); color:var(--in)} .delta.bad{background:var(--ex-bg); color:var(--ex)} .delta.flat{background:var(--sunken); color:var(--muted)}
.kpi .spark{position:absolute; right:16px; bottom:14px; width:96px; height:30px; opacity:.9}
.spark .sa{fill:var(--brand); opacity:.08} .spark .sl{fill:none; stroke:var(--brand); stroke-width:2; stroke-linejoin:round; stroke-linecap:round}
.spark.in .sa{fill:var(--in)} .spark.in .sl{stroke:var(--in)}

/* ── 오늘 할 일 ── */
.todo{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding-bottom:10px}
.split > div{min-width:0}
.td{display:flex; align-items:center; gap:12px; width:100%; text-align:left; border:0; cursor:pointer; font:inherit; color:var(--ink);
  background:var(--sunken); border-radius:16px; padding:13px 16px; transition:background .15s, transform .12s}
.td:hover{background:var(--brand-soft-2); transform:translateX(2px)} .td:hover .ta{color:var(--brand); transform:translateX(3px)}
.td .ti{width:38px; height:38px; border-radius:50%; display:grid; place-items:center; flex:none; background:var(--surface); color:var(--ink-2); box-shadow:var(--sh-btn)}
.td.br .ti{background:var(--brand-soft); color:var(--brand)} .td.wa .ti{background:var(--warn-bg); color:var(--warn)} .td.ex .ti{background:var(--ex-bg); color:var(--ex)}
.td .tt{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px}
.td .tt b{font-size:14.5px} .td .tt small{font-size:12.5px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.td .ta{color:var(--faint); transition:transform .15s, color .15s}
.empty.done .ic{color:var(--in); background:var(--in-bg); border-radius:50%; padding:8px; width:44px; height:44px}

/* ── 차트 ── */
.chart-wrap{position:relative; width:100%; user-select:none; -webkit-user-select:none}
.chart{display:block; width:100%; height:var(--h,260px); font-family:var(--font)}
.chart .cg{stroke:var(--line-2); stroke-width:1; stroke-dasharray:3 4} .chart .cg.z{stroke:var(--faint); stroke-dasharray:none; stroke-width:1.5}
.chart .cy,.chart .cx{fill:var(--muted); font-size:11.5px; font-weight:600; font-variant-numeric:tabular-nums}
.chart .cx{font-size:12.5px; fill:var(--ink-2)} .chart .cyr{font-size:10.5px; fill:var(--muted); font-weight:600}
.chart.noanim *{animation:none !important}
.chart .cb{transform-box:fill-box; transform-origin:50% 100%; animation:grow .5s cubic-bezier(.2,.8,.2,1) both; animation-delay:var(--d,0ms)}
.chart .cl{fill:none; stroke:var(--c-line); stroke-width:2.5; stroke-linejoin:round; stroke-linecap:round; stroke-dasharray:1200; animation:dash 1s ease-out both}
.chart .cd{fill:var(--surface); stroke:var(--c-line); stroke-width:2.5}
.chart .ch{fill:transparent} .chart .chl{fill:transparent; transition:fill .12s} .chart .chl.on{fill:var(--brand-soft-2)}
.ctip{position:absolute; top:10px; z-index:3; pointer-events:none; background:var(--navy); color:var(--navy-ink); border-radius:14px; padding:9px 12px; font-size:12.5px; box-shadow:var(--sh-2); min-width:150px}
.ctip b{display:block; font-size:12px; opacity:.75; margin-bottom:5px}
.ctip div{display:flex; align-items:center; gap:7px; padding:2px 0} .ctip i{width:9px; height:9px; border-radius:3px; flex:none}
.ctip span{flex:1; font-weight:600} .ctip em{font-style:normal; font-weight:700; font-variant-numeric:tabular-nums}
.legend i.ln{width:14px; height:3px; border-radius:2px; background:var(--c-line)}
@keyframes grow{from{transform:scaleY(.02); opacity:0}to{transform:scaleY(1); opacity:1}}
@keyframes dash{from{stroke-dashoffset:1200}to{stroke-dashoffset:0}}
.donut-c{container-type:inline-size}
.donut{display:grid; grid-template-columns:150px 1fr; gap:14px 18px; align-items:center; padding:6px 0 12px}
.donut svg{width:150px; height:150px; display:block}
.donut .ds{transition:opacity .15s, stroke-width .15s; cursor:pointer} .donut .ds:hover{stroke-width:30} .donut .ds.dim{opacity:.25}
.donut .dc1{fill:var(--muted); font-size:12px; font-weight:600} .donut .dc2{fill:var(--ink); font-family:var(--en); font-size:20px; font-weight:600; letter-spacing:-.02em}
.dlg{display:flex; flex-direction:column; gap:2px; min-width:0}
.dli{display:grid; grid-template-columns:10px 1fr auto auto; gap:8px; align-items:center; padding:5px 6px; border-radius:8px; font-size:13px; transition:opacity .15s, background .15s}
.dli:hover{background:var(--sunken)} .dli.dim{opacity:.35}
.dli i{width:10px; height:10px; border-radius:3px}
.dli .dn{font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap} .dli .dp{color:var(--muted); font-weight:600; font-variant-numeric:tabular-nums; width:38px; text-align:right}
.dli .dv{font-variant-numeric:tabular-nums; font-size:13px}
@container (max-width:420px){ .donut{grid-template-columns:1fr; justify-items:center; gap:8px} .dlg{width:100%} }

/* ── 지출결의서 (기관 결재 서식) ── */
.doc-modal .box{width:min(820px,100%)}
.doc{color:var(--ink)}
.doc-top{display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:8px}
.doc-co{display:flex; align-items:center; gap:8px; font-size:13px; font-weight:650; color:var(--ink-2)} .doc-co svg{width:22px; height:auto; color:var(--brand)}
.doc-no{font-size:12.5px; color:var(--muted); font-weight:600} .doc-no b{color:var(--ink); font-variant-numeric:tabular-nums; margin-left:4px}
.doc-title{text-align:center; font-size:26px; letter-spacing:.32em; padding:10px 0 18px; margin:0 0 0 .32em}
.doc-sign{display:flex; justify-content:flex-end; gap:0; margin-bottom:18px}
.sg{width:118px; display:flex; flex-direction:column; align-items:center; padding:10px 8px 10px; background:var(--sunken); position:relative}
.sg + .sg{box-shadow:-1px 0 0 var(--line-2)} .sg:first-child{border-radius:14px 0 0 14px} .sg:last-child{border-radius:0 14px 14px 0} .sg:only-child{border-radius:14px}
.sg small{font-size:11px; font-weight:700; color:var(--muted); letter-spacing:.08em}
.sg b{font-size:15px; margin-top:6px} .sg i{font-style:normal; font-size:11.5px; color:var(--muted); font-weight:600; min-height:15px}
.sg em{font-style:normal; font-size:11px; color:var(--muted); font-weight:600; min-height:14px; margin-top:4px; font-variant-numeric:tabular-nums}
.stamp{width:52px; height:52px; border-radius:50%; display:grid; place-items:center; font-weight:800; font-size:15px; letter-spacing:.06em; margin-top:8px; transform:rotate(-10deg); border:2.5px solid currentColor; box-shadow:inset 0 0 0 2px var(--surface), inset 0 0 0 3.5px currentColor}
.stamp.ok{color:#D23B36; animation:stampin .35s cubic-bezier(.2,1.4,.4,1) both} .stamp.no{color:#8A7A18; border-style:double}
.stamp.sent{color:var(--brand)} .stamp.wait{color:var(--faint); border-style:dashed; box-shadow:none; transform:none; font-size:12.5px; font-weight:700}
@keyframes stampin{from{transform:rotate(-10deg) scale(1.6); opacity:0}to{transform:rotate(-10deg) scale(1); opacity:1}}
.doc-t{width:100%; border-collapse:separate; border-spacing:0; font-size:14px; border-radius:14px; overflow:hidden; box-shadow:inset 0 0 0 1px var(--line-2)}
.doc-t th{width:92px; text-align:left; background:var(--sunken); color:var(--ink-2); font-size:12.5px; font-weight:700; padding:11px 14px; white-space:nowrap; box-shadow:inset 0 -1px 0 var(--line-2)}
.doc-t td{padding:11px 14px; font-weight:500; white-space:normal; box-shadow:inset 0 -1px 0 var(--line)}
.doc-t tr:last-child th,.doc-t tr:last-child td{box-shadow:none}
.doc-t td.num{text-align:left; font-variant-numeric:tabular-nums} .doc-t td.doc-desc{white-space:pre-wrap; line-height:1.6; min-height:52px}
.doc-t a{font-weight:600}
.doc-att{margin-top:14px}
.doc-hist{margin-top:14px; font-size:13px; color:var(--ink-2)} .doc-hist small{display:block; font-size:11.5px; color:var(--muted); font-weight:700; margin-bottom:4px} .doc-hist div{padding:3px 0}
.doc-foot{margin-top:12px; font-size:12.5px; color:var(--in); font-weight:600}

/* ── 마감 품질: 전환·눌림 ── */
#main.vin > *{animation:vin .32s cubic-bezier(.2,.8,.2,1) backwards}
#main.vin > *:nth-child(2){animation-delay:.04s} #main.vin > *:nth-child(3){animation-delay:.08s} #main.vin > *:nth-child(n+4){animation-delay:.12s}
@keyframes vin{from{opacity:0; transform:translateY(8px)}to{opacity:1; transform:none}}
.modal .box{animation:pop .22s cubic-bezier(.2,.9,.3,1.2) both}
@keyframes pop{from{opacity:0; transform:translateY(10px) scale(.98)}to{opacity:1; transform:none}}
.sheet-box{animation:up .26s cubic-bezier(.2,.8,.2,1) both} .sheet-bg,.modal{animation:fade .2s both}
@keyframes up{from{transform:translateY(40px)}to{transform:none}} @keyframes fade{from{opacity:0}to{opacity:1}}
.btn:active,.chip-f:active,.td:active,.ib:active{transform:scale(.97) !important}
.lr:active,.li:active{background:var(--brand-soft)}
#toast.show{animation:tst .25s cubic-bezier(.2,.9,.3,1.2) both} #toast.bad{background:var(--ex); color:#fff}
@keyframes tst{from{opacity:0; transform:translate(-50%,10px)}to{opacity:1; transform:translate(-50%,0)}}
.eart{width:120px; height:90px; display:block; margin:0 auto 6px}
.eart .e1{fill:var(--sunken)} .eart .e2{fill:var(--sunken-2)} .eart .e3{fill:var(--faint); opacity:.6} .eart .e4{fill:var(--brand-soft)} .eart .e5{fill:none; stroke:var(--brand); stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round}
@media(prefers-reduced-motion:reduce){*{animation:none !important; transition:none !important}}
#printArea{display:none}
body.pdf-mode *{animation:none !important; transition:none !important}
body.pdf-mode #login,body.pdf-mode #toast,body.pdf-mode .sheet,body.pdf-mode .modal{display:none !important}

/* ── 알림 설정 ── */
.pushbox{background:var(--sunken); border-radius:16px; padding:14px 16px; margin-bottom:6px}
.pb-t{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:4px} .pb-t b{font-size:14.5px}
.pb-dev{display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:10px} .pb-dev:empty{display:none} .pb-dev small{font-size:12px; color:var(--muted); margin-right:4px}
.steps-v{display:flex; flex-direction:column; gap:10px}
.steps-v div{display:flex; gap:12px; align-items:flex-start; background:var(--sunken); border-radius:14px; padding:12px 14px; line-height:1.55}
.steps-v b{width:24px; height:24px; border-radius:50%; background:var(--ink); color:var(--surface); display:grid; place-items:center; font-size:12.5px; flex:none}
.steps-v strong{font-weight:650}

/* ── 월 정산 ── */
.kind{font-weight:650; color:var(--brand)}
.choices{display:flex; flex-direction:column; gap:8px}
.choice{display:flex; align-items:center; gap:14px; width:100%; text-align:left; border:0; cursor:pointer; font:inherit; color:var(--ink); background:var(--sunken); border-radius:18px; padding:16px 18px; transition:background .15s}
.choice:hover{background:var(--brand-soft-2)} .choice > .ic{color:var(--muted)}
.choice .ti{width:42px; height:42px; border-radius:50%; background:var(--surface); display:grid; place-items:center; color:var(--brand); flex:none; box-shadow:var(--sh-btn)}
.choice .tt{flex:1; min-width:0; display:flex; flex-direction:column; gap:3px}
.choice .tt b{font-size:15.5px; display:flex; align-items:center; gap:8px} .choice .tt small{font-size:13px; color:var(--muted); line-height:1.5}
.choice em{font-style:normal; font-size:11px; font-weight:650; color:var(--surface); background:var(--ink); border-radius:999px; padding:2px 8px}
.mm-top{display:flex; gap:16px; align-items:flex-end; flex-wrap:wrap; margin-bottom:12px} .mm-top > div:first-child{width:170px}
.mm-sum{display:flex; gap:18px; flex-wrap:wrap} .mm-sum span{display:flex; flex-direction:column} .mm-sum small{font-size:11.5px; color:var(--muted)} .mm-sum b{font-size:16px; font-variant-numeric:tabular-nums} .mm-sum b.neg{color:var(--warn)}
.mm-cats{display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px} .mm-cats span{background:var(--sunken); border-radius:999px; padding:5px 11px; font-size:12.5px; color:var(--ink-2)} .mm-cats b{color:var(--ink); font-weight:600; margin-left:4px; font-variant-numeric:tabular-nums}
.mm-all{display:flex; align-items:center; gap:8px; font-size:13.5px; font-weight:600; padding:6px 4px}
.mm-list{display:flex; flex-direction:column; max-height:46vh; overflow:auto; border-radius:14px; background:var(--sunken); padding:4px}
.mm-row{display:grid; grid-template-columns:20px 44px minmax(0,1fr) auto 30px; gap:10px; align-items:center; padding:10px 10px; border-radius:10px; cursor:pointer}
.mm-row:hover{background:var(--surface)} .mm-row.warn .mm-v small em{font-style:normal; color:var(--warn); font-weight:650}
.mm-d{font-size:13px; font-weight:600; font-variant-numeric:tabular-nums; color:var(--ink-2)}
.mm-v{display:flex; flex-direction:column; min-width:0} .mm-v b{font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap} .mm-v small{font-size:12px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.mm-a{font-weight:650; font-variant-numeric:tabular-nums; font-size:14px}
.mm-row .clip:empty{display:none}
.doc-title.long{letter-spacing:.18em; margin-left:.18em}
.doc-sub{font-size:12.5px; font-weight:650; color:var(--muted); margin:18px 0 8px}
.doc-cats{display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:6px}
.doc-cats div{display:flex; justify-content:space-between; gap:8px; background:var(--sunken); border-radius:10px; padding:8px 12px; font-size:13px}
.doc-cats i{font-style:normal; color:var(--muted); font-size:12px} .doc-cats b{font-variant-numeric:tabular-nums; font-weight:600}
.doc-items{font-size:13px} .doc-items td small{display:block; color:var(--muted); font-size:11.5px; white-space:normal}
.doc-items td{white-space:nowrap; vertical-align:middle} .doc-items td:nth-child(2){white-space:normal; min-width:160px}
.doc-items tr.warn td{background:var(--warn-bg)}
.doc-items tfoot td{font-weight:650; box-shadow:inset 0 1px 0 var(--line-2)}

/* ── 도넛 세부 보기 ── */
.donut.clickable .ds{cursor:pointer}
button.dli{border:0; background:transparent; font:inherit; color:inherit; text-align:left; cursor:pointer; width:100%; grid-template-columns:10px 1fr auto auto 14px}
button.dli:hover{background:var(--sunken)} button.dli .dg{color:var(--faint); width:13px; height:13px; margin:0} button.dli:hover .dg{color:var(--brand)}
.dli .dn em{font-style:normal; font-size:11.5px; color:var(--muted); font-weight:500}
.dhint{grid-column:1/-1; font-size:12px; color:var(--muted); text-align:center}
.cd-vend{display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px} .cd-vend span{background:var(--sunken); border-radius:999px; padding:5px 11px; font-size:12.5px; color:var(--ink-2)} .cd-vend b{color:var(--ink); font-weight:600; margin-left:4px}

/* ── 월간 리포트 (A4 한 장) ── */
.onepage{max-width:900px; margin:0 auto; background:var(--surface); border-radius:var(--r); box-shadow:var(--sh-1); padding:34px 38px 26px; display:flex; flex-direction:column; gap:18px; font-size:13px}
.onepage h3{font-size:13px; font-weight:650; margin:0 0 8px; display:flex; justify-content:space-between; align-items:baseline} .onepage h3 span{font-size:11px; color:var(--muted); font-weight:500}
.op-h{display:flex; justify-content:space-between; align-items:flex-start; gap:16px; padding-bottom:16px; box-shadow:inset 0 -2px 0 var(--ink)}
.op-h .brand{padding:0} .op-h .brand .wm{height:30px}
.op-meta{text-align:right} .op-meta h2{font-size:22px; margin:6px 0 4px; letter-spacing:-.03em} .op-meta small{color:var(--muted); font-size:12px}
.op-kpis{display:grid; grid-template-columns:repeat(4,1fr); gap:0; background:var(--sunken); border-radius:14px}
.op-kpis div{padding:14px 16px; display:flex; flex-direction:column; gap:4px} .op-kpis div + div{box-shadow:-1px 0 0 var(--line-2)}
.op-kpis small{font-size:11.5px; color:var(--muted); font-weight:550}
.op-kpis b{font-family:var(--en); font-size:20px; font-weight:600; letter-spacing:-.02em} .op-kpis b.neg{color:var(--ex)}
.op-d{font-size:11.5px; font-weight:600} .op-d.good{color:var(--in)} .op-d.bad{color:var(--ex)} .op-d.flat{color:var(--muted); font-weight:500}
.op-points ul{margin:0; padding-left:18px; display:flex; flex-direction:column; gap:5px; line-height:1.6; color:var(--ink-2)} .op-points b{color:var(--ink); font-weight:650} .op-points b.neg{color:var(--ex)}
.op-two{display:grid; grid-template-columns:1.15fr 1fr; gap:22px}
.op-two .legend{margin-top:4px}
.op-cats{display:flex; flex-direction:column; gap:6px}
.oc{display:grid; grid-template-columns:92px minmax(0,1fr) auto 58px; gap:8px; align-items:center; font-size:12.5px}
.oc-n{overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:550}
.oc-b{height:8px; background:var(--sunken); border-radius:999px; overflow:hidden} .oc-b i{display:block; height:100%; background:var(--ink); border-radius:999px}
.oc b{font-variant-numeric:tabular-nums; font-weight:600} .oc em{font-style:normal; text-align:right; font-size:11.5px; color:var(--muted); font-variant-numeric:tabular-nums} .oc em.up{color:var(--ex)} .oc em.down{color:var(--in)}
.oc.rest .oc-n{color:var(--muted)}
.op-three{display:grid; grid-template-columns:1.3fr 1fr 1fr; gap:22px}
.op-top{margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:6px; counter-reset:t}
.op-top li{display:flex; justify-content:space-between; gap:10px; align-items:center; counter-increment:t}
.op-top li::before{content:counter(t); width:18px; height:18px; border-radius:50%; background:var(--sunken); font-size:10.5px; font-weight:650; display:grid; place-items:center; flex:none}
.op-top li span{flex:1; min-width:0; display:flex; flex-direction:column} .op-top li span b{font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.op-top li small{font-size:11px; color:var(--muted)} .op-top em{font-style:normal; font-weight:600; font-variant-numeric:tabular-nums}
.op-dl{display:flex; justify-content:space-between; gap:8px; padding:5px 0; box-shadow:inset 0 -1px 0 var(--line)} .op-dl b{font-variant-numeric:tabular-nums; font-weight:600}
.op-dl.tot{box-shadow:none} .op-dl.tot span{font-weight:650} .op-dl b.good{color:var(--in)} .op-dl b.warn{color:var(--warn)}
.op-note{display:block; color:var(--muted); font-size:11px; margin-top:2px; font-variant-numeric:tabular-nums}
.op-foot{display:flex; flex-direction:column; gap:10px; padding-top:12px; box-shadow:inset 0 1px 0 var(--line-2)}
.op-cal{display:flex; flex-wrap:wrap; gap:6px 16px} .op-cal span{font-size:12.5px} .op-cal b{font-variant-numeric:tabular-nums; margin-right:4px} .op-cal i{font-style:normal; font-size:10.5px; color:var(--warn)}
.op-disc{margin:0; font-size:10.5px; color:var(--muted); line-height:1.55}

/* ── 결재 후 수정 ── */
.edit-after{margin-top:16px; background:var(--sunken); border-radius:16px; padding:14px 16px}
.ea-sw{display:flex; gap:12px; align-items:flex-start; cursor:pointer} .ea-sw input{margin-top:3px; width:18px; height:18px}
.ea-sw span{display:flex; flex-direction:column; gap:4px} .ea-sw b{font-size:14.5px} .ea-sw small{font-size:12.5px; color:var(--muted); line-height:1.55}
.edit-after.ro{opacity:.75} .edit-after.ro .ea-sw{cursor:default}
.hist{display:flex; flex-direction:column; gap:8px}
.hi{background:var(--sunken); border-radius:12px; padding:10px 12px}
.hi-h{font-size:12px; color:var(--muted); font-weight:550; margin-bottom:4px}
.hi-d{display:flex; flex-wrap:wrap; gap:4px 14px; font-size:13px} .hi-d s{color:var(--muted)} .hi-d b{font-weight:650}
.doc-edits:empty{display:none}

/* ── 태블릿: 사이드바 숨김 ── */
@media(max-width:1080px){
  body{padding-left:0}
  .side{display:none}
  .topbar{left:0; padding:0 16px; background:var(--glass-2); box-shadow:0 1px 0 var(--line)}
  .topbar .menu-btn{display:grid} .topbar .brand-m{display:flex} .topbar .me-m{display:grid}
  .crumb{display:none}
  #main{padding:20px 18px 80px}
  .g4{grid-template-columns:repeat(2,1fr)} .split{grid-template-columns:minmax(0,1fr); gap:0; align-items:stretch}
  .adv{grid-template-columns:repeat(3,1fr)}
  .adv-a{grid-column:span 3; justify-content:flex-end}
}
/* ── 모바일 ── */
@media(max-width:720px){
  :root{--top:56px}
  body{padding-bottom:calc(var(--tab) + env(safe-area-inset-bottom))}
  .brand-m .brand-sub{display:none} .brand-m .wm{height:28px}
  .chip-l{display:none}
  .chip-approve{padding:0 10px 0 12px}
  #main{padding:14px 14px 96px}
  .head{margin-bottom:14px} .head h1{font-size:22px}
  .hero{padding:18px 18px 16px; border-radius:18px; margin-bottom:14px} .hero h1{font-size:22px} .hero .sub{font-size:13px}
  .hero-a{width:100%} .hero-a .btn:not(.fab){flex:1; justify-content:center}
  .kpi .spark{display:none}
  .todo{grid-template-columns:minmax(0,1fr); gap:6px}
  .doc-title{font-size:21px; padding:6px 0 14px} .doc-sign{justify-content:stretch} .sg{flex:1; width:auto; padding:8px 4px} .stamp{width:44px; height:44px; font-size:13px}
  .doc-t th{width:72px; padding:9px 10px} .doc-t td{padding:9px 10px}
  .doc-title.long{font-size:18px; letter-spacing:.08em; margin-left:.08em}
  .onepage{padding:20px 16px; border-radius:18px; gap:16px}
  .op-h{flex-direction:column} .op-meta{text-align:left} .op-meta h2{font-size:19px}
  .op-kpis{grid-template-columns:1fr 1fr} .op-kpis div:nth-child(3){box-shadow:inset 0 1px 0 var(--line-2)} .op-kpis div:nth-child(4){box-shadow:-1px 0 0 var(--line-2), inset 0 1px 0 var(--line-2)}
  .op-kpis b{font-size:17px}
  .op-two,.op-three{grid-template-columns:minmax(0,1fr); gap:18px}
  .oc{grid-template-columns:84px minmax(0,1fr) auto 50px}
  .doc-items,.doc-items tbody,.doc-items tfoot{display:block} .doc-items thead{display:none}
  .doc-items tr{display:grid; grid-template-columns:40px minmax(0,1fr) auto auto; grid-template-areas:"d v a a" "d c e x"; gap:3px 10px; padding:10px 4px; box-shadow:inset 0 -1px 0 var(--line); align-items:center}
  .doc-items td{padding:0; box-shadow:none !important; white-space:normal; min-width:0 !important}
  .doc-items td:nth-child(1){grid-area:d; align-self:start; font-weight:600; color:var(--ink-2)} .doc-items td:nth-child(2){grid-area:v}
  .doc-items td:nth-child(3){grid-area:c; font-size:12px; color:var(--muted)} .doc-items td:nth-child(4){grid-area:e; justify-self:end}
  .doc-items td:nth-child(5){grid-area:a; font-weight:650} .doc-items td:nth-child(6){grid-area:x} .doc-items td:nth-child(6):empty{display:none}
  .doc-items tr.warn{background:var(--warn-bg); border-radius:10px} .doc-items tr.warn td{background:transparent}
  .doc-items tfoot tr{display:flex; justify-content:space-between; box-shadow:none} .doc-items tfoot td:last-child{display:none}
  .mm-top > div:first-child{width:100%} .mm-row{grid-template-columns:20px 38px minmax(0,1fr) auto; } .mm-row .clip{display:none}
  .head .row .btn:not(.fab){padding:8px 12px; font-size:13px}
  .sec{padding:2px 16px 8px; border-radius:18px; margin-bottom:14px}
  .kpis{grid-template-columns:repeat(2,1fr)}
  .kpi{padding:14px 16px 12px} .kpi:nth-child(n+3){box-shadow:inset 0 1px 0 var(--line)} .kpi:nth-child(3){box-shadow:inset 0 1px 0 var(--line)}
  .kpi .v{font-size:21px}
  .g2,.g3{grid-template-columns:1fr}
  .kv{grid-template-columns:1fr 1fr}
  .adv{grid-template-columns:1fr 1fr} .adv-a{grid-column:span 2}
  .search{max-width:none; min-width:0; width:100%}
  .toolbar > div{flex:1 1 140px; min-width:0} .toolbar > div:has(> .btn:only-child){flex:0 0 auto}
  /* 리스트 → 카드형 */
  .lh{display:none}
  .lst .lr{grid-template-columns:auto 1fr auto !important; grid-template-areas:"main main amt" "date cat x" "ev ev ev"; gap:4px 10px; padding:12px 2px; align-items:center}
  .lst .lr .c-main{grid-area:main} .lst .lr .c-main b{white-space:normal}
  .lst .lr .c-amt{grid-area:amt; align-self:start; font-size:15px; white-space:nowrap}
  .lst .lr .c-date{grid-area:date; flex-direction:row; gap:5px; align-items:baseline; font-size:12px; color:var(--muted); font-weight:600}
  .lst .lr .c-date small{font-size:12px}
  .lst .lr .c-cat{grid-area:cat; font-size:12px; justify-self:start}
  .lst .lr .c-x{grid-area:x; justify-self:end}
  .lst .lr .c-ev{grid-area:ev; justify-self:start} .lst .lr .c-ev:empty{display:none}
  .lst.rq .lr{grid-template-areas:"main main amt" "date who x" "st st st"}
  .lst.rq .lr .c-who{grid-area:who; font-size:12px; color:var(--muted); font-weight:600} .lst.rq .lr .c-st{grid-area:st; justify-self:start}
  .lst.cal .lr{grid-template-areas:"main main main" "date cat st" "x x x"}
  .lst.cal .lr .c-st{grid-area:st; justify-self:end}
  .lst.cal .lr .c-x{justify-self:stretch; width:100%; margin-top:4px} .lst.cal .lr .c-x .row{width:100%} .lst.cal .lr .c-x .btn{flex:1; justify-content:center}
  .split{display:flex; flex-direction:column; align-items:stretch; gap:0} .split > *{width:100%; min-width:0} .split > div:last-child{order:-1}
  .sums{gap:14px} .sums b{font-size:14px}
  .bar-f{display:grid; grid-template-columns:1fr auto; gap:8px}
  .bar-f .chips{grid-column:1/-1; flex-wrap:nowrap; overflow:auto; scrollbar-width:none; padding-bottom:2px}
  .bar-f .chips::-webkit-scrollbar{display:none}
  .bar-f .chip-f{flex:none}
  .head .sub{display:none}
  .hide-m{display:none !important}
  .modal{padding:0; place-items:end center}
  .modal .box{border-radius:24px 24px 0 0; max-height:92vh; padding:8px 18px calc(22px + env(safe-area-inset-bottom)); width:100%}
  .modal .grip{display:block}
  .modal .foot .btn{flex:1 1 auto; justify-content:center}
  .dh{flex-direction:column; gap:6px} .amt.big{font-size:22px}
  .bottomnav{
    display:flex; position:fixed; left:0; right:0; bottom:0; height:calc(var(--tab) + env(safe-area-inset-bottom));
    padding:6px 8px env(safe-area-inset-bottom); gap:4px; background:var(--glass-3); backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
    box-shadow:0 -1px 0 var(--line); z-index:40;
  }
  .bottomnav a{flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; color:var(--muted); font-size:10.5px; font-weight:600; border-radius:12px}
  .bottomnav a.on{color:var(--ink); background:transparent} .bottomnav a.on .ic{stroke-width:2.4}
  .bottomnav a .ic{width:22px;height:22px}
  .fab{position:fixed; right:16px; bottom:calc(var(--tab) + 16px + env(safe-area-inset-bottom)); z-index:45; padding:14px 20px; border-radius:999px; font-size:15px; box-shadow:0 14px 30px -8px rgba(11,11,30,.45)}
  .fab .ic{width:20px;height:20px}
  #toast{bottom:calc(var(--tab) + 84px + env(safe-area-inset-bottom))}
  .attach{max-width:none}
  th{padding:8px 8px; font-size:11px} td{padding:10px 8px; font-size:13px}
  .step div{font-size:11px; padding:8px 6px}
}
@page{size:A4; margin:10mm}
@media print{
  :root,:root[data-theme="dark"]{--bg:#FFFFFF; --surface:#FFFFFF; --sunken:#F2F2F5; --sunken-2:#E6E6EB; --line:rgba(11,11,30,.10); --line-2:rgba(11,11,30,.18);
    --ink:#0B0B1E; --ink-2:#3B3F55; --muted:#5E6378; --faint:#A9ACBA; --brand:#3323E4; --brand-ink:#3323E4; --brand-soft:#EEF0FF; --brand-soft-2:#F6F7FF;
    --in:#1B7A3D; --in-bg:#E3F5EA; --ex:#B42318; --ex-bg:#FDECEB; --warn:#8A5A00; --warn-bg:#FFF4D6; --c-in:#3323E4; --c-ex:#0B0B1E; --c-line:#8F86FF; color-scheme:light}
  *{-webkit-print-color-adjust:exact; print-color-adjust:exact}
  body.print-onepage #main > *:not(.onepage){display:none !important}
  body.print-onepage .onepage{max-width:none; box-shadow:none; border-radius:0; padding:0; gap:18px; font-size:12px}
  body.print-onepage .onepage *{animation:none !important}
  body.print-onepage .op-kpis b{font-size:19px} body.print-onepage .op-meta h2{font-size:21px}
  body.print-onepage .onepage h3{font-size:13.5px}
  body.print-onepage .chart{height:auto}
  body.print-onepage .op-points ul{gap:6px}
  body.printing > *:not(#printArea){display:none !important}
  body.printing #printArea{display:block; padding:24px}
  body.printing .doc-t{box-shadow:none; border:1px solid #333} body.printing .doc-t th,body.printing .doc-t td{border-bottom:1px solid #ccc; box-shadow:none}
  body.printing .sg{border:1px solid #333; background:#fff; box-shadow:none; border-radius:0 !important} body.printing .stamp{box-shadow:none}
  body.printing .stamp.ok{color:#D23B36} body.printing .doc-att{display:none}
  .side,.topbar,.bottomnav,#toast,.noprint,.fab{display:none !important}
  body{padding:0; background:#fff; color:#111} #main{padding:0; max-width:none}
  .sec,.kpis,.progress{box-shadow:none; border-radius:0; break-inside:avoid}
}
