
  /*
   * Mobile-first. Dasar = layar HP; >= 900px menambah sidebar & tabel penuh.
   * Warna utama & aksen dari tab Pengaturan (WARNA_UTAMA, WARNA_AKSEN) lewat Index.html.
   */
  :root {
    --navy-2: color-mix(in srgb, var(--navy) 82%, #ffffff); --navy-soft: color-mix(in srgb, var(--navy) 8%, #ffffff);
    --teal-dark: color-mix(in srgb, var(--teal) 78%, #000000); --teal-soft: color-mix(in srgb, var(--teal) 12%, #ffffff);
    --bg: #f4f6f9; --card: #ffffff; --line: #e3e6ee; --line-2: #eef0f5; --text: #1d1f33; --muted: #646883;
    --red: #b42318; --red-bg: #fdecea; --yel: #8a5a00; --yel-bg: #fff3d6; --input: #ffffff;
    --radius: 14px; --nav-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
    --shadow: 0 1px 2px rgba(20, 22, 50, .04), 0 4px 14px rgba(20, 22, 50, .05);
  }
  * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html { -webkit-text-size-adjust: 100%; }
  body { margin: 0; font: 15px/1.5 'Poppins', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; color: var(--text); background: var(--bg); }
  a { color: var(--teal-dark); }
  h1 { font-size: 20px; font-weight: 700; margin: 0 0 2px; color: var(--navy); line-height: 1.3; }
  h2 { font-size: 15px; font-weight: 600; margin: 0 0 10px; color: var(--navy); }
  h3 { font-size: 14px; font-weight: 600; margin: 22px 0 8px; color: var(--navy); text-transform: uppercase; letter-spacing: .04em; }
  .muted { color: var(--muted); } .small { font-size: 12.5px; } .nowrap { white-space: nowrap; } .hidden { display: none !important; }
  .num { text-align: right; font-variant-numeric: tabular-nums; }

  /* ---------- kerangka ---------- */
  .topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: #fff;
    border-bottom: 1px solid var(--line); box-shadow: 0 2px 0 var(--teal); min-height: 54px; }
  .brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
  .logo { height: 28px; width: auto; display: block; }
  .brand-sub { display: none; font-weight: 600; font-size: 14px; color: var(--navy); white-space: nowrap; padding-left: 12px; border-left: 1px solid var(--line); }
  .who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
  .who .nm { display: none; }
  .who b { color: var(--navy); font-weight: 600; }
  .avatar { width: 38px; height: 38px; min-height: 0; min-width: 38px; flex: 0 0 38px; aspect-ratio: 1; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; line-height: 1; border: 0; padding: 0; letter-spacing: .02em; }
  .role-chip { display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-dark); font-weight: 600; font-size: 11.5px; }
  .layout { display: block; }
  .nav { display: none; }
  .main { padding: 14px 14px calc(var(--nav-h) + var(--safe-b) + 22px); min-width: 0; width: 100%; }

  /* bottom navigation (HP) */
  .bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-template-columns: repeat(5, 1fr); background: #fff;
    border-top: 1px solid var(--line); padding-bottom: var(--safe-b); box-shadow: 0 -4px 16px rgba(20, 22, 50, .06); }
  .bnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: var(--nav-h); color: var(--muted);
    text-decoration: none; font-size: 11px; font-weight: 500; cursor: pointer; position: relative; }
  .bnav a svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .bnav a.active { color: var(--teal-dark); font-weight: 600; }
  .bnav a.plus span.ic { width: 46px; height: 46px; border-radius: 16px; background: var(--teal-dark); color: #fff; display: grid; place-items: center; margin-top: -18px; box-shadow: 0 6px 16px color-mix(in srgb, var(--teal) 40%, transparent); }
  .bnav a.plus svg { stroke: #fff; }
  .bnav .dot { position: absolute; top: 9px; right: calc(50% - 18px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: #e0a100; color: #1d1f33; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }

  /* drawer menu (HP) */
  .drawer { position: fixed; inset: 0; z-index: 40; background: rgba(20, 22, 50, .45); display: flex; justify-content: flex-end; }
  .drawer-box { width: min(340px, 88vw); height: 100%; background: var(--navy); overflow-y: auto; padding: 14px 0 calc(24px + var(--safe-b)); }
  .drawer-head { display: flex; align-items: center; gap: 10px; padding: 6px 18px 14px; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .1); margin-bottom: 8px; }
  .drawer-head .avatar { background: var(--teal); }
  .menu a { display: flex; justify-content: space-between; align-items: center; margin: 2px 10px; padding: 10px 14px; border-radius: 10px; color: #d9daec; text-decoration: none; cursor: pointer; }
  .menu a:hover { background: var(--navy-2); color: #fff; }
  .menu a.active { background: var(--teal); color: #fff; font-weight: 600; }
  .menu .sep { margin: 16px 24px 4px; font-size: 11px; text-transform: uppercase; color: #a3a5c8; letter-spacing: .06em; }
  .menu .cnt { background: #e0a100; color: #1d1f33; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 0 7px; }
  .menu .out { margin-top: 18px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 10px; }

  /* ---------- komponen ---------- */
  .page-head { display: flex; flex-direction: column; gap: 10px; margin: 2px 0 12px; }
  .page-head p { margin: 2px 0 0; font-size: 13px; }
  .page-head .acts { display: flex; gap: 8px; flex-wrap: wrap; }
  .page-head .acts button { flex: 1 1 130px; }
  .back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 6px; }

  input, select, textarea { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--input); width: 100%; color: var(--text); min-height: 44px; }
  input:not([type=checkbox]):not([type=radio]):not([type=file]), select { height: 46px; }
  input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal); outline-offset: 0; border-color: var(--teal); }
  input[disabled], select[disabled], textarea[readonly] { background: #f1f2f6; color: var(--muted); }
  input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--teal-dark); }
  textarea { min-height: 84px; resize: vertical; }
  label { font-size: 12.5px; color: var(--muted); display: block; margin-bottom: 4px; font-weight: 500; }
  label .req { color: var(--red); }
  .help { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.4; }

  button { font: inherit; font-weight: 600; font-size: 14px; line-height: 1.2; min-height: 44px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--navy); background: var(--navy); color: #fff; cursor: pointer; white-space: nowrap;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; vertical-align: middle; }
  button svg { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  button.small svg { width: 15px; height: 15px; }
  button:hover { background: var(--navy-2); }
  button.primary { background: var(--teal-dark); border-color: var(--teal-dark); }
  button.primary:hover { filter: brightness(.94); }
  button.secondary { background: #fff; color: var(--navy); border-color: var(--line); }
  button.secondary:hover { border-color: var(--teal); color: var(--teal-dark); }
  button.danger { background: #fff; color: var(--red); border-color: #f1b7b0; }
  button.danger:hover { background: var(--red-bg); }
  button:disabled { opacity: .5; cursor: default; }
  button.icon { background: none; border: none; color: var(--muted); font-size: 26px; padding: 0 6px; min-height: 40px; }
  button.small { min-height: 34px; padding: 5px 12px; font-size: 13px; }
  button.block { width: 100%; margin-top: 14px; background: var(--teal-dark); border-color: var(--teal-dark); }
  button.link { background: none; border: none; padding: 0; min-height: 0; color: var(--teal-dark); font-weight: 600; }
  button.link:hover { background: none; text-decoration: underline; }

  .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; box-shadow: var(--shadow); }
  .cards { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 12px 0; }
  .sumbar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 12px 0; }
  .st { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--navy-soft); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
  .st span { font-size: 12px; color: var(--muted); }
  .st b { font-size: 17px; color: var(--navy); line-height: 1.25; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
  .st small { font-size: 11.5px; color: var(--muted); }
  .st.good { border-left-color: var(--teal); } .st.warn { border-left-color: #e0a100; } .st.bad { border-left-color: var(--red); }
  .big { font-size: 26px; font-weight: 700; color: var(--navy); line-height: 1.2; font-variant-numeric: tabular-nums; }
  .quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 12px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--navy); font-size: 12px; font-weight: 500; text-align: center; cursor: pointer; }
  .quick a svg { width: 24px; height: 24px; stroke: var(--teal-dark); fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

  .toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 12px; }
  .toolbar input[type=search] { flex: 1 1 100%; }
  .toolbar input:not([type=checkbox]):not([type=radio]):not([type=file]), .toolbar select { height: 42px; min-height: 42px; padding: 0 12px; font-size: 16px; }
  .toolbar input[type=checkbox] { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--teal-dark); }
  .toolbar select, .toolbar input[type=month] { flex: 1 1 calc(50% - 4px); width: auto; min-width: 0; text-overflow: ellipsis; padding-right: 8px; }
  .toolbar label { min-height: 42px; }
  .toolbar input[type=date] { flex: 1 1 calc(50% - 4px); width: auto; min-width: 0; }
  .toolbar .dp-range { display: contents; }
  .toolbar button.reset { min-height: 42px; padding: 0 12px; font-size: 13px; }
  .toolbar .ftoggle { min-height: 42px; padding: 0 12px; font-size: 14px; flex: 0 0 auto; }
  .toolbar .ftoggle.on { border-color: var(--teal); color: var(--teal-dark); background: var(--teal-soft); }
  .toolbar.has-f > input[type=search] { flex: 1 1 0; min-width: 0; }
  @media (max-width: 599px) {
    .toolbar.has-f:not(.open) > select, .toolbar.has-f:not(.open) > .dp-range, .toolbar.has-f:not(.open) > input[type=date], .toolbar.has-f:not(.open) > .reset { display: none; }
  }
  .toolbar > .muted.small { white-space: nowrap; }
  .toolbar select.on { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-dark); font-weight: 600; }
  .toolbar .grow { flex: 1; }
  .toolbar .count { flex-basis: 100%; }

  /* ---------- tabel: kartu di HP, tabel di desktop ---------- */
  .table-wrap { background: transparent; }
  table.t { border-collapse: collapse; width: 100%; }
  table.t thead { display: none; }
  table.t tbody tr { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
  table.t tbody tr.click { cursor: pointer; }
  table.t tbody tr.click:active { background: #f3fbf9; }
  table.t td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; border: 0; font-size: 14px; text-align: right; min-width: 0; }
  table.t td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; text-align: left; flex-shrink: 0; max-width: 45%; }
  table.t td.title { display: block; text-align: left; font-weight: 600; font-size: 15px; color: var(--navy); padding: 0 0 6px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); }
  table.t td.title::before { display: none; }
  table.t td.empty-cell { display: none; }
  table.t td.act { justify-content: flex-end; padding-top: 8px; }
  table.t td.act::before { display: none; }
  table.t td.wrap { white-space: normal; overflow-wrap: anywhere; }
  table.t tfoot { display: block; }
  table.t tfoot tr { display: block; background: var(--navy); color: #fff; border-radius: 12px; padding: 10px 14px; }
  table.t tfoot td { color: #fff; }
  table.t tfoot td::before { color: #c9cbe3; }
  .empty { padding: 28px 16px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: 12px; }
  .badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: #eef0f5; white-space: nowrap; }
  .b-red { background: var(--red-bg); color: var(--red); } .b-yel { background: var(--yel-bg); color: var(--yel); }
  .b-green { background: var(--teal-soft); color: var(--teal-dark); } .b-blue { background: var(--navy-soft); color: var(--navy); }
  .warn-ico { color: #c27c00; font-weight: 700; }

  /* tabel detail (label | nilai) & tabel rincian angka - rapi di semua ukuran */
  table.dt { width: 100%; border-collapse: collapse; font-size: 14px; }
  table.dt th, table.dt td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
  table.dt th { width: 42%; color: var(--muted); font-weight: 500; font-size: 13px; background: #fafbfd; }
  table.dt td { overflow-wrap: anywhere; }
  table.dt tr:last-child th, table.dt tr:last-child td { border-bottom: 0; }
  .dt-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
  .dt-card > .hd { padding: 10px 12px; font-weight: 600; color: var(--navy); background: var(--navy-soft); font-size: 13.5px; display: flex; justify-content: space-between; gap: 8px; }
  table.rt { width: 100%; border-collapse: collapse; font-size: 14px; }
  table.rt td, table.rt th { padding: 8px 12px; border-bottom: 1px solid var(--line-2); }
  table.rt th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 500; background: #fafbfd; }
  table.rt td:last-child, table.rt th:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
  table.rt tr.tot td { font-weight: 700; background: var(--navy-soft); color: var(--navy); border-bottom: 0; }
  table.rt tr.sub td { color: var(--muted); font-size: 13px; }
  table.rt tr.neg td:last-child { color: var(--red); }

  /* ---------- modal = bottom sheet di HP ---------- */
  .modal { position: fixed; inset: 0; background: rgba(20, 22, 50, .5); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
  .modal-box { background: #fff; width: 100%; max-height: 94vh; display: flex; flex-direction: column; border-radius: 18px 18px 0 0; animation: up .18s ease-out; }
  @keyframes up { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
  .modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line-2); }
  .modal-head h2 { margin: 0; font-size: 16px; }
  .modal-box { position: relative; }
  .modal-head::before { content: ''; position: absolute; left: 50%; top: 6px; transform: translateX(-50%); width: 40px; height: 4px; border-radius: 99px; background: #d5d8e2; }
  #modalBody { padding: 14px 16px calc(16px + var(--safe-b)); overflow-y: auto; }
  .grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
  .actions { position: sticky; bottom: calc(-16px - var(--safe-b)); background: #fff; display: flex; gap: 8px; flex-wrap: wrap; margin: 16px -16px calc(-16px - var(--safe-b)); padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line-2); }
  .actions button { flex: 1 1 auto; }
  .actions .left { order: 9; flex-basis: 100%; }
  .actions.inline { position: static; margin: 12px 0 0; padding: 0; border: 0; justify-content: flex-start; align-items: center; }
  .actions.inline button { flex: 0 0 auto; }
  .toast { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + var(--safe-b) + 12px); background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px; border-left: 4px solid var(--teal); z-index: 60; box-shadow: var(--shadow); }
  .toast.err { background: var(--red); border-left-color: #7a140d; }
  .note { background: var(--yel-bg); color: var(--yel); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin: 10px 0; }
  .note.info { background: var(--teal-soft); color: var(--teal-dark); }
  .note.err { background: var(--red-bg); color: var(--red); }
  .filebox { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  .filebox input[type=file] { padding: 8px; }
  .sheet-list a { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--text); cursor: pointer; }
  .sheet-list a:last-child { border-bottom: 0; }
  .sheet-list .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--teal-soft); display: grid; place-items: center; flex-shrink: 0; }
  .sheet-list .ico svg { width: 22px; height: 22px; stroke: var(--teal-dark); fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .sheet-list b { display: block; color: var(--navy); }

  .clock { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
  .clock .time { font-size: 34px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1; }
  .list { margin: 0; padding: 0; list-style: none; }
  .list li { padding: 9px 0; border-bottom: 1px solid var(--line-2); }
  .list li:last-child { border-bottom: none; }
  .tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 12px 0; overflow-x: auto; scrollbar-width: none; }
  .tabs a { padding: 10px 14px; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; font-weight: 500; white-space: nowrap; }
  .tabs a.active { color: var(--navy); border-bottom-color: var(--teal); font-weight: 600; }
  .stepper { display: flex; gap: 4px; margin: 8px 0 4px; overflow-x: auto; }
  .step { font-size: 11.5px; padding: 4px 10px; border-radius: 999px; background: #eef0f5; color: var(--muted); white-space: nowrap; }
  .step.done { background: var(--teal-soft); color: var(--teal-dark); }
  .step.now { background: var(--teal-dark); color: #fff; font-weight: 600; }
  .slip-cols { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .thp { display: flex; justify-content: space-between; align-items: center; background: var(--navy); color: #fff; border-radius: 12px; padding: 14px 16px; margin-top: 12px; gap: 10px; flex-wrap: wrap; }
  .thp b { font-size: 22px; font-variant-numeric: tabular-nums; }
  .bar { height: 8px; background: var(--navy-soft); border-radius: 999px; overflow: hidden; margin-top: 6px; }
  .bar span { display: block; height: 100%; background: var(--teal); }
  .hbar { display: grid; grid-template-columns: 110px 1fr 30px; align-items: center; gap: 10px; margin: 6px 0; font-size: 13px; }
  .hbar .l { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hbar .v { text-align: right; font-weight: 600; }
  .paste { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; min-height: 150px; white-space: pre; }
  .steps-num { counter-reset: s; list-style: none; padding: 0; margin: 0 0 12px; }
  .steps-num li { counter-increment: s; position: relative; padding: 4px 0 4px 34px; font-size: 13.5px; }
  .steps-num li::before { content: counter(s); position: absolute; left: 0; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--teal-soft); color: var(--teal-dark); font-weight: 700; display: grid; place-items: center; font-size: 12px; }
  .scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
  table.grid-t { border-collapse: collapse; font-size: 13px; min-width: 100%; }
  table.grid-t th, table.grid-t td { border-bottom: 1px solid var(--line-2); padding: 7px 10px; white-space: nowrap; text-align: left; }
  table.grid-t th { background: var(--navy-soft); color: var(--navy); font-weight: 600; position: sticky; top: 0; }
  table.grid-t tr.bad td { background: var(--red-bg); }
  table.grid-t tr.ok td:first-child { border-left: 3px solid var(--teal); }

  /* ---------- login ---------- */
  .login { position: fixed; inset: 0; z-index: 70; display: grid; grid-template-columns: 1fr; background: var(--bg); overflow-y: auto; }
  .login-brand { display: none; }
  .login-main { display: grid; place-items: center; padding: 24px 16px; }
  .login-card { width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: 18px; box-shadow: 0 12px 32px rgba(31, 32, 78, .08); padding: 26px 22px; }
  .login-card .logo { height: 36px; margin-bottom: 22px; }
  .login-card h1 { font-size: 22px; margin-bottom: 6px; }
  .login-card p.muted { margin: 0 0 18px; font-size: 13.5px; }
  .login-card input { padding: 12px; font-size: 16px; }
  .login-card input.code { font: 700 26px/1 'Poppins', Arial, sans-serif; letter-spacing: 12px; text-align: center; padding: 12px; }
  .login-links { display: flex; justify-content: space-between; margin-top: 16px; font-size: 13px; }
  .login-err { color: var(--red); font-size: 13px; min-height: 1.2em; margin-top: 12px; }
  .login-foot { margin: 12px 0 0; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
  .login-brand-kicker { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--teal); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
  .login-brand h2 { color: #fff; font-size: 28px; line-height: 1.3; font-weight: 700; margin: 20px 0 22px; max-width: 420px; }
  .login-brand ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
  .login-brand li { padding-left: 28px; position: relative; color: #d6d7ea; }
  .login-brand li::before { content: ''; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--teal); box-shadow: inset 0 0 0 4px var(--navy); background: var(--teal); box-sizing: border-box; }
  .login-brand-foot { margin: 0; font-size: 12px; color: #a3a5c8; position: relative; z-index: 1; }

  /* ---------- konfirmasi (di atas modal) ---------- */
  .confirm { position: fixed; inset: 0; z-index: 70; background: rgba(20, 22, 50, .55); display: flex; align-items: flex-end; justify-content: center; }
  .confirm-box { background: #fff; width: 100%; border-radius: 18px 18px 0 0; padding: 18px 16px calc(16px + var(--safe-b)); max-height: 90vh; overflow-y: auto; animation: up .16s ease-out; }
  .confirm-box h2 { margin: 0 0 8px; font-size: 17px; color: var(--navy); display: flex; align-items: center; gap: 10px; }
  .confirm-box h2 .cf-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-dark); flex-shrink: 0; font-size: 18px; }
  .confirm-box.danger h2 .cf-ic { background: var(--red-bg); color: var(--red); }
  .confirm-box p { margin: 0 0 10px; }
  .confirm-box table.dt { margin: 8px 0 4px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: table; width: 100%; }
  .confirm-box .cf-acts { display: flex; gap: 8px; margin-top: 14px; }
  .confirm-box .cf-acts button { flex: 1; }

  /* ---------- timeline & komentar ---------- */
  .tl { list-style: none; margin: 0; padding: 4px 14px 6px; }
  .tl li { position: relative; padding: 0 0 14px 28px; }
  .tl li::before { content: ''; position: absolute; left: 8px; top: 18px; bottom: -2px; width: 2px; background: var(--line); }
  .tl li:last-child::before { display: none; }
  .tl .pt { position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); background: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; }
  .tl li.done .pt { background: var(--teal); border-color: var(--teal); }
  .tl li.rejected .pt { background: var(--red); border-color: var(--red); }
  .tl li.now .pt { border-color: #e0a100; background: #fff3d6; box-shadow: 0 0 0 4px rgba(224, 161, 0, .15); }
  .tl li.next .pt { border-style: dashed; }
  .tl li.next .tl-t { color: var(--muted); font-weight: 500; }
  .tl .tl-t { font-weight: 600; color: var(--navy); font-size: 14px; }
  .tl li.rejected .tl-t { color: var(--red); }
  .tl li.now .tl-t { color: var(--yel); }
  .tl .tl-m { font-size: 12px; color: var(--muted); }
  .tl .tl-n { font-size: 13px; margin-top: 4px; white-space: pre-line; }
  .tl li.c .pt { background: var(--navy-soft); border-color: var(--navy-soft); color: var(--navy); }
  .tl li.c .bubble { background: #f4f6f9; border-radius: 4px 12px 12px 12px; padding: 8px 12px; margin-top: 3px; font-size: 13.5px; white-space: pre-line; word-break: break-word; }
  .tl li.c.me .bubble { background: var(--teal-soft); }
  .tl li.sys .pt { background: #fff; border-color: var(--muted); }
  .tl li.sys .tl-t { font-weight: 500; color: var(--text); font-size: 13.5px; }
  .cbox { padding: 10px 14px 14px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; align-items: flex-end; }
  .cbox textarea { min-height: 44px; height: 44px; resize: vertical; }
  .cbox button { flex-shrink: 0; }
  .kom { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
  .kom svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
  .kom .new { background: var(--red); color: #fff; border-radius: 999px; padding: 0 6px; font-size: 11px; font-weight: 700; line-height: 17px; }
  .menu .cnts { display: inline-flex; gap: 4px; }
  .menu .cnt.c { background: var(--red); color: #fff; display: inline-flex; align-items: center; gap: 3px; }
  .menu .cnt.c svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2.4; }

  /* ---------- absen: kamera & cek ---------- */
  .cam { position: relative; background: #11132a; border-radius: 14px; overflow: hidden; aspect-ratio: 3 / 4; height: 42vh; margin: 0 auto 12px; max-width: 100%; display: grid; place-items: center; color: #c9cbe3; text-align: center; }
  .cam video, .cam img { width: 100%; height: 100%; object-fit: cover; }
  .cam video { transform: scaleX(-1); }
  .cam .oval { position: absolute; inset: 12% 18% 20%; border: 2px dashed rgba(255, 255, 255, .55); border-radius: 50%; pointer-events: none; }
  .cam .msg { padding: 18px; font-size: 13px; }
  .checks { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
  .checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; padding: 8px 10px; border-radius: 10px; background: #f6f7fa; }
  .checks .ci { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: #dfe2ea; color: var(--muted); }
  .checks li.ok .ci { background: var(--teal); color: #fff; } .checks li.warn .ci { background: #e0a100; color: #fff; } .checks li.bad .ci { background: var(--red); color: #fff; }
  .checks li.bad { background: var(--red-bg); } .checks li.warn { background: var(--yel-bg); }
  .checks b { display: block; font-size: 13px; }
  .bigtime { text-align: center; font-size: 40px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1.1; }
  .thumbs { display: flex; gap: 6px; }
  .thumbs { flex-wrap: wrap; margin-top: 4px; }
  .thumbs button { padding: 5px 10px; min-height: 32px; font-size: 12.5px; }
  .ph-view { text-align: center; } .ph-view img { max-width: 100%; max-height: 70vh; border-radius: 12px; }

  /* ---------- sembunyikan nominal ---------- */
  .amt { display: inline-flex; align-items: center; gap: 8px; }
  .eye { background: none; border: 0; padding: 4px; min-height: 0; color: var(--muted); cursor: pointer; display: inline-grid; place-items: center; border-radius: 8px; }
  .eye:hover { background: var(--line-2); }
  .eye svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

  /* ---------- struktur organisasi ---------- */
  .org ul { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
  .org > ul { padding-left: 0; border-left: 0; }
  .org li { margin: 6px 0; }
  .org summary { list-style: none; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; cursor: pointer; box-shadow: var(--shadow); }
  .org summary::-webkit-details-marker { display: none; }
  .org summary.leaf { cursor: default; }
  .org summary.hit { border-color: var(--teal); background: var(--teal-soft); }
  .org summary.me { border-left: 4px solid var(--teal); }
  .org .av { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
  .org .who2 { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .org .who2 b { color: var(--navy); font-size: 14px; }
  .org .cnt2 { font-size: 11.5px; font-weight: 700; color: var(--navy); background: var(--navy-soft); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
  .org details:not([open]) > summary:not(.leaf) .cnt2::after { content: ' ▸'; }
  .org details[open] > summary:not(.leaf) .cnt2::after { content: ' ▾'; }

  /* ---------- talenta ---------- */
  .card.sel { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal-soft); }
  .lvl { display: inline-flex; gap: 2px; vertical-align: middle; }
  .lvl i { width: 8px; height: 8px; border-radius: 2px; background: var(--line); display: inline-block; }
  .lvl i.on { background: var(--teal-dark); }
  .sm-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
  table.sm { border-collapse: collapse; font-size: 13px; width: 100%; }
  table.sm th, table.sm td { border-bottom: 1px solid var(--line-2); border-left: 1px solid var(--line-2); padding: 6px; text-align: center; }
  table.sm thead th { background: var(--navy-soft); color: var(--navy); font-weight: 600; font-size: 11.5px; vertical-align: bottom; height: 160px; white-space: nowrap; }
  table.sm thead th span { writing-mode: vertical-rl; transform: rotate(180deg); display: inline-block; max-height: 150px; overflow: hidden; text-overflow: ellipsis; }
  table.sm .sm-name { position: sticky; left: 0; background: #fff; text-align: left; width: 220px; min-width: 150px; border-left: 0; z-index: 1; }
  table.sm thead .sm-name { background: var(--navy-soft); writing-mode: initial; vertical-align: bottom; }
  table.sm td[data-sk] { width: 34px; min-width: 34px; cursor: pointer; font-weight: 700; }
  table.sm td.lv1 { background: #e7f6f2; } table.sm td.lv2 { background: #b9e6da; } table.sm td.lv3 { background: #5cc7aa; color: #fff; } table.sm td.lv4 { background: var(--teal-dark); color: #fff; }
  table.sm tfoot td { font-weight: 700; background: #fafbfd; }

  /* ---------- WhatsApp ---------- */
  .confirm-box h2 .cf-ic svg { width: 20px; height: 20px; stroke: #128C7E; fill: none; stroke-width: 1.8; stroke-linejoin: round; }
  .wa-txt { font-size: 14px; line-height: 1.45; min-height: 120px; margin: 4px 0 10px; height: auto; }
  .wa-to { display: grid; gap: 6px; }
  .wa-btn { justify-content: flex-start; gap: 10px; background: #fff; color: var(--text); border: 1px solid var(--line); text-align: left; white-space: normal; min-height: 52px; }
  .wa-btn:hover { background: #effaf3; border-color: #25D366; }
  .wa-btn.first { border-color: #25D366; background: #effaf3; }
  .wa-btn svg { width: 24px; height: 24px; stroke: #128C7E; stroke-width: 1.8; }
  .wa-btn b { display: block; font-size: 14px; color: var(--navy); }
  .wa-btn .small { color: var(--muted); font-weight: 400; }
  .wa-btn.other svg { stroke: var(--muted); }
  .wa-btn:disabled { opacity: .55; }
  .wa-mini { background: #25D366; border-color: #25D366; color: #fff; min-height: 34px; padding: 5px 10px; font-size: 13px; }
  .wa-mini:hover { background: #1ebe5a; }
  .wa-mini svg { width: 16px; height: 16px; }
  .actions .wa-mini { min-height: 44px; padding: 9px 14px; font-size: 14px; }
  .actions .wa-mini svg { width: 18px; height: 18px; }
  td .wa-mini, .list .wa-mini, .card .wa-mini { min-height: 34px; }

  /* ---------- kalender ---------- */
  .cal-wrap { display: grid; gap: 14px; }
  .cal { display: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
  .cal-h, .cal-g { display: grid; grid-template-columns: repeat(7, 1fr); }
  .cal-h span { padding: 8px; font-size: 12px; font-weight: 600; color: var(--navy); background: var(--navy-soft); text-align: center; }
  .cal-d { min-height: 96px; border-top: 1px solid var(--line-2); border-left: 1px solid var(--line-2); padding: 4px 5px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; min-width: 0; }
  .cal-d:nth-child(7n+1) { border-left: 0; }
  .cal-d.out { background: #fafbfd; cursor: default; }
  .cal-d.wk { background: #fbfbfd; }
  .cal-d b { font-size: 12px; color: var(--muted); }
  .cal-d.today b { background: var(--teal-dark); color: #fff; border-radius: 999px; width: 22px; height: 22px; display: grid; place-items: center; }
  .cal-d .ev { font-size: 11px; line-height: 1.3; padding: 1px 5px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cal-d .ev.pend { opacity: .6; border: 1px dashed currentColor; }
  .cal-d .more { font-size: 11px; color: var(--muted); }
  .ev.c-cuti, .dot.c-cuti { background: #e3f4ef; color: var(--teal-dark); } .ev.c-libur, .dot.c-libur { background: var(--red-bg); color: var(--red); }
  .ev.c-ultah, .dot.c-ultah { background: #fdf0d9; color: #8a5a00; } .ev.c-plt, .dot.c-plt { background: #e8ebfb; color: #3a46a8; }
  .ev.c-int, .dot.c-int { background: #f1e8fb; color: #6b2fa3; } .ev.c-new, .dot.c-new { background: #e0f2fe; color: #075985; }
  .ev.c-out, .dot.c-out { background: #eef0f5; color: var(--muted); } .ev.c-gaji, .dot.c-gaji { background: var(--navy); color: #fff; }
  .agenda { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
  .agenda li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
  .agenda li:last-child { border-bottom: 0; }
  .agenda .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
  .agenda .when { width: 92px; flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--navy); }
  .agenda .what { display: flex; flex-direction: column; min-width: 0; }
  /* ---------- analitik ---------- */
  .chart { margin-top: 6px; }
  .chart svg { width: 100%; height: 130px; display: block; }
  .chart-x, .chart-v { display: flex; } .chart-x span, .chart-v span { flex: 1; text-align: center; font-size: 10.5px; color: var(--muted); min-width: 0; overflow: hidden; white-space: nowrap; }
  .chart-v span { color: var(--navy); font-weight: 600; font-size: 10px; }

  /* ================= tablet ================= */
  @media (min-width: 600px) {
    .main { padding: 18px 20px calc(var(--nav-h) + 26px); }
    .cards { grid-template-columns: repeat(2, 1fr); }
    .sumbar { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
    .grid { grid-template-columns: 1fr 1fr; }
    .grid .full { grid-column: 1 / -1; }
    .slip-cols { grid-template-columns: 1fr 1fr; }
    .page-head { flex-direction: row; justify-content: space-between; align-items: flex-start; }
    .page-head .acts button { flex: 0 0 auto; }
    .toolbar input[type=search] { flex: 1 1 240px; max-width: 340px; }
    .toolbar select, .toolbar input[type=month] { flex: 0 1 auto; min-width: 150px; max-width: 240px; }
    .toolbar input[type=date] { flex: 0 1 auto; min-width: 150px; max-width: 170px; }
    .toolbar .ftoggle { display: none; }
    .cal { display: block; }
    .cal-wrap { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
    .toolbar.has-f > input[type=search] { flex: 1 1 240px; max-width: 340px; }
    .toolbar .count { flex-basis: auto; }
    .modal { align-items: flex-start; padding: 40px 16px; overflow-y: auto; }
    .modal-box { max-width: 780px; border-radius: 16px; max-height: none; border-top: 4px solid var(--teal); }
    .modal-box.narrow { max-width: 480px; }
    .modal-head::before { display: none; }
    .actions { position: static; margin: 18px 0 0; padding: 14px 0 0; justify-content: flex-end; }
    .actions button { flex: 0 0 auto; }
    .actions .left { order: 0; flex-basis: auto; margin-right: auto; }
    .toast { left: auto; right: 20px; max-width: 440px; }
    .confirm { align-items: center; padding: 16px; }
    .confirm-box { max-width: 440px; border-radius: 16px; padding: 20px 22px; }
    .confirm-box .cf-acts { justify-content: flex-end; }
    .confirm-box .cf-acts button { flex: 0 0 auto; }
    .who .nm { display: inline; }
    .quick { grid-template-columns: repeat(4, 140px); }
  }

  /* ================= desktop ================= */
  @media (min-width: 900px) {
    .topbar { padding: 10px 24px; }
    .logo { height: 34px; }
    .brand-sub { display: inline; }
    .layout { display: flex; min-height: calc(100vh - 56px); }
    .nav { display: block; width: 236px; background: var(--navy); padding: 14px 0; flex-shrink: 0; position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; }
    .bnav { display: none; }
    .main { flex: 1; padding: 22px 28px 40px; }
    .toast { bottom: 20px; }
    .cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
    .cards.wide { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
    h1 { font-size: 22px; }
    /* tabel kembali menjadi tabel */
    .table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
    table.t thead { display: table-header-group; }
    table.t tbody tr { display: table-row; background: none; border: 0; border-radius: 0; padding: 0; margin: 0; box-shadow: none; }
    table.t tbody tr:nth-child(even) { background: #fbfcfd; }
    table.t tbody tr.click:hover { background: #f1faf7; }
    table.t th, table.t td { display: table-cell; padding: 10px 10px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: middle; white-space: normal; font-size: 13.5px; line-height: 1.4; }
    table.t td { overflow-wrap: normal; word-break: normal; }
    table.t td.nw, table.t td.act { white-space: nowrap; }
    table.t td.act { width: 1%; }
    table.t th:first-child, table.t td:first-child { padding-left: 14px; }
    table.t th:last-child, table.t td:last-child { padding-right: 14px; }
    table.t td::before { display: none; }
    table.t td.title { font-size: 13.5px; border-bottom: 1px solid var(--line-2); padding: 10px 10px; margin: 0; display: table-cell; min-width: 110px; }
    table.t td.empty-cell { display: table-cell; }
    table.t td.wrap { white-space: normal; min-width: 140px; max-width: 300px; }
    table.t td.act { text-align: right; }
    table.t th { background: var(--navy-soft); font-size: 11.5px; font-weight: 600; color: var(--navy); position: sticky; top: 0; cursor: pointer; user-select: none; text-transform: uppercase; letter-spacing: .02em; line-height: 1.25; vertical-align: bottom; }
    table.t th.num, table.t td.num { text-align: right; }
    table.t tfoot { display: table-footer-group; }
    table.t tfoot tr { display: table-row; border-radius: 0; }
    table.t tfoot td { font-weight: 700; background: var(--navy-soft); color: var(--navy); }
    .login { grid-template-columns: minmax(320px, 44%) 1fr; }
    .login-brand { display: flex; background: var(--navy); color: #fff; padding: 48px 48px 32px; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
    .login-brand::after { content: ''; position: absolute; right: -120px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%; border: 48px solid var(--teal); opacity: .22; }
  }
