:root{--y:#FECE42;--yd:#F2B705;--bk:#14181D;--bk2:#2B323B;--bg:#F5F5F2;--sf:#fff;--bd:#E3E3DC;--tx:#14181D;--tx2:#5E6470;--ok:#1E8E5A;--er:#D64545;--info:#2F6FDE}
*{box-sizing:border-box}
body{margin:0;font:14px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;background:var(--bg);color:var(--tx)}
a{color:inherit}
button,input,select,textarea{font:inherit;color:inherit}
input,select,textarea{width:100%;padding:9px 11px;border:1px solid var(--bd);border-radius:10px;background:#fff;outline:none}
input:focus,select:focus,textarea:focus{border-color:var(--bk);box-shadow:0 0 0 2px var(--y)}
textarea{min-height:80px;resize:vertical}
label{display:block;font-size:12px;font-weight:600;color:var(--tx2);margin:0 0 4px}
.btn{border:0;border-radius:10px;padding:9px 16px;font-weight:600;cursor:pointer;background:var(--y);color:var(--bk)}
.btn:hover{background:var(--yd)}
.btn.sec{background:#fff;border:1px solid var(--bd)}
.btn.sec:hover{background:var(--bg)}
.btn.dark{background:var(--bk);color:#fff}
.btn.danger{background:#fff;border:1px solid var(--er);color:var(--er)}
.btn.sm{padding:5px 10px;font-size:12px;border-radius:8px}
.btn:disabled{opacity:.5;cursor:default}
.login{max-width:360px;margin:12vh auto;background:#fff;border-radius:18px;padding:28px;box-shadow:0 8px 30px #0001;text-align:center}
.login img{width:84px;height:84px}
.login h1{font-size:20px;margin:12px 0 18px}
.shell{display:flex;min-height:100vh}
.side{width:240px;background:#fff;border:1px solid var(--bd);border-radius:16px;padding:10px;position:sticky;top:12px;align-self:flex-start;display:flex;flex-direction:column;gap:2px;flex-shrink:0;margin:18px 0 18px 18px}
.side .brand{display:flex;align-items:center;gap:10px;padding:4px 8px 16px;font-weight:700;font-size:16px}
.side .brand img{width:34px;height:34px}
.side a{display:flex;align-items:center;gap:10px;padding:11px 12px;border-radius:10px;color:var(--tx);text-decoration:none;cursor:pointer;border-left:3px solid transparent}
.side a:hover{background:#FFFBEA}
.side a.on{background:#FFF6D6;border-left-color:var(--y);font-weight:700}
.side .ic{width:22px;text-align:center}
.side .badge{margin-left:auto;background:var(--er);color:#fff;border-radius:99px;font-size:11px;padding:1px 7px}
.side .sp{flex:1}
.main{flex:1;padding:22px 26px;min-width:0}
.top{display:flex;align-items:center;gap:12px;margin-bottom:16px;flex-wrap:wrap}
.top h1{font-size:22px;margin:0;flex:1}
.card{background:#fff;border:1px solid var(--bd);border-radius:16px;padding:16px;margin-bottom:16px}
.grid{display:grid;gap:12px}
.g2{grid-template-columns:repeat(2,1fr)}.g3{grid-template-columns:repeat(3,1fr)}.g4{grid-template-columns:repeat(4,1fr)}
.stat{background:#fff;border:1px solid var(--bd);border-radius:16px;padding:16px}
.stat b{display:block;font-size:26px}
.stat span{color:var(--tx2);font-size:12px}
.stat.hl{background:var(--y);border-color:var(--y)}
.tbl{width:100%;border-collapse:collapse;background:#fff;border:1px solid var(--bd);border-radius:14px;overflow:hidden}
.tbl th{text-align:left;font-size:12px;color:var(--tx2);padding:10px 12px;background:#FAFAF7;border-bottom:1px solid var(--bd)}
.tbl td{padding:10px 12px;border-bottom:1px solid #F0F0EA;vertical-align:middle}
.tbl tr:last-child td{border-bottom:0}
.tbl tr.click{cursor:pointer}.tbl tr.click:hover td{background:#FFFBEA}
.tw{overflow-x:auto}
.pill{display:inline-block;padding:2px 9px;border-radius:99px;font-size:11px;font-weight:700;background:#eee}
.pill.accepted,.pill.new{background:#FFF4DB;color:#A86A00}.pill.confirmed{background:#E8F0FD;color:var(--info)}
.pill.shipped{background:#EAE6FB;color:#5B3FD0}.pill.delivered,.pill.done,.pill.ok{background:#E4F5EC;color:var(--ok)}
.pill.cancelled,.pill.bad{background:#FDEBEB;color:var(--er)}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.row>.grow{flex:1;min-width:140px}
.muted{color:var(--tx2)}.small{font-size:12px}
.thumb{width:44px;height:44px;border-radius:8px;background:#EFEFEA;object-fit:cover;display:block}
.modal-bg{position:fixed;inset:0;background:#0008;display:flex;align-items:flex-start;justify-content:center;overflow:auto;padding:24px 12px;z-index:50}
.modal{background:#fff;border-radius:18px;width:100%;max-width:820px;padding:20px;position:relative}
.modal h2{margin:0 0 14px;font-size:18px}
.f{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.f .full{grid-column:1/-1}
.sect{font-weight:700;margin:18px 0 8px;padding-top:12px;border-top:1px solid var(--bd)}
.imgs{display:flex;gap:8px;flex-wrap:wrap}
.imgs .im{position:relative}
.imgs .im img{width:76px;height:76px;border-radius:10px;object-fit:cover;border:1px solid var(--bd)}
.imgs .im button{position:absolute;top:-6px;right:-6px;width:20px;height:20px;border-radius:50%;border:0;background:var(--er);color:#fff;cursor:pointer;line-height:1}
.imgs .add{width:76px;height:76px;border:2px dashed var(--bd);border-radius:10px;display:grid;place-items:center;cursor:pointer;font-size:26px;color:var(--tx2)}
.kv{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;margin-bottom:8px}
.tiers{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;margin-bottom:8px}
.chk{display:flex;gap:6px;align-items:center;font-size:13px;font-weight:500;color:var(--tx)}
.chk input{width:auto}
.tabs{display:flex;gap:6px;margin-bottom:14px;flex-wrap:wrap}
.tabs button{border:1px solid var(--bd);background:#fff;border-radius:99px;padding:6px 14px;cursor:pointer}
.tabs button.on{background:var(--bk);color:#fff;border-color:var(--bk)}
#toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;gap:8px;z-index:99}
#toast div{background:var(--bk);color:#fff;padding:10px 16px;border-radius:12px}
#toast div.er{background:var(--er)}
.items-list div{padding:6px 0;border-bottom:1px dashed var(--bd)}
@media(max-width:860px){.shell{flex-direction:column}.main{padding:14px}.g4,.g3{grid-template-columns:repeat(2,1fr)}.f{grid-template-columns:1fr}}

.topbar{background:#1F1B14;color:#e8e6df;font-size:12px;padding:8px 22px;display:flex;justify-content:space-between}
.hdr{background:#fff;border-bottom:3px solid var(--y);padding:10px 22px;display:flex;align-items:center;gap:10px}
.hdr img{width:38px;height:38px}.hdr b{font-size:20px;letter-spacing:1px}.hdr .sp{flex:1}
.ftr{background:#1F1B14;color:#a9a69c;font-size:12px;padding:18px 22px;border-top:3px solid var(--y)}
.shell{min-height:calc(100vh - 150px)}
.card,.stat{box-shadow:0 1px 3px #0000000a}
.tbl th{text-transform:uppercase;letter-spacing:.3px;font-size:11px}
.btn{box-shadow:0 1px 0 #0001}
@media(max-width:860px){.side{width:auto;margin:10px;position:static;flex-direction:row;flex-wrap:wrap}.side a{border-left:0}.hdr .muted{display:none}}

/* ---- modern theme ---- */
:root{--bg:#F4F5F7;--bd:#E6E8EC;--side:#14181D}
body{background:var(--bg)}
.shell{min-height:100vh;gap:0}
.side{width:248px;background:var(--side);border:0;border-radius:0;margin:0;padding:16px 12px;position:sticky;top:0;height:100vh;align-self:flex-start;gap:4px;color:#C9CED6}
.side .brand{padding:6px 8px 20px;color:#fff;gap:12px}
.side .brand img{width:40px;height:40px;border-radius:50%}
.side .brand b{display:block;font-size:17px;letter-spacing:1px;line-height:1.1}
.side .brand small{display:block;font-size:11px;color:#8D95A1;font-weight:500}
.side a{color:#C9CED6;border-left:0;border-radius:10px;padding:10px 12px;gap:12px;font-weight:500}
.side a:hover{background:#222831;color:#fff}
.side a.on{background:var(--y);color:var(--bk);font-weight:700}
.svg{width:20px;height:20px;flex-shrink:0}
.side .badge{background:var(--er);color:#fff}
.side a.on .badge{background:var(--bk)}
.side .me{display:flex;align-items:center;gap:10px;padding:10px 12px;color:#8D95A1;border-top:1px solid #262C35;margin-top:6px}
.side a.out:hover{background:#3A1F1F;color:#FF8A8A}
.main{padding:28px 32px;max-width:1400px}
.top h1{font-size:24px;font-weight:700}
.card,.stat,.tbl{border-radius:14px;border:1px solid var(--bd);box-shadow:0 1px 2px #1018280a}
.stat{padding:18px;position:relative}
.stat b{font-size:28px;letter-spacing:-.5px}
.stat.hl{background:linear-gradient(135deg,#FECE42,#F7B500);border:0}
.tbl th{background:#F9FAFB;font-size:11px;letter-spacing:.5px}
.tbl tr.click:hover td{background:#FFFCEF}
.btn{border-radius:10px;box-shadow:none;transition:.15s}
.btn.sec{background:#fff}
.tabs button{border-radius:10px;font-weight:600;color:var(--tx2)}
.tabs button.on{background:var(--bk);color:#fff}
.pill{padding:3px 10px}
input,select,textarea{border-radius:10px;background:#fff}
.login{border-radius:20px;box-shadow:0 20px 60px #0002}
.login img{border-radius:50%}
@media(max-width:860px){
 .side{width:100%;height:auto;position:static;flex-direction:row;overflow-x:auto;padding:8px;gap:2px}
 .side .brand,.side .me,.side .sp{display:none}
 .side a{flex-shrink:0;padding:9px 12px}
 .side a .lbl{display:none}.side a.on .lbl{display:inline}
 .main{padding:16px}
}

.chart{width:100%;height:auto;display:block;margin-top:10px;overflow:visible}
.bar{flex:1;height:10px;background:#EEF0F3;border-radius:99px;overflow:hidden}.bar i{display:block;height:100%;background:var(--y);border-radius:99px}
