:root{--ink:#1b2430;--muted:#5e6673;--gold:#b8860b;--gold-soft:#f7f1e1;--rule:#d9d5c9;--paper:#fff;--desk:#f3f1ec;--ok:#1e6b3a;--bad:#a83232;--warn:#8a5a00}*{box-sizing:border-box;margin:0;padding:0}html,body,#root{height:100%}body{color:var(--ink);background:var(--desk);font-variant-numeric:tabular-nums;font-family:Archivo,Helvetica Neue,Arial,sans-serif;font-size:14px;line-height:1.45}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit;color:inherit}:focus-visible{outline:2px solid var(--gold);outline-offset:2px}.shell{grid-template-columns:200px 1fr;min-height:100%;display:grid}.rail{background:var(--ink);color:#e9e4d6;flex-direction:column;padding:20px 0;display:flex}.rail .brand{color:#fff;letter-spacing:.02em;padding:0 20px 18px;font-size:17px;font-weight:700}.rail .brand small{color:#a9b0bc;font-size:11px;font-weight:400;display:block}.rail a{color:#c9ced6;border-left:3px solid #0000;padding:9px 20px;display:block}.rail a:hover{color:#fff}.rail a.active{color:#fff;border-left-color:var(--gold);background:#ffffff0d}.rail .spacer{flex:1}.rail .user{color:#a9b0bc;border-top:1px solid #ffffff1a;padding:12px 20px;font-size:12px}.rail .user button{color:#e9e4d6;cursor:pointer;background:0 0;border:0;padding:0;text-decoration:underline}.main{width:100%;max-width:1240px;padding:28px 32px}.main h1{margin-bottom:18px;font-size:22px;font-weight:600}.main h1 small{color:var(--muted);margin-left:10px;font-size:14px;font-weight:400}.topbar{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px;display:flex}.topbar h1{margin:0}.btn{border:1px solid var(--ink);background:var(--ink);color:#fff;cursor:pointer;border-radius:3px;align-items:center;gap:6px;padding:8px 14px;display:inline-flex}.btn:hover{background:#2a3442}.btn.gold{background:var(--gold);border-color:var(--gold)}.btn.gold:hover{background:#9c7209}.btn.ghost{color:var(--ink);background:0 0}.btn.ghost:hover{background:var(--gold-soft)}.btn.sm{padding:5px 10px;font-size:13px}.btn:disabled{opacity:.5;cursor:default}.field{flex-direction:column;gap:4px;display:flex}.field label{color:var(--muted);font-size:12px}.field input,.field select,.field textarea{border:1px solid var(--rule);background:#fff;border-radius:3px;min-width:0;padding:7px 9px}.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--gold);outline:none;box-shadow:0 0 0 2px #b8860b2e}.field input.num{text-align:right}.grid{gap:12px 16px;display:grid}.g2{grid-template-columns:repeat(2,1fr)}.g3{grid-template-columns:repeat(3,1fr)}.g4{grid-template-columns:repeat(4,1fr)}.g6{grid-template-columns:repeat(6,1fr)}.panel{background:var(--paper);border:1px solid var(--rule);margin-bottom:16px;padding:18px 20px}.panel h2{border-bottom:1px solid var(--rule);margin-bottom:12px;padding-bottom:8px;font-size:14px;font-weight:600}.panel h2 span{color:var(--muted);margin-left:8px;font-weight:400}table{border-collapse:collapse;background:var(--paper);width:100%}th{text-align:left;background:var(--gold-soft);border-top:1px solid var(--ink);border-bottom:1px solid var(--ink);white-space:nowrap;padding:9px 10px;font-size:12px;font-weight:600}td{border-bottom:1px solid var(--rule);vertical-align:top;padding:9px 10px}tr.click{cursor:pointer}.num{text-align:right;white-space:nowrap}.muted{color:var(--muted)}.small{font-size:12px}.pos{color:var(--ok)}.neg{color:var(--bad)}.tag{border:1px solid var(--rule);color:var(--muted);border-radius:2px;padding:2px 7px;font-size:11px;display:inline-block}.tag.issued{border-color:var(--ok);color:var(--ok)}.tag.draft{border-color:var(--warn);color:var(--warn)}.empty{text-align:center;color:var(--muted);background:var(--paper);border:1px dashed var(--rule);padding:40px}.error{border:1px solid var(--bad);color:var(--bad);background:#fbeaea;margin-bottom:14px;padding:10px 12px}.notice{background:var(--gold-soft);border:1px solid var(--gold);margin-bottom:14px;padding:10px 12px}.stats{grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:20px;display:grid}.stat{background:var(--paper);border:1px solid var(--rule);border-top:3px solid var(--gold);padding:16px 18px}.stat .v{margin-top:2px;font-size:24px;font-weight:600}.stat .l{color:var(--muted);font-size:12px}.two{grid-template-columns:1fr 1fr;gap:16px;display:grid}.sheetrow{z-index:2;background:var(--ink);color:#fff;grid-template-columns:2fr 1.4fr 1fr 1fr 1fr 1fr 1fr;align-items:end;gap:14px;margin:-28px -32px 20px;padding:12px 18px;display:grid;position:sticky;top:0}.sheetrow div{min-width:0}.sheetrow .k{color:#a9b0bc;font-size:11px}.sheetrow .v{white-space:nowrap;text-overflow:ellipsis;font-size:15px;font-weight:600;overflow:hidden}.sheetrow .v.gold{color:#e8c25a}.segrow{grid-template-columns:120px 90px 90px 160px 32px;align-items:end;gap:8px;margin-bottom:8px;display:grid}.dropzone{border:2px dashed var(--rule);text-align:center;color:var(--muted);cursor:pointer;background:#fff;padding:22px}.dropzone.on{border-color:var(--gold);background:var(--gold-soft)}.itemcard{border:1px solid var(--rule);background:#fbfaf7;margin-bottom:12px;padding:14px}.itemcard .hd{justify-content:space-between;align-items:center;margin-bottom:10px;font-weight:600;display:flex}.x{color:var(--bad);cursor:pointer;background:0 0;border:0;padding:6px;font-size:16px}.login{background:var(--ink);place-items:center;min-height:100%;display:grid}.login form{background:var(--paper);border-top:4px solid var(--gold);width:360px;padding:34px 36px}.login h1{margin-bottom:4px;font-size:20px}.login p{color:var(--muted);margin-bottom:20px;font-size:13px}.login .field{margin-bottom:12px}@media (width<=900px){.shell{grid-template-columns:1fr}.rail{flex-flow:wrap;padding:8px}.rail .brand{width:100%;padding:8px 12px}.rail a{border-left:0;padding:8px 12px}.rail .spacer,.rail .user{display:none}.main{padding:16px}.stats,.two,.g3,.g4,.g6{grid-template-columns:1fr 1fr}.sheetrow{grid-template-columns:1fr 1fr 1fr;margin:-16px -16px 16px}.segrow{grid-template-columns:1fr 1fr 1fr 1fr}}@media print{.rail,.topbar{display:none}.main{max-width:none;padding:0}}:root{--ink:#16202e;--muted:#667085;--gold:#c08a12;--gold-soft:#fbf3e2;--rule:#e6e1d6;--paper:#fff;--desk:#f6f4ef;--ok:#16794c;--bad:#c0362c;--warn:#b26b00;--shadow:0 1px 2px #16202e0d,0 4px 16px #16202e0f}body{letter-spacing:.005em;font-size:14px}.rail{background:linear-gradient(#16202e 0%,#1c2a3d 100%);gap:2px;padding:22px 12px}.rail .brand{padding:0 12px 22px;font-size:18px}.rail .brand small{margin-top:3px}.rail a{color:#b7c0cc;border-left:0;border-radius:8px;padding:9px 12px;transition:background .15s,color .15s}.rail a:hover{color:#fff;background:#ffffff0f}.rail a.active{color:#f3d48a;background:#c08a122e}.rail .user{border-top:1px solid #ffffff14;margin-top:10px;padding:14px 12px 0}.main{padding:30px 36px}.main h1{letter-spacing:-.01em;font-size:24px}.panel{border:1px solid var(--rule);box-shadow:var(--shadow);border-radius:12px;padding:20px 22px}.panel h2{border-bottom:0;margin-bottom:14px;padding-bottom:0;font-size:15px}.stat{border:1px solid var(--rule);box-shadow:var(--shadow);border-top:0;border-radius:12px;position:relative;overflow:hidden}.stat:before{content:"";background:var(--gold);width:4px;position:absolute;top:0;bottom:0;left:0}.stat .v{letter-spacing:-.01em;font-size:26px}.btn{border-radius:8px;padding:8px 16px;font-weight:500;transition:background .15s,box-shadow .15s}.btn.gold{box-shadow:0 1px 2px #c08a1259}.btn.ghost{border-color:var(--rule)}.btn.ghost:hover{border-color:var(--gold);background:var(--gold-soft)}.btn.sm{border-radius:7px}.field input,.field select,.field textarea{border-radius:8px;padding:8px 10px}table{border-radius:10px;overflow:hidden}th{border-top:0;border-bottom:1px solid var(--rule);color:#475467;background:#faf7f0;font-weight:600}tr.click:hover td{background:#fbf8f1}.tag{border-radius:999px;padding:2px 9px}.empty{border-radius:12px}.error{border-radius:10px}.notice{background:#fdf7e8;border-color:#ebcb7e;border-radius:10px}.sheetrow{background:linear-gradient(90deg,#16202e,#22344b);border-radius:0 0 14px 14px}.itemcard{background:#fcfbf8;border-radius:10px}.dropzone{background:#fffdf8;border-color:#e2d3ac;border-radius:12px}.dropzone.on{background:var(--gold-soft)}.login{background:radial-gradient(1200px 600px at 20% 0,#2a3d57 0%,#16202e 60%)}.login form{border-top:0;border-radius:16px;box-shadow:0 20px 60px #00000059}.shell>main,.main,.grid>*{min-width:0}.field input,.field select,.field textarea{width:100%;max-width:100%}.live{color:var(--ok);vertical-align:middle;background:#e8f3ec;border-radius:20px;align-items:center;gap:6px;margin-left:14px;padding:3px 10px;font-size:12px;font-weight:500;display:inline-flex}.live i{background:#1fa155;border-radius:50%;width:7px;height:7px;animation:1.8s infinite pulse;box-shadow:0 0 #1fa15599}@keyframes pulse{0%{box-shadow:0 0 #1fa1558c}70%{box-shadow:0 0 0 8px #1fa15500}to{box-shadow:0 0 #1fa15500}}.kpis{grid-template-columns:1.3fr repeat(4,1fr);gap:12px;margin-bottom:16px;display:grid}.kpi{border:1px solid var(--rule);background:#fff;border-radius:10px;min-width:0;padding:14px 16px}.kpi .l{color:var(--muted);font-size:12px}.kpi .v{letter-spacing:-.5px;margin:4px 0 2px;font-size:24px;font-weight:700}.kpi .s{color:var(--muted);font-size:12px}.kpi.hero{color:#fff;background:linear-gradient(135deg,#1b2430,#2c3a4d);border-color:#1b2430}.kpi.hero .l,.kpi.hero .s{color:#c9c3b3}.kpi.hero .v{color:#f2c14e}.kpi .s.neg{color:var(--bad)}.bars{align-items:flex-end;gap:6px;height:170px;padding-top:8px;display:flex}.bar{flex-direction:column;flex:1;justify-content:flex-end;align-items:center;min-width:0;display:flex}.bar .col{background:linear-gradient(#d9a62e,#b8860b);border-radius:5px 5px 2px 2px;width:100%;max-width:30px}.bar.now .col{background:linear-gradient(#2c3a4d,#1b2430)}.bar .amt{color:var(--muted);white-space:nowrap;margin-bottom:3px;font-size:10px}.bar .d{color:var(--muted);margin-top:4px;font-size:10.5px}.feed{max-height:200px;margin:0;padding:0;list-style:none;overflow:auto}.feed li{border-bottom:1px solid #eeeae0;grid-template-columns:12px 1fr auto 74px;align-items:center;gap:8px;padding:7px 0;font-size:13px;display:grid}.feed li a{color:inherit;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;overflow:hidden}.feed li a:hover b{text-decoration:underline}.feed .when{color:var(--muted);text-align:right;font-size:11.5px}.feed .dot{background:#999;border-radius:50%;width:8px;height:8px}.feed .dot.issued{background:var(--gold)}.feed .dot.draft{background:#c9c3b3}.feed .dot.in{background:#1fa155}.feed .dot.out{background:var(--bad)}@media (width<=1100px){.kpis{grid-template-columns:repeat(2,1fr)}}.sh-kpis{grid-template-columns:repeat(5,1fr);gap:10px;margin-bottom:12px;display:grid}.sh-kpis>div{border:1px solid var(--rule);background:#fff;border-radius:10px;flex-direction:column;min-width:0;padding:10px 14px;display:flex}.sh-kpis span{color:var(--muted);font-size:11.5px}.sh-kpis b{letter-spacing:-.3px;margin:2px 0;font-size:19px}.sh-kpis em{color:var(--muted);font-size:11px;font-style:normal}.sh-kpis .ok b{color:var(--ok)}.sh-kpis .warn{background:#fff8e6;border-color:#ebcb7a}.sh-kpis .warn b{color:var(--warn)}.sh-bar{border:1px solid var(--rule);background:#fff;border-bottom:0;border-radius:10px 10px 0 0;flex-wrap:wrap;align-items:center;gap:10px;padding:10px 12px;display:flex}.sh-bar input,.sh-bar select{border:1px solid var(--rule);font:inherit;background:#fff;border-radius:6px;padding:6px 8px;font-size:13px}.sh-search{width:260px}.sh-chk{align-items:center;gap:5px;font-size:13px;display:flex}.sh-new{background:var(--gold-soft);border-radius:8px;align-items:center;gap:6px;margin-left:auto;padding:5px 6px;display:flex}.sh-new select:first-child{max-width:230px}.sheet{border:1px solid var(--rule);background:#fff;border-radius:0 0 10px 10px;max-height:calc(100vh - 300px);overflow:auto}.sheet table{border-collapse:separate;border-spacing:0;background:#fff;min-width:2150px;font-size:12.5px}.sheet th{z-index:3;color:#3a4350;white-space:nowrap;background:#f4f1e8;border-top:0;border-bottom:1px solid #cfc8b6;border-right:1px solid #e6e1d5;padding:7px 8px;font-size:11.5px;font-weight:600;position:sticky;top:30px}.sheet tr.grp th{letter-spacing:.6px;text-transform:uppercase;color:#fff;border-bottom:0;height:30px;padding:4px 8px;font-size:10.5px;top:0}.sheet tr.grp th.stk0,.sheet tr.grp th.stk1,.sheet tr.grp th.stk2{background:#1b2430}.sheet .g-book{background:#2f4a6b}.sheet .g-sale{background:#1e6b3a}.sheet .g-cost{background:#8a5a00}.sheet .g-comm{background:#6b4c8a}.sheet .g-inv{background:#1b2430}.sheet td{white-space:nowrap;vertical-align:middle;background:#fff;border-bottom:1px solid #eeeae0;border-right:1px solid #f2efe7;height:32px;padding:1px 3px}.sheet tr.odd td{background:#fbfaf6}.sheet tr:hover td{background:#fff7e0}.sheet tr.first td{border-top:1px solid #ddd6c4}.sheet .stk0,.sheet .stk1,.sheet .stk2{z-index:2;position:sticky}.sheet th.stk0,.sheet th.stk1,.sheet th.stk2{z-index:4}.sheet .stk0{width:38px;min-width:38px;left:0}.sheet .stk1{min-width:102px;left:38px}.sheet .stk2{min-width:200px;left:140px;box-shadow:2px 0 #ddd6c4}.sheet td.rn{color:#9aa0a8;text-align:center;font-size:11px;background:#f7f5ef!important}.sheet tr.draft td.rn{box-shadow:inset 3px 0 #e0a526}.sheet tr.issued td.rn{box-shadow:inset 3px 0 #2e9e5b}.sheet .cell{font:inherit;background:0 0;border:1px solid #0000;border-radius:5px;height:26px;padding:5px 6px}.sheet .cell:hover{background:#fff;border-color:#e1daca}.sheet .cell:focus{border-color:var(--gold);background:#fff;outline:0;box-shadow:0 0 0 3px #b8860b2e}.sheet .cell.date{cursor:pointer}.sheet .cell.pill{border-radius:20px;padding:3px 8px;font-size:12px;font-weight:600}.sheet .saving td{background:#fffbea!important}.sheet .ro{color:var(--muted);padding:4px 6px}.sheet tfoot td{z-index:2;color:#fff;border:0;height:34px;padding:4px 10px;font-weight:600;position:sticky;bottom:0;background:#1b2430!important}.sheet tfoot td.stk0,.sheet tfoot td.stk1,.sheet tfoot td.stk2{z-index:3}.chip{border-radius:20px;padding:3px 9px;font-size:11.5px;font-weight:600;text-decoration:none;display:inline-block}.chip.ok{color:var(--ok);background:#e6f4ec}.chip.ok:hover{background:#d3ebdd}.chip.warn{color:var(--warn);background:#fff1d1}@media (width<=1100px){.sh-kpis{grid-template-columns:repeat(2,1fr)}}.sheet table{border-radius:0;overflow:visible}.sheet .cell.need{background:#fff1d1;border-color:#ebcb7a}.sh-mail{flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:10px;display:flex}.chip.bad{color:var(--bad);background:#fbe3e3}
