:root{--ink:#12263A;--muted:#4A5F72;--line:#DDE5EB;--bg:#F2F5F7;--accent:#0F766E;--red:#B3261E}
*{box-sizing:border-box}
body{margin:0;font-family:'IBM Plex Sans',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--ink);font-size:14px}
a{color:var(--accent)}
h1{margin:0 0 4px;font-size:26px;font-weight:600}
h2{margin:0 0 14px;font-size:15px;font-weight:600}
.shell{display:flex;min-height:100vh}
.side{width:232px;flex:none;background:#12263A;padding:24px 16px;display:flex;flex-direction:column;gap:4px}
.brand{color:#fff;font-size:20px;font-weight:600;padding:0 14px 20px}
.side nav{display:flex;flex-direction:column;gap:4px;flex:1}
.side nav a{display:block;padding:11px 14px;border-radius:8px;color:#C9D6E2;text-decoration:none}
.side nav a.on{background:var(--accent);color:#fff}
.side-foot{border-top:1px solid #29425B;padding-top:14px;color:#C9D6E2}
.who{margin-bottom:8px}
.langs a{color:#C9D6E2;text-decoration:none;margin-right:10px}
.langs a.on{color:#fff;font-weight:600}
.main{flex:1;min-width:0;padding:28px 32px;display:flex;flex-direction:column;gap:20px}
.head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap}
.muted,.k{color:var(--muted);font-size:13px}
.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px}
.narrow{max-width:640px}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px}
.n{font-size:30px;font-weight:600;margin-top:6px}
.red{color:var(--red)}
.scroll{overflow-x:auto}
table{width:100%;border-collapse:collapse;font-size:13px}
th{text-align:left;color:var(--muted);font-weight:500;padding:10px 8px;border-bottom:1px solid var(--line);white-space:nowrap}
td{padding:9px 8px;border-bottom:1px solid #EEF2F5;vertical-align:middle}
.num{text-align:right;white-space:nowrap}
.badge{display:inline-block;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:600;white-space:nowrap}
.r-critical{background:#7A1B14;color:#fff}.r-high{background:#B3261E;color:#fff}.r-medium{background:#E8A33D;color:#12263A}.r-low{background:#E3EEE8;color:#1F5C42}.r-none{background:#EEF2F5;color:var(--muted)}
.btn,button{font-family:inherit;min-height:44px;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;border:1px solid var(--accent);background:var(--accent);color:#fff;font-size:13px;font-weight:600;padding:0 16px;cursor:pointer;text-decoration:none}
.btn.ghost{background:#fff;color:var(--accent)}
.side-foot .btn.ghost{width:100%;margin-top:10px}
input,select{font-family:inherit;min-height:44px;border:1px solid var(--line);border-radius:8px;padding:0 12px;font-size:14px;background:#fff;color:var(--ink)}
label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--muted)}
.stack{display:flex;flex-direction:column;gap:12px;margin-top:14px}
.inline{display:inline-flex;gap:8px;align-items:center;flex-wrap:wrap}
.filters{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.filters input[type=search]{flex:1;min-width:220px}
.actions{display:flex;gap:8px;flex-wrap:wrap}
.two{display:grid;grid-template-columns:1fr 1fr;gap:16px}
@media(max-width:900px){.two{grid-template-columns:1fr}.shell{flex-direction:column}.side{width:auto}.main{padding:20px 16px}}
.flash{padding:12px 14px;border-radius:8px;font-size:14px}
.flash.ok{background:#E3EEE8;color:#1F5C42}.flash.err{background:#F8DEDB;color:#7A1B14}
.aging{display:grid;grid-template-columns:110px 1fr 110px;gap:12px;align-items:center;font-size:13px;margin-bottom:12px}
.bar-wrap{background:#EEF2F5;border-radius:6px;height:12px}
.bar{height:12px;border-radius:6px}
.b-not_due{background:#9DB4C0}.b-d1_30{background:#E8A33D}.b-d31_60{background:#D9822B}.b-d61_90{background:#B3261E}.b-d90p{background:#7A1B14}
body.auth{display:flex;align-items:center;justify-content:center;min-height:100vh}
.auth-card{width:100%;max-width:380px;display:flex;flex-direction:column;gap:14px}

.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:16px}
.s-vacant{background:#F8DEDB;color:#7A1B14}.s-occupied{background:#E3EEE8;color:#1F5C42}.s-maintenance{background:#FBEBCB;color:#7A5200}.s-closed{background:#EEF2F5;color:#4A5F72}
.s-new{background:#E1ECF7;color:#1B4F80}.s-review,.s-contacted,.s-meeting,.s-pending_approval,.s-in_talks,.s-searching{background:#FBEBCB;color:#7A5200}
.s-offer,.s-approved,.s-won,.s-sent,.s-agreed,.s-found{background:#E3EEE8;color:#1F5C42}.s-rejected,.s-lost,.s-failed,.s-declined,.s-cancelled{background:#F8DEDB;color:#7A1B14}
.s-none,.s-closed2{background:#EEF2F5;color:#4A5F72}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:8px}
.tile{display:block;padding:8px;border-radius:8px;font-size:12px;text-decoration:none;border:1px solid transparent;min-height:56px}
.tile b{display:block;font-size:13px}
.tile.vacant{background:#F8DEDB;color:#7A1B14;border-color:#E9B6B0}.tile.occupied{background:#E3EEE8;color:#1F5C42;border-color:#BFD8CB}
.tile.maintenance{background:#FBEBCB;color:#7A5200;border-color:#E8CD8F}.tile.closed{background:#EEF2F5;color:#4A5F72;border-color:#D5DEE5}
.legend span{display:inline-block;margin-right:14px;font-size:12px;color:var(--muted)}
.legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px;vertical-align:middle}
textarea{font-family:inherit;border:1px solid var(--line);border-radius:8px;padding:10px 12px;font-size:14px;min-height:80px;width:100%}
.list-plain{margin:0;padding:0;list-style:none}.list-plain li{padding:8px 0;border-bottom:1px solid #EEF2F5;display:flex;justify-content:space-between;gap:10px}
.sm{min-height:34px;padding:0 10px;font-size:12px}
details summary{cursor:pointer;color:var(--accent);font-weight:600}
