*{box-sizing:border-box}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;margin:0;background:#f5f5f2;color:#1d1d1b}
header{display:flex;justify-content:space-between;align-items:center;padding:10px 16px;background:#24343b;color:#fff}h1{font-size:1.2rem;margin:0}
.who{display:flex;gap:8px;align-items:center}.who button{background:#fff;color:#24343b}
.testbar{background:#ffd54a;color:#000;text-align:center;font-weight:600;padding:6px}
main{max-width:1100px;margin:0 auto;padding:12px}section{background:#fff;border-radius:8px;padding:14px;box-shadow:0 1px 3px #0002}
label{display:inline-flex;flex-direction:column;gap:4px;margin:6px 10px 6px 0;font-size:.9rem}
input,select,button{font:inherit;padding:8px;border:1px solid #bbb;border-radius:6px}button{cursor:pointer;background:#eee}
button.primary{background:#2e7d32;color:#fff;border-color:#2e7d32}button.big{font-size:1.1rem;padding:12px 20px}button:disabled{opacity:.45;cursor:not-allowed}
.tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}.tabs button.on{background:#24343b;color:#fff}
table{border-collapse:collapse;width:100%;margin:8px 0;font-size:.9rem}th,td{border-bottom:1px solid #ddd;padding:6px;text-align:left;vertical-align:middle}
td.num,th.num{text-align:right}.lines input{width:6.5em}.lines select{max-width:12em}
.totals,.preview,.done{margin:10px 0;padding:10px;background:#f1f6f1;border-radius:6px}.preview table td:nth-child(n+2){text-align:right}
.msg{color:#b00020;font-weight:600;min-height:1em}.ok{color:#2e7d32}.note{color:#555;font-size:.85rem}.warn{color:#8a5a00;font-weight:600}
.row{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end;margin:6px 0}.chips{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:6px}.chips li{background:#eef;border-radius:12px;padding:4px 10px}
.cust{border:1px solid #ddd;border-radius:8px;padding:10px;margin:8px 0}.cust h4{margin:0 0 6px}.flag{color:#b00020}.linked{color:#2e7d32}
.rates{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:6px}.rates div{display:flex;gap:4px;align-items:center}.rates span{flex:1;font-size:.85rem}.rates input{width:7em}
tr.click{cursor:pointer}tr.click:hover{background:#f7f7f7}.err td{background:#fde8e8}
@media (max-width:700px){.lines thead{display:none}.lines td[data-label]:not(:empty)::before{content:attr(data-label) ': ';color:#555;font-size:.8rem}.lines tr{display:grid;grid-template-columns:1fr 1fr;border-bottom:2px solid #ccc;padding:6px 0}.lines td{border:0}}
.wait{color:#1a5fb4}
.hostall{margin:8px 0;padding:10px;border:2px solid #b00020;background:#fff0f0;font-weight:600}

/* Customers & rates layout v2 (26 Nov): branch-menu look (cash-up vars: ink #252525, muted #616161, line #d6d6d6, accent #D00E0E, bg #F3F3F3) */
#tab-customers{--ink:#252525;--muted:#616161;--line:#d6d6d6;--accent:#D00E0E;font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink)}
#tab-customers .cu-lead{margin:0 0 10px}
#tab-customers .cust{background:#fff;border:1px solid var(--line);border-radius:10px;padding:14px 16px;margin:0 0 14px}
#tab-customers .cu-head h4{margin:0;font-size:1.05rem;color:var(--ink)}
#tab-customers .cu-qb{display:flex;flex-wrap:wrap;gap:4px 12px;align-items:center;font-size:.82rem;color:var(--muted);margin:2px 0 8px}
#tab-customers .cu-qbbtns{display:inline-flex;border:1px solid var(--line);border-radius:7px;overflow:hidden}
#tab-customers button.link{background:#fff;border:0;border-right:1px solid var(--line);border-radius:0;padding:3px 10px;font-size:.8rem;color:var(--ink)}
#tab-customers button.link:last-child{border-right:0}#tab-customers button.link:hover{background:#f3f3f3}
#tab-customers button.sm{padding:5px 10px;font-size:.82rem;background:#fff;border:1px solid var(--line);border-radius:7px}
#tab-customers .cu-pick{background:#f7f7f7;border-radius:8px;padding:8px;margin:0 0 8px}
#tab-customers table.cu-rates{width:auto;min-width:60%;border-collapse:collapse;font-variant-numeric:tabular-nums}
#tab-customers .cu-rates th,#tab-customers .cu-rates td{border-bottom:1px solid var(--line);padding:5px 8px}
#tab-customers .cu-rates thead th{font-size:.8rem;color:var(--muted);font-weight:600;text-transform:none}
#tab-customers .cu-rates th.num,#tab-customers .cu-rates td.num{text-align:right}
#tab-customers .cu-rates th.cu-col{font-weight:600;white-space:nowrap}
#tab-customers .cu-rates input.num{width:7.5em;text-align:right;font-variant-numeric:tabular-nums;padding:6px 8px;border:1px solid var(--line);border-radius:6px}
#tab-customers .cu-rates input.dirty{border-color:var(--accent);background:#fff6f6}
#tab-customers .cu-thin{width:4.5em;padding:5px 6px;border:1px solid var(--line);border-radius:6px}
#tab-customers .cu-add .row{margin:0;flex-wrap:nowrap;gap:4px;align-items:center}
#tab-customers .cu-foot{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:10px}
#tab-customers .cu-msg{font-size:.85rem;color:var(--muted)}
#tab-customers .cu-foot .cu-more{margin-right:auto}
#tab-customers .cu-foot button.primary{background:#252525;border-color:#252525;color:#fff;font-weight:700;border-radius:7px;padding:9px 18px}
@media (max-width:700px){
 #tab-customers .cust{padding:12px}
 #tab-customers table.cu-rates,#tab-customers .cu-rates tbody{display:block;width:100%;min-width:0}
 #tab-customers .cu-rates thead tr{display:flex;flex-wrap:wrap;justify-content:flex-end;border:0}
 #tab-customers .cu-rates thead th{display:none}#tab-customers .cu-rates thead th.cu-add{display:block;border:0;padding:0 0 8px}
 #tab-customers .cu-rates tbody tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 8px;border:1px solid var(--line);border-radius:8px;padding:8px 10px;margin:0 0 8px}
 #tab-customers .cu-rates tbody th.cu-col{grid-column:1/-1;border:0;padding:0;white-space:normal}
 #tab-customers .cu-rates tbody td{border:0;padding:0;display:flex;flex-direction:column;align-items:stretch;text-align:left}
 #tab-customers .cu-rates tbody td.num::before{content:attr(data-label);font-size:.75rem;color:var(--muted)}
 #tab-customers .cu-rates tbody td.cu-add{display:none}
 #tab-customers .cu-rates input.num{width:100%}
 #tab-customers .cu-foot{flex-wrap:wrap}#tab-customers .cu-foot button.primary{width:100%}
}
