  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    /* Surfaces — warm neutral workshop, not cream stationery */
    --paper:      #F2F1ED;
    --card:       #FFFFFF;
    --card-2:     #FAF9F6;
    --ink:        #16150F;
    --ink-soft:   #2A2822;
    --ink-rail:   #1C1B14;

    /* Hairlines */
    --line:       #E4E1D9;
    --line-soft:  #EFEDE6;
    --line-dark:  rgba(255,255,255,0.10);

    /* Type */
    --text:       #16150F;
    --muted:      #6E6A61;
    --faint:      #A29D93;

    /* Antique gold — the accent, spent sparingly */
    --gold:       #A8842F;
    --gold-lift:  #C9A24E;
    --gold-soft:  #F4EDDA;
    --gold-line:  #E3D5AC;

    /* Functional status colours — deliberately unchanged.
       Staff already read these at a glance; recolouring costs more than it gains. */
    --st-fabric:  #8A6200;  --st-fabric-bg:  #FFF8E1;  --st-fabric-ln: #F0B429;
    --st-bin:     #B86C10;  --st-bin-bg:     #FFF4E5;  --st-bin-ln:    #E0913A;
    --st-batam:   #2D50D6;  --st-batam-bg:   #E8F0FE;  --st-batam-ln:  #4A6CF7;
    --st-delta:   #6C3483;  --st-delta-bg:   #F3E8FE;  --st-delta-ln:  #9B59B6;
    --st-store:   #1A8A4A;  --st-store-bg:   #E6F9F0;  --st-store-ln:  #2ECC71;
    --st-home:    #FFFFFF;  --st-home-bg:    #16150F;  --st-home-ln:   #16150F;
    --danger:     #C0392B;  --danger-bg:     #FDECEA;  --danger-ln:    #E74C3C;
    --ok:         #1A8A4A;

    --r-lg: 14px; --r-md: 10px; --r-sm: 7px;
    --rail: 236px;
    --tap: 46px;

    --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-ui: 'Jost', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-data: ui-monospace, 'SF Mono', 'Roboto Mono', Menlo, monospace;

    --shadow-card: 0 1px 2px rgba(22,21,15,0.04), 0 1px 8px rgba(22,21,15,0.03);
    --shadow-pop:  0 24px 70px rgba(22,21,15,0.22);
  }

  html, body { height: 100%; }
  body {
    font-family: var(--font-ui);
    background: var(--paper);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
  }
  input, textarea, select, button { font-family: inherit; font-size: inherit; color: inherit; }
  :focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
  .num { font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }

  /* ══ SHELL ══════════════════════════════════════════ */
  .shell { display: flex; min-height: 100vh; }

  /* ── Rail ── */
  .rail {
    width: var(--rail); min-width: var(--rail);
    background: var(--ink-rail); color: #fff;
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
  }
  .rail-head { padding: 22px 20px 18px; border-bottom: 1px solid var(--line-dark); }
  .wordmark {
    font-family: var(--font-display);
    font-size: 27px; letter-spacing: 0.22em; line-height: 1;
    color: #fff; display: block; padding-left: 2px;
  }
  .wordmark-sub {
    display: block; margin-top: 7px;
    font-size: 9px; letter-spacing: 0.26em; text-transform: uppercase;
    color: var(--gold); font-weight: 500;
  }
  .rail-new {
    margin: 16px 14px 6px; width: calc(100% - 28px); height: var(--tap);
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--gold); color: #16150F; border: none; border-radius: var(--r-md);
    font-size: 13.5px; font-weight: 600; letter-spacing: 0.03em; cursor: pointer;
    transition: filter .15s, transform .1s;
  }
  .rail-new:hover { filter: brightness(1.07); }
  .rail-new:active { transform: scale(.98); }
  .rail-nav { flex: 1; overflow-y: auto; padding: 10px 10px 14px; }
  .rail-group {
    font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
    color: rgba(255,255,255,0.34); padding: 14px 10px 7px;
  }
  .nav-item {
    width: 100%; display: flex; align-items: center; gap: 11px;
    height: 42px; padding: 0 11px; margin-bottom: 2px;
    background: none; border: none; border-radius: var(--r-sm);
    color: rgba(255,255,255,0.66); font-size: 13.5px; letter-spacing: 0.015em;
    cursor: pointer; text-align: left; position: relative;
    transition: background .14s, color .14s;
  }
  .nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
  .nav-item.on { background: rgba(255,255,255,0.09); color: #fff; font-weight: 500; }
  .nav-item.on::before {
    content: ''; position: absolute; left: -10px; top: 9px; bottom: 9px;
    width: 3px; background: var(--gold); border-radius: 0 3px 3px 0;
  }
  .nav-ico { width: 17px; flex-shrink: 0; opacity: .82; display: flex; }
  .nav-ico svg { width: 17px; height: 17px; }
  .nav-label { flex: 1; }
  .nav-count {
    font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 20px;
    background: rgba(255,255,255,0.11); color: rgba(255,255,255,0.7);
    font-variant-numeric: tabular-nums;
  }
  .nav-item.on .nav-count { background: var(--gold); color: #16150F; }
  .rail-foot { border-top: 1px solid var(--line-dark); padding: 12px 14px 16px; }
  .sync-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
  .sync-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ADE80; flex-shrink: 0; }
  .sync-dot.warn { background: #F0B429; }
  .sync-dot.bad  { background: #E74C3C; }
  .sync-text { font-size: 11px; color: rgba(255,255,255,0.5); letter-spacing: .02em; }
  .rail-refresh {
    width: 100%; height: 36px; background: rgba(255,255,255,0.07);
    border: 1px solid var(--line-dark); border-radius: var(--r-sm);
    color: rgba(255,255,255,0.78); font-size: 12.5px; cursor: pointer; transition: background .15s;
  }
  .rail-refresh:hover { background: rgba(255,255,255,0.13); }

  /* ── Main ── */
  .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .topbar {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
    padding: 26px 30px 18px; border-bottom: 1px solid var(--line); background: var(--paper);
    position: sticky; top: 0; z-index: 40;
  }
  .topbar-titles { min-width: 0; }
  .eyebrow {
    font-size: 9.5px; letter-spacing: 0.24em; text-transform: uppercase;
    color: var(--faint); margin-bottom: 5px;
  }
  .page-title {
    font-family: var(--font-display); font-size: 30px; font-weight: 500;
    letter-spacing: 0.005em; line-height: 1.1; color: var(--ink);
  }
  .topbar-actions { display: flex; gap: 9px; flex-shrink: 0; }
  .pane { padding: 22px 30px 60px; flex: 1; }

  /* ══ CONTROLS ══════════════════════════════════════ */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 38px; padding: 0 15px; border-radius: var(--r-sm);
    border: 1px solid var(--line); background: var(--card); color: var(--muted);
    font-size: 12.5px; letter-spacing: .02em; cursor: pointer; white-space: nowrap;
    transition: background .14s, border-color .14s, color .14s;
  }
  .btn:hover { background: var(--card-2); border-color: #D6D2C8; color: var(--text); }
  .btn.on { background: var(--ink); border-color: var(--ink); color: #fff; }
  .btn.gold { background: var(--gold); border-color: var(--gold); color: #16150F; font-weight: 600; }
  .btn.gold:hover { filter: brightness(1.07); background: var(--gold); color: #16150F; }
  .btn.ghost-danger:hover { background: var(--danger-bg); border-color: var(--danger-ln); color: var(--danger); }
  .btn.sm { height: 32px; padding: 0 11px; font-size: 12px; }
  .btn.tall { height: var(--tap); padding: 0 20px; font-size: 13.5px; }
  .btn svg { width: 14px; height: 14px; }

  .icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: var(--r-sm);
    border: 1px solid var(--line); background: var(--card); color: var(--faint);
    cursor: pointer; transition: all .14s; flex-shrink: 0;
  }
  .icon-btn:hover { background: var(--card-2); color: var(--text); border-color: #D6D2C8; }
  .icon-btn.danger:hover { background: var(--danger-bg); border-color: var(--danger-ln); color: var(--danger); }
  .icon-btn svg { width: 15px; height: 15px; }

  .field-label {
    display: block; font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--faint); margin-bottom: 6px;
  }
  .field {
    width: 100%; height: var(--tap); padding: 0 13px;
    border: 1px solid var(--line); border-radius: var(--r-sm);
    background: var(--card); color: var(--text); font-size: 14px; outline: none;
    transition: border-color .14s, box-shadow .14s; -webkit-appearance: none;
  }
  .field::placeholder { color: var(--faint); }
  .field:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(168,132,47,0.13); }
  .field.err { border-color: var(--danger-ln); background: var(--danger-bg); }
  textarea.field { height: auto; padding: 11px 13px; resize: vertical; line-height: 1.55; }
  select.field { cursor: pointer; }
  .field-err { color: var(--danger); font-size: 11.5px; margin-top: 5px; display: none; }
  .field-err.show { display: block; }
  .field-hint { font-size: 11px; color: var(--faint); margin-top: 5px; }

  .search-wrap { position: relative; flex: 1; min-width: 200px; }
  .search-wrap .field { padding-left: 38px; height: 40px; }
  .search-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; display: flex; }
  .search-ico svg { width: 15px; height: 15px; }
  .search-x {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--faint); cursor: pointer;
    padding: 5px 7px; line-height: 1; display: none;
  }
  .search-x:hover { color: var(--text); }
  .search-x.show { display: block; }

  .toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
  .toolbar-label { font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
  .toolbar-sep { width: 1px; height: 22px; background: var(--line); flex-shrink: 0; }

  /* ══ CARDS & EMPTY ═════════════════════════════════ */
  .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
  .section-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    margin-bottom: 11px;
  }
  .section-title { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); }
  .empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 68px 24px; background: var(--card);
    border: 1px dashed var(--line); border-radius: var(--r-lg); color: var(--muted);
  }
  .empty-mark { color: var(--line); margin-bottom: 14px; }
  .empty-mark svg { width: 38px; height: 38px; }
  .empty-title { font-family: var(--font-display); font-size: 21px; color: var(--ink); margin-bottom: 6px; }
  .empty-body { font-size: 13px; color: var(--muted); max-width: 340px; line-height: 1.6; }
  .empty .btn { margin-top: 18px; }