*{box-sizing:border-box}
body{margin:0;font:14px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:#1f2933;background:#f4f5f7}
a{color:#1d5fbf;text-decoration:none}a:hover{text-decoration:underline}
.top{position:fixed;top:0;left:0;right:0;height:48px;background:#1f2937;color:#fff;display:flex;align-items:center;gap:12px;padding:0 14px;z-index:20}
.top b{letter-spacing:1px}.top .who{margin-left:auto;font-size:13px;color:#cbd2d9}.top .who a{color:#fff}
.burger{display:none;background:none;border:0;color:#fff;font-size:20px;cursor:pointer}
.side{position:fixed;top:48px;bottom:0;left:0;width:200px;background:#2b3542;overflow-y:auto;padding:8px 0}
.side a{display:block;color:#d9dee4;padding:8px 18px;font-size:13.5px}.side a:hover{background:#374151;text-decoration:none}
.side a.on{background:#1d5fbf;color:#fff}
main{margin:48px 0 0 200px;padding:20px 24px 40px}
h1{font-size:20px;margin:0 0 16px}h2{font-size:16px;margin:22px 0 10px}
.card{background:#fff;border:1px solid #e1e4e8;border-radius:6px;padding:16px;margin-bottom:16px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px 14px}
label{display:block;font-size:12px;color:#52606d;margin-bottom:3px}
input,select,textarea{width:100%;padding:7px 8px;border:1px solid #c5cbd3;border-radius:4px;font:inherit;background:#fff}
input:focus,select:focus,textarea:focus{outline:2px solid #9cc0f0;border-color:#1d5fbf}
textarea{min-height:60px}
.btn{display:inline-block;padding:7px 16px;border:1px solid #1d5fbf;background:#1d5fbf;color:#fff;border-radius:4px;cursor:pointer;font:inherit}
.btn:hover{background:#174d9b;text-decoration:none}.btn.light{background:#fff;color:#1d5fbf}.btn.red{background:#c0392b;border-color:#c0392b}
.btn.sm{padding:3px 9px;font-size:12px}
.row{display:flex;gap:8px;align-items:end;flex-wrap:wrap}.row>*{flex:0 0 auto}
table{width:100%;border-collapse:collapse;background:#fff}
th,td{border:1px solid #e1e4e8;padding:5px 7px;text-align:left;vertical-align:top}
th{background:#f0f2f5;font-weight:600;font-size:12.5px;white-space:nowrap}
td.n,th.n{text-align:right;white-space:nowrap}tr:hover td{background:#fafbfc}
tfoot td{font-weight:600;background:#f7f8fa}
.neg{color:#c0392b}
.tbl{overflow-x:auto}
.alert{padding:9px 12px;border-radius:4px;margin-bottom:14px}.alert.ok{background:#e3f4e8;color:#1e6b34}.alert.err{background:#fbe5e3;color:#962d22}
.stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px}
.stat{background:#fff;border:1px solid #e1e4e8;border-radius:6px;padding:14px}.stat b{display:block;font-size:20px}.stat span{color:#52606d;font-size:12px}
.pager{margin:10px 0;display:flex;gap:6px;align-items:center;flex-wrap:wrap}.pager a,.pager span{padding:4px 9px;border:1px solid #c5cbd3;border-radius:4px;background:#fff}.pager span{color:#9aa5b1}.pager em{color:#52606d;font-style:normal;margin-left:8px}
.muted{color:#7b8794;font-size:12px}
.login{max-width:340px;margin:12vh auto;background:#fff;padding:26px;border:1px solid #e1e4e8;border-radius:8px}
.login h1{text-align:center}
.totals td{border:0;padding:3px 8px}.totals td:last-child{text-align:right;min-width:120px}
.ac{position:relative}.ac-list{position:absolute;z-index:30;left:0;right:0;top:100%;background:#fff;border:1px solid #c5cbd3;max-height:260px;overflow-y:auto;box-shadow:0 4px 12px rgba(0,0,0,.12)}
.ac-list div{padding:6px 8px;cursor:pointer;font-size:13px}.ac-list div:hover,.ac-list div.hl{background:#e8f0fc}
@media(max-width:800px){.burger{display:block}.side{transform:translateX(-100%);transition:.2s;z-index:19}.nav-open .side{transform:none}main{margin-left:0;padding:16px 12px}}
@media print{.top,.side,.noprint{display:none}main{margin:0}}
#lines select{min-width:64px}#lines input{min-width:70px}
/* v2: home tiles, pills, doubts, checks */
.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;margin-bottom:18px}
.tile{display:flex;flex-direction:column;justify-content:space-between;min-height:150px;border-radius:12px;padding:22px;color:#fff;box-shadow:0 2px 8px rgba(0,0,0,.15)}
.tile:hover{text-decoration:none;filter:brightness(1.07)}.tile b{font-size:21px}.tile span{opacity:.92}.tile .n{font-size:26px;font-weight:700;opacity:1}
.tile.off{opacity:.35;cursor:not-allowed}.t-kgr{background:#c65911}.t-cmf{background:#2f75b5}.t-sal{background:#7030a0}
.warnbox{border-left:5px solid #c0392b}
.pill{display:inline-block;border-radius:20px;padding:1px 9px;font-size:12px;font-weight:600;white-space:nowrap}
.p-auto{background:#e3f0ff;color:#1f5fa8}.p-man{background:#fff1e0;color:#a35400}.p-doubt{background:#fde2e2;color:#a3221a}.p-other{background:#eceff3;color:#52606d}
.p-in{background:#e3f4e8;color:#1e6b34}.p-out{background:#fbe5e3;color:#962d22}
.pos{color:#1e6b34}.btn.green{background:#2e7d32;border-color:#2e7d32}
.tabs{display:flex;gap:6px;margin-bottom:12px}.tabs a{border:1px solid #c5cbd3;background:#fff;border-radius:6px;padding:7px 14px}.tabs a.on{background:#1d5fbf;color:#fff;border-color:#1d5fbf}
.doubt .reason{color:#962d22;margin-top:4px}
[hidden]{display:none!important}
.okbox{border-left:5px solid #2e7d32}
.t-cmi{background:#2e7d32}
/* v3: daily review of the AI draft */
table.daily td{vertical-align:middle}
table.daily tr.chk td{background:#fdecea}
table.daily tr.okl td{background:#fff}
table.daily tr.marked td{background:#e6f4ea}
table.daily tr.errl td:first-child{border-left:4px solid #c0392b}
table.daily tr.errl td{background:#fdecea}
table.daily .reason,.reason{color:#c0392b;font-size:12px;margin-top:3px}
table.daily .dec label{display:inline-block;margin:0 12px 0 0;font-size:13.5px;color:#1f2933;cursor:pointer}
table.daily .dec input{width:auto;margin:0 4px 0 0;vertical-align:middle}
table.daily .fix input{margin:2px 0}table.daily .fix .edit{margin-bottom:4px}
#adds tr.errl td:first-child{border-left:4px solid #c0392b}
.savebar{position:sticky;bottom:0;z-index:10;background:#fff;box-shadow:0 -3px 12px rgba(0,0,0,.15);display:flex;gap:12px;align-items:center;margin-top:12px}
/* v4: pending tasks bar (every page) and big boxes (Home) */
.pendbar{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:8px;margin:0 0 14px}
.pend{border:1px solid #e1e4e8;border-left:6px solid #2e7d32;border-radius:6px;padding:8px 12px;background:#e3f4e8;color:#1f2933;font-size:13.5px}
.pend.today{border-left-color:#d68910;background:#fff4e0}
.pend.old{border-left-color:#c0392b;background:#fbe5e3}
.pend a{font-weight:600}.pend .why{display:block;font-size:12px;color:#52606d;margin-top:2px}
.pendbar.big{gap:16px;margin-bottom:6px}
.pendbar.big .pend{padding:16px 18px;font-size:15px}
.pendbar.big .pend h2{margin:0 0 4px;font-size:18px}.pendbar.big .big-n{font-size:28px;font-weight:700}
.pendbar.big ul{margin:8px 0 0;padding-left:20px}.pendbar.big li{margin:4px 0}
table.snaps td{vertical-align:middle}
.check.bad{border-left:5px solid #c0392b}.check.warn{border-left:5px solid #d68910}.check.ok{border-left:5px solid #2e7d32}.check.info{border-left:5px solid #1d5fbf}
/* v5 (owner 19 Nov): formal look - navy and steel, one gold accent, darker main buttons, no icons */
body{background:#eef1f5;color:#1b2533}
a{color:#1f4e8c}
.top{height:54px;background:#0b1f3a;border-bottom:3px solid #c8891f;box-shadow:0 2px 8px rgba(0,0,0,.25)}
.top b{font-size:16px;letter-spacing:2.5px;color:#fff}
.top .who{color:#c9d3e0}.top .who .team{border:1px solid rgba(255,255,255,.3);padding:2px 10px;border-radius:4px;color:#fff}
.top .who a{color:#f0c36d;font-weight:600}
.side{top:54px;width:215px;background:#12294a;padding:10px 0}
.side a{color:#cdd6e3;padding:10px 20px;font-size:13.5px;border-left:4px solid transparent}
.side a:hover{background:#1a3866;color:#fff;text-decoration:none}
.side a.on{background:#0b1f3a;color:#fff;font-weight:600;border-left-color:#c8891f}
main{margin:54px 0 0 215px;padding:24px 28px 44px}
h1{font-size:22px;color:#0b1f3a;display:inline-block;padding-bottom:8px;margin-bottom:18px;border-bottom:2px solid #c8891f}
h2{color:#12294a}
.card{border:1px solid #d5dbe4;border-radius:8px;box-shadow:0 1px 3px rgba(16,24,40,.06)}
label{color:#3e4c5e;font-weight:600}
input,select,textarea{border:1px solid #b9c3d0;border-radius:5px;padding:8px 10px}
input:focus,select:focus,textarea:focus{outline:2px solid #9bb4d6;border-color:#1f4e8c}
input[name="s"]{border:2px solid #12294a;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2312294a' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") no-repeat 11px center;padding-left:38px!important}
.btn{background:#12294a;border:1px solid #12294a;border-radius:5px;padding:8px 18px;font-weight:600;letter-spacing:.2px}
.btn:hover{background:#0b1f3a;border-color:#0b1f3a}
.btn.light{background:#fff;color:#12294a;border:1px solid #8a9bb2}.btn.light:hover{background:#eef2f7}
.btn.red{background:#9b1c1c;border-color:#9b1c1c}.btn.red:hover{background:#7f1616}
.btn.green{background:#14532d;border-color:#14532d}.btn.green:hover{background:#0f3f22}
th{background:#1b2f4e;color:#fff;border-color:#1b2f4e;padding:8px}
td{border-color:#dde3ea}
tr:nth-child(even) td{background:#f6f8fb}tr:hover td{background:#fdf6e3}
.tbl{border:1px solid #d5dbe4;border-radius:8px}
.neg{color:#b42318;font-weight:700}.pos{color:#1f6f43;font-weight:600}
.stat{border:1px solid #d5dbe4;border-left:5px solid #12294a;border-radius:8px}
.stat b{color:#0b1f3a;font-size:21px}
.stat:nth-child(2){border-left-color:#c8891f}.stat:nth-child(3){border-left-color:#1f6f43}.stat:nth-child(4){border-left-color:#5b6b82}
.tile{border-radius:10px;box-shadow:0 2px 8px rgba(16,24,40,.18)}
.t-kgr{background:#9a3d0a}.t-cmf{background:#163f73}.t-cmi{background:#1f5f3a}.t-sal{background:#3d3a6b}
.pend{border-radius:6px}
.alert{border-radius:6px;border-left:5px solid transparent}.alert.ok{border-left-color:#1f6f43}.alert.err{border-left-color:#b42318}
.tabs a.on{background:#12294a;border-color:#12294a}
.login{border-top:4px solid #c8891f;border-radius:8px;box-shadow:0 10px 30px rgba(0,0,0,.3)}
body:has(.login){background:#0b1f3a}
.savebar{border-top:3px solid #14532d}
@media(max-width:800px){main{margin-left:0}}
@media print{body{background:#fff}th{background:#eee;color:#000}}