/* Lace Workstation — gaya dasar (sama dengan versi uji coba di Claude) */
:root{
  --bg:#F3F4F7; --surface:#FFFFFF; --sunk:#ECEEF3; --ink:#1A2030; --muted:#5D6577; --line:#DDE1E8;
  --accent:#2C3E8C; --accent-ink:#FFFFFF; --accent-soft:#E6E9F6;
  --ok:#1D7A50; --ok-soft:#DFF2E8; --warn:#9A6200; --warn-soft:#FBEFD5; --bad:#B42318; --bad-soft:#FDE6E3;
  --hold:#6B7280; --hold-soft:#ECEDEF; --jl:#9B2C3A; --mj:#6B46C1; --mm:#2F855A;
  --font:"Plus Jakarta Sans",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --r:10px; --shadow:0 1px 2px rgba(20,25,40,.06),0 4px 16px rgba(20,25,40,.06);
}
@media (prefers-color-scheme:dark){:root{
  --bg:#12151C; --surface:#1A1F29; --sunk:#222834; --ink:#E8EAF0; --muted:#9AA2B3; --line:#2E3543;
  --accent:#8C9EF0; --accent-ink:#0F1426; --accent-soft:#252C48;
  --ok:#5BCB95; --ok-soft:#173326; --warn:#E8B44C; --warn-soft:#3A2D12; --bad:#F2857A; --bad-soft:#3D1D1A;
  --hold:#A1A8B5; --hold-soft:#2A2F38; --jl:#E07A88; --mj:#A88BEA; --mm:#6CC795; color-scheme:dark}}
*{box-sizing:border-box}
html,body{margin:0}
body{background:var(--bg);color:var(--ink);font-family:var(--font);font-size:14px;line-height:1.45}
h1,h2,h3{margin:0}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.muted{color:var(--muted)} .small{font-size:12px} .num{font-variant-numeric:tabular-nums}
.wrap{max-width:1180px;margin:0 auto;padding:16px 16px 64px}
.center{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:16px}

/* login */
.auth{width:min(380px,100%);background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:28px 24px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:14px}
.auth h1{font-size:22px;font-weight:800;letter-spacing:-.01em}
.logo{display:flex;align-items:center;gap:10px}
.logo .mark{width:34px;height:34px;border-radius:9px;background:var(--accent);color:var(--accent-ink);display:flex;align-items:center;justify-content:center;font-weight:800}
.fld{display:flex;flex-direction:column;gap:5px}
.fld label{font-size:12px;font-weight:600;color:var(--muted)}
.fld input,.fld select{border:1px solid var(--line);background:var(--surface);border-radius:8px;padding:10px 12px;width:100%}
.btn{border:1px solid var(--line);background:var(--surface);padding:9px 14px;border-radius:9px;font-weight:600}
.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.btn.link{border:0;background:none;color:var(--accent);padding:0;font-weight:600}
.btn:disabled{opacity:.55;cursor:not-allowed}
.msg{border-radius:8px;padding:10px 12px;font-size:13px;background:var(--accent-soft)}
.msg.bad{background:var(--bad-soft);color:var(--bad)} .msg.ok{background:var(--ok-soft);color:var(--ok)}

/* shell */
.top{display:flex;flex-wrap:wrap;gap:12px 20px;align-items:center;justify-content:space-between;margin-bottom:14px}
.top h1{font-size:20px;font-weight:800}
.seg{display:flex;gap:4px;background:var(--sunk);padding:4px;border-radius:12px;flex-wrap:wrap}
.seg button{border:0;background:transparent;padding:7px 12px;border-radius:9px;font-weight:600;color:var(--muted);display:flex;align-items:center;gap:7px}
.seg button[aria-pressed="true"]{background:var(--surface);color:var(--ink);box-shadow:var(--shadow)}
.seg.div button[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink)}
.dot{width:9px;height:9px;border-radius:50%;display:inline-block}
.user{display:flex;align-items:center;gap:10px}
.user .who{display:flex;flex-direction:column;align-items:flex-end;line-height:1.2}
.tabs{display:flex;gap:2px;border-bottom:1px solid var(--line);margin-bottom:16px;overflow-x:auto}
.tabs button{border:0;background:transparent;padding:10px 14px;font-weight:600;color:var(--muted);border-bottom:2px solid transparent;white-space:nowrap}
.tabs button[aria-selected="true"]{color:var(--accent);border-bottom-color:var(--accent)}
.empty{text-align:center;padding:40px 16px;color:var(--muted);background:var(--surface);border:1px dashed var(--line);border-radius:var(--r)}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:14px}
.pill{display:inline-flex;align-items:center;padding:2px 9px;border-radius:999px;font-size:11.5px;font-weight:700;background:var(--sunk);color:var(--muted)}
.pill.ok{background:var(--ok-soft);color:var(--ok)} .pill.warn{background:var(--warn-soft);color:var(--warn)}
table.t{width:100%;border-collapse:collapse;font-size:13px}
table.t th{text-align:left;font-size:11px;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);font-weight:600;padding:6px 8px;border-bottom:1px solid var(--line)}
table.t td{padding:8px;border-bottom:1px solid var(--line);vertical-align:middle}
table.t select{border:1px solid var(--line);background:var(--surface);border-radius:7px;padding:5px 8px}
.scroll{overflow-x:auto}
.toast{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);background:var(--ink);color:var(--bg);padding:10px 16px;border-radius:10px;font-weight:600;z-index:40;max-width:calc(100% - 32px)}

