:root{
  --primary:#2155E5;--primary-d:#1A44B8;--primary-t:#1D4ED8;--primary-soft:#EAF0FF;
  --side:#0E1B3D;--side-2:#1A2A55;--side-text:#C3CDE3;--side-muted:#A9B6D3;
  --bg:#F4F6FB;--surface:#FFFFFF;--surface-2:#F8FAFC;--border:#E3E8F0;
  --text:#0F172A;--text-2:#334155;--muted:#64748B;
  --gray:#475569;--gray-s:#EEF1F6;--blue:#1D4ED8;--blue-s:#EAF0FF;--amber:#B45309;--amber-s:#FFF4DE;
  --green:#15803D;--green-s:#E6F6EC;--purple:#6D28D9;--purple-s:#F1EAFE;--red:#B91C1C;--red-s:#FDECEC;
  --r-sm:8px;--r:10px;--r-md:12px;--r-lg:16px;
  --font:'Plus Jakarta Sans',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font);font-size:14px;line-height:1.45;-webkit-font-smoothing:antialiased}
a{color:var(--primary)}a:hover{color:var(--primary-d)}
button,input,select,textarea{font-family:inherit;font-size:inherit;color:inherit}
:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
h1,h2,h3,p{margin:0}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.muted{color:var(--muted)}
.overline{font-size:11px;line-height:14px;font-weight:700;letter-spacing:.06em;color:var(--muted);text-transform:uppercase}
.h1{font-size:26px;line-height:34px;font-weight:800}
.h2{font-size:17px;line-height:24px;font-weight:800}
.small{font-size:12px;line-height:16px}
.stack{display:flex;flex-direction:column;gap:var(--g,12px)}
.row-flex{display:flex;align-items:center;gap:var(--g,10px)}
.between{justify-content:space-between}
.wrap{flex-wrap:wrap}
.grow{flex:1;min-width:0}
.pre{white-space:pre-line}
.icon{width:18px;height:18px;flex-shrink:0;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.icon-lg{width:22px;height:22px}

/* buttons */
.btn{min-height:44px;padding:0 16px;border-radius:var(--r-md);border:1px solid transparent;font-weight:700;font-size:14px;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;text-decoration:none;white-space:nowrap;background:none}
.btn:disabled{opacity:.55;cursor:not-allowed}
.btn-primary{background:var(--primary);color:#fff}.btn-primary:hover:not(:disabled){background:var(--primary-d);color:#fff}
.btn-secondary{background:var(--surface);border-color:var(--border);color:var(--text)}.btn-secondary:hover:not(:disabled){background:var(--surface-2);color:var(--text)}
.btn-ghost{background:var(--primary-soft);color:var(--primary-t)}.btn-ghost:hover:not(:disabled){color:var(--primary-d)}
.btn-success{background:var(--green);color:#fff}.btn-success:hover{color:#fff}
.btn-danger{background:var(--surface);border-color:#F5C2C2;color:var(--red)}
.btn-sm{min-height:34px;padding:0 12px;font-size:12px;border-radius:var(--r-sm)}
.btn-lg{min-height:52px;font-size:15px}
.btn-block{width:100%}
.icon-btn{width:44px;height:44px;border-radius:var(--r-md);border:1px solid var(--border);background:var(--surface);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:var(--text);flex-shrink:0;padding:0;text-decoration:none}
.icon-btn.plain{border:0;background:transparent;color:var(--muted)}

/* forms */
.field{display:flex;flex-direction:column;gap:6px;min-width:0}
.label{font-size:13px;line-height:18px;font-weight:600}
.hint{font-size:12px;line-height:17px;color:var(--muted)}
.input,.select,.textarea{width:100%;border:1px solid var(--border);border-radius:var(--r);background:var(--surface);padding:0 14px;font-size:15px;font-weight:500;color:var(--text)}
.input,.select{height:48px}
.textarea{padding:12px 14px;line-height:22px;resize:vertical;min-height:96px}
.select{appearance:none;background-image: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='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;padding-right:40px}
.input:focus,.select:focus,.textarea:focus{outline:2px solid var(--primary);outline-offset:0;border-color:var(--primary)}
.input[readonly]{background:var(--surface-2);color:var(--muted)}
.check{display:flex;align-items:center;gap:10px;cursor:pointer;font-weight:500}
.check input{width:18px;height:18px;accent-color:var(--primary);margin:0}
fieldset{border:0;margin:0;padding:0;min-width:0}
legend{padding:0;margin-bottom:8px;font-size:13px;line-height:18px;font-weight:600}
.opts{display:flex;flex-wrap:wrap;gap:8px}
.opts.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.opts.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.opt{min-height:44px;padding:8px 14px;border-radius:var(--r);border:1px solid var(--border);background:var(--surface);color:var(--text);font-weight:500;display:inline-flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:2px;cursor:pointer;text-align:left}
.opt .sub{font-size:12px;line-height:16px;color:var(--gray);font-weight:500}
.opt.on{background:var(--primary-soft);border-color:var(--primary);color:var(--primary-t);font-weight:700}
.opt.on.urgent{background:var(--red-s);border-color:var(--red);color:var(--red)}
.dropzone{border:1px dashed #94A3B8;border-radius:var(--r-md);background:var(--surface-2);padding:18px 16px;display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;cursor:pointer}
.dropzone.drag{border-color:var(--primary);background:var(--primary-soft)}
.filerow{border:1px solid var(--border);border-radius:var(--r);padding:8px 6px 8px 12px;display:flex;align-items:center;gap:10px;background:var(--surface)}
.fileext{width:38px;height:38px;border-radius:var(--r);display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:10px;font-weight:800;background:var(--blue-s);color:var(--blue)}
.fileext.pdf{background:var(--red-s);color:var(--red)}
.filename{font-size:13px;line-height:18px;font-weight:700;overflow-wrap:anywhere}

/* cards, badges */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:var(--p,20px)}
.badge{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;font-size:12px;line-height:16px;font-weight:700;white-space:nowrap}
.badge::before{content:"";width:6px;height:6px;border-radius:999px;background:currentColor}
.st-menunggu{color:var(--gray);background:var(--gray-s)}
.st-dikerjakan{color:var(--blue);background:var(--blue-s)}
.st-revisi{color:var(--amber);background:var(--amber-s)}
.st-siap-diambil{color:var(--green);background:var(--green-s)}
.st-sudah-diambil{color:var(--purple);background:var(--purple-s)}
.tag{display:inline-flex;align-items:center;padding:3px 9px;border-radius:6px;font-size:12px;font-weight:700}
.tag.admin{color:var(--purple);background:var(--purple-s)}.tag.dg{color:var(--green);background:var(--green-s)}.tag.sales{color:var(--blue);background:var(--blue-s)}
.tag.off{color:var(--gray);background:var(--gray-s)}.tag.on{color:var(--green);background:var(--green-s)}
.avatar{width:32px;height:32px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;font-size:12px;font-weight:700;background:var(--green-s);color:var(--green)}
.avatar.blue{background:var(--blue-s);color:var(--blue)}.avatar.purple{background:var(--purple-s);color:var(--purple)}.avatar.amber{background:var(--amber-s);color:var(--amber)}
.note{border-radius:var(--r-md);padding:12px 14px;font-size:13px;line-height:19px;font-weight:600}
.note.ok{background:var(--green-s);color:#166534}.note.warn{background:var(--amber-s);color:#92400E}.note.info{background:var(--primary-soft);color:var(--primary-t)}.note.err{background:var(--red-s);color:var(--red)}
.kv{display:flex;justify-content:space-between;gap:12px;font-size:13px;line-height:18px}.kv span:first-child{color:var(--muted)}.kv b{text-align:right}
.box{padding:12px 14px;border:1px solid var(--border);border-radius:var(--r);font-size:14px;line-height:22px;background:var(--surface)}
.box.soft{background:var(--surface-2);border-color:transparent}

/* tabs & chips */
.tabs{display:flex;flex-wrap:wrap;gap:6px}
.tab{min-height:36px;padding:0 10px 0 12px;border:0;border-radius:var(--r-sm);background:transparent;color:var(--gray);font-weight:600;font-size:13px;display:inline-flex;align-items:center;gap:8px;cursor:pointer}
.tab .n{padding:1px 7px;border-radius:999px;font-size:11px;font-weight:700;background:var(--gray-s);color:var(--gray)}
.tab.on{background:var(--primary-soft);color:var(--primary-t)}.tab.on .n{background:var(--primary);color:#fff}
.seg{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;background:var(--bg);border-radius:var(--r-md);padding:4px}
.seg button{min-height:40px;border:0;border-radius:9px;background:transparent;color:var(--gray);font-weight:700;font-size:13px;cursor:pointer;padding:0 4px}
.seg button.on{background:var(--surface);color:var(--primary-t);box-shadow:0 1px 2px rgba(15,23,42,.08)}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{min-height:40px;padding:0 8px 0 14px;border-radius:999px;border:1px solid var(--border);background:var(--surface);font-weight:600;display:inline-flex;align-items:center;gap:8px;cursor:pointer}
.chip .n{min-width:24px;padding:2px 8px;border-radius:999px;font-size:12px;font-weight:700;text-align:center;background:var(--gray-s);color:var(--gray)}
.chip.on{background:var(--primary);border-color:var(--primary);color:#fff}.chip.on .n{background:#fff;color:var(--primary-t)}

/* tables (grid rows) */
.table-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:var(--r-md)}
.table{min-width:var(--minw,720px)}
.thead,.trow{display:grid;grid-template-columns:var(--cols);gap:12px;align-items:center;padding:10px 16px}
.thead{background:var(--surface-2);font-size:12px;line-height:16px;font-weight:700;color:var(--muted)}
.trow{width:100%;border:0;border-top:1px solid var(--border);background:var(--surface);text-align:left;cursor:pointer;padding-top:12px;padding-bottom:12px;color:var(--text)}
.trow:hover{background:#FAFBFE}
.trow.on{background:var(--primary-soft);box-shadow:inset 3px 0 0 var(--primary)}
.cell-main{font-size:14px;line-height:20px;font-weight:700}
.cell-sub{font-size:12px;line-height:16px;color:var(--gray)}
.no{color:var(--primary-t);font-weight:700}
.empty{padding:32px 16px;text-align:center;color:var(--muted)}

/* stepper */
.stepper{list-style:none;margin:0;padding:0}
.stepper li{display:flex;gap:12px}
.stepper .rail{display:flex;flex-direction:column;align-items:center;width:22px}
.stepper .dot{width:22px;height:22px;border-radius:999px;border:2px solid var(--border);background:var(--surface);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.stepper .dot.done{background:var(--green);border-color:var(--green)}
.stepper .dot.done svg{width:12px;height:12px;stroke:#fff;stroke-width:3}
.stepper .dot.now{background:var(--primary-soft);border:6px solid var(--primary)}
.stepper .line{width:2px;flex:1;min-height:16px;background:var(--border)}
.stepper .line.done{background:var(--green)}
.stepper .txt{padding:1px 0 14px;display:flex;flex-direction:column}
.stepper .t{font-size:14px;line-height:20px;font-weight:500;color:var(--muted)}
.stepper .done-t{font-weight:600;color:var(--text)}.stepper .now-t{font-weight:700;color:var(--primary-t)}
.segbar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
.segbar span{height:6px;border-radius:999px;background:var(--border)}

/* desk layout */
.desk{min-height:100vh;display:flex;flex-wrap:wrap;align-items:stretch}
.side{flex:1 1 232px;max-width:100%;background:var(--side);color:#fff;padding:22px 16px;display:flex;flex-direction:column;gap:4px}
.brand{display:flex;align-items:center;gap:12px;padding:0 6px 18px}
.brand-logo{width:40px;height:40px;border-radius:var(--r);background:var(--primary);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.brand b{display:block;font-size:16px;line-height:22px}.brand span{font-size:12px;color:var(--side-muted)}
.side .sec{padding:12px 12px 6px;font-size:11px;font-weight:700;letter-spacing:.06em;color:var(--side-muted)}
.side a.nav{min-height:44px;padding:0 12px;border-radius:var(--r);color:var(--side-text);display:flex;align-items:center;gap:12px;font-weight:500;text-decoration:none}
.side a.nav:hover{background:var(--side-2);color:#fff}
.side a.nav.on{background:var(--primary);color:#fff;font-weight:600}
.side .spacer{flex:1;min-height:20px}
.profile{background:var(--side-2);border-radius:var(--r-md);padding:12px;display:flex;flex-direction:column;gap:10px}
.pbtn{flex:1;min-height:36px;border:0;border-radius:var(--r-sm);background:rgba(255,255,255,.08);color:var(--side-text);font-size:12px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;gap:6px;cursor:pointer}.pbtn:hover{background:rgba(255,255,255,.16);color:#fff}.pbtn .icon{width:15px;height:15px}
.profile b{font-size:14px;line-height:20px;display:block}.profile span{font-size:12px;color:var(--side-muted)}
.main{flex:999 1 560px;min-width:0;padding:28px 32px 48px;display:flex;flex-direction:column;gap:22px}
.split{display:flex;flex-wrap:wrap;gap:20px;align-items:flex-start}
.split>.left{flex:999 1 560px;min-width:0}
.split>.right{flex:1 1 340px;min-width:0}
.stats{display:flex;flex-wrap:wrap;gap:14px}
.stat{flex:1 1 160px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:16px 18px;display:flex;align-items:center;gap:14px}
.stat .bub{width:44px;height:44px;border-radius:var(--r-md);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.stat .bub i{width:12px;height:12px;border-radius:999px;background:currentColor}
.stat b{display:block;font-size:24px;line-height:30px;font-weight:800}
.panel-head{padding:20px 22px 16px;border-bottom:1px solid var(--border)}
.panel-body{padding:18px 22px}
.panel-foot{padding:16px 22px 20px;background:var(--surface-2);border-top:1px solid var(--border)}
.detail{padding:0;overflow:hidden}
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid var(--border);border-radius:var(--r-md);overflow:hidden}
.meta div{padding:10px 14px;display:flex;flex-direction:column;border-bottom:1px solid var(--border)}
.meta div:nth-child(odd){border-right:1px solid var(--border)}
.meta div:nth-last-child(-n+2){border-bottom:0}
.meta span{font-size:12px;color:var(--muted)}.meta b{font-size:14px;line-height:20px}
.search{position:relative;flex:0 1 300px}
.search svg{position:absolute;left:13px;top:12px;width:18px;height:18px;stroke:var(--muted)}
.search input{height:42px;padding-left:40px;font-size:14px}

/* sales (mobile) layout */
.mobile{max-width:480px;margin:0 auto;min-height:100vh;background:var(--bg);display:flex;flex-direction:column;box-shadow:0 0 0 1px var(--border)}
.m-head{background:var(--surface);padding:16px 16px 12px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--border);position:sticky;top:0;z-index:5}
.m-head h1{font-size:17px;line-height:24px;font-weight:700}
.m-body{flex:1;padding:18px 18px 24px;display:flex;flex-direction:column;gap:16px}
.m-foot{position:sticky;bottom:0;background:var(--surface);border-top:1px solid var(--border);padding:12px 18px calc(16px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:10px;z-index:5}
.bottomnav{position:sticky;bottom:0;background:var(--surface);border-top:1px solid var(--border);padding:8px 18px calc(10px + env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;z-index:5}
.bottomnav a{min-height:52px;border-radius:var(--r-md);color:var(--muted);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:12px;font-weight:600;text-decoration:none}
.bottomnav a.on{background:var(--primary-soft);color:var(--primary-t);font-weight:700}
.steps{background:var(--surface);padding:0 16px 14px;border-bottom:1px solid var(--border);display:flex;flex-direction:column;gap:8px}
.steps .bars{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.steps .bars i{height:4px;border-radius:999px;background:var(--border)}.steps .bars i.on{background:var(--primary)}
.steps .labels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;font-size:12px;font-weight:500;color:var(--muted)}
.steps .labels .on{font-weight:700;color:var(--primary-t)}
.tcard{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:14px 16px;display:flex;flex-direction:column;gap:10px}

/* auth */
.auth{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}
.auth .card{width:100%;max-width:400px;--p:28px}

/* misc */
.modal-back{position:fixed;inset:0;background:rgba(15,23,42,.45);display:flex;align-items:center;justify-content:center;padding:20px;z-index:50}
.modal{width:100%;max-width:440px;background:var(--surface);border-radius:var(--r-lg);padding:22px;display:flex;flex-direction:column;gap:14px;max-height:90vh;overflow:auto}
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:var(--text);color:#fff;padding:12px 18px;border-radius:var(--r-md);font-weight:600;font-size:13px;z-index:60;max-width:90vw;box-shadow:0 8px 24px rgba(15,23,42,.25)}
.toast.err{background:var(--red)}
.loading{padding:48px;text-align:center;color:var(--muted)}
@media (max-width:720px){.main{padding:20px 16px 40px}.side{padding:14px}.side .spacer{display:none}.h1{font-size:22px;line-height:30px}}
