  :root {
    --bg: #FBF5E6;
    --bg-grad: radial-gradient(ellipse 900px 500px at 50% -10%, #FFFBF2 0%, #FBF5E6 60%);
    --surface: #FFFFFF;
    --surface-2: #FDF9EF;
    --border: #E7DBB8;
    --border-soft: #EFE6CC;
    --gold: #B8860F;
    --gold-bright: #8A6410;
    --gold-dim: #C9A03D;
    --ink: #2B1F04;
    --text: #332B18;
    --text-muted: #7A6E4E;
    --success-bg: #E6F0DC;
    --success-fg: #4B7327;
    --danger-bg: #FBE7E0;
    --danger-fg: #B24B2C;
    --info-bg: #E4EEF7;
    --info-fg: #2E6693;
  }
  * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  body {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-grad), var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
  }
  .wrap { max-width: 640px; margin: 0 auto; padding: 28px 16px calc(60px + env(safe-area-inset-bottom)); }
  @media (min-width: 700px) {
    .wrap { max-width: 720px; padding-left: 24px; padding-right: 24px; }
  }
  @media (min-width: 900px) {
    .wrap { max-width: 900px; }
  }
  @media (min-width: 1200px) {
    .wrap { max-width: 1080px; padding-left: 32px; padding-right: 32px; }
  }
  header { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--border-soft); position: relative; }
  header::after {
    content: ""; position: absolute; left: 0; bottom: -1px; width: 64px; height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
  }
  header h1 {
    font-family: "Fraunces", Georgia, serif; font-optical-sizing: auto;
    font-size: 24px; font-weight: 600; margin: 0 0 4px; color: var(--gold-bright);
    letter-spacing: .2px;
  }
  header p { font-size: 13px; color: var(--text-muted); margin: 0; }

  .tabbar {
    display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: nowrap;
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    touch-action: pan-x pan-y; overscroll-behavior-x: contain;
    position: sticky; top: 0; background: var(--bg); padding: 10px 0; z-index: 10;
    border-bottom: 1px solid transparent;
  }
  .tabbar::-webkit-scrollbar { display: none; }
  .tab-btn {
    flex: 0 0 auto; min-width: 70px; min-height: 44px; padding: 10px 14px; font-size: 12px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
    border-radius: 999px; cursor: pointer; text-align: center; font-weight: 500;
    white-space: nowrap; transition: border-color .15s ease, color .15s ease;
  }
  .tab-btn.active { background: var(--gold); color: var(--ink); border-color: var(--gold); font-weight: 700; }

  .panel { display: none; }
  .panel.active { display: block; }

  .card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
    padding: 18px; margin-bottom: 16px;
    box-shadow: 0 1px 0 rgba(255,255,255,.02) inset, 0 12px 24px -16px rgba(0,0,0,.6);
  }
  .card h2 {
    font-family: "Fraunces", Georgia, serif; font-weight: 600;
    font-size: 16px; margin: 0 0 14px; color: var(--text);
  }
  /* Borang login saiz biasa di laptop/desktop, bukan selebar halaman. */
  #admin-login-gate > .card { max-width: 440px; margin-left: auto; margin-right: auto; }
  /* Landing: pengenalan di sebelah kiri, log masuk admin di sebelah kanan (satu lajur di telefon). */
  #landing-hero { display: none; color: #fff; }
  body.is-login #landing { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 440px); gap: 40px; align-items: start; }
  body.is-login #landing-hero { display: block; }
  body.is-login #admin-login-gate { position: sticky; top: 20px; }
  body.is-login #admin-login-gate > .card { max-width: none; margin: 0; }
  .lp-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); background: rgba(255,221,85,.12); border: 1px solid rgba(255,221,85,.35); padding: 5px 11px; border-radius: 999px; margin: 0 0 14px; }
  #landing-hero .lp-title { font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 14px; color: #fff; }
  #landing-hero .lp-title em { font-style: normal; color: var(--gold); }
  .lp-lead { font-size: clamp(15px, 1.6vw, 17px); line-height: 1.6; margin: 0 0 20px; color: rgba(255,255,255,.82); max-width: 56ch; }
  .lp-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 22px; }
  .lp-feature { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 16px; padding: 14px 15px; }
  .lp-feature .lp-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--gold); color: var(--ink); margin-bottom: 10px; }
  .lp-feature .lp-ico svg { width: 20px; height: 20px; }
  .lp-feature h2 { font-size: 15px; margin: 0 0 4px; color: #fff; font-weight: 700; }
  .lp-feature p { font-size: 13px; line-height: 1.5; margin: 0; color: rgba(255,255,255,.74); }
  .lp-steps { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 22px; padding: 0; list-style: none; }
  .lp-steps li { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; color: #fff; }
  .lp-steps .lp-n { width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--ink); display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; }
  .lp-steps .lp-arrow { color: rgba(255,255,255,.4); }
  .lp-preview { background: #fff; border-radius: 18px; padding: 16px 18px; max-width: 330px; box-shadow: 0 18px 40px -18px rgba(0,0,0,.6); color: var(--text); margin: 0 0 22px; }
  .lp-preview .lp-tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 8px; }
  .lp-preview .lp-lab { font-size: 12px; color: var(--text-muted); margin: 0; }
  .lp-preview .lp-amt { font-size: 24px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
  .lp-preview .lp-div { border-top: 1px solid var(--border-soft); margin: 10px 0 8px; }
  .lp-vendor-note { font-size: 13px; line-height: 1.55; margin: 0 0 16px; padding: 11px 13px; border-radius: 12px; background: rgba(255,255,255,.1); border: 1px dashed rgba(255,255,255,.3); color: rgba(255,255,255,.88); }
  #intro-login-btn { display: none; }
  @media (max-width: 900px) {
    body.is-login #landing { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    body.is-login #admin-login-gate { position: static; }
    #intro-login-btn { display: inline-flex; }
    .lp-features { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .lp-feature { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 12px; padding: 12px 13px; }
    .lp-feature .lp-ico { grid-row: 1 / 3; margin: 0; }
    .lp-feature h2 { margin: 0 0 2px; }
    .lp-preview { max-width: none; }
  }
  input[type=file] { width: 100%; font-size: 14px; padding: 12px; border: 1px dashed var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); font-family: inherit; }
  /* Kad boleh buka/tutup (data-collapse): tajuk (h2) memegang satu butang; klik butang untuk tukar. */
  .card[data-collapse] > h2 { margin-top:0; }
  .card[data-collapse] > h2 > .card-toggle { all:unset; box-sizing:border-box; width:100%; cursor:pointer; display:flex; align-items:center; justify-content:space-between; gap:12px; user-select:none; font:inherit; color:inherit; letter-spacing:inherit; text-transform:inherit; }
  .card[data-collapse] > h2 > .card-toggle::after { content:""; flex:none; width:9px; height:9px; margin:0 6px 5px 0; border-right:2.5px solid var(--text-muted); border-bottom:2.5px solid var(--text-muted); transform:rotate(45deg); transition:transform .2s ease, margin .2s ease; }
  .card[data-collapse].is-collapsed > h2 { margin-bottom:0; }
  .card[data-collapse].is-collapsed > h2 > .card-toggle::after { transform:rotate(-45deg); margin-bottom:0; }
  .card[data-collapse] > h2 > .card-toggle:focus-visible { outline:3px solid rgba(94,56,172,.45); outline-offset:4px; border-radius:8px; }
  .card.is-collapsed > .card-collapse-body { display:none; }
  /* Cuti anak vendor: senarai hari yang boleh ditanda */
  /* Aliran hari ini: lima peringkat, garis kemajuan, peringkat semasa berdenyut */
  .day-flow-card h2 { margin-bottom:12px; }
  .day-flow-track { position:relative; display:grid; grid-template-columns:repeat(var(--df-cols, 5), minmax(0, 1fr)); gap:0; }
  .day-flow-line { position:absolute; top:19px; left:calc(50% / var(--df-cols, 5)); right:calc(50% / var(--df-cols, 5)); height:3px; border-radius:2px; background:var(--border); overflow:hidden; }
  .day-flow-fill { height:100%; width:calc(var(--df-fill, 0) * 1%); background:var(--gold); transition:width .8s ease; }
  .day-flow-step { all:unset; box-sizing:border-box; position:relative; display:flex; flex-direction:column; align-items:center; text-align:center; gap:4px; padding:0 4px; cursor:pointer; color:var(--text); }
  .day-flow-step:disabled { cursor:default; opacity:.6; }
  .day-flow-step:focus-visible { outline:3px solid rgba(94,56,172,.45); outline-offset:3px; border-radius:10px; }
  .day-flow-dot { position:relative; z-index:1; display:flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:50%; border:2px solid var(--border); background:var(--surface-2); color:var(--text-muted); transition:background .4s, border-color .4s, color .4s; }
  .day-flow-dot svg { width:18px; height:18px; }
  .day-flow-step.is-done .day-flow-dot { background:var(--gold); border-color:var(--gold); color:var(--ink); }
  .day-flow-step.is-now .day-flow-dot { border-color:var(--gold); color:var(--text); }
  .day-flow-step.is-now .day-flow-dot::after { content:""; position:absolute; inset:-6px; border-radius:50%; border:2px solid var(--gold); opacity:.6; animation:day-flow-pulse 1.6s ease-out infinite; }
  @keyframes day-flow-pulse { 0% { transform:scale(.85); opacity:.7; } 100% { transform:scale(1.35); opacity:0; } }
  .day-flow-title { font-size:13px; font-weight:700; line-height:1.25; }
  .day-flow-sub { font-size:12px; line-height:1.3; color:var(--text-muted); }
  .day-flow-step.is-now .day-flow-sub { color:var(--text); font-weight:600; }
  .day-flow-bar { display:block; width:86%; max-width:100px; height:5px; margin-top:2px; border-radius:3px; background:var(--border); overflow:hidden; }
  .day-flow-bar i { display:block; height:100%; background:var(--gold); transition:width .8s ease; }
  @media (max-width:640px) {
    .day-flow-track { grid-template-columns:1fr; gap:12px; }
    .day-flow-line { display:none; }
    .day-flow-step { display:grid; grid-template-columns:40px minmax(0, 1fr); grid-template-areas:"dot title" "dot sub" "dot bar"; column-gap:12px; row-gap:2px; align-items:center; text-align:left; padding:0; }
    .day-flow-dot { grid-area:dot; }
    .day-flow-title { grid-area:title; }
    .day-flow-sub { grid-area:sub; }
    .day-flow-bar { grid-area:bar; width:100%; max-width:none; }
  }
  @media (prefers-reduced-motion: reduce) { .day-flow-step.is-now .day-flow-dot::after { animation:none; opacity:.35; } .day-flow-fill, .day-flow-bar i, .day-flow-dot { transition:none; } }
  /* Overlay memuatkan (js/loading.js): menghalang sentuhan bila menunggu pelayan */
  .loading-overlay { position:fixed; inset:0; z-index:900; display:flex; align-items:center; justify-content:center; padding:24px; background:rgba(20,10,45,.55); backdrop-filter:blur(2px); -webkit-backdrop-filter:blur(2px); cursor:progress; }
  .loading-overlay[hidden] { display:none; }
  .loading-box { display:flex; flex-direction:column; align-items:center; gap:10px; max-width:300px; padding:22px 26px; border-radius:18px; background:var(--surface-2); color:var(--text); text-align:center; box-shadow:0 10px 40px rgba(0,0,0,.35); }
  .loading-spinner { width:38px; height:38px; border-radius:50%; border:4px solid var(--border); border-top-color:var(--gold); animation:loading-spin .8s linear infinite; }
  @keyframes loading-spin { to { transform:rotate(360deg); } }
  .loading-text { margin:0; font-size:15px; font-weight:700; }
  .loading-slow { margin:0; font-size:12px; line-height:1.4; color:var(--text-muted); }
  .loading-slow[hidden] { display:none; }
  @media (prefers-reduced-motion: reduce) { .loading-spinner { animation:none; border-top-color:var(--border); border-right-color:var(--gold); } }
  /* Corak cuti dan tak hantar */
  .ap-metrics { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px; margin:0 0 10px; }
  .ap-metric { background:var(--surface-1); border-radius:10px; padding:8px 10px; }
  .ap-metric .label { margin:0; font-size:12px; color:var(--text-muted); }
  .ap-metric .value { margin:0; font-size:22px; font-weight:800; }
  .ap-r-text { color:#a82f1f; } .ap-a-text { color:#8a5a00; } .ap-g-text { color:#1f6b2a; }
  .ap-filters { display:flex; gap:6px; flex-wrap:wrap; margin:0 0 4px; }
  .ap-chip { padding:6px 12px; font-size:13px; min-height:36px; width:auto; }
  .ap-chip.on { background:var(--gold) !important; color:var(--ink) !important; border-color:var(--gold) !important; }
  .ap-row { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1.4fr); gap:8px 14px; padding:12px 0; border-top:1px solid var(--border-soft); align-items:center; }
  @media (max-width:560px){ .ap-row { grid-template-columns:1fr; } }
  .ap-name { margin:0; font-weight:700; font-size:14px; color:var(--text); }
  .ap-counts, .ap-pattern { margin:4px 0 0; font-size:12px; }
  .ap-dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:8px; }
  .ap-dot.ap-r { background:#b34331; } .ap-dot.ap-a { background:#d98a0a; } .ap-dot.ap-g { background:#2f8f3a; }
  .ap-badge { display:inline-block; margin-top:6px; padding:2px 8px; border-radius:8px; font-size:12px; font-weight:700; }
  .ap-badge.ap-r { background:#fde2dd; color:#7d1f12; } .ap-badge.ap-a { background:#fdebc8; color:#6b4300; } .ap-badge.ap-g { background:#dff3df; color:#1d5a24; }
  .ap-tl { display:flex; gap:3px; flex-wrap:nowrap; }
  .ap-sq { display:inline-block; width:14px; height:22px; border-radius:3px; flex:none; }
  .ap-sq.ok { background:#4a9d54; } .ap-sq.c { background:#ef9f27; } .ap-sq.m { background:#c0392b; } .ap-sq.n { background:#cfc6e6; }
  .ap-sq.hi { outline:2px solid #c0392b; outline-offset:1px; }
  #dash-absence-list.ap-list { max-height:420px; overflow-y:auto; padding-right:4px; }
  #dash-absence-list .ap-row:first-child { border-top:0; }
  .ap-others { margin:10px 0 0; font-size:13px; }
  .ap-link { background:none; border:0; padding:0 2px; color:var(--text-accent, #5b3aa8); font:inherit; font-weight:700; text-decoration:underline; cursor:pointer; }
  .ap-legend { display:flex; flex-wrap:wrap; gap:6px 14px; margin-top:12px; padding-top:10px; border-top:1px solid var(--border-soft); font-size:12px; color:var(--text-muted); }
  .ap-legend span { display:inline-flex; align-items:center; gap:6px; }
  .ap-legend .ap-sq { width:12px; height:12px; }
  /* Cuti dan menu */
  .lm-day { margin:0 0 14px; }
  .lm-day-title { margin:0 0 6px; font-size:14px; font-weight:800; color:var(--text); }
  .lm-foods { list-style:none; margin:0; padding:0; display:grid; gap:4px; }
  .lm-foods li { font-size:13px; color:var(--text-muted); }
  .lm-food { display:flex; gap:8px; align-items:flex-start; cursor:pointer; color:var(--text); }
  .lm-food input { width:20px; height:20px; flex:none; margin-top:1px; accent-color:var(--gold-bright); }
  .lm-none { margin:0; font-size:12px; }
  .leave-days { display:grid; grid-template-columns:repeat(auto-fill, minmax(86px, 1fr)); gap:8px; margin-top:10px; max-height:52vh; overflow-y:auto; padding:2px; }
  .leave-day { min-height:48px; padding:8px 6px; border:1.5px solid var(--border); border-radius:12px; background:var(--surface-2); color:var(--text); font:inherit; font-size:13px; font-weight:600; line-height:1.25; text-align:center; cursor:pointer; }
  .leave-day[aria-pressed="true"] { background:var(--gold); border-color:var(--gold); color:var(--ink); }
  .leave-day small { display:block; font-size:11px; font-weight:800; }
  .leave-day:disabled { opacity:.5; cursor:not-allowed; }
  @media print { .card.is-collapsed > .card-collapse-body { display:block; } .card[data-collapse] > h2 > .card-toggle::after { display:none; } }
  .setting-group-label { margin:0 0 8px; color:var(--text-muted); font-size:12px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
  .row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
  .tappable-row { padding:10px 12px; border-radius:10px; background:var(--surface-2); margin-bottom:8px; cursor:pointer; transition:background .12s; }
  .tappable-row:hover, .tappable-row:active { background:var(--gold-bg, rgba(199,162,76,.14)); }
  .tappable-chevron { font-size:20px; font-weight:700; color:var(--text-muted, #8a8398); line-height:1; }
  .selected-slot { background:var(--gold) !important; color:var(--ink) !important; border-color:var(--gold) !important; }
  label { font-size: 12px; color: var(--text-muted); display: block; margin-bottom: 4px; }
  select, input[type=number], input[type=text], input[type=password], input[type=date], input[type=time], input[type=email], input[type=tel], textarea {
    width: 100%; font-size: 16px; padding: 11px 12px; border: 1px solid var(--border);
    border-radius: 10px; background: var(--surface-2); color: var(--text); font-family: inherit;
    outline: none; transition: border-color .15s ease;
  }
  select:focus, input:focus, textarea:focus { border-color: var(--gold); }
  input[type=date], input[type=time] { color-scheme: light; }
  textarea { font-family: ui-monospace, Menlo, monospace; font-size: 14px; resize: vertical; }
  button.btn {
    padding: 13px 16px; font-size: 15px; border-radius: 10px; border: 1px solid var(--gold);
    background: var(--gold); color: var(--ink); cursor: pointer; font-weight: 700; min-height: 46px;
    transition: background .15s ease, transform .05s ease;
  }
  button.btn:hover { background: var(--gold-bright); border-color: var(--gold-bright); }
  button.btn:active { transform: translateY(1px); }
  button.btn.secondary { background: transparent; color: var(--gold-bright); border: 1px solid var(--border); }
  button.btn.secondary:hover { border-color: var(--gold); background: var(--surface-2); }
  button.btn.full { width: 100%; }
  button.btn:disabled { opacity: 0.4; cursor: not-allowed; }

  .keyin-branch { margin-top: 10px; }
  .keyin-branch-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
  .keyin-branch-head label { margin: 0; font-weight: 700; color: var(--text); font-size: 14px; }
  .keyin-branch.closed textarea { opacity: .55; }
  .keyin-branch-warning { margin-top: 8px; }
  .badge { font-size: 11px; padding: 4px 9px; border-radius: 6px; font-weight: 600; white-space: nowrap; }
  .badge.aktif { background: var(--success-bg); color: var(--success-fg); }
  .badge.tutup { background: var(--danger-bg); color: var(--danger-fg); }
  .badge.ok { background: var(--success-bg); color: var(--success-fg); }
  .badge.beza { background: rgba(199,162,76,.16); color: var(--gold-bright); }
  .badge.manual { background: var(--info-bg); color: var(--info-fg); }
  .badge.info { background: var(--info-bg); color: var(--info-fg); }

  .table-scroll {
    overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 8px; border-radius: 10px;
    touch-action: pan-x pan-y; overscroll-behavior-x: contain; position: relative;
  }
  table { width: 100%; border-collapse: collapse; font-size: 13px; }
  /* Booking ambil duit tables: fixed columns, amounts right-aligned. */
  .pickup-table { table-layout: fixed; font-size: 14px; margin-bottom: 4px; }
  .pickup-table col.c-amt { width: 140px; }
  .pickup-table col.c-status { width: 92px; }
  .pickup-table col.c-left { width: 136px; }
  .pickup-table th { white-space: normal; vertical-align: bottom; }
  .pickup-table tr.pickup-calc td { padding: 0 0 10px; }
  .pickup-calc .pc-box { background: rgba(184, 134, 15, .12); border-radius: 10px; padding: 10px 12px; color: var(--ink); font-size: 13px; }
  .pickup-calc .pc-title { font-weight: 800; margin-bottom: 4px; }
  .pickup-calc .pc-line { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
  .pickup-calc .pc-line b { font-weight: 700; white-space: nowrap; }
  .pickup-calc .pc-line small { color: var(--text-muted); font-size: 12px; }
  .pickup-calc .pc-sum { border-top: 1px solid rgba(43, 31, 4, .25); margin-top: 4px; padding-top: 6px; font-weight: 700; }
  .pickup-calc .pc-tag { font-style: normal; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 8px; margin-left: 6px; }
  .pickup-calc .pc-tag.same { background: #dff3df; color: #1d5a24; }
  .pickup-calc .pc-tag.diff { background: #fde9c8; color: #7a4a05; }
  .pickup-calc .pc-note { margin: 6px 0 0; font-size: 12px; color: var(--text-muted); }
  .pickup-table td { overflow-wrap: anywhere; vertical-align: top; padding-top: 10px; padding-bottom: 10px; }
  .pickup-table .num { text-align: right; font-variant-numeric: tabular-nums; }
  .pickup-table td.num strong { display: block; white-space: nowrap; }
  .pickup-table td.num small { display: block; font-size: 11px; color: var(--text-muted); font-weight: 400; }
  .pickup-table td.num button.btn { margin: 6px 0 0 auto; min-height: 36px; padding: 4px 8px; font-size: 12px; white-space: nowrap; }
  .pickup-grand { margin: 0 0 8px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
  .pickup-grand .g-head { margin: 0 0 6px; font-weight: 700; color: var(--text); }
  .pickup-grand .g-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
  .pickup-grand .g-row b { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
  .pickup-grand .g-note { margin: 6px 0 0; font-size: 12px; color: var(--text-muted); }
  .pickup-table td.st-col { text-align: center; }
  .pickup-table td.st-col .badge { display: inline-block; white-space: nowrap; }
  .uncol-table col.c-status { width: 120px; }
  .uncol-table col.c-amt { width: 116px; }
  .pickup-scroll { max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; border-bottom: 1px solid var(--border-soft); }
  .pickup-scroll thead th { position: sticky; top: 0; z-index: 1; background: rgba(240,236,249,.94); backdrop-filter: blur(6px); }
  .pickup-table .sub { display: block; margin-top: 3px; font-size: 11px; line-height: 1.5; color: var(--text-muted); }
  @media (max-width: 600px) {
    .pickup-table col.c-amt { width: 88px; }
    .pickup-table col.c-left { width: 92px; }
    .pickup-table col.c-status { width: 76px; }
    .uncol-table { font-size: 12.5px; }
    .uncol-table col.c-amt { width: 76px; }
    .uncol-table col.c-left { width: 84px; }
    .uncol-table col.c-status { width: 82px; }
    .uncol-table th, .uncol-table td { padding-left: 4px; padding-right: 4px; }
    .pickup-table td.st-col .badge { font-size: 10px; padding: 3px 6px; }
    .pickup-table td.num button.btn { display: block; width: 100%; min-height: 0; padding: 6px 4px; font-size: 11px; line-height: 1.25; white-space: normal; }
  }
  .pickup-table tr.hint td { border-bottom: 1px solid var(--border-soft); padding-top: 0; font-size: 11px; color: var(--text-muted); white-space: normal; }
  table.table-wide { min-width: 560px; }
  th { text-align: left; color: var(--text-muted); font-weight: 500; padding: 8px 6px; border-bottom: 1px solid var(--border); white-space: nowrap; }
  td { padding: 8px 6px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
  .numin { width: 100px; min-width: 100px; min-height: 40px; padding: 8px 6px; text-align: center; font-size: 16px; box-sizing: border-box; -moz-appearance: textfield; }
  .numin::-webkit-outer-spin-button, .numin::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

  .metrics { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
  .metrics .metric { flex: 1 1 96px; }
  .metric { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; min-width: 0; overflow: hidden; }
  .metric p.label { font-size: 12px; color: var(--text-muted); margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .metric p.value {
    font-family: "Fraunces", Georgia, serif; font-size: 19px; font-weight: 600; margin: 0; color: var(--gold-bright);
    overflow-wrap: break-word;
  }

  .muted { font-size: 12px; color: var(--text-muted); }
  .divider { border-top: 1px solid var(--border-soft); margin: 14px 0; }
  .empty { font-size: 13px; color: var(--text-muted); padding: 12px 0; }

  .pick-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; max-height: 180px; overflow-y: auto; padding: 2px 0; }
  .pick-btn {
    padding: 10px 14px; font-size: 14px; min-height: 42px; border: 1px solid var(--border);
    background: var(--surface-2); border-radius: 999px; cursor: pointer; color: var(--text);
  }
  .pick-btn.picked { background: var(--gold); color: var(--ink); border-color: var(--gold); font-weight: 700; }
  .selected-line { font-size: 13px; margin-top: 8px; color: var(--text-muted); }
  .selected-line strong { color: var(--gold-bright); }
  .warn { font-size: 12px; color: var(--danger-fg); }
  .role-btn { padding: 20px; font-size: 16px; min-height: 56px; }

  @media (max-width: 360px) {
    .tab-btn { font-size: 11px; padding: 10px 2px; }
    .metric p.value { font-size: 15px; }
  }

  .resit-head { text-align:center; margin-bottom:14px; }
  .resit-head h3 { font-family:"Fraunces", Georgia, serif; margin:0 0 2px; font-size:19px; color: var(--gold-bright); }
  .resit-head p { margin:0; font-size:12px; color: var(--text-muted); }
  .resit-meta { font-size:13px; margin-bottom:10px; }
  .resit-meta div { display:flex; justify-content:space-between; padding:2px 0; }
  .resit-meta span { color: var(--text-muted); }
  .resit-meta strong { max-width:68%;text-align:right;overflow-wrap:anywhere; }
  .resit-meta .sum-title { display:block; font-weight:800; color:var(--text); margin-top:8px; padding-top:6px; border-top:1px solid var(--border-soft); }
  .resit-meta .sum-final { font-size:16px; padding:8px 10px; margin:4px 0; border-radius:8px; background:var(--gold-bg, rgba(199,162,76,.14)); align-items:baseline; }
  .resit-meta .sum-final span { color:var(--text); font-weight:700; }
  .resit-meta .sum-final strong { font-size:18px; }
  .resit-meta strong.resit-amount { white-space: nowrap; overflow-wrap: normal; font-variant-numeric: tabular-nums; }
  table.resit-table { width:100%; border-collapse:collapse; font-size:13px; margin-top:8px; }
  @media (max-width:420px) { table.resit-table { font-size:11px; } table.resit-table th, table.resit-table td { padding:6px 2px; } }
  table.resit-table th, table.resit-table td { padding:6px 4px; border-bottom:1px solid var(--border-soft); text-align:left; }
  table.resit-table td:nth-child(3), table.resit-table th:nth-child(3),
  table.resit-table td:nth-child(4), table.resit-table th:nth-child(4) { text-align:right; }
  table.resit-table td:nth-child(5), table.resit-table th:nth-child(5) { text-align:right; }
  table.resit-table .resit-num { text-align:right;white-space:nowrap; }
  table.resit-table .resit-branch, table.table-wide .resit-branch { vertical-align:top;font-weight:600;overflow-wrap:anywhere; }
  .resit-total-row td { font-weight:700; border-top:2px solid var(--gold); color: var(--gold-bright); }
  .resit-foot { margin-top:14px; font-size:11px; color: var(--text-muted); text-align:center; }

  .data-warning { display:none; margin:0 0 12px; padding:10px 12px; border-radius:10px; background:var(--danger-bg); color:var(--danger-fg); font-size:13px; font-weight:700; }
  .data-warning.on { display:block; }
  .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: 8px; top: -60px; z-index: 1000; background: var(--gold); color: var(--ink); font-weight: 700; padding: 10px 14px; border-radius: 10px; text-decoration: none; }
  .skip-link:focus { top: 8px; }
  main:focus { outline: none; }
  #resit-anak-list tr.selected small { color: var(--ink); }
  .pw-wrap { position: relative; }
  .caps-warn { display:none; margin:4px 0 0; padding:6px 10px; border-radius:8px; font-size:12px; font-weight:700; background:var(--danger-bg); color:var(--danger-fg); }
  .caps-warn.on { display:block; }
  .pw-wrap input[type=password], .pw-wrap input[type=text] { padding-right: 68px; }
  .pw-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    background: transparent; border: none; color: var(--gold-bright);
    font-size: 12px; font-weight: 700; padding: 6px 8px; cursor: pointer; min-height: auto;
  }
  .action-sheet-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.4);
    display: flex; align-items: center; justify-content: center; z-index: 100;
    padding: 20px;
  }
  .action-sheet-card {
    background: var(--surface); width: 100%; max-width: 420px;
    border-radius: 16px; padding: 20px 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,.3);
    max-height: 85vh; overflow-y: auto;
  }
  .action-sheet-btn { margin-bottom: 8px; text-align: left; }
  /* Bantuan anak vendor: butang terapung + tetingkap soal jawab */
  .help-fab { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 18px; min-height: 48px; background: var(--gold); color: var(--ink); font: 700 15px/1 inherit; font-family: inherit; box-shadow: 0 10px 24px -8px rgba(0,0,0,.45); cursor: pointer; }
  .help-fab svg { width: 20px; height: 20px; flex: none; }
  .help-log { display: flex; flex-direction: column; gap: 8px; max-height: 48vh; overflow-y: auto; margin: 10px 0; padding: 2px; }
  .help-msg { padding: 10px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; max-width: 90%; white-space: pre-line; overflow-wrap: anywhere; }
  .help-msg.bot { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border-soft); color: var(--text); }
  .help-msg.me { align-self: flex-end; background: var(--gold); color: var(--ink); }
  .help-chips { display: flex; flex-wrap: nowrap; gap: 6px; margin: 4px 0 10px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .help-chip { flex: none; white-space: nowrap; }
  /* Ruang di bawah supaya butang Bantuan tak tutup Hantar Laporan bila skrol ke bawah. */
  #anak-app { padding-bottom: 84px; }
  .help-chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 8px 12px; font: 600 13px/1.2 inherit; font-family: inherit; cursor: pointer; }
  .help-wa { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
  .help-wa a { flex: 1; min-width: 130px; text-align: center; text-decoration: none; background: #25d366; color: #06331a; font-weight: 700; border-radius: 12px; padding: 10px 8px; font-size: 13px; line-height: 1.3; }
  .help-input-row { display: flex; gap: 8px; }
  .help-input-row input { flex: 1; min-width: 0; }
  .help-input-row button { flex: none; padding: 10px 16px; min-height: 0; }

  .sesi-status-display {
    display: flex; align-items: center; gap: 14px;
    padding: 16px; border-radius: 16px; background: var(--surface-2);
    border: 1px solid var(--border); margin-bottom: 16px;
  }
  .sesi-status-dot {
    width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
    background: var(--danger-fg); box-shadow: 0 0 0 7px var(--danger-bg);
    transition: background .2s, box-shadow .2s;
  }
  .sesi-status-dot.aktif { background: var(--success-fg); box-shadow: 0 0 0 7px var(--success-bg); }
  .sesi-status-text { margin: 2px 0 0; font-size: 24px; font-weight: 700; color: var(--danger-fg); font-family: "Fraunces", Georgia, serif; }
  .sesi-status-text.aktif { color: var(--success-fg); }
  .scroll-v-limit { max-height: 480px; overflow-y: auto; }
  #resit-anak-list { max-height: min(46vh, 420px); overflow-y:auto; overscroll-behavior-y:auto; }
  #resit-anak-list table { width:100%; min-width:480px; border-collapse:collapse; }
  #resit-anak-list th { position:sticky; top:0; z-index:1; background:var(--surface); text-align:left; }
  #resit-anak-list th, #resit-anak-list td { padding:10px 8px; border-bottom:1px solid var(--border-soft); }
  #resit-anak-list th:nth-child(2), #resit-anak-list td:nth-child(2) { text-align:left; white-space:nowrap; }
  #resit-anak-list tr.selected { background:var(--gold); color:var(--ink); }
  #resit-anak-list tr { cursor:pointer; }
  #resit-anak-list .resit-pick { all:unset; display:block; width:100%; cursor:pointer; overflow-wrap:anywhere; }
  #resit-anak-list .resit-pick:focus-visible { outline:2px solid var(--gold-bright); outline-offset:2px; border-radius:4px; }
  .payment-camera { position:relative; border-radius:14px; overflow:hidden; background:#111; aspect-ratio:4/3; }
  .payment-camera video { width:100%; height:100%; object-fit:cover; display:block; }
  .payment-camera-live { position:absolute; top:8px; left:8px; background:#e5484d; color:#fff; font-size:11px; font-weight:700; padding:2px 8px; border-radius:99px; }
  .payment-camera .btn.payment-camera-snap { position:absolute; bottom:10px; left:50%; transform:translateX(-50%); min-height:44px; padding:8px 22px; width:auto; }
  .payment-camera .btn.payment-camera-snap:active { transform:translateX(-50%) translateY(1px); }
  .payment-photo-taken { display:flex; gap:10px; align-items:center; }
  .payment-photo-taken img { width:120px; height:90px; object-fit:cover; border-radius:10px; border:2px solid #2e9d5b; flex:none; }
  .payment-photo-ok { margin:0; font-weight:700; color:#1d7a45; }
  .req-star { color:var(--danger-fg); }
  .pickup-table td.num button.btn.payment-photo-btn { display:inline-block; width:auto; min-height:0; margin:4px 0 0; padding:4px 10px; font-size:12px; line-height:1.3; white-space:nowrap; }
  .btn.payment-photo-btn { margin-top:4px; padding:4px 10px; min-height:0; font-size:12px; width:auto; }
  #resit-anak-list .resit-row-wa { margin-top:6px; padding:4px 12px; min-height:32px; font-size:12px; background:#E9F7EF; color:#14532d; white-space:nowrap; }
  .scroll-v-limit thead th { background: var(--surface); }
  #history-date-list, #history-items { overscroll-behavior-y:auto; }
  #history-date-list .history-date-row { width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:58px; padding:11px 14px; border:1px solid transparent; border-bottom-color:var(--border-soft); border-radius:12px; background:transparent; color:var(--text); text-align:left; font:inherit; cursor:pointer; }
  #history-date-list .history-date-row:hover { background:var(--surface-2); }
  #history-date-list .history-date-row:focus-visible { outline:2px solid var(--gold-bright); outline-offset:2px; }
  #history-date-list .history-date-row.selected { background:#fff3c7; border-color:#f2d779; box-shadow:inset 4px 0 0 #e8ba28; }
  #history-date-list .history-date-label { min-width:0; font-size:15px; font-weight:600; line-height:1.35; }
  #history-date-list .history-date-row.selected .history-date-label { font-weight:750; }
  #history-date-list .history-date-count { flex:none; padding:5px 9px; border-radius:999px; background:var(--surface-2); color:var(--text-muted); font-size:12px; font-weight:700; white-space:nowrap; }
  #history-date-list .history-date-row.selected .history-date-count { background:#fff; color:var(--ink); }
  #history-items { max-height:min(60vh, 560px); overflow-y:auto; padding-right:4px; scrollbar-gutter:stable; }
  @media print { #history-items { max-height:none; overflow:visible; } }
  .dash-pair-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px; margin-bottom: 20px;
  }
  .dash-pair-grid .card { margin-bottom: 0; min-width: 0; }
  .top-rank-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid var(--border-soft);
  }
  .top-rank-row:last-child { border-bottom: none; }
  .top-rank-badge {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-family: "Fraunces", Georgia, serif; font-size: 14px;
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
  }
  .top-rank-badge.rank-1 { background: var(--gold); border-color: var(--gold); color: var(--ink); }
  .top-rank-badge.rank-2 { background: var(--gold-dim); border-color: var(--gold-dim); color: var(--ink); }
  .top-rank-badge.rank-3 { background: rgba(199,162,76,.25); border-color: var(--gold); color: var(--gold-bright); }
  .top-rank-badge.rank-low { background: var(--danger-bg); border-color: transparent; color: var(--danger-fg); }
  .sesi-toggle-big {
    border-radius: 999px !important; min-height: 64px; font-size: 18px;
    letter-spacing: .3px;
  }