/* ===== komponen dari versi uji coba (timeline, editor, kartu) ===== */
h1,h2,h3{margin:0;text-wrap:balance}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.num{font-variant-numeric:tabular-nums}
.muted{color:var(--muted)}
.small{font-size:12px}
.lbl{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-weight:600}

/* top bar */
.top{display:flex;flex-wrap:wrap;gap:12px 20px;align-items:center;justify-content:space-between;margin-bottom:14px}
.brandname{display:flex;flex-direction:column;gap:2px}
.brandname h1{font-size:20px;font-weight:800;letter-spacing:-.01em}
.seg{display:flex;gap:4px;background:var(--sunk);padding:4px;border-radius:12px;flex-wrap:wrap}
.seg button{border:0;background:transparent;padding:7px 12px;border-radius:9px;font-weight:600;color:var(--muted);display:flex;align-items:center;gap:7px}
.seg button[aria-pressed="true"]{background:var(--surface);color:var(--ink);box-shadow:var(--shadow)}
.dot{width:9px;height:9px;border-radius:50%;display:inline-block;flex:none}
.monthnav{display:flex;align-items:center;gap:6px}
.monthnav button{border:1px solid var(--line);background:var(--surface);width:34px;height:34px;border-radius:9px;font-size:16px}
.monthnav .m{min-width:150px;text-align:center;font-weight:700;font-size:15px}
.tabs{display:flex;gap:2px;border-bottom:1px solid var(--line);margin-bottom:16px;overflow-x:auto}
.tabs button{border:0;background:transparent;padding:10px 14px;font-weight:600;color:var(--muted);border-bottom:2px solid transparent;white-space:nowrap}
.tabs button[aria-selected="true"]{color:var(--accent);border-bottom-color:var(--accent)}
.notice{background:var(--accent-soft);border-radius:var(--r);padding:12px 14px;margin-bottom:14px;font-size:13px}
.notice.bad{background:var(--bad-soft)}

