:root{--bg:#f6f7f9;--panel:#fff;--line:#dfe3e8;--line-strong:#c4cad2;--text:#1d2430;--muted:#6a7482;--accent:#1f6f4a;--accent-soft:#e6f2ec;--bad:#b42318;--bad-soft:#fdecea;--warn:#9a6700;--warn-soft:#fff6d6;--in:#eef6ff;--out:#fbf4ec;--header:#eef1f4;color:var(--text);background:var(--bg);font-family:ui-sans-serif,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif}*{box-sizing:border-box}body{margin:0;font-size:14px}input,select,button{font:inherit;color:inherit}input,select{border:1px solid var(--line-strong);background:#fff;border-radius:6px;padding:6px 8px}code{background:var(--header);border-radius:4px;padding:1px 4px;font-size:12px}.muted{color:var(--muted)}.small{font-size:12px}.error-text{color:var(--bad)}.warn-text{color:var(--warn);background:var(--warn-soft)}.btn{border:1px solid var(--line-strong);cursor:pointer;background:#fff;border-radius:6px;padding:7px 14px}.btn:hover:not(:disabled){background:var(--header)}.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn.primary:hover:not(:disabled){background:#185a3c}.btn:disabled{opacity:.5;cursor:default}.link{color:var(--accent);cursor:pointer;background:0 0;border:0;padding:0;text-decoration:underline}.login-page{place-items:center;min-height:100vh;display:grid}.login-card{background:var(--panel);border:1px solid var(--line);border-radius:12px;flex-direction:column;gap:14px;width:340px;padding:28px;display:flex;box-shadow:0 6px 24px #141e280f}.login-card h1{margin:0;font-size:22px}.login-card p{margin:0}.login-card label{color:var(--muted);flex-direction:column;gap:4px;font-size:13px;display:flex}.login-card input{color:var(--text)}.app{flex-direction:column;min-height:100vh;display:flex}.topbar{background:var(--panel);border-bottom:1px solid var(--line);z-index:20;justify-content:space-between;align-items:center;padding:10px 20px;display:flex;position:sticky;top:0}.brand{font-size:16px;font-weight:600}.topbar-actions{gap:8px;display:flex}.panel{background:var(--panel);border:1px solid var(--line);border-radius:8px;margin:12px 20px 0;padding:10px 14px}.company{flex-wrap:wrap;gap:16px;display:flex}.company label{color:var(--muted);flex-direction:column;gap:4px;font-size:12px;display:flex}.company input,.company select{color:var(--text);min-width:160px}.dropzone{border:2px dashed var(--line-strong);background:var(--panel);cursor:pointer;border-radius:10px;flex-direction:column;align-items:center;gap:4px;margin:12px 20px 0;padding:22px;transition:background .15s,border-color .15s;display:flex}.dropzone.over,.dropzone:hover{border-color:var(--accent);background:var(--accent-soft)}.files{flex-direction:column;gap:6px;display:flex}.file-row{border-bottom:1px solid var(--line);flex-wrap:wrap;align-items:center;gap:12px;padding:6px 0;display:flex}.file-row:last-of-type{border-bottom:0}.file-name{text-overflow:ellipsis;white-space:nowrap;max-width:280px;font-weight:500;overflow:hidden}.file-row.reading .status,.file-row.categorizing .status{color:var(--accent)}.file-row.reading .status:before,.file-row.categorizing .status:before{content:"";border:2px solid var(--accent);vertical-align:-1px;border-right-color:#0000;border-radius:50%;width:10px;height:10px;margin-right:6px;animation:.8s linear infinite spin;display:inline-block}@keyframes spin{to{transform:rotate(360deg)}}.badge{border-radius:999px;padding:2px 8px;font-size:12px}.badge.ok{background:var(--accent-soft);color:var(--accent)}.badge.bad{background:var(--bad-soft);color:var(--bad)}.badge.warn{background:var(--warn-soft);color:var(--warn)}.warnings{color:var(--warn);flex-basis:100%;margin:0;padding-left:20px;font-size:13px}.files-footer{justify-content:space-between;padding-top:4px;display:flex}.tabs{border-bottom:1px solid var(--line-strong);gap:2px;margin:14px 20px 0;display:flex;overflow-x:auto}.tabs button{cursor:pointer;white-space:nowrap;color:var(--muted);background:0 0;border:1px solid #0000;border-bottom:0;border-radius:8px 8px 0 0;padding:8px 14px}.tabs button.active{background:var(--panel);border-color:var(--line-strong);color:var(--text);margin-bottom:-1px;font-weight:600}.count{background:var(--header);border-radius:999px;margin-left:6px;padding:1px 7px;font-size:11px}.count.bad{background:var(--bad-soft);color:var(--bad)}.sheet-area{background:var(--panel);border:1px solid var(--line-strong);border-top:0;flex:1;min-height:300px;margin:0 20px}.sheet-area>.panel{margin:10px}.empty{text-align:center;color:var(--muted);padding:40px}.foot{padding:12px 20px;font-size:12px}.grid-wrap{flex-direction:column;display:flex}.grid-toolbar{border-bottom:1px solid var(--line);flex-wrap:wrap;align-items:center;gap:8px;padding:8px 10px;display:flex}.spacer{flex:1}.seg{border:1px solid var(--line-strong);border-radius:6px;display:inline-flex;overflow:hidden}.seg button{cursor:pointer;border:0;border-right:1px solid var(--line);background:#fff;padding:4px 10px}.seg button:last-child{border-right:0}.seg button.active{background:var(--accent-soft);color:var(--accent);font-weight:600}.check{align-items:center;gap:6px;font-size:13px;display:inline-flex}.grid-scroll{max-height:calc(100vh - 230px);overflow:auto}.grid-scroll.summary{max-height:none;padding:10px}table.sheet{border-collapse:separate;border-spacing:0;font-variant-numeric:tabular-nums;font-size:12.5px}table.sheet th,table.sheet td{border-right:1px solid var(--line);border-bottom:1px solid var(--line);white-space:nowrap;background:#fff;padding:3px 8px}table.sheet thead th,table.sheet thead td{z-index:3;position:sticky}table.sheet tr.letters th{background:var(--header);height:22px;color:var(--muted);text-align:center;font-size:11px;font-weight:400;top:0}table.sheet tr.headers th{white-space:normal;vertical-align:bottom;background:#f7f9fb;height:44px;font-weight:600;line-height:1.2;top:22px}table.sheet tr.headers th:not(.sticky){min-width:90px;max-width:140px}table.sheet tr.totals td{border-bottom:2px solid var(--line-strong);background:#f3f6f9;height:24px;font-weight:600;top:66px}.summary table.sheet tr.headers th{top:0}table.sheet .num{text-align:right}table.sheet .center{text-align:center}table.sheet .strong{font-weight:600}table.sheet th.cat.in{background:var(--in)}table.sheet th.cat.out{background:var(--out)}table.sheet .sticky{z-index:2;position:sticky}table.sheet thead .sticky{z-index:4}table.sheet .s0{width:84px;min-width:84px;max-width:84px;left:0}table.sheet .s1{width:128px;min-width:128px;max-width:128px;left:84px}table.sheet .s2{width:56px;min-width:56px;max-width:56px;left:212px;overflow:hidden}table.sheet .s3{text-overflow:ellipsis;width:240px;min-width:240px;max-width:240px;left:268px;overflow:hidden}table.sheet .s4{text-overflow:ellipsis;border-right:2px solid var(--line-strong);width:150px;min-width:150px;max-width:150px;left:508px;overflow:hidden}table.sheet .s5{text-overflow:ellipsis;border-right:2px solid var(--line-strong);width:170px;min-width:170px;max-width:170px;left:658px;overflow:hidden}table.sheet td.category{min-width:170px}table.sheet .flag-review{background:var(--warn-soft)}table.sheet .flag-bad{background:var(--bad-soft);color:var(--bad);font-weight:600}table.sheet tr.row-error td.desc{box-shadow:inset 3px 0 0 var(--bad)}table.sheet tbody tr:hover td{background:#f4f8ff}table.sheet tbody tr:hover td.flag-review{background:#fff0b8}table.sheet tr.start-row td{background:#fafbfc;font-style:italic}.start-input{text-align:right;width:110px;padding:2px 4px;font-style:normal}.missing{color:var(--bad)}table.sheet.narrow{min-width:300px}.summary td.group{color:var(--muted);font-weight:600}.summary tr.group-start td{border-top:2px solid var(--line-strong)}
