/* ==========================================================================
   STO Alat Berat Wilayah 1 — stylesheet utama (tanpa framework, tanpa npm, tanpa CDN)

   Tema dokumen: kuning + abu arang, kerangka sidebar + bar atas,
   kartu bergaris tipis, panel samping untuk detail STO.

   Font: Inria Sans saja, disimpan lokal di public/assets/fonts.
     300 = teks tipis (keterangan, sub-judul)
     400 = teks biasa (+ miring)
     700 = judul dan teks tebal
   Cadangan bila font gagal dimuat: Segoe UI (Windows), lalu font sistem.
   ========================================================================== */

@font-face { font-family: "Inria Sans"; font-style: normal; font-weight: 300; font-display: swap; src: url("../assets/fonts/inria-sans-latin-ext-300-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inria Sans"; font-style: normal; font-weight: 300; font-display: swap; src: url("../assets/fonts/inria-sans-latin-300-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inria Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/inria-sans-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inria Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/inria-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inria Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("../assets/fonts/inria-sans-latin-ext-400-italic.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inria Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("../assets/fonts/inria-sans-latin-400-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inria Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../assets/fonts/inria-sans-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inria Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../assets/fonts/inria-sans-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
    /* identitas STO Alat Berat Wilayah 1: kuning + abu arang (charcoal) */
    --yellow: #FACC15;        /* isi: tombol utama, menu aktif, penanda */
    --yellow-600: #EAB308;
    --yellow-ink: #1C1917;    /* teks di atas kuning */
    --brand: #A16207;         /* kuning tua: teks/ikon di atas putih agar terbaca */
    --brand-600: #854D0E;
    --brand-700: #713F12;
    --brand-500: #EAB308;     /* garis fokus, bingkai aktif */
    --brand-100: #FEF08A;
    --brand-50: #FEFCE8;
    --accent: #FBBF24;
    --accent-50: #FFFBEB;
    --accent-ink: #78350F;

    --side: #1C1F24;          /* sidebar: abu arang */
    --side-2: #2A2E35;

    --ink: #18181B;
    --text: #3F3F46;
    --muted: #71717A;
    --faint: #A1A1AA;
    --line: #E4E4E7;
    --line-soft: #F4F4F5;
    --bg: #F5F5F4;
    --card: #FFFFFF;
    --danger: #DC2626;
    --success: #15803D;

    --radius: 14px;
    --ring: 0 0 0 3px rgba(234, 179, 8, .3);
    --shadow: 0 1px 2px rgba(24, 24, 27, .04), 0 1px 3px rgba(24, 24, 27, .04);
    --shadow-md: 0 8px 24px -12px rgba(24, 24, 27, .18);
    --shadow-lg: 0 24px 64px -20px rgba(24, 24, 27, .35);
    --font: "Inria Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --side-w: 264px;
    --topbar-h: 64px;
}

/* ---------- dasar ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body { margin: 0; font-family: var(--font); font-size: 14px; font-weight: 400; line-height: 1.55; color: var(--text); background: var(--bg); min-height: 100vh; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
body:has(dialog[open]), body.nav-open { overflow: hidden; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: 1.25; font-weight: 700; }
h1 { font-size: 28px; letter-spacing: -.01em; }
h2 { font-size: 16px; }
h3 { font-size: 15px; }
strong, b, th { font-weight: 700; }
em, i:not([class]) { font-style: italic; }
p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); text-decoration: underline; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex: none; }
[hidden] { display: none !important; }
.icon { display: inline-block; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 100; background: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); color: var(--ink); }
.skip-link:focus { top: 12px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }

/* ---------- merek ---------- */
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none !important; min-width: 0; }
.brand:hover { color: inherit; }
.brand-mark { width: 38px; height: 38px; flex: none; display: block; border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; min-width: 0; }
.brand-text b { font-size: 15.5px; font-weight: 700; }
.brand-text small { font-size: 12px; font-weight: 300; opacity: .75; }

/* ---------- kerangka aplikasi: sidebar + konten ---------- */
.app { min-height: 100vh; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--side-w); display: flex; flex-direction: column;
    background: var(--side); color: rgba(255, 255, 255, .78);
    background-image: radial-gradient(420px 260px at 0% 0%, rgba(250, 204, 21, .10), transparent 70%);
}
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: var(--topbar-h); padding: 0 16px 0 20px; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.sidebar .side-close { display: none; color: rgba(255, 255, 255, .7); }
.side-close:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.side-nav { flex: 1; overflow-y: auto; padding: 12px 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.side-label { margin: 16px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .38); }
.side-label:first-child { margin-top: 4px; }
.side-link {
    position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent;
    color: rgba(255, 255, 255, .72); font-size: 14px; text-align: left; text-decoration: none !important; transition: background .12s, color .12s;
}
.side-link .icon { opacity: .8; }
.side-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-link.active { background: var(--yellow); color: var(--yellow-ink); font-weight: 700; }
.side-link.active .icon { color: var(--yellow-ink); opacity: 1; }
.side-foot { padding: 12px; border-top: 1px solid rgba(255, 255, 255, .06); display: grid; gap: 10px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .05); }
.side-user .who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.side-user .who strong { color: #fff; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .who small { font-size: 12px; font-weight: 300; color: rgba(255, 255, 255, .55); }
.side-user form { margin: 0; }
.side-user .icon-btn { color: rgba(255, 255, 255, .6); width: 34px; height: 34px; }
.side-user .icon-btn:hover { background: rgba(220, 38, 38, .18); color: #FCA5A5; }
.side-backdrop { display: none; }
.avatar { width: 36px; height: 36px; border-radius: 10px; background: var(--yellow); color: var(--yellow-ink); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.avatar-lg { width: 80px; height: 80px; border-radius: 22px; font-size: 28px; }

.main { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 14px; padding: 0 28px;
    background: rgba(255, 255, 255, .85); backdrop-filter: blur(12px) saturate(1.4); -webkit-backdrop-filter: blur(12px) saturate(1.4); border-bottom: 1px solid var(--line);
}
.topbar .nav-toggle, .topbar .topbar-brand { display: none; }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--faint); font-size: 13.5px; }
.crumbs span { font-weight: 300; white-space: nowrap; }
.crumbs strong { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.today { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 300; white-space: nowrap; }

.shell { width: 100%; max-width: 1360px; margin: 0 auto; padding: 28px 28px 40px; flex: 1; }
.shell > * + * { margin-top: 20px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 4px; }
.page-head .eyebrow { margin-bottom: 4px; }
.page-head .lead { margin-top: 4px; color: var(--muted); font-weight: 300; font-size: 15px; max-width: 64ch; }
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.footer { width: 100%; max-width: 1360px; margin: 0 auto; padding: 4px 28px 24px; color: var(--faint); font-size: 12.5px; font-weight: 300; }

/* ---------- KPI dasbor ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l ico" "n n" "f f"; align-items: center; gap: 4px 12px; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); text-decoration: none !important; transition: border-color .15s, box-shadow .15s, transform .15s; }
.kpi:hover { border-color: #FDE047; box-shadow: var(--shadow-md); transform: translateY(-1px); color: var(--text); }
.kpi-ico { grid-area: ico; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--tone-bg); color: var(--tone-fg); }
.kpi-l { grid-area: l; font-size: 13px; color: var(--muted); }
.kpi-n { grid-area: n; margin-top: 6px; font-size: 32px; font-weight: 700; line-height: 1.1; color: var(--ink); letter-spacing: -.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi-n.money { font-size: 25px; }
.kpi-n small { font-size: 15px; font-weight: 300; color: var(--muted); margin-right: 4px; }
.kpi-f { grid-area: f; font-size: 12.5px; font-weight: 300; color: var(--faint); }
.kpi.is-warn { border-color: #FDE68A; background: linear-gradient(180deg, #FFFBEB 0%, #fff 70%); }
.kpi.is-warn .kpi-f { color: #B45309; font-weight: 400; }
.kpi.is-warn::after { content: ""; position: absolute; top: 14px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: #F59E0B; box-shadow: 0 0 0 4px rgba(245, 158, 11, .18); }
.kpi.is-ok .kpi-f { color: var(--success); }

/* ---------- kartu ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: 15.5px; }
.card-head p { margin-top: 1px; font-size: 13px; font-weight: 300; color: var(--muted); }
.card-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line); }
.card.pad { padding: 20px; }
.chip-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--tone-bg, var(--brand-50)); color: var(--tone-fg, var(--brand)); flex: none; }

/* palet nada */
.tone-green { --tone-bg: #DCFCE7; --tone-fg: #15803D; --tone-bd: #BBF7D0; }
.tone-amber, .tone-orange { --tone-bg: #FEF3C7; --tone-fg: #B45309; --tone-bd: #FDE68A; }
.tone-red, .tone-rose { --tone-bg: #FEE2E2; --tone-fg: #B91C1C; --tone-bd: #FECACA; }
.tone-yellow { --tone-bg: #FEF9C3; --tone-fg: #854D0E; --tone-bd: #FDE68A; }
.tone-dark { --tone-bg: #27272A; --tone-fg: #FACC15; --tone-bd: #3F3F46; }
.tone-teal { --tone-bg: #FEF9C3; --tone-fg: #854D0E; --tone-bd: #FDE68A; }   /* MUAT: kuning */
.tone-blue { --tone-bg: #F4F4F5; --tone-fg: #27272A; --tone-bd: #D4D4D8; }   /* BONGKAR: abu arang */
.tone-gray { --tone-bg: #F4F4F5; --tone-fg: #52525B; --tone-bd: #E4E4E7; }

/* ---------- badge ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 6px; border: 1px solid var(--tone-bd, var(--line)); background: var(--tone-bg, var(--line-soft)); color: var(--tone-fg, var(--text)); font-size: 12px; font-weight: 700; white-space: nowrap; line-height: 1.6; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge-green { --tone-bg: #DCFCE7; --tone-fg: #15803D; --tone-bd: #BBF7D0; }
.badge-amber { --tone-bg: #FEF3C7; --tone-fg: #B45309; --tone-bd: #FDE68A; }
.badge-blue { --tone-bg: #F4F4F5; --tone-fg: #27272A; --tone-bd: #D4D4D8; }   /* BONGKAR: abu arang */
.badge-teal { --tone-bg: #FEF9C3; --tone-fg: #854D0E; --tone-bd: #FDE68A; }   /* MUAT: kuning */
.badge-rose { --tone-bg: #FEE2E2; --tone-fg: #B91C1C; --tone-bd: #FECACA; }
.badge-gray { --tone-bg: #F4F4F5; --tone-fg: #52525B; --tone-bd: #E4E4E7; }
.count-pill { display: inline-flex; align-items: center; padding: 1px 8px; margin-left: 8px; border-radius: 6px; background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand); font-size: 12px; font-weight: 700; vertical-align: 2px; }

/* ---------- tombol ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; background: #fff; color: var(--text);
    font-size: 14px; font-weight: 400; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s, transform .08s; text-decoration: none !important; line-height: 1.2; white-space: nowrap; text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .icon-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-cta { background: var(--yellow); color: var(--yellow-ink); font-weight: 700; box-shadow: 0 1px 2px rgba(161, 98, 7, .3), inset 0 -1px 0 rgba(0, 0, 0, .08); }
.btn-cta:hover { background: var(--yellow-600); color: var(--yellow-ink); }
.btn-primary { background: var(--side); color: #fff; font-weight: 700; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.btn-primary:hover { background: var(--side-2); color: #fff; }
.btn-navy { background: var(--ink); color: #fff; }
.btn-navy:hover { background: #27272A; color: #fff; }
.btn-secondary { background: #fff; color: var(--text); border-color: var(--line); box-shadow: var(--shadow); }
.btn-secondary:hover { background: var(--line-soft); border-color: #D4D4D8; color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; font-weight: 700; }
.btn-danger:hover { background: #B91C1C; color: #fff; }
.btn-danger-soft { background: #FEF2F2; color: var(--danger); border-color: #FECACA; }
.btn-danger-soft:hover { background: #FEE2E2; color: #B91C1C; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--line-soft); color: var(--ink); }
.btn-sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-lg { height: 50px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: background .12s, color .12s; }
.icon-btn:hover { background: var(--line-soft); color: var(--ink); }
.link-btn { padding: 0; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; color: var(--brand); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn-secondary .spinner, .btn-ghost .spinner, .btn-danger-soft .spinner { border-color: rgba(24, 24, 27, .2); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field + .field { margin-top: 16px; }
.field-label, .label { font-size: 13px; font-weight: 700; color: var(--ink); }
.optional { color: var(--faint); font-weight: 400; font-style: italic; }
.input, .select, .textarea {
    width: 100%; min-width: 0; padding: 11px 14px; background: #fff; border: 1px solid #D4D4D8; border-radius: 10px; outline: none; color: var(--ink);
    box-shadow: 0 1px 2px rgba(24, 24, 27, .04); transition: border-color .15s, box-shadow .15s;
}
.input, .select { height: 44px; padding-top: 0; padding-bottom: 0; }
.input::placeholder, .textarea::placeholder { color: var(--faint); font-weight: 300; }
.input:hover, .select:hover, .textarea:hover { border-color: #A1A1AA; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-500); box-shadow: var(--ring); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: #F87171; background: #FEF2F2; }
.input[disabled], .select[disabled] { background: var(--line-soft); color: var(--muted); }
.select {
    appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717A' 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;
}
.textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
.hint { font-size: 12.5px; font-weight: 300; color: var(--muted); }
.field-error { font-size: 12.5px; color: var(--danger); }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-icon .input { padding-left: 40px; }
.input-icon .reveal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 8px; color: var(--faint); }
.input-icon .reveal:hover { color: var(--ink); background: var(--line-soft); }
.input-icon.has-reveal .input { padding-right: 44px; }
.reveal .eye-off { display: none; }
.reveal.is-on .eye-on { display: none; }
.reveal.is-on .eye-off { display: inline-block; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .field + .field { margin-top: 0; }
.form-actions { margin-top: 20px; display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- alert ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; border: 1px solid; }
.alert > .icon { flex: none; margin-top: 2px; }
.alert p, .alert ul { color: inherit; }
.alert a { color: inherit; font-weight: 700; text-decoration: underline; }
.alert ul { margin: 4px 0 0 18px; padding: 0; list-style: disc; }
.alert-success { background: #F0FDF4; border-color: #BBF7D0; color: #166534; }
.alert-danger, .alert-error { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.alert-warn, .alert-warning { background: var(--accent-50); border-color: #FDE68A; color: var(--accent-ink); }
.alert-info { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-700); }
form > .alert, .panel .alert { margin-bottom: 16px; }

/* ---------- toast ---------- */
.toasts { position: fixed; top: calc(var(--topbar-h) + 14px); right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toasts[popover] { inset: calc(var(--topbar-h) + 14px) 20px auto auto; margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; }
.toast { --tone: var(--brand); --tone-bg: var(--brand-50); position: relative; overflow: hidden; pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); animation: toast-in .24s ease-out; }
.toast-success { --tone: #15803D; --tone-bg: #DCFCE7; }
.toast-error { --tone: #DC2626; --tone-bg: #FEE2E2; }
.toast-ic { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--tone-bg); color: var(--tone); }
.toast-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.toast-body strong { font-size: 14.5px; color: var(--ink); line-height: 1.3; }
.toast-body span { font-size: 13.5px; font-weight: 300; color: var(--text); line-height: 1.45; overflow-wrap: anywhere; }
.toast-x { flex: none; margin: -4px -4px 0 0; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--faint); display: grid; place-items: center; cursor: pointer; }
.toast-x:hover { background: var(--line-soft); color: var(--ink); }
.toast-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--tone); opacity: .7; transform-origin: left; animation: toast-bar 6s linear forwards; }
.toast.is-leaving { opacity: 0; transform: translateX(10px); transition: opacity .2s, transform .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---------- unggah PDF ---------- */
.upload-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 24px; align-items: stretch; }
.dropzone {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-height: 250px; padding: 28px 24px; text-align: center; cursor: pointer;
    border: 1.5px dashed #D4D4D8; border-radius: 14px; transition: border-color .15s, background .15s, box-shadow .15s;
    background: radial-gradient(circle at 1px 1px, #E4E4E7 1px, transparent 0) 0 0 / 18px 18px, #FAFAF9;
}
.dropzone:hover { border-color: var(--brand-500); background-color: var(--brand-50); }
.dropzone:focus-within { border-color: var(--brand-500); box-shadow: var(--ring); }
.dropzone.is-drag { border-color: var(--brand-500); border-style: solid; background-color: var(--brand-50); }
.dz-icon { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 10px; border-radius: 14px; color: var(--brand); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-md); transition: transform .2s; }
.dropzone:hover .dz-icon, .dropzone.is-drag .dz-icon { transform: translateY(-3px); }
.dz-title { font-size: 16.5px; font-weight: 700; color: var(--ink); max-width: 100%; overflow-wrap: anywhere; }
.dz-hint { color: var(--muted); font-size: 13px; font-weight: 300; }
.dz-btn { margin-top: 14px; }
.dropzone.has-file { border-style: solid; border-color: #86EFAC; background: #F0FDF4; }
.dropzone.has-file .dz-icon { color: var(--success); border-color: #BBF7D0; }
.dropzone.has-error { border-color: #FCA5A5; background: #FEF2F2; }
.dropzone.has-error .dz-icon { color: var(--danger); border-color: #FECACA; }
.dropzone.has-error .dz-title { color: var(--danger); }
.upload-side { display: flex; flex-direction: column; gap: 20px; }
.upload-side .btn { margin-top: auto; }
.steps { display: grid; gap: 0; counter-reset: step; position: relative; }
.steps li { position: relative; display: flex; gap: 14px; align-items: flex-start; padding-bottom: 18px; color: var(--text); }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { counter-increment: step; content: counter(step); position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 1.5px solid var(--brand-500); color: var(--brand); font-size: 13px; font-weight: 700; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 13.5px; top: 28px; bottom: 0; width: 1.5px; background: var(--brand-100); }
.steps strong { color: var(--ink); }

/* ---------- filter ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filters .input-icon { flex: 1 1 260px; }
.filters .select { width: auto; min-width: 180px; }

/* ---------- tabel ---------- */
.table-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card > .table-card, .modal-body .table-card { box-shadow: none; border-radius: 12px; }
.table-scroll { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.table-scroll:focus-visible { outline: 2px solid var(--brand-500); outline-offset: -2px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
.data-table th { padding: 11px 14px; font-size: 12px; font-weight: 700; color: var(--muted); background: #FAFAFA; border-bottom: 1px solid var(--line); line-height: 1.35; vertical-align: bottom; white-space: nowrap; }
.data-table td { padding: 14px; color: var(--text); border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.data-table tbody:last-of-type tr:last-child td, .data-table tbody:last-child tr:last-child td { border-bottom: 0; }
.data-table tbody.group { border-bottom: 1px solid var(--line); }
.data-table tbody.group:last-of-type { border-bottom: 0; }
.data-table tbody.group:hover td, .data-table tbody:not(.group) tr:hover td { background: #FAFAFA; }
.data-table tbody.group tr:not(:last-child) td.item { border-bottom: 1px dashed var(--line); }
.data-table .ta-r { text-align: right; }
.data-table td.item, .data-table td.num { font-variant-numeric: tabular-nums; }
.data-table .col-no { width: 52px; color: var(--faint); }
.sto-no { font-weight: 700; color: var(--ink); white-space: nowrap; }
.link-btn.sto-no { color: var(--brand); }
.link-btn.sto-no:hover { color: var(--brand-600); text-decoration: underline; }
.data-table .place { min-width: 130px; max-width: 210px; white-space: pre-line; overflow-wrap: anywhere; }
.data-table .name { min-width: 140px; color: var(--ink); }
.data-table .total { font-weight: 700; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.data-table .muted { color: var(--faint); }
.row-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.data-table tfoot th, .data-table tfoot td { background: var(--brand-50); color: var(--ink); font-size: 14px; border-top: 1px solid var(--brand-100); border-bottom: 0; padding: 14px; }
.data-table tfoot .total { color: var(--brand-700); }
.data-table tr.is-dup td { background: var(--accent-50); }
.data-table.compact td, .data-table.compact th { padding: 10px 12px; }
.line-items { min-width: 230px; }
.line-items .li + .li { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.line-items .li strong { display: block; color: var(--ink); }
.line-items .li span { font-size: 12.5px; font-weight: 300; color: var(--muted); font-variant-numeric: tabular-nums; }
.route-cell { min-width: 220px; overflow-wrap: anywhere; }
.addr { display: block; white-space: pre-line; }
.route-cell .to { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.route-cell small { display: block; color: var(--faint); font-size: 11.5px; margin-bottom: 1px; }
.notes { margin-top: 8px; font-size: 12.5px; font-style: italic; color: #B45309; }
.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; white-space: pre-line; }
.data-table .refs { min-width: 130px; }
.refs .ref { display: flex; align-items: center; gap: 8px; }
.refs .ref + .ref { margin-top: 8px; }
.refs small { width: 30px; flex: none; color: var(--faint); font-size: 11.5px; font-weight: 700; }
.refs .ref > span:not(.badge) { color: var(--ink); overflow-wrap: anywhere; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 48px 20px; text-align: center; color: var(--muted); }
.empty .chip-icon { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 10px; background: var(--brand-50); color: var(--brand); border: 1px solid var(--brand-100); }
.empty h3 { font-size: 15px; color: var(--ink); }
.empty p { max-width: 42ch; font-weight: 300; }

/* ---------- kartu STO (HP & tablet kecil) ---------- */
.sto-cards { display: none; gap: 12px; }
.sto-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.sto-card .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.sto-card .sto-no { font-size: 16px; overflow-wrap: anywhere; white-space: normal; }
.sto-card .date { color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.sto-card .badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.sto-card .route { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; border-radius: 10px; background: #FAFAFA; border: 1px solid var(--line-soft); overflow-wrap: anywhere; }
.sto-card .route + .route { margin-top: 8px; }
.sto-card .route small { display: block; color: var(--faint); font-size: 11.5px; }
.sto-card .route p { color: var(--ink); white-space: pre-line; }
.sto-card .items { margin-top: 12px; }
.sto-card .items li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.sto-card .items li:last-child { border-bottom: 0; }
.sto-card .items b { color: var(--ink); }
.sto-card .items span { color: var(--muted); font-weight: 300; text-align: right; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.sto-card .sum { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; margin-bottom: 4px; border-top: 1px solid var(--line); }
.sto-card .sum strong { font-size: 16px; color: var(--brand-700); font-variant-numeric: tabular-nums; }
.sto-card .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sto-card .actions > :only-child { grid-column: 1 / -1; }

/* ---------- pagination ---------- */
.pager { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 12px 20px; border-top: 1px solid var(--line); }
.pager-info { color: var(--muted); font-size: 13px; font-weight: 300; }
.pager-links { display: flex; gap: 4px; flex-wrap: wrap; }
.page-link { min-width: 34px; height: 34px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 13px; text-decoration: none !important; }
a.page-link:hover { border-color: var(--brand-500); color: var(--brand); }
.page-link.is-current { background: var(--yellow); border-color: var(--yellow-600); color: var(--yellow-ink); font-weight: 700; }
.page-link.is-disabled { color: var(--faint); opacity: .6; pointer-events: none; }
.page-link.is-wide { display: inline-flex; gap: 4px; padding: 0 12px; }

/* ---------- modal: tengah (pratinjau impor) & panel samping (detail / tambah STO) ---------- */
.modal {
    display: none; flex-direction: column; padding: 0; border: 0; color: var(--text);
    width: min(1180px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 48px); margin: auto;
    background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.modal[open] { display: flex; animation: pop .2s ease; }
.modal::backdrop { background: rgba(24, 24, 27, .45); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); animation: fade .15s ease; }
.modal:focus { outline: 0; }
.modal-sm { width: min(440px, calc(100vw - 32px)); }
.modal-lg { width: min(860px, 100vw); height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-radius: 18px 0 0 18px; }
.modal-lg[open] { animation: slidein .26s cubic-bezier(.2, .8, .2, 1); }
.modal-head { display: flex; align-items: center; gap: 14px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.modal-head .titles { flex: 1; min-width: 0; }
.modal-head h2 { font-size: 18px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.modal-head p { font-size: 13px; font-weight: 300; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { flex: 1; min-height: 0; overflow: auto; padding: 20px 24px 24px; overscroll-behavior: contain; background: #FAFAF9; }
.modal-body > * + * { margin-top: 16px; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 24px; border-top: 1px solid var(--line); background: #fff; }
.modal-foot .note { font-size: 12.5px; font-weight: 300; font-style: italic; color: var(--muted); max-width: 46ch; }
.modal-foot .foot-actions { display: flex; gap: 10px; margin-left: auto; }
.modal-foot form { margin: 0; }
.modal:not(.is-editing) [data-edit] { display: none !important; }
.modal.is-editing [data-view] { display: none !important; }
.modal-foot .foot-main, .modal-foot .foot-confirm { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; width: 100%; }
.modal-foot .foot-confirm { display: none; }
.modal-foot .foot-confirm p { color: #991B1B; max-width: 60ch; }
.modal.is-confirming .foot-main { display: none; }
.modal.is-confirming .foot-confirm { display: flex; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.98) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes slidein { from { transform: translateX(100%); } to { transform: none; } }
@keyframes slideup { from { transform: translateY(100%); } to { transform: none; } }

/* ringkasan pratinjau impor */
.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.summary > div { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.summary strong { display: block; font-size: 22px; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; }
.summary span { font-size: 12.5px; font-weight: 300; color: var(--muted); }

/* detail STO */
.view-stack > * + * { margin-top: 16px; }
.panel { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.panel-warn { border-color: #FDE68A; background: var(--accent-50); }
.panel > h3 { margin-bottom: 12px; }
.detail-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.section-title { display: flex; align-items: center; gap: 4px; margin-bottom: 12px; }
.dl { display: grid; }
.dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.dl > div:first-child { padding-top: 0; }
.dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.dl dt { color: var(--muted); font-weight: 300; }
.dl dd { color: var(--ink); text-align: right; overflow-wrap: anywhere; }
.route-line { position: relative; display: grid; gap: 18px; padding-left: 28px; }
.route-line::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; border-left: 2px dotted #D4D4D8; }
.route-line > div { position: relative; overflow-wrap: anywhere; }
.route-line > div::before { content: ""; position: absolute; left: -28px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 4px solid var(--brand-500); }
.route-line > div:last-child::before { border-color: #F59E0B; }
.route-line small { display: block; color: var(--faint); font-size: 12px; }
.route-line p { color: var(--ink); white-space: pre-line; }

/* form STO: baris barang */
.items-block { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.items-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.item-list { display: grid; gap: 10px; }
.item-row { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1.2fr) minmax(0, 1.2fr) 38px; gap: 10px; align-items: start; padding: 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.item-row .field + .field { margin-top: 0; }
.item-row .item-remove { margin-top: 27px; color: var(--faint); }
.item-row .item-remove:hover { background: #FEF2F2; color: var(--danger); }
.item-row .amount { display: flex; align-items: center; height: 44px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; overflow: hidden; }
.items-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 14px 16px; border-radius: 12px; background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand-700); }
.items-total strong { font-size: 18px; color: var(--brand-700); font-variant-numeric: tabular-nums; }

/* ---------- dasbor: grafik ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.donut-wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.donut { --percent: 0%; --color: var(--brand); --rest: var(--line-soft); flex: none; width: 136px; height: 136px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--color) 0 var(--percent), var(--rest) var(--percent) 100%); }
.donut-core { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100px; height: 100px; border-radius: 50%; background: #fff; line-height: 1.2; }
.donut-core strong { font-size: 24px; color: var(--ink); }
.donut-core small { font-size: 11px; font-weight: 300; color: var(--muted); }
.legend { display: grid; gap: 0; flex: 1; min-width: 150px; font-size: 13.5px; }
.legend li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); color: var(--text); }
.legend li:last-child { border-bottom: 0; }
.legend i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.legend span { flex: 1; }
.legend b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.bars { display: flex; align-items: stretch; gap: 12px; height: 230px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bar-val { font-size: 12.5px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(0deg, transparent 0 45px, var(--line-soft) 45px 46px); }
.bar { width: 100%; max-width: 36px; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, #52525B 0%, #27272A 100%); }
.bar-col.is-today .bar { background: linear-gradient(180deg, #FCD34D 0%, #F59E0B 100%); }
.bar-col.is-zero .bar { background: var(--line); }
.bar-lbl { font-size: 11.5px; font-weight: 300; color: var(--muted); white-space: nowrap; }
.recent-list { list-style: none; margin: 0; padding: 6px; }
.recent { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none !important; transition: background .12s; }
.recent:hover { background: var(--line-soft); color: var(--ink); }
.recent .chip-icon { width: 36px; height: 36px; border-radius: 9px; }
.recent .info { flex: 1; min-width: 0; }
.recent strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent small { display: block; color: var(--muted); font-size: 12px; font-weight: 300; }
.recent .go { color: var(--faint); }
.card-head a.more { font-size: 13px; font-weight: 700; white-space: nowrap; }

/* ---------- akun ---------- */
.account-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 1.8fr); gap: 16px; align-items: start; }
.profile { text-align: center; padding: 28px 20px !important; background: linear-gradient(180deg, var(--brand-50) 0, #fff 96px); }
.profile .avatar { margin: 0 auto 14px; }
.profile h2 { font-size: 18px; }
.profile p { margin-top: 2px; color: var(--muted); font-weight: 300; }
.pw-rules { display: flex; gap: 10px; align-items: center; margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: var(--line-soft); font-size: 13px; color: var(--muted); }

/* ---------- login: kartu dua panel di tengah layar ---------- */
.login-page { background: var(--bg); }
.login {
    min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 32px 20px;
    background:
        radial-gradient(600px 400px at 15% 10%, rgba(250, 204, 21, .16), transparent 70%),
        radial-gradient(520px 380px at 90% 90%, rgba(251, 191, 36, .14), transparent 70%),
        radial-gradient(circle at 1px 1px, #E7E5E4 1px, transparent 0) 0 0 / 22px 22px,
        var(--bg);
}
.login-card { width: min(1040px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 40px 90px -40px rgba(24, 24, 27, .35); overflow: hidden; }
.login-form { display: flex; flex-direction: column; padding: 36px 44px 28px; }
.login-brand { display: flex; align-items: center; gap: 14px; color: var(--ink); }
.co-tile { width: 40px; height: 40px; flex: none; display: grid; place-items: center; padding: 5px; border-radius: 10px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.co-tile img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-sep { width: 1px; height: 28px; background: var(--line); flex: none; }
.login-head { margin: 44px 0 26px; }
.login-head h1 { margin-top: 6px; font-size: 30px; }
.login-head p { margin-top: 6px; color: var(--muted); font-weight: 300; font-size: 15px; }
.auth-form { display: grid; gap: 16px; }
.auth-form .field + .field { margin-top: 0; }
.auth-form .input { height: 48px; }
.auth-form .btn { margin-top: 6px; }
.login-copy { margin-top: auto; padding-top: 32px; color: var(--faint); font-size: 12px; font-weight: 300; }
.login-visual {
    position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding: 44px 44px 36px; min-height: 560px; color: #fff; overflow: hidden;
    background: radial-gradient(460px 340px at 100% 0%, rgba(250, 204, 21, .28), transparent 70%), linear-gradient(160deg, #2A2E35 0%, #1C1F24 55%, #141619 100%);
}
.login-visual::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .12) 1px, transparent 0) 0 0 / 22px 22px; pointer-events: none; }
.login-visual > * { position: relative; }
.login-caption { margin: auto 0; }
.login-caption .eyebrow { color: var(--yellow); }
.login-caption h2 { margin-top: 10px; color: #fff; font-size: clamp(30px, 3.2vw, 42px); line-height: 1.12; letter-spacing: -.01em; }
.login-caption h2 em { font-style: normal; color: var(--yellow); }
.login-caption p { margin-top: 14px; color: rgba(255, 255, 255, .8); font-weight: 300; font-size: 16px; line-height: 1.65; max-width: 40ch; }

/* ---------- halaman error ---------- */
.err-wrap { min-height: 100vh; width: 100%; display: grid; place-items: center; padding: 24px; text-align: center; background: radial-gradient(circle at 1px 1px, #E7E5E4 1px, transparent 0) 0 0 / 22px 22px, var(--bg); }
.err-card { width: min(460px, 100%); padding: 32px 28px 28px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-md); }
.err-brand { display: inline-flex; color: var(--ink); margin-bottom: 26px; text-align: left; }
.err-code { font-size: 72px; font-weight: 700; line-height: 1; letter-spacing: -.02em; background: linear-gradient(135deg, #3F3F46, #18181B); -webkit-background-clip: text; background-clip: text; color: transparent; }
.err-card h1 { font-size: 20px; margin-top: 12px; }
.err-card p { color: var(--muted); font-weight: 300; max-width: 380px; margin: 6px auto 0; }
.err-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.err-wrap .err-copy { color: var(--faint); font-size: 12px; font-weight: 300; margin-top: 18px; }

/* ---------- kartu daftar STO (judul + filter + tabel + paginasi) ---------- */
.list-card { overflow: hidden; }
.list-card .card-head h2 { display: flex; align-items: center; flex-wrap: wrap; }
.list-card .filters { padding-top: 14px; padding-bottom: 14px; background: #FAFAF9; }
.list-card .table-scroll, .list-card .list-empty { border-top: 1px solid var(--line); }
.list-card .sto-cards { gap: 0; border-top: 1px solid var(--line); }
.list-card .sto-card { border: 0; border-radius: 0; box-shadow: none; }
.list-card .sto-card + .sto-card { border-top: 1px solid var(--line); }
.list-card .data-table { font-size: 13.5px; }
.list-card .data-table th, .list-card .data-table td { padding-left: 10px; padding-right: 10px; }
.list-card .data-table th:first-child, .list-card .data-table td.col-no { padding-left: 18px; width: 44px; }
.list-card .data-table thead th:last-child, .list-card .data-table td:has(> .row-actions) { padding-right: 18px; }
.list-card .data-table .place { min-width: 110px; max-width: 170px; }
.list-card .data-table .name { min-width: 120px; }
.list-card .data-table .refs { min-width: 150px; }
.list-card .data-table .badge { padding: 1px 7px; font-size: 11.5px; }

/* ---------- responsif ---------- */
@media (max-width: 1300px) { .today { display: none; } }
@media (max-width: 1180px) {
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-main, .account-grid { grid-template-columns: minmax(0, 1fr); }
}

/* tablet & HP: sidebar jadi laci yang dibuka dari tombol menu */
@media (max-width: 1023px) {
    .sidebar { transform: translateX(-100%); transition: transform .25s cubic-bezier(.2, .8, .2, 1); box-shadow: none; }
    body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
    body.nav-open .side-backdrop { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(24, 24, 27, .45); }
    .sidebar .side-close { display: inline-grid; }
    .main { margin-left: 0; }
    .topbar { padding: 0 14px 0 8px; gap: 8px; }
    .topbar .nav-toggle { display: inline-grid; }
    .topbar .topbar-brand { display: flex; }
    .crumbs { display: none; }
    .topbar-brand .brand-mark { width: 34px; height: 34px; }
    .shell { padding: 22px 20px 32px; }
    .footer { padding: 4px 20px 24px; }
    .modal-lg { width: min(760px, 100vw); }
}

@media (max-width: 900px) {
    .detail-cols, .form-grid { grid-template-columns: minmax(0, 1fr); }
    .form-grid > .field:empty { display: none; }
    .item-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .item-row .item-name { grid-column: 1 / -1; }
    .item-row .item-remove { grid-column: 1 / -1; justify-self: end; margin-top: 0; }
    .upload-grid { grid-template-columns: minmax(0, 1fr); }
    .dropzone { min-height: 200px; }
    .grid-2 { grid-template-columns: minmax(0, 1fr); }

    .login { padding: 16px; place-items: start center; }
    .login-card { grid-template-columns: minmax(0, 1fr); max-width: 480px; }
    .login-visual { display: none; }
    .login-form { padding: 28px 24px 22px; }
    .login-head { margin: 32px 0 22px; }
    .login-head h1 { font-size: 25px; }
}

@media (max-width: 820px) {
    .desk-only { display: none !important; }
    .sto-cards { display: grid; }
}

@media (max-width: 760px) {
    .shell { padding: 18px 14px 28px; }
    .shell > * + * { margin-top: 16px; }
    .card-head { padding: 14px 16px; flex-wrap: wrap; } .card-body { padding: 16px; } .card.pad { padding: 16px; }
    h1, .page-head h1 { font-size: 24px; }
    .page-head .lead { font-size: 14px; }
    .head-actions { width: 100%; }
    .head-actions .btn { flex: 1 1 0; }
    .kpis { gap: 10px; }
    .kpi { padding: 14px; }
    .kpi-ico { width: 34px; height: 34px; border-radius: 9px; }
    .kpi-n { font-size: 26px; } .kpi-n.money { font-size: 18px; }
    .kpi-f { display: none; }
    .topbar-actions .btn span { display: none; }
    .topbar-actions .btn { width: 40px; padding: 0; }
    .filters .select, .filters .btn, .filters .input-icon { flex: 1 1 100%; width: 100%; }
    .input, .select { font-size: 16px; }
    .pager { justify-content: center; padding: 12px 16px; }
    .pager-info { width: 100%; text-align: center; }
    .summary { gap: 8px; }
    .summary > div { flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; }
    .summary .chip-icon { display: none; }
    .summary strong { font-size: 20px; }
    .summary span { font-size: 11.5px; line-height: 1.3; }

    /* modal -> lembar dari bawah */
    .modal, .modal-lg, .modal-sm { width: 100vw; max-width: none; height: auto; max-height: 94dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
    .modal[open], .modal-lg[open] { animation: slideup .28s cubic-bezier(.2, .8, .2, 1); }
    .modal-head { padding: 14px 16px; }
    .modal-body { padding: 16px; }
    .modal-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
    .modal-foot .note { display: none; }
    .modal-foot .foot-actions { width: 100%; }
    .modal-foot .foot-actions > *, .modal-foot .foot-actions form .btn { flex: 1; width: 100%; }
    .modal-foot .foot-main > .btn { width: 100%; }

    /* tabel -> daftar berlabel */
    .stack-table, .stack-table tbody { display: block; }
    .stack-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .stack-table tr { display: block; padding: 4px 14px; border-bottom: 1px solid var(--line); }
    .stack-table tbody tr:last-child { border-bottom: 0; }
    .stack-table td { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; text-align: right; border-bottom: 1px solid var(--line-soft) !important; }
    .stack-table td:last-child { border-bottom: 0 !important; }
    .stack-table td::before { content: attr(data-label); flex: none; color: var(--faint); font-size: 12px; font-weight: 300; text-align: left; }
    .stack-table td > * { text-align: right; }
    .stack-table .route-cell, .stack-table .line-items, .stack-table .name { min-width: 0; }
    .stack-table .col-no { width: auto; }
    .stack-table tfoot, .stack-table tfoot tr { display: block; }
    .stack-table tfoot tr { padding: 0 14px; background: var(--brand-50); }
    .stack-table tfoot th, .stack-table tfoot td { display: flex; justify-content: space-between; border: 0 !important; padding: 10px 0; }
    .stack-table tfoot td::before { content: none; }

    .dl > div { flex-direction: column; gap: 2px; }
    .dl dd { text-align: left; }
    .err-code { font-size: 60px; }
    .toasts, .toasts[popover] { inset: calc(var(--topbar-h) + 8px) 12px auto 12px; width: auto; }
}

@media (max-width: 400px) { .topbar-brand .brand-text small { display: none; } }

/* ---------- cetak ---------- */
@media print {
    .sidebar, .topbar, .footer, .toasts, .filters, .dropzone, .pager, .row-actions, .modal, .no-print { display: none !important; }
    .main { margin: 0; }
    body { background: #fff; font-size: 12px; }
    .shell { padding: 0; max-width: none; }
    .card, .table-card { box-shadow: none; border-color: #999; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* tabel Master STO: Qty + satuan satu kolom, aksi berupa ikon */
.data-table td.qty { white-space: nowrap; }
.data-table .unit { color: var(--faint); font-size: 12px; }
.list-card .row-actions { flex-direction: row; gap: 4px; }
.icon-btn.act { width: 32px; height: 32px; border: 1px solid var(--line); background: #fff; color: var(--muted); }
.icon-btn.act:hover { border-color: var(--brand-500); color: var(--brand); background: var(--brand-50); text-decoration: none; }
.list-card .data-table .place { max-width: 140px; }
.list-card .data-table .refs { min-width: 166px; }

/* lockup di sidebar: logo perusahaan | ikon aplikasi + nama */
.sidebar .brand { gap: 10px; }
.sidebar .co-tile { width: 36px; height: 36px; padding: 4px; border: 0; border-radius: 9px; box-shadow: inset 0 -2px 0 var(--yellow); }
.sidebar .brand-sep { height: 24px; background: rgba(255, 255, 255, .14); }
.sidebar .brand-mark { width: 36px; height: 36px; }
.sidebar .brand-text b { font-size: 14.5px; }
.side-top { padding-left: 16px; }
.sidebar .brand-mark, .topbar-brand .brand-mark { box-shadow: 0 0 0 1px rgba(255, 255, 255, .22); }
.topbar-brand .brand-mark { box-shadow: none; }

/* ---------- jejak perubahan, Sampah, urungkan ---------- */
.side-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 6px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center; }
.side-link.active .side-count { background: rgba(0, 0, 0, .12); color: var(--yellow-ink); }
.toast-undo { margin-top: 8px; }
.timeline { display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--faint); }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 5px; top: 18px; bottom: 2px; width: 1.5px; background: var(--line); }
.timeline .tl-imported::before, .timeline .tl-created::before { border-color: var(--yellow-600); background: var(--yellow); }
.timeline .tl-references::before, .timeline .tl-restored::before { border-color: var(--success); }
.timeline .tl-deleted::before, .timeline .tl-purged::before { border-color: var(--danger); }
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.tl-head strong { color: var(--ink); font-size: 13.5px; }
.tl-meta { color: var(--faint); font-size: 12px; font-weight: 300; }
.tl-note { margin-top: 2px; color: var(--muted); font-size: 12.5px; font-weight: 300; overflow-wrap: anywhere; }
.tl-changes { margin-top: 4px; display: grid; gap: 2px; font-size: 12.5px; color: var(--text); }
.tl-changes b { font-weight: 700; color: var(--ink); }
.tl-changes .old { color: var(--faint); text-decoration: line-through; }
.tl-changes .new { color: var(--ink); }
.trash-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.trash-actions form { margin: 0; }
.trash-confirm { display: none; }
.trash-confirm p { margin-bottom: 6px; font-size: 12.5px; color: #991B1B; }
[data-confirm-scope].is-confirming > td > .trash-actions { display: none; }
[data-confirm-scope].is-confirming .trash-confirm { display: block; }
[data-confirm-scope].is-confirming td { background: #FEF2F2; }

/* ---------- jendela unggah, STO gagal dibaca, isi cepat, filter periode ---------- */
.modal-md { width: min(820px, calc(100vw - 32px)); }
.modal-md .upload-grid { grid-template-columns: minmax(0, 1.25fr) minmax(240px, 1fr); gap: 20px; }
.modal-md .dropzone { min-height: 230px; }
.modal-md .modal-body > .alert { margin-bottom: 16px; }
.alert-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.alert-actions form { margin: 0; }
.summary { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.failed-box { border: 1px solid #FECACA; border-radius: 12px; background: #FFF7F7; }
.failed-head { display: flex; gap: 10px; padding: 14px 16px; color: #991B1B; }
.failed-head > .icon { flex: none; margin-top: 2px; }
.failed-head strong { display: block; color: #991B1B; }
.failed-head p { color: #7F1D1D; font-size: 13px; font-weight: 300; margin-top: 2px; }
.failed-list { display: grid; }
.failed-list li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid #FDE2E2; }
.failed-list .sto-no { min-width: 110px; }
.failed-list .fl-msg { flex: 1 1 260px; color: var(--muted); font-size: 13px; }
.failed-list .fl-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.failed-card { border-color: #FECACA; }
.failed-card .card-head { background: #FFF7F7; border-radius: var(--radius) var(--radius) 0 0; }
.failed-group + .failed-group { border-top: 1px solid var(--line); }
.failed-group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 20px; background: #FAFAF9; color: var(--muted); font-size: 12.5px; }
.failed-group-head form { margin: 0; }
.failed-card .failed-list li { padding-left: 20px; padding-right: 20px; border-top-color: var(--line-soft); }
.prefill-note { margin-bottom: 16px; }

.filters { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
.filters > .filter-row { flex: none; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filter-row .input-icon { flex: 1 1 280px; }
.period { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.period .input { width: 160px; }
.period .sep { color: var(--faint); }
.period-chips { display: flex; gap: 6px; }
.chip { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 12.5px; text-decoration: none !important; }
.chip:hover { border-color: var(--brand-500); color: var(--ink); }
.chip.is-on { background: var(--yellow); border-color: var(--yellow-600); color: var(--yellow-ink); font-weight: 700; }
.filter-row > .select[name="urut"] { margin-left: auto; min-width: 200px; }

.list-card.is-quick { border-color: #FDE68A; }
.quick-table td { vertical-align: middle; }
.quick-table .quick-cell { min-width: 190px; }
.quick-route { max-width: 280px; color: var(--muted); font-size: 13px; }
.input-sm { height: 38px; padding: 0 12px; font-size: 13.5px; }
.input.is-empty { background: #FFFBEB; border-color: #FCD34D; }
.input.is-changed { background: #F0FDF4; border-color: #4ADE80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .18); }
.quick-table tr.is-dirty td { background: #FBFFFB; }
.quick-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); }
.quick-status { color: var(--muted); font-size: 13px; }
[data-quick-form].has-changes .quick-status { color: #B45309; font-weight: 700; }
.quick-alert { margin: 12px 20px; }
body.is-loading, body.is-loading * { cursor: progress !important; }
[aria-busy="true"] { opacity: .6; }

@media (max-width: 900px) {
    .modal-md .upload-grid { grid-template-columns: minmax(0, 1fr); }
    .filter-row > .select[name="urut"] { margin-left: 0; }
}
@media (max-width: 760px) {
    .period { flex-wrap: wrap; width: 100%; }
    .period .input { flex: 1 1 130px; width: auto; }
    .period > span:first-child { width: 100%; }
    .filter-row > .select, .filter-row > .btn { flex: 1 1 100%; }
    .quick-table .quick-cell { min-width: 0; }
    .quick-table td.quick-cell { display: block; text-align: left; }
    .quick-table td.quick-cell::before { display: block; margin-bottom: 4px; }
    .quick-bar { padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); }
    .quick-bar .btn { width: 100%; }
    .failed-list .fl-actions { margin-left: 0; width: 100%; }
}
@media (max-width: 760px) { .modal-md { width: 100vw; } }
@media (max-width: 760px) {
    .quick-table td.quick-cell .input { text-align: left; }
    .quick-table td[data-label="Kegiatan"], .quick-table td[data-label="Rute"] { display: none; }
}
.btn-count { padding: 1px 7px; margin-left: 2px; border-radius: 6px; background: rgba(0, 0, 0, .1); font-size: 11.5px; font-weight: 700; }

/* ===== Pilihan periode (Dashboard, Rekap) ===== */
.period-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 4px 0 18px; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.period-bar .period-chips { flex-wrap: wrap; }
.period-bar .period { margin-left: auto; }
.period-bar .btn { height: 36px; }
@media (max-width: 760px) { .period-bar .period { margin-left: 0; } .period-bar .btn { width: 100%; justify-content: center; } }

/* grafik padat (per hari dalam sebulan) */
.bars.is-dense { gap: 3px; }
.bars.is-dense .bar-val { visibility: hidden; font-size: 11px; }
.bars.is-dense .bar-col:hover .bar-val { visibility: visible; }
.bars.is-dense .bar { border-radius: 4px 4px 0 0; }
.bars.is-dense .bar-lbl { font-size: 10.5px; }
.bar-col { cursor: default; }
.bar-col:hover .bar { filter: brightness(1.25); }
.kpi-n small { font-size: 14px; font-weight: 700; color: var(--muted); }

/* ===== Rekap ===== */
.rekap-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-bottom: 18px; background: var(--side); color: #fff; border-radius: var(--radius); overflow: hidden; }
.rekap-sum > div { padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; border-left: 1px solid rgba(255,255,255,.08); }
.rekap-sum > div:first-child { border-left: 0; box-shadow: inset 4px 0 0 var(--yellow); }
.rekap-sum span { font-size: 12.5px; color: #A1A1AA; }
.rekap-sum strong { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rekap-sum small { font-size: 13px; color: var(--yellow); }
.rekap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.rekap-wide { grid-column: 1 / -1; }
.rekap-card .card-title h2 { font-size: 16px; }
.rekap-table tbody th { background: none; color: var(--text); font-size: 13.5px; font-weight: 400; white-space: normal; vertical-align: middle; border-bottom: 1px solid var(--line-soft); }
.rekap-table td { vertical-align: middle; }
.rekap-table tfoot th, .rekap-table tfoot td { background: #FAFAF9; color: var(--ink); font-weight: 700; font-size: 13.5px; border-top: 1px solid var(--line); }
.rekap-table tfoot td { padding: 11px 14px; }
.rekap-note { margin-top: 14px; }
@media (max-width: 1023px) { .rekap-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .rekap-sum { grid-template-columns: minmax(0, 1fr); } .rekap-sum > div { border-left: 0; border-top: 1px solid rgba(255,255,255,.08); } }
@media print {
    .rekap-sum { background: #fff; color: #000; border: 1px solid #999; }
    .rekap-sum span, .rekap-sum small { color: #333; }
    .rekap-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .rekap-card { break-inside: avoid; }
    .table-scroll { overflow: visible !important; }
}

/* ===== Pengguna ===== */
.users-table tr.is-muted td { color: var(--faint); }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #A1A1AA; }
.status-dot.is-on { color: var(--text); }
.status-dot.is-on::before { background: #16A34A; }
.reset-pw { margin-top: 22px !important; padding-top: 18px; border-top: 1px dashed var(--line); }
.reset-pw h3 { margin: 0 0 12px; font-size: 14px; }
.modal-body .alert ul { margin: 0; padding-left: 18px; }
@media (max-width: 560px) { .modal .form-grid { grid-template-columns: minmax(0, 1fr); } }
.bar-val, .bar-lbl { min-height: 1.45em; line-height: 1.45; }
.rekap-table tbody th { padding: 14px; }
.rekap-table tbody tr:last-child th { border-bottom: 0; }
.users-table td:first-child { min-width: 240px; }
.rekap-table td.num { white-space: nowrap; }