/* buttons */
.btn{border:1px solid var(--line);background:var(--surface);padding:8px 14px;border-radius:9px;font-weight:600}
.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.btn.ghost{border-color:transparent;background:transparent;color:var(--accent)}
.btn.danger{color:var(--bad)}
.btn:disabled{opacity:.5;cursor:not-allowed}
.toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;margin-bottom:12px}
.toolbar .left{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.search{border:1px solid var(--line);background:var(--surface);border-radius:9px;padding:8px 12px;min-width:0;width:220px;max-width:100%}
select.f{border:1px solid var(--line);background:var(--surface);border-radius:9px;padding:8px 10px}

/* pills */
.pill{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:999px;font-size:11.5px;font-weight:700;white-space:nowrap}
.st-LAUNCHED,.st-SELESAI,.st-DISETUJUI,.st-DITERIMA{background:var(--ok-soft);color:var(--ok)}
.st-PRODUKSI,.st-SAMPLE,.st-PROSES,.st-EKSPEDISI{background:var(--accent-soft);color:var(--accent)}
.st-PLANNING,.st-TUNGGU,.st-DIAJUKAN,.st-BELUM{background:var(--warn-soft);color:var(--warn)}
.st-HOLD,.st-BATAL,.st-DITOLAK{background:var(--hold-soft);color:var(--hold)}
.flag{background:var(--bad-soft);color:var(--bad)}
.flag.w{background:var(--warn-soft);color:var(--warn)}
.jenis{background:var(--sunk);color:var(--muted)}

/* KPI */
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin-bottom:16px}
.kpi{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:12px 14px;display:flex;flex-direction:column;gap:4px}
.kpi .v{font-size:22px;font-weight:800;letter-spacing:-.01em}
.kpi .s{font-size:12px;color:var(--muted)}
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:12px;margin-bottom:16px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:14px;min-width:0}
.card h3{font-size:14px;font-weight:700;margin-bottom:10px}
.bar{height:8px;background:var(--sunk);border-radius:99px;overflow:hidden}
.bar>i{display:block;height:100%;background:var(--accent);border-radius:99px}
.bar.over>i{background:var(--bad)}
table.t{width:100%;border-collapse:collapse;font-size:13px}
table.t th{text-align:left;font-size:11px;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);font-weight:600;padding:6px 8px;border-bottom:1px solid var(--line)}
table.t td{padding:7px 8px;border-bottom:1px solid var(--line);vertical-align:top}
table.t td.r,table.t th.r{text-align:right}
.scroll{overflow-x:auto}
.checklist{display:flex;flex-direction:column;gap:6px}
.checklist button{display:flex;justify-content:space-between;gap:10px;text-align:left;border:1px solid var(--line);background:var(--surface);border-radius:8px;padding:8px 10px}
svg text{fill:var(--muted);font-family:var(--font)}

/* artikel list */
.list{display:flex;flex-direction:column;gap:8px}
.row{display:grid;grid-template-columns:4px minmax(0,1.6fr) minmax(0,1fr) minmax(0,1.3fr) auto;gap:14px;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:10px 14px 10px 0;text-align:left;width:100%}
.row:hover{border-color:var(--accent)}
.row .stripe{align-self:stretch;border-radius:0 3px 3px 0}
.row .name{font-weight:700;font-size:14.5px}
.row .meta{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:3px}
.row .nums{display:grid;grid-template-columns:repeat(3,auto);gap:2px 14px;font-size:12px;justify-content:start}
.row .nums b{font-size:13.5px;display:block}
.row .flags{display:flex;flex-wrap:wrap;gap:4px;justify-content:flex-end}
.empty{text-align:center;padding:40px 16px;color:var(--muted);background:var(--surface);border:1px dashed var(--line);border-radius:var(--r)}
@media (max-width:760px){
  .row{grid-template-columns:4px minmax(0,1fr);row-gap:8px}
  .row>*:not(.stripe){grid-column:2}
  .row .flags{justify-content:flex-start}
}

