/* MY TAX ERP — sistem desain diturunkan dari prototipe mytax-pwa / mytax_v2 (indigo #242484 · kuning #FCCC00) */
:root{
  --ink:#242484; --ink2:#303090; --gold:#FCCC00; --goldSoft:#FFF4CC; --goldText:#8A6D00;
  --bg:#F4F5FA; --card:#FFFFFF; --line:#E4E5EF; --muted:#6E7191;
  --green:#2E7D5B; --greenBg:#E3F1EA; --red:#C62828; --redBg:#FBE9E7; --amber:#B7791F; --amberBg:#FFF4CC;
  --blue:#1D5FA8; --blueBg:#E5EEFA; --radius:13px;
}
*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{font-family:'Inter',-apple-system,system-ui,'Segoe UI',sans-serif;background:var(--bg);color:var(--ink);min-height:100vh}
button,input,select,textarea{font-family:inherit;font-size:13px}
a{color:var(--ink2)}
.hidden{display:none!important}
.appshell{display:flex;min-height:100vh}

/* ---------- sidebar */
aside{width:236px;background:var(--ink);color:#fff;padding:20px 14px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh;flex-shrink:0;overflow-y:auto}
.brand{display:flex;flex-direction:column;gap:6px;padding:2px 6px 16px;border-bottom:1px solid rgba(255,255,255,.1);margin-bottom:12px}
.brand .logobox{background:#fff;border-radius:10px;padding:9px 12px;display:flex;justify-content:center}
.brand .logobox img{width:100%;max-width:170px;height:auto;display:block}
.brand small{font-size:10px;color:var(--gold);letter-spacing:1.2px;text-transform:uppercase;font-weight:600;padding-left:2px}
.navgroup{font-size:10px;letter-spacing:1px;text-transform:uppercase;color:rgba(255,255,255,.38);padding:12px 12px 4px;font-weight:700}
.navbtn{display:flex;align-items:center;gap:11px;width:100%;padding:10px 12px;margin-bottom:2px;border-radius:9px;border:none;cursor:pointer;text-align:left;font-size:13.5px;font-weight:500;background:transparent;color:rgba(255,255,255,.82);transition:all .15s}
.navbtn:hover{background:rgba(255,255,255,.06)}
.navbtn.active{background:rgba(252,204,0,.18);color:var(--gold);font-weight:700}
.navbtn svg{width:17px;height:17px;flex-shrink:0}
.navbtn .cnt{margin-left:auto;background:var(--gold);color:var(--ink);font-size:10.5px;font-weight:800;border-radius:99px;padding:1px 7px}
.sidenote{margin-top:auto;padding:12px 8px 0;font-size:10.5px;color:rgba(255,255,255,.45);line-height:1.5}

/* ---------- main */
main{flex:1;padding:24px 32px;max-width:1280px;min-width:0}
.topbar{display:flex;align-items:center;gap:14px;margin-bottom:22px;flex-wrap:wrap}
.topbar h2{font-size:22px;font-weight:800;letter-spacing:-.3px}
.topbar .sub{font-size:12.5px;color:var(--muted);margin-top:2px}
.topbar .sub em{color:var(--ink);font-style:normal;font-weight:700}
.rolechip{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);border-radius:9px;padding:6px 10px;font-size:12.5px}
.rolechip .rc-name{font-weight:700;color:var(--ink);max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rolechip .rc-role{font-size:11px;color:var(--goldText);background:var(--goldSoft);border-radius:6px;padding:2px 7px;font-weight:700}
.rolechip button{border:none;background:none;color:var(--muted);cursor:pointer;display:flex}
.rolechip button svg{width:16px;height:16px}

.btn{display:inline-flex;align-items:center;gap:8px;border-radius:9px;padding:9px 15px;font-weight:700;font-size:13px;cursor:pointer;border:none;white-space:nowrap}
.btn svg{width:16px;height:16px}
.btn-gold{background:var(--gold);color:var(--ink)}
.btn-ink{background:var(--ink);color:#fff}
.btn-ghost{background:#fff;color:var(--ink2);border:1px solid var(--line)}
.btn-green{background:var(--green);color:#fff}
.btn-red{background:var(--redBg);color:var(--red)}
.btn-sm{padding:6px 11px;font-size:12px;border-radius:7px}
.btn:disabled{opacity:.5;cursor:not-allowed}
.smallbtn{border:1px solid var(--line);background:#fff;border-radius:7px;padding:5px 10px;font-size:11.5px;cursor:pointer;font-weight:600;color:var(--ink2);display:inline-flex;align-items:center;gap:5px}
.smallbtn svg{width:13px;height:13px}
.smallbtn.danger{color:var(--red)}

/* ---------- cards & grids */
.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:18px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:18px}
.kpi{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:16px 17px}
.kpi .row{display:flex;justify-content:space-between;align-items:flex-start}
.kpi .lbl{font-size:12px;color:var(--muted);font-weight:600;line-height:1.3}
.kpi .ic{width:32px;height:32px;border-radius:8px;display:grid;place-items:center;background:var(--goldSoft);color:var(--goldText)}
.kpi .ic svg{width:17px;height:17px}
.kpi .val{font-size:21px;font-weight:800;margin-top:12px;letter-spacing:-.4px}
.kpi .sub{font-size:11.5px;color:var(--muted);margin-top:4px}
.panels{display:grid;grid-template-columns:1.35fr 1fr;gap:16px;margin-bottom:18px}
.panel{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:16px 18px}
.panel .phead{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.panel .phead svg{width:16px;height:16px;color:var(--gold)}
.panel .ptitle{font-size:14px;font-weight:700;flex:1}
.drow{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.drow:last-child{border-bottom:none}
.dot{width:8px;height:8px;border-radius:99px;flex-shrink:0}
.drow .t1{font-size:13.5px;font-weight:600}
.drow .t2{font-size:11.5px;color:var(--muted)}
.irow{display:flex;justify-content:space-between;align-items:center;padding:8px 0;border-bottom:1px solid var(--line);gap:12px}
.irow:last-child{border-bottom:none}
.irow .l{font-size:13px;color:var(--muted)}
.irow .r{font-size:13.5px;font-weight:600;text-align:right}
.irow.total .l,.irow.total .r{font-weight:800;color:var(--ink)}
.callout{background:var(--goldSoft);border:1px solid #E7D9AE;border-radius:12px;padding:14px 16px;margin-bottom:16px;display:flex;align-items:flex-start;gap:12px;font-size:13px;line-height:1.5}
.callout svg{width:22px;height:22px;color:var(--goldText);flex-shrink:0}
.callout.info{background:var(--blueBg);border-color:#C9D9F0}
.callout.info svg{color:var(--blue)}
.callout.danger{background:var(--redBg);border-color:#F0C9C4}
.callout.danger svg{color:var(--red)}
.note{font-size:11.5px;color:var(--muted);margin-top:10px;line-height:1.5}
.bar{height:8px;background:var(--line);border-radius:99px;overflow:hidden}
.bar i{display:block;height:100%;background:var(--gold)}

/* ---------- toolbar / filter */
.toolbar{display:flex;gap:10px;align-items:center;margin-bottom:14px;flex-wrap:wrap}
.toolbar .search{display:flex;align-items:center;gap:8px;background:var(--card);border:1px solid var(--line);border-radius:9px;padding:8px 12px;min-width:240px;flex:1;max-width:380px}
.toolbar .search svg{width:15px;height:15px;color:var(--muted)}
.toolbar .search input{border:none;outline:none;font-size:13px;width:100%;background:transparent;color:var(--ink)}
.toolbar select,.toolbar input[type=month],.toolbar input[type=text]{padding:8px 10px;border-radius:8px;border:1px solid var(--line);background:#fff;color:var(--ink)}
.toolbar .spacer{flex:1}
.tabs{display:flex;gap:4px;border-bottom:1.5px solid var(--line);margin-bottom:16px;overflow-x:auto}
.tab{border:none;background:none;padding:10px 14px;font-weight:600;color:var(--muted);cursor:pointer;border-bottom:2.5px solid transparent;margin-bottom:-1.5px;white-space:nowrap}
.tab.active{color:var(--ink);border-bottom-color:var(--gold)}
.pills{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}
.pill{border:1px solid var(--line);background:#fff;border-radius:99px;padding:5px 12px;font-size:12px;font-weight:600;cursor:pointer;color:var(--muted)}
.pill.active{background:var(--ink);color:#fff;border-color:var(--ink)}

/* ---------- table */
.tablewrap{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow:auto;margin-bottom:16px}
table{width:100%;border-collapse:collapse;font-size:13px}
thead tr{background:#FAFBFA}
th{text-align:left;padding:11px 14px;font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.5px;border-bottom:1.5px solid var(--line);white-space:nowrap}
th.num,td.num{text-align:right;font-variant-numeric:tabular-nums}
td{padding:10px 14px;vertical-align:middle;border-bottom:1px solid var(--line)}
td.mono{font-family:'SF Mono',Menlo,Consolas,monospace;font-size:12.5px}
tbody tr:last-child td{border-bottom:none}
tbody tr.click{cursor:pointer}
tbody tr.click:hover{background:#FAFAFF}
tr.subtotal td{background:#FAFBFA;font-weight:700}
tr.grouphead td{background:var(--goldSoft);font-weight:800;color:var(--goldText);font-size:12px;text-transform:uppercase;letter-spacing:.4px}
.empty{padding:28px;text-align:center;color:var(--muted);font-size:13px}
.pager{display:flex;align-items:center;gap:10px;font-size:12.5px;color:var(--muted);margin-bottom:16px}
.badge{display:inline-block;font-size:11.5px;font-weight:600;padding:3px 9px;border-radius:999px;white-space:nowrap;letter-spacing:.2px}
.b-green{background:var(--greenBg);color:var(--green)}
.b-red{background:var(--redBg);color:var(--red)}
.b-amber{background:var(--amberBg);color:var(--amber)}
.b-gold{background:var(--goldSoft);color:var(--goldText)}
.b-gray{background:#EEF1F0;color:var(--muted)}
.b-blue{background:var(--blueBg);color:var(--blue)}
.b-ink{background:var(--ink);color:#fff}

/* ---------- forms */
.field{margin-bottom:12px}
.field label{font-size:12px;font-weight:600;display:block;margin-bottom:5px;color:var(--ink2)}
.field input,.field select,.field textarea{width:100%;padding:9px 11px;border-radius:8px;border:1px solid var(--line);font-size:13px;color:var(--ink);background:#fff}
.field textarea{min-height:70px;resize:vertical}
.field input:focus,.field select:focus,.field textarea:focus{outline:2px solid var(--gold);border-color:var(--gold)}
.f2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.f3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}
.hint{font-size:11px;color:var(--muted);margin-top:4px}
.calc{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:18px}
.calcform{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:18px 20px}
.calcform .ct{font-size:14px;font-weight:700;margin-bottom:14px;display:flex;align-items:center;gap:8px}
.calcform .ct svg{width:16px;height:16px;color:var(--gold)}
.result{background:var(--ink);color:#fff;border-radius:var(--radius);padding:20px 22px;display:flex;flex-direction:column}
.result .rt{font-size:12.5px;color:var(--gold);font-weight:700;letter-spacing:1px;text-transform:uppercase}
.result .big{font-size:32px;font-weight:800;margin:14px 0 6px;letter-spacing:-1px}
.result .sub{font-size:12.5px;color:rgba(255,255,255,.7)}
.rdiv{border-top:1px solid rgba(255,255,255,.15);margin:16px 0;padding-top:14px;display:flex;flex-direction:column;gap:9px}
.rrow{display:flex;justify-content:space-between;font-size:13px;gap:12px}
.rrow .rl{color:rgba(255,255,255,.65)}
.rrow .rv{font-weight:700;text-align:right}
.rnote{font-size:10.5px;color:rgba(255,255,255,.45);margin-top:14px;line-height:1.5}
.dropzone{width:100%;padding:22px;border-radius:11px;border:2px dashed var(--gold);background:var(--goldSoft);color:var(--ink2);cursor:pointer;font-size:13.5px;font-weight:600;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}
.dropzone svg{width:26px;height:26px;color:var(--goldText)}
.dropzone.drag{background:#FFE98A}

/* ---------- modal / toast */
.overlay{position:fixed;inset:0;background:rgba(14,42,59,.45);display:grid;place-items:center;z-index:50;padding:20px}
.modal{background:#fff;border-radius:14px;padding:24px;width:520px;max-width:100%;max-height:90vh;overflow-y:auto;box-shadow:0 20px 60px rgba(0,0,0,.25)}
.modal.wide{width:820px}
.mhead{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:14px;gap:12px}
.mhead h3{font-size:17px;font-weight:800}
.mhead p{font-size:12px;color:var(--muted);margin-top:4px;line-height:1.5}
.mhead .x{cursor:pointer;color:var(--muted);border:none;background:none;display:flex}
.mhead .x svg{width:18px;height:18px}
.savebar{display:flex;gap:10px;margin-top:16px;justify-content:flex-end}
.toast{position:fixed;bottom:24px;right:24px;background:var(--ink);color:#fff;padding:13px 18px;border-radius:10px;font-size:13px;font-weight:500;box-shadow:0 10px 30px rgba(0,0,0,.3);z-index:70;max-width:360px;display:flex;align-items:center;gap:10px;opacity:0;transform:translateY(10px);transition:all .25s;pointer-events:none}
.toast.show{opacity:1;transform:translateY(0)}
.toast.err{background:var(--red)}
.toast svg{width:17px;height:17px;color:var(--gold);flex-shrink:0}

/* ---------- login */
.loginscreen{position:fixed;inset:0;background:var(--ink);z-index:100;display:flex;align-items:center;justify-content:center;padding:20px;overflow-y:auto}
.loginbox{background:#fff;border-radius:18px;padding:30px 26px;width:100%;max-width:400px;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.loginlogo{display:flex;justify-content:center;margin-bottom:6px}
.loginlogo img{width:160px;height:auto}
.logintag{text-align:center;font-size:11px;color:var(--goldText);letter-spacing:1px;text-transform:uppercase;font-weight:700;margin-bottom:20px}
.loginhead{font-size:18px;font-weight:800;color:var(--ink)}
.loginsub{font-size:12.5px;color:var(--muted);margin-bottom:14px}
.loginchoice{display:flex;align-items:center;gap:12px;width:100%;background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 13px;margin-bottom:8px;cursor:pointer;text-align:left;transition:all .15s}
.loginchoice:hover{border-color:var(--gold);background:var(--goldSoft)}
.loginchoice .lc-ic{width:36px;height:36px;border-radius:9px;background:var(--ink);display:grid;place-items:center;flex-shrink:0}
.loginchoice .lc-ic svg{width:18px;height:18px;stroke:var(--gold)}
.loginchoice .lc-role{font-size:14px;font-weight:700;color:var(--ink)}
.loginchoice .lc-desc{font-size:11.5px;color:var(--muted)}
.loginerr{color:var(--red);font-size:12.5px;margin:6px 0}
.loginnote{font-size:11px;color:var(--muted);margin-top:12px;line-height:1.5;text-align:center}

/* ---------- AI chat */
.ai-fab{position:fixed;right:22px;bottom:22px;width:54px;height:54px;border-radius:50%;background:var(--gold);color:var(--ink);border:none;box-shadow:0 10px 30px rgba(36,36,132,.3);cursor:pointer;display:grid;place-items:center;z-index:45}
.ai-fab svg{width:24px;height:24px}
.ai-drawer{position:fixed;top:0;right:0;bottom:0;width:440px;max-width:100%;background:#fff;box-shadow:-10px 0 40px rgba(0,0,0,.2);z-index:60;display:flex;flex-direction:column;transform:translateX(105%);transition:transform .25s}
.ai-drawer.open{transform:translateX(0)}
.chat{display:flex;flex-direction:column;height:100%;min-height:0}
.chat.page{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);height:calc(100vh - 150px);min-height:480px}
.chat-head{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--line);background:var(--ink);color:#fff;border-radius:var(--radius) var(--radius) 0 0}
.ai-drawer .chat-head{border-radius:0}
.chat-head .ch-ic{width:34px;height:34px;border-radius:9px;background:var(--gold);display:grid;place-items:center;color:var(--ink)}
.chat-head .ch-ic svg{width:18px;height:18px}
.chat-head .ch-t{font-weight:800;font-size:14px}
.chat-head .ch-s{font-size:11px;color:rgba(255,255,255,.7)}
.chat-head .x{margin-left:auto;background:none;border:none;color:#fff;cursor:pointer;display:flex}
.chat-head .x svg{width:18px;height:18px}
.chat-brief{font-size:11.5px;color:var(--goldText);background:var(--goldSoft);padding:8px 14px;line-height:1.4;border-bottom:1px solid #E7D9AE}
.chat-body{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;background:var(--bg)}
.msg{max-width:88%;padding:10px 13px;border-radius:12px;font-size:13px;line-height:1.55;white-space:pre-wrap;word-break:break-word}
.msg.user{align-self:flex-end;background:var(--ink);color:#fff;border-bottom-right-radius:3px}
.msg.assistant{align-self:flex-start;background:#fff;border:1px solid var(--line);border-bottom-left-radius:3px}
.msg.sys{align-self:center;background:var(--goldSoft);color:var(--goldText);font-size:11.5px;border-radius:99px;padding:5px 12px}
.msg b{font-weight:700}
.msg ul{margin:4px 0 4px 18px}
.msg .tools{margin-top:8px;font-size:11px;color:var(--muted)}
.msg .tools summary{cursor:pointer;font-weight:600}
.msg .tools code{display:block;background:#F4F5FA;border-radius:6px;padding:5px 7px;margin-top:4px;white-space:pre-wrap;font-size:10.5px}
.chat-foot{border-top:1px solid var(--line);padding:10px 12px;display:flex;gap:8px;align-items:flex-end;background:#fff;border-radius:0 0 var(--radius) var(--radius)}
.chat-foot textarea{flex:1;resize:none;min-height:42px;max-height:120px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;font-size:13px}
.chat-foot .ib{width:40px;height:40px;border-radius:10px;border:1px solid var(--line);background:#fff;cursor:pointer;display:grid;place-items:center;color:var(--ink2)}
.chat-foot .ib.send{background:var(--gold);border-color:var(--gold);color:var(--ink)}
.chat-foot .ib svg{width:18px;height:18px}
.chat-suggest{display:flex;gap:6px;flex-wrap:wrap;padding:8px 12px 0;background:#fff}
.chat-suggest button{border:1px solid var(--line);background:#fff;border-radius:99px;padding:4px 10px;font-size:11.5px;cursor:pointer;color:var(--ink2)}
.ai-layout{display:grid;grid-template-columns:240px 1fr;gap:16px}
.convlist{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:10px;height:calc(100vh - 150px);overflow-y:auto}
.convlist .ci{padding:9px 10px;border-radius:8px;cursor:pointer;font-size:12.5px;border-bottom:1px solid var(--line)}
.convlist .ci:hover,.convlist .ci.active{background:var(--goldSoft)}
.convlist .ci small{display:block;color:var(--muted);font-size:10.5px}
.typing{font-size:12px;color:var(--muted);padding:0 14px 8px;font-style:italic}

/* ---------- SPT editor */
.spthead{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:16px 18px;margin-bottom:16px;display:flex;gap:18px;align-items:center;flex-wrap:wrap}
.spthead .who{flex:1;min-width:220px}
.spthead .who .n{font-size:17px;font-weight:800}
.spthead .who .s{font-size:12px;color:var(--muted);margin-top:2px}
.spthead .ctl{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.spthead .ctl .field{margin:0;min-width:120px}
.flow{display:flex;gap:6px;align-items:center;font-size:11.5px;color:var(--muted);flex-wrap:wrap}
.flow span{padding:3px 9px;border-radius:99px;background:#EEF1F0}
.flow span.on{background:var(--ink);color:#fff;font-weight:700}
.flow span.done{background:var(--greenBg);color:var(--green);font-weight:700}
.reviewgrid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}

/* ---------- laporan (print) */
.report{background:#fff;max-width:960px;margin:0 auto;padding:36px 44px;border:1px solid var(--line);border-radius:var(--radius);font-size:12.5px;color:#1a1a3a}
.report h1{font-size:19px;font-weight:800;color:var(--ink);letter-spacing:-.3px}
.report h2{font-size:14px;font-weight:800;color:var(--ink);border-bottom:2px solid var(--gold);padding-bottom:5px;margin:26px 0 10px}
.report h3{font-size:12.5px;font-weight:800;margin:16px 0 6px;color:var(--ink2)}
.report .rh{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;border-bottom:2px solid var(--ink);padding-bottom:14px;margin-bottom:14px}
.report .rh img{width:180px}
.report .meta{font-size:12px;line-height:1.7}
.report .meta b{display:inline-block;min-width:160px}
.report table{font-size:11.5px}
.report th{background:var(--ink);color:#fff;font-size:10px;letter-spacing:.3px;padding:7px 9px;border-bottom:none}
.report td{padding:6px 9px;border-bottom:1px solid #E8E8F0}
.report .dual{color:var(--muted);font-size:10.5px;font-weight:500}
.report .letter{line-height:1.7;margin:10px 0}
.report .sign{margin-top:26px;line-height:1.6}
.report .foot{margin-top:30px;border-top:1px solid #E8E8F0;padding-top:10px;font-size:10.5px;color:var(--muted);line-height:1.6}
.report .page{page-break-before:always}
.report .concl{background:var(--goldSoft);border-left:4px solid var(--gold);padding:10px 14px;margin:12px 0;line-height:1.6;white-space:pre-wrap}
.report .kv{display:grid;grid-template-columns:1fr auto;gap:4px 20px;font-size:12px}
.report .kv .k{color:#333}.report .kv .v{text-align:right;font-variant-numeric:tabular-nums;font-weight:600}
.report .kv .tot{font-weight:800;border-top:1.5px solid var(--ink);padding-top:4px;margin-top:2px}
.printbar{display:flex;gap:10px;justify-content:flex-end;max-width:960px;margin:0 auto 12px}

/* ---------- mobile */
.mobilebar{display:none}
.bottomnav{display:none}
@media(max-width:900px){
  .appshell{flex-direction:column;padding-bottom:64px}
  aside{display:none}
  main{padding:0}
  .mobilebar{display:flex;align-items:center;gap:10px;background:var(--ink);padding:10px 16px;position:sticky;top:0;z-index:30}
  .mobilebar .mlogo{background:#fff;border-radius:7px;padding:5px 9px;display:flex;align-items:center}
  .mobilebar .mlogo img{height:22px;width:auto;display:block}
  .mobilebar .mtag{font-size:9.5px;color:var(--gold);letter-spacing:.5px;text-transform:uppercase;font-weight:600;flex:1;line-height:1.2}
  .mobilebar .menubtn{background:var(--gold);border:none;border-radius:8px;padding:7px 10px;font-weight:700;color:var(--ink);cursor:pointer;font-size:12px}
  .topbar{margin-bottom:14px;padding:14px 16px 0;gap:10px}
  .topbar h2{font-size:19px}
  #view{padding:0 16px}
  .grid4{grid-template-columns:1fr 1fr;gap:10px}
  .grid3,.grid2,.panels,.calc,.reviewgrid,.ai-layout{grid-template-columns:1fr}
  .convlist{height:auto;max-height:180px}
  .f3{grid-template-columns:1fr 1fr}
  .kpi .val{font-size:17px}
  table{min-width:560px}
  .modal{width:100%;border-radius:16px 16px 0 0;position:absolute;bottom:0;left:0;max-height:92vh}
  .overlay{align-items:flex-end;padding:0}
  .bottomnav{display:flex;position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid var(--line);z-index:40;padding:6px 4px 8px;justify-content:space-around;box-shadow:0 -2px 12px rgba(36,36,132,.08)}
  .bnbtn{display:flex;flex-direction:column;align-items:center;gap:3px;border:none;background:none;cursor:pointer;padding:4px 6px;flex:1;min-width:0;color:var(--muted);font-size:9.5px;font-weight:600}
  .bnbtn svg{width:20px;height:20px}
  .bnbtn.active{color:var(--ink)}
  .bnbtn span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:60px}
  .toast{bottom:78px;left:16px;right:16px;max-width:none}
  .ai-fab{bottom:76px;right:14px}
  .ai-drawer{width:100%}
  .chat.page{height:calc(100vh - 210px)}
  .report{padding:20px 16px}
  .spthead .ctl{width:100%}
  .mobile-menu{position:fixed;inset:0;background:var(--ink);z-index:80;padding:20px;overflow-y:auto}
}
@media print{
  aside,.mobilebar,.bottomnav,.topbar,.ai-fab,.ai-drawer,.printbar,.toast{display:none!important}
  body{background:#fff}
  main{padding:0;max-width:none}
  #view{padding:0}
  .report{border:none;border-radius:0;padding:0;max-width:none}
}