/* editor */
.overlay{position:fixed;inset:0;background:rgba(10,14,25,.42);display:flex;justify-content:flex-end;z-index:20}
.panel{background:var(--bg);width:min(760px,100%);height:100%;display:flex;flex-direction:column;box-shadow:var(--shadow)}
.panel header{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:14px 18px;padding-top:calc(14px + env(safe-area-inset-top,0px));background:var(--surface);border-bottom:1px solid var(--line)}
.panel header h2{font-size:17px}
.panel .body{flex:1;overflow-y:auto;padding:16px 18px;display:flex;flex-direction:column;gap:14px}
.panel footer{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between;align-items:center;padding:12px 18px;padding-bottom:calc(12px + env(safe-area-inset-bottom,0px));background:var(--surface);border-top:1px solid var(--line)}
.sec{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:14px;display:flex;flex-direction:column;gap:12px}
.sec>.h{display:flex;align-items:baseline;gap:10px;justify-content:space-between;flex-wrap:wrap}
.sec>.h h3{font-size:14.5px;font-weight:700}
.step{display:inline-flex;width:22px;height:22px;border-radius:50%;background:var(--accent);color:var(--accent-ink);font-size:12px;font-weight:800;align-items:center;justify-content:center;margin-right:8px}
.fields{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.fields .wide{grid-column:span 2}
.fields .full{grid-column:1/-1}
@media (max-width:420px){.fields .wide{grid-column:1/-1}}
.fld{display:flex;flex-direction:column;gap:4px;min-width:0}
.fld label{font-size:12px;font-weight:600;color:var(--muted)}
.fld input,.fld select,.fld textarea{border:1px solid var(--line);background:var(--surface);border-radius:8px;padding:8px 10px;width:100%;min-width:0}
.fld input[readonly]{background:var(--sunk);color:var(--muted)}
.fld textarea{min-height:60px;resize:vertical}
.hint{font-size:11.5px;color:var(--muted)}
.calc{background:var(--sunk);border-radius:8px;padding:8px 10px;font-weight:700}
.komp{border:1px solid var(--line);border-radius:9px;padding:10px;display:flex;flex-direction:column;gap:8px;background:var(--surface)}
.komp .krow{display:grid;grid-template-columns:130px minmax(0,1fr) 92px 70px 70px 104px 84px 30px;gap:6px;align-items:end}
.komp .krow .fld label{font-size:10.5px}
.komp .out{text-align:right;font-weight:700;padding:8px 2px}
.komp .det{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:6px}
.komp .xbtn{border:0;background:transparent;color:var(--muted);font-size:18px;padding:6px 0}
@media (max-width:700px){.komp .krow{grid-template-columns:1fr 1fr}.komp .krow .out{text-align:left}}
.sum{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px}
.sum div{background:var(--sunk);border-radius:8px;padding:8px 10px}
.sum b{display:block;font-size:16px}
.sum .neg b{color:var(--bad)}
.sum .pos b{color:var(--ok)}
.copybox{display:flex;flex-wrap:wrap;gap:8px;align-items:center;background:var(--accent-soft);border-radius:8px;padding:8px 10px;font-size:13px}
.confirm{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.toast{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);background:var(--ink);color:var(--bg);padding:10px 16px;border-radius:10px;font-weight:600;z-index:40;max-width:calc(100% - 32px)}
.help{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.help ol{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px}
/* timeline */
.tlhead{display:flex;flex-wrap:wrap;gap:12px 24px;align-items:flex-end;justify-content:space-between;margin-bottom:14px}
.tlhead h2{font-size:22px;font-weight:800;letter-spacing:-.01em}
.tlhead .sub{color:var(--muted);margin-top:2px}
.cal{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;margin-bottom:18px}
.cal .dn{font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);text-align:center;padding-bottom:2px}
.cal .d{min-height:54px;border:1px solid var(--line);border-radius:8px;background:var(--surface);padding:4px 6px;display:flex;flex-direction:column;gap:3px;text-align:left}
.cal .d.off{background:transparent;border-color:transparent}
.cal .d.has{border-color:var(--accent);background:var(--accent-soft);cursor:pointer}
.cal .d.today{box-shadow:inset 0 0 0 2px var(--warn)}
.cal .d .n{font-size:12px;font-weight:700}
.cal .d .c{font-size:11px;font-weight:700;color:var(--accent);line-height:1.2}
.cal .d .t{font-size:10.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:560px){.cal .d{min-height:40px;padding:3px}.cal .d .t{display:none}}
.day{margin-bottom:22px;scroll-margin-top:12px}
.dayh{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 12px;border-bottom:2px solid var(--ink);padding-bottom:6px;margin-bottom:10px}
.dayh h3{font-size:16px;font-weight:800}
.dayh .tema{font-size:12px;font-weight:700;color:var(--accent);letter-spacing:.04em;text-transform:uppercase}
.dayh .cnt{margin-left:auto;font-size:12px;color:var(--muted)}
.pgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px}
.pcard{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);overflow:hidden;text-align:left;padding:0;width:100%}
.pcard:hover{border-color:var(--accent)}
.ph{aspect-ratio:3/4;width:100%;background:var(--sunk);display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}
.ph img{width:100%;height:100%;object-fit:cover;display:block}
.ph .ini{font-size:28px;font-weight:800;color:var(--muted);letter-spacing:.04em}
.ph .ref{position:absolute;left:6px;bottom:6px;background:rgba(0,0,0,.55);color:#fff;font-size:10px;padding:2px 6px;border-radius:6px}
.ph .stp{position:absolute;right:6px;top:6px}
.pcard .pb{padding:9px 10px 11px;display:flex;flex-direction:column;gap:4px}
.pcard .pn{font-weight:800;font-size:14px;line-height:1.2}
.pcard .pw{font-size:12px;color:var(--muted)}
.pcard .pm{font-size:12px;display:flex;flex-wrap:wrap;gap:4px 8px;color:var(--muted)}
.pcard .pm b{color:var(--ink)}
.thumb{width:40px;height:52px;border-radius:6px;object-fit:cover;background:var(--sunk);display:block}
.thumbph{width:40px;height:52px;border-radius:6px;background:var(--sunk);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:var(--muted)}
.row .thumb,.row .thumbph{width:44px;height:58px}
.row.has-thumb{grid-template-columns:4px 44px minmax(0,1.6fr) minmax(0,1fr) minmax(0,1.3fr) auto}
@media (max-width:760px){.row.has-thumb{grid-template-columns:4px 44px minmax(0,1fr)}.row.has-thumb>*:not(.stripe):not(.thumb):not(.thumbph){grid-column:3}}
.edfoto{display:flex;gap:14px;align-items:flex-start;flex-wrap:wrap}
.edfoto .ph{width:150px;flex:none;border-radius:8px}
.seg2{display:inline-flex;gap:2px;background:var(--sunk);padding:3px;border-radius:9px}
.seg2 button{border:0;background:transparent;padding:6px 12px;border-radius:7px;font-weight:600;color:var(--muted)}
.seg2 button[aria-pressed="true"]{background:var(--surface);color:var(--ink);box-shadow:var(--shadow)}
table.tl td{vertical-align:middle}
table.tl tr.first td{border-top:2px solid var(--ink)}
table.tl tr{cursor:pointer}
table.tl tr:hover td{background:var(--accent-soft)}
@media (prefers-reduced-motion:no-preference){.panel{animation:slide .18s ease-out}@keyframes slide{from{transform:translateX(24px);opacity:.6}to{transform:none;opacity:1}}}
/* operasional */
.divseg{margin-top:8px;align-self:flex-start}
.divseg button{padding:6px 14px}
.divseg button[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink)}
.hbar{display:flex;height:14px;border-radius:99px;overflow:hidden;background:var(--sunk);gap:2px}
.hbar>i{display:block;height:100%}
.legend{display:flex;flex-wrap:wrap;gap:6px 16px;margin-top:8px;font-size:12px;color:var(--muted)}
.legend span{display:inline-flex;align-items:center;gap:6px}
.legend b{color:var(--ink)}
table.tl tr[tabindex]:focus-visible td{background:var(--accent-soft)}
.st-MASUK,.st-DISERAHKAN,.st-SIAP{background:var(--ok-soft);color:var(--ok)}
.st-DIPESAN,.st-PERMINTAAN{background:var(--warn-soft);color:var(--warn)}
.st-PERLU{background:var(--bad-soft);color:var(--bad)}
.fld input[type="checkbox"]{width:auto;flex:none}
.topright{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.btn.small{padding:4px 10px;font-size:12px}
.msg{border-radius:8px;padding:10px 12px;font-size:13px;background:var(--accent-soft)}
.msg.bad{background:var(--bad-soft);color:var(--bad)}
