/* =========================================================
   SAPRAS ATM — stylesheet
   Tema Bank Jakarta 2026: hitam (struktur), merah jingga (aksi & sorotan), kanvas hangat
   ========================================================= */
:root {
  /* Identitas Bank Jakarta: merah jingga (utama) + hitam (struktur).
     Sesuaikan --brand / --brand-strong dengan kode warna resmi dari brand guideline bila berbeda. */
  --dark: #161616;
  --dark-2: #262626;
  --dark-3: #3D3A37;
  --canvas: #F5F3F0;
  --surface: #FFFFFF;
  --surface-2: #FAF8F6;
  --line: #E2DDD7;
  --line-2: #EEEAE5;
  --ink: #1C1B1A;
  --muted: #6B645D;
  --brand: #FF451E;
  --brand-strong: #D93A14;
  --brand-ink: #A3300E;
  --brand-soft: #FFEBE4;
  --ok: #1F7A4D;
  --ok-soft: #E3F2EA;
  --bad: #C0262D;
  --bad-soft: #FBE4E4;
  --info-soft: #EFEDEA;
  --on-dark: #F3F0EC;
  --on-dark-muted: #A8A29B;
  --grey: #E4DED7;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow-pop: 0 18px 50px -12px rgba(22, 22, 22, .28);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --sidebar: 248px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5;
  color: var(--ink); background: var(--canvas);
  font-variant-numeric: tabular-nums;
}
img { max-width: 100%; }
a { color: var(--dark-3); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; }
.ic { width: 20px; height: 20px; flex: none; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ---------- Kerangka ---------- */
.app { min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 40;
  background: var(--dark); color: #D6D2CD; display: flex; flex-direction: column;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 14px calc(16px + env(safe-area-inset-bottom, 0px));
}
.sidebar::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--brand); }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; text-decoration: none; color: #fff; }
.brand strong { display: block; font-size: 15.5px; letter-spacing: .01em; }
.brand small { display: block; font-size: 12px; color: var(--on-dark-muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav-btn {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm);
  color: #D6D2CD; text-decoration: none; font-weight: 500; background: none; border: 0; width: 100%; cursor: pointer; text-align: left;
}
.nav a:hover, .nav-btn:hover { background: var(--dark-2); color: #fff; }
.nav a.active { background: var(--dark-2); color: #fff; box-shadow: inset 3px 0 0 var(--brand); }
.nav a.active .ic { color: var(--brand); }
.org-mark { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; margin-top: -8px; }
.org-mark img { height: 34px; width: auto; max-width: 170px; object-fit: contain; }
.org-mark span { font-size: 12px; color: var(--on-dark-muted); line-height: 1.35; }
.org-mark b { display: block; color: var(--on-dark); font-size: 13px; }
.sidebar-copy { font-size: 11.5px; color: #7C766F; padding: 10px 12px 0; line-height: 1.6; }
.sidebar-copy span { display: block; color: #6A655F; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--dark-3); padding-top: 12px; display: flex; flex-direction: column; gap: 2px; }

.main { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 28px 12px; background: rgba(245, 243, 240, .92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.page-title { font-size: 20px; font-weight: 700; color: var(--dark); flex: 1; min-width: 0; }
.me { display: flex; align-items: center; gap: 10px; }
.me-text { text-align: right; line-height: 1.2; }
.me-text strong { display: block; font-size: 13.5px; }
.me-text small { color: var(--muted); font-size: 12px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--line); border: 2px solid var(--surface); }
.menu-toggle { display: none; }
.scrim { display: none; }
.content { padding: 24px 28px calc(40px + env(safe-area-inset-bottom, 0px)); flex: 1; min-width: 0; }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s;
}
.btn .ic { width: 18px; height: 18px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--dark); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #333; }
.btn-accent { background: var(--brand-strong); color: #fff; }
.btn-accent:hover:not(:disabled) { background: #BC3010; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { border-color: var(--dark-3); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #A01F25; }
.btn-danger-ghost { background: var(--surface); border-color: #EDB7B9; color: var(--bad); }
.btn-block { width: 100%; height: 46px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-sm);
  border: 1px solid transparent; background: none; cursor: pointer; color: var(--muted);
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.icon-btn.danger:hover { color: var(--bad); border-color: #EDB7B9; background: var(--bad-soft); }
.icon-btn .ic { width: 18px; height: 18px; }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea, .input {
  height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); width: 100%; min-width: 0;
}
.field textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--dark-3); box-shadow: 0 0 0 3px rgba(255, 69, 30, .18); }
.field small { color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.search {
  position: relative; flex: 1 1 260px; max-width: 380px;
}
.search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; pointer-events: none; }
.search input { padding-left: 36px; }

/* ---------- Panel & toolbar ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.panel-head h2 { font-size: 15.5px; font-weight: 700; flex: 1; }
.panel-body { padding: 18px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.toolbar .spacer { flex: 1; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; padding: 14px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); }
.filters .field > span { font-size: 12px; }
.filters .filter-actions { display: flex; align-items: flex-end; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; user-select: none; }
.check input { width: 17px; height: 17px; accent-color: var(--dark); }

.bulkbar {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--brand-soft);
  border-bottom: 1px solid #F6C8B1; color: var(--brand-ink); font-weight: 600;
}

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th {
  position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: left; font-weight: 600;
  color: var(--muted); font-size: 12.5px; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table th[data-sort] { cursor: pointer; }
.table th[data-sort]:hover { color: var(--ink); }
.table th[data-sort]::after { content: ""; display: inline-block; width: 0; height: 0; margin-left: 6px; vertical-align: middle; border: 4px solid transparent; border-top-color: var(--line); border-bottom: 0; }
.table th.sort-asc::after { border-top: 0; border-bottom: 5px solid var(--dark); }
.table th.sort-desc::after { border-top-color: var(--dark); border-top-width: 5px; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover td { background: #FCFAF8; }
.table tbody tr.selected td { background: var(--brand-soft); }
.table .nowrap { white-space: nowrap; }
.table .w-check { width: 44px; }
.table input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--dark); cursor: pointer; vertical-align: middle; }
.table .actions { white-space: nowrap; text-align: right; width: 1%; }
.table .cell-strong { font-weight: 600; }
.table .cell-sub { display: block; color: var(--muted); font-size: 12.5px; }
.table-wide td, .table-wide th { white-space: nowrap; }
.table .sticky-col { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line-2); }
.table th.sticky-col { z-index: 3; background: var(--surface-2); }
.table tbody tr:hover td.sticky-col { background: #FCFAF8; }
.table-state td { text-align: center; padding: 48px 16px; color: var(--muted); }
.table-state .empty-title { display: block; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.table.loading tbody { opacity: .45; transition: opacity .15s; }

.pager { display: flex; align-items: center; gap: 12px; padding: 12px 16px; flex-wrap: wrap; font-size: 13.5px; }
.pager .info { color: var(--muted); flex: 1; min-width: 160px; }
.pager .pages { display: flex; gap: 4px; }
.pager .pages button { min-width: 34px; height: 34px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; font-weight: 600; }
.pager .pages button[aria-current="page"] { background: var(--dark); border-color: var(--dark); color: #fff; }
.pager .pages button:disabled { opacity: .4; cursor: default; }
.pager select { height: 34px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); padding: 0 8px; }

/* ---------- Tiket (elemen khas) ---------- */
.ticket {
  --notch: var(--surface);
  position: relative; display: inline-flex; align-items: center; height: 26px; padding: 0 10px 0 14px;
  background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: 12.5px; letter-spacing: .02em;
  border-radius: 4px; border-left: 3px dashed var(--brand); white-space: nowrap;
}
.ticket::before, .ticket::after { content: ""; position: absolute; left: -6px; width: 9px; height: 9px; border-radius: 50%; background: var(--notch); }
.ticket::before { top: -4px; }
.ticket::after { bottom: -4px; }
tr:hover .ticket { --notch: #FCFAF8; }
tr.selected .ticket { --notch: var(--brand-soft); }

/* ---------- Badge ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-sched { background: var(--brand-soft); color: var(--brand-ink); }
.badge-none { background: #F1EEEA; color: #57524C; }
.badge-none::before { background: var(--bad); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-wait { background: #F1EEEA; color: #57524C; }
.badge-wait::before { background: var(--brand); }
.badge-late { background: var(--bad-soft); color: var(--bad); }
.badge-admin { background: var(--dark); color: #fff; }
.badge-admin::before { background: var(--brand); }
.badge-tek { background: var(--info-soft); color: var(--dark-3); }
.cond { display: inline-flex; align-items: center; gap: 6px; }
.cond.bad { color: var(--bad); font-weight: 600; }
.cond.bad::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); }
.photo-count { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; }
.photo-count .ic { width: 16px; height: 16px; }
.user-cell { display: flex; align-items: center; gap: 12px; }
.user-cell img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--line); }

/* ---------- Modal ---------- */
.modal { border: 0; padding: 0; background: transparent; max-width: calc(100vw - 32px); width: 640px; max-height: calc(100dvh - 32px); overflow: visible; }
.modal::backdrop { background: rgba(22, 22, 22, .5); backdrop-filter: blur(2px); }
.modal[open] { animation: pop .18s ease-out; }
.modal-sm { width: 440px; }
.modal-lg { width: 920px; }
.modal-box { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); display: flex; flex-direction: column; max-height: calc(100dvh - 32px); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-2); }
.modal-head h2 { font-size: 17px; flex: 1; }
.modal-head .sub { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.modal-body { padding: 20px; overflow-y: auto; overscroll-behavior: contain; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

.confirm-body { display: flex; gap: 16px; align-items: flex-start; }
.confirm-body h2 { font-size: 17px; margin-bottom: 4px; }
.confirm-body p { margin: 0; color: var(--muted); }
.confirm-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--bad-soft); color: var(--bad); display: grid; place-items: center; flex: none; }

/* Autocomplete ATM */
.combo { position: relative; }
.combo-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 10; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); box-shadow: var(--shadow-pop); max-height: 260px; overflow-y: auto; margin: 0; padding: 4px; list-style: none;
}
.combo-list li { padding: 8px 10px; border-radius: 4px; cursor: pointer; }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: var(--canvas); }
.combo-list li b { color: var(--dark); }
.combo-list li small { display: block; color: var(--muted); }
.combo-picked { margin-top: 6px; padding: 8px 12px; background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--r-sm); font-size: 13px; }

/* Upload avatar */
.avatar-edit { display: flex; align-items: center; gap: 16px; }
.avatar-edit img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--line); }

/* ---------- Import ---------- */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 16px; text-align: center;
  border: 2px dashed var(--line); border-radius: var(--r-md); background: var(--surface-2); cursor: pointer;
}
.dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone .ic { width: 30px; height: 30px; color: var(--dark-3); }
.import-result { margin-top: 14px; }
.import-errors { max-height: 180px; overflow-y: auto; font-size: 13px; background: var(--bad-soft); border-radius: var(--r-sm); padding: 10px 14px; margin: 8px 0 0; color: var(--bad); }
.progress { height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .2s; }
.steps-note { font-size: 13px; color: var(--muted); margin: 12px 0 0; padding-left: 18px; }

/* ---------- Alert ---------- */
.alert { padding: 10px 14px; border-radius: var(--r-sm); font-size: 13.5px; }
.alert-error { background: var(--bad-soft); color: var(--bad); }
.alert-info { background: var(--info-soft); color: var(--dark); }

/* ---------- Toast ---------- */
.toasts { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast {
  background: var(--dark); color: #fff; padding: 12px 16px; border-radius: var(--r-md); box-shadow: var(--shadow-pop);
  max-width: min(420px, calc(100vw - 40px)); font-weight: 500; border-left: 4px solid var(--brand); animation: pop .2s ease-out;
}
.toast.error { border-left-color: #F07C80; }

/* ---------- Dashboard ---------- */
.dash { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.today {
  background: var(--dark); color: var(--on-dark); border-radius: var(--r-lg); padding: 24px 26px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 28px; align-items: end;
}
.today h2 { font-size: 15px; font-weight: 600; color: var(--on-dark-muted); }
.today-count { font-size: 44px; font-weight: 800; line-height: 1.05; color: #fff; margin-top: 4px; }
.today-count small { font-size: 20px; font-weight: 600; color: var(--on-dark-muted); }
.today-meta { display: flex; gap: 24px; flex-wrap: wrap; }
.today-meta div { min-width: 90px; }
.today-meta b { display: block; font-size: 22px; color: #fff; }
.today-meta span { font-size: 12.5px; color: var(--on-dark-muted); }
.today-meta .late b { color: #FF8A5C; }
.ticks { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
.ticks i { width: 14px; height: 22px; border-radius: 3px; background: var(--dark-3); }
.ticks i.done { background: var(--brand); }
.ticks-empty { grid-column: 1 / -1; color: var(--on-dark-muted); font-size: 13.5px; }
.ticks-bar { grid-column: 1 / -1; height: 14px; border-radius: 99px; background: var(--dark-3); overflow: hidden; }
.ticks-bar i { display: block; height: 100%; background: var(--brand); }

.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; text-decoration: none; color: inherit; display: block; }
a.stat:hover { border-color: var(--dark-3); }
.stat span { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat b { display: block; font-size: 26px; font-weight: 700; color: var(--dark); margin-top: 2px; }
.stat small { color: var(--muted); font-size: 12.5px; }
.stat.warn b { color: var(--bad); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 230px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .grow strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .grow small { color: var(--muted); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list li.task { align-items: center; }
.task-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.list-empty { padding: 28px 18px; color: var(--muted); text-align: center; }

/* ---------- Form kegiatan ---------- */
.kform-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-md); margin-bottom: 18px; }
.kform-meta div span { display: block; font-size: 12px; color: var(--muted); }
.kform-meta div b { font-size: 14px; }
.ksection { border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 14px; overflow: hidden; }
.ksection > h3 { font-size: 14.5px; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; }
.ksection > h3 .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.ksection.done > h3 .dot { background: var(--ok); }
.ksection .kbody { padding: 16px; display: grid; gap: 16px; }
.choice-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice-group legend .opt, .photo-input .opt { font-weight: 500; color: var(--muted); }
.req { color: var(--bad); }
.choice-group legend { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { position: relative; }
.choices input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choices span {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: background .12s, border-color .12s;
}
.choices input:checked + span { background: var(--dark); border-color: var(--dark); color: #fff; }
.choices input:checked + span.is-bad { background: var(--bad); border-color: var(--bad); }
.choices input:focus-visible + span { outline: 2.5px solid var(--brand); outline-offset: 2px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.photo-input { border: 1px dashed var(--line); border-radius: var(--r-md); padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.photo-input > span { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.photo-input .thumb { aspect-ratio: 4 / 3; border-radius: var(--r-sm); background: var(--canvas) center / cover no-repeat; display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.photo-input .thumb .ic { width: 28px; height: 28px; }
.photo-input .thumb.has { color: transparent; }
.photo-input .row { display: flex; gap: 6px; }
.photo-input label.btn { flex: 1; position: relative; overflow: hidden; }
.photo-input label.btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Detail kegiatan */
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.detail-grid dl { margin: 0; }
.drow { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.drow dt { color: var(--muted); }
.drow dd { margin: 0; font-weight: 600; text-align: right; }
.drow dd.bad { color: var(--bad); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 18px; }
.gallery figure { margin: 0; }
.gallery a { display: block; aspect-ratio: 4 / 3; border-radius: var(--r-sm); overflow: hidden; background: var(--canvas); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.gallery .none { display: grid; place-items: center; height: 100%; font-size: 12px; color: var(--muted); }
.section-title { font-size: 14.5px; font-weight: 700; margin: 22px 0 6px; color: var(--dark); }
.note { background: var(--surface-2); border-radius: var(--r-sm); padding: 12px 14px; margin-top: 10px; font-size: 14px; white-space: pre-wrap; }

/* ---------- Login (v4.3) ---------- */
.login-page { background: var(--canvas); }
.lg { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr); }
.lg-art {
  position: relative; overflow: hidden; background: var(--dark); color: #D6D2CD;
  display: grid; grid-template-rows: auto 1fr auto auto; gap: 36px;
  padding: calc(40px + env(safe-area-inset-top, 0px)) 56px calc(32px + env(safe-area-inset-bottom, 0px));
}
.lg-art::after { content: ""; position: absolute; inset: auto -20% -35% 30%; height: 70%; background: radial-gradient(closest-side, rgba(255, 69, 30, .22), transparent); pointer-events: none; }
.lg-org { height: 46px; width: auto; display: block; }
.lg-top { visibility: hidden; } /* layar lebar: logo cukup satu, di atas form */
.lg-org-text { color: #fff; font-size: 20px; }
.lg-hero { align-self: center; max-width: 30rem; position: relative; z-index: 1; }
.lg-app { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; color: #fff; font-weight: 700; font-size: 15px; }
.lg-hero h1 { font-size: clamp(30px, 3.1vw, 42px); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; color: #fff; margin: 0 0 16px; }
.lg-lead { font-size: 16px; line-height: 1.6; color: #BDB7B0; margin: 0; max-width: 34ch; }
.lg-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(21, 1fr); gap: 5px; max-width: 30rem; }
.lg-grid i { aspect-ratio: 1; border-radius: 3px; background: #2A2826; }
.lg-grid i.on { background: var(--brand); animation: lgOn .5s ease-out both; animation-delay: calc(var(--i) * 12ms + 250ms); }
@keyframes lgOn { from { background: #2A2826; transform: scale(.6); } to { background: var(--brand); transform: none; } }
.lg-credit { position: relative; z-index: 1; font-size: 12.5px; color: #8A847D; }

.lg-form-wrap { display: grid; place-items: center; padding: 40px 28px; }
.lg-form { width: min(380px, 100%); display: grid; gap: 18px; }
.lg-logo { height: 54px; width: auto; justify-self: start; margin-bottom: 10px; }
.lg-form h2 { font-size: 26px; font-weight: 800; color: var(--dark); letter-spacing: -.01em; margin: 0 0 4px; }
.lg-form .muted { margin: 0; }
.lg-form .field input { height: 46px; font-size: 15px; }
.lg-form .btn-block { height: 48px; font-size: 15px; margin-top: 4px; }
.lg-foot { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.lg-dev { color: #8A847D; }
.lg-credit, .lg-dev { letter-spacing: .01em; }
.lg-form-wrap .lg-dev { display: none; } /* di layar lebar kredit tampil di panel kiri */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0; width: 38px; height: 38px; display: grid; place-items: center; color: var(--muted); cursor: pointer; border-radius: var(--r-sm); }
.pw-toggle:hover { color: var(--ink); }

@media (max-width: 960px) {
  .lg { grid-template-columns: minmax(0, 1fr); }
  .lg-art { grid-template-rows: auto auto auto; gap: 22px; padding: calc(28px + env(safe-area-inset-top, 0px)) 24px 26px; }
  .lg-art::after { inset: auto -30% -60% 20%; }
  .lg-top { visibility: visible; }
  .lg-org { height: 38px; }
  .lg-hero h1 { font-size: 26px; }
  .lg-lead { font-size: 14.5px; }
  .lg-grid { grid-template-columns: repeat(21, 1fr); gap: 3px; }
  .lg-grid i:nth-child(n+64) { display: none; }
  .lg-credit { display: none; }
  .lg-form-wrap { place-items: start center; padding: 30px 22px calc(36px + env(safe-area-inset-bottom, 0px)); }
  .lg-form-wrap .lg-dev { display: inline; }
  .lg-logo { display: none; } /* logo sudah tampil di panel atas */
}
@media (prefers-reduced-motion: reduce) { .lg-grid i.on { animation: none; } }

/* ---------- Form pengecekan (admin) ---------- */
.page-intro { margin: 0 0 16px; max-width: 85ch; }
.opsi-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.opsi-fields { position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow-y: auto; }
.tree { padding: 8px 10px 14px; display: grid; gap: 10px; }
.tree-bagian { border: 1px solid var(--line-2); border-radius: var(--r-md); overflow: hidden; }
.tree-bagian.off { opacity: .7; }
.tree-head { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); }
.tree-head strong { flex: 1; font-size: 13.5px; min-width: 0; }
.tree-tools { display: inline-flex; gap: 2px; flex: none; }
.tree-tools .icon-btn { width: 30px; height: 30px; font-size: 11px; }
.tree-list { list-style: none; margin: 0; padding: 4px; }
.tree-list button {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px;
  border: 0; border-radius: var(--r-sm); background: none; cursor: pointer; font-size: 13.5px; font-weight: 500;
}
.tree-list button .ic { width: 16px; height: 16px; color: var(--muted); }
.tree-list button .grow { flex: 1; min-width: 0; }
.tree-list button small { color: var(--muted); font-size: 12px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tree-list button:hover { background: var(--surface-2); }
.tree-list button.off .grow { color: var(--muted); text-decoration: line-through; }
.tree-list button[aria-current] { background: var(--dark); color: #fff; }
.tree-list button[aria-current] .ic, .tree-list button[aria-current] small { color: var(--on-dark-muted); }
.tree-list .tree-add { color: var(--dark-3); font-weight: 600; }
.tree-list .tree-add .ic { color: var(--dark-3); }
.warn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); display: inline-block; }
.detail-head { gap: 8px; }
.detail-head h2 { flex: none; }
.opsi-add { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; padding: 14px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); }
.opsi-add .field { flex: 1 1 220px; }
.opsi-add .check { height: 40px; }
.table tr.row-off td { color: var(--muted); }
.icon-btn:disabled { opacity: .3; cursor: default; background: none; border-color: transparent; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + span { background: var(--dark); }
.switch input[data-toggle="is_temuan"]:checked + span { background: var(--bad); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2.5px solid var(--brand); outline-offset: 2px; }
.filter-isian { display: flex; gap: 8px; }
.filter-isian select { flex: 1; min-width: 0; }
@media (max-width: 960px) {
  .opsi-layout { grid-template-columns: minmax(0, 1fr); }
  .opsi-fields { position: static; max-height: none; }
}
@media (max-width: 640px) {
  .detail-head .btn { flex: 1; }
}


/* ---------- Dashboard: cakupan & tahunan ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dash-single { display: grid; grid-template-columns: minmax(0, 1fr); }
.panel-head .grow { flex: 1; min-width: 0; }
.panel-head .grow h2 { flex: none; }
.panel-sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.chart-box.lg { height: 340px; }

.month-nav { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.month-nav span { min-width: 136px; text-align: center; font-weight: 700; font-size: 14px; }
.month-nav .icon-btn { border-radius: 50%; font-size: 18px; line-height: 1; color: var(--ink); }
.month-nav .icon-btn:disabled { opacity: .25; }

.cov-body { display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.cov-chart {
  padding: 24px 22px; border-right: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 18px;
  background: radial-gradient(90% 60% at 50% 22%, var(--brand-soft), transparent 70%);
}
.donut-wrap { position: relative; height: 230px; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-center b { font-size: 38px; font-weight: 800; color: var(--dark); line-height: 1; letter-spacing: -.02em; }
.donut-center span { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.cov-legend { display: grid; gap: 8px; }
.cov-item {
  display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 2px 10px; text-align: left; width: 100%;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.cov-item:hover { border-color: #CFC7BE; }
.cov-item.active { border-color: var(--dark); box-shadow: 0 0 0 1px var(--dark); }
.cov-item i { width: 12px; height: 12px; border-radius: 3px; background: var(--grey, #E4DED7); }
.cov-item.done i { background: var(--brand); }
.cov-item span { font-weight: 600; font-size: 14px; }
.cov-item b { font-size: 22px; font-weight: 800; color: var(--dark); }
.cov-item small { grid-column: 2 / -1; color: var(--muted); font-size: 12.5px; }
.cov-note { margin: 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.cov-list { min-width: 0; display: flex; flex-direction: column; }
.cov-list .pager { margin-top: auto; }

.tabs { display: flex; gap: 4px; padding: 12px 16px 0; border-bottom: 1px solid var(--line-2); }
.tabs [role=tab] {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 0; background: none; cursor: pointer;
  font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tabs [role=tab]:hover { color: var(--ink); }
.tabs [role=tab][aria-selected=true] { color: var(--dark); border-bottom-color: var(--brand); }
.tab-count { min-width: 26px; padding: 1px 8px; border-radius: 999px; background: var(--info-soft); font-size: 12px; color: var(--ink); text-align: center; }
.tabs [aria-selected=true] .tab-count { background: var(--brand); color: #fff; }
.cov-list td.cell-name { min-width: 200px; }
.cov-list td .cell-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; }
@media (min-width: 1500px) { .cov-list td .cell-sub { max-width: 360px; } }
.cov-list .toolbar { border-bottom: 1px solid var(--line-2); }

.year-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line-2); }
.ys { padding: 16px 18px; border-right: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 2px; }
.ys:last-child { border-right: 0; }
.ys > span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.ys b { font-size: 24px; font-weight: 800; color: var(--dark); }
.ys b small { font-size: 14px; color: var(--muted); font-weight: 600; }
.ys > small { font-size: 12px; color: var(--muted); }
.ys-bar { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; margin: 6px 0 2px; }
.ys-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #FF8C6E); border-radius: 99px; }
.year-select select { height: 36px; min-width: 96px; font-weight: 700; }

@media (max-width: 1180px) {
  .cov-body { grid-template-columns: minmax(0, 1fr); }
  .cov-chart { border-right: 0; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: center; }
  .cov-note { grid-column: 1 / -1; }
  .donut-wrap { height: 210px; }
  .year-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ys:nth-child(2) { border-right: 0; }
  .ys:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); }
}
@media (max-width: 640px) {
  .cov-chart { grid-template-columns: minmax(0, 1fr); padding: 18px 16px; }
  .donut-center b { font-size: 32px; }
  .month-nav span { min-width: 118px; font-size: 13px; }
  .panel-head { gap: 10px; }
  .chart-box.lg { height: 300px; }
  .ys { padding: 12px 14px; }
  .ys b { font-size: 20px; }
  .tabs [role=tab] { padding: 10px 8px; font-size: 13.5px; white-space: nowrap; }
  .tab-word { display: none; }
  .cov .panel-head, .year .panel-head { flex-wrap: wrap; }
  .cov .panel-head .grow, .year .panel-head .grow { flex-basis: 100%; }
  .month-nav { width: 100%; justify-content: space-between; }
}


/* ---------- Log problem (v4.0) ---------- */
.nav-count { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 700; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--brand); color: #fff; text-align: center; }
.urg { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 4px; vertical-align: 1px; }
.urg-t { background: var(--bad-soft); color: var(--bad); }
.urg-s { background: var(--brand-soft); color: var(--brand-ink); }
.urg-r { background: var(--info-soft); color: var(--muted); }
.umur { font-weight: 700; }
.umur-warn { color: #B45309; }
.umur-bad { color: var(--bad); }
.umur-done { color: var(--muted); font-weight: 600; }
.txt-warn { color: #B45309 !important; }
.txt-bad { color: var(--bad) !important; }
.pb-cell { min-width: 230px; }
.pb-cell .cell-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
#tbl td .cell-sub { max-width: 300px; }
@media (max-width: 1500px) {
  .pb-cell { min-width: 200px; }
  .pb-cell .cell-sub, #tbl td.pb-cell .cell-sub { max-width: 210px; }
  .pb-page #tbl td.nowrap { white-space: normal; min-width: 128px; }
  .pb-page #tbl td .ticket { font-size: 11.5px; padding: 0 8px 0 12px; }
}
.pb-chip { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; padding: 1px 7px 1px 5px; border-radius: 999px; background: var(--bad-soft); color: var(--bad); font-size: 11.5px; font-weight: 700; text-decoration: none; vertical-align: 1px; }
.pb-chip .ic { width: 13px; height: 13px; }
.pb-warn { color: var(--bad); font-weight: 600; }
.pb-warn .ic { width: 14px; height: 14px; vertical-align: -2px; }
.pb-atm-filter { margin: 12px 16px 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.pb-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.pb-stat { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; transition: border-color .15s; }
.pb-stat:hover { border-color: var(--dark-3); }
.pb-stat span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.pb-stat b { font-size: 24px; font-weight: 800; color: var(--dark); }
.pb-stat small { font-size: 12px; color: var(--muted); }
.pb-stat.warn { box-shadow: inset 3px 0 0 #D97706; }
.pb-stat.warn b { color: #B45309; }
.pb-stat.bad { box-shadow: inset 3px 0 0 var(--bad); }
.pb-stat.bad b { color: var(--bad); }
.pb-stat.ok b { color: var(--ok); }

/* Form teknisi */
.pb-box { border: 1.5px solid #F2B8A0; background: #FFF8F4; border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 16px; }
.pb-box h3, .pb-new-head h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; margin: 0; }
.pb-box h3 .ic, .pb-new-head h3 .ic { color: var(--bad); width: 18px; height: 18px; }
.pb-hint { font-size: 12.5px; color: var(--muted); margin: 4px 0 10px; }
.pb-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; margin-top: 10px; display: grid; gap: 10px; }
.pb-card.open { border-color: #F2B8A0; }
.pb-card.fixed { border-color: #9FD3B5; background: #F7FCF9; }
.pb-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pb-body { display: flex; gap: 12px; align-items: flex-start; }
.pb-body p { margin: 2px 0 4px; font-size: 14px; }
.pb-thumb { flex: none; width: 76px; height: 58px; border-radius: var(--r-sm); overflow: hidden; background: var(--canvas); }
.pb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pb-choices span.is-ok { }
.choices input:checked + span.is-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.pb-photo { max-width: 240px; }
.pb-photo .thumb { aspect-ratio: auto; height: 110px; }
.pb-note input { height: 36px; }
.pb-new { border: 1px dashed var(--line); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 14px; }
.pb-new-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.pb-draft { border-color: #F2B8A0; }
.pb-readonly .pb-line { padding: 6px 0; }
.pb-line { display: block; padding: 8px 0; border-bottom: 1px solid var(--line-2); color: inherit; text-decoration: none; font-size: 14px; }
.pb-list .pb-line:hover b { text-decoration: underline; }

/* Detail problem */
.pd-head { margin-bottom: 14px; }
.pd-head h3 { font-size: 18px; margin: 8px 0 4px; }
.pd-head p { margin: 0; font-size: 15px; }
.pd-meta small { display: block; font-size: 12px; color: var(--muted); }
.pd-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pd-photos figure { margin: 0; }
.pd-photos span { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.pd-nophoto { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; margin: 4px 0 0; }
.pd-nophoto .ic { width: 18px; height: 18px; }
.pd-photos a, .pd-photos .none { display: grid; place-items: center; aspect-ratio: 16 / 10; max-height: 240px; border-radius: var(--r-md); overflow: hidden; background: var(--canvas); color: var(--muted); font-size: 13px; }
.pd-photos img { width: 100%; height: 100%; object-fit: cover; }
.timeline { list-style: none; margin: 8px 0 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 110px 1fr; gap: 14px; position: relative; padding-bottom: 16px; }
.timeline li::before { content: ""; position: absolute; left: 121px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--grey); box-shadow: 0 0 0 3px var(--surface); z-index: 1; }
.timeline li::after { content: ""; position: absolute; left: 126px; top: 12px; bottom: -6px; width: 1.5px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline .tl-date { font-size: 12.5px; color: var(--muted); text-align: right; padding-top: 2px; }
.timeline .tl-body { padding-left: 22px; font-size: 14px; }
.timeline .tl-body p { margin: 4px 0 0; }
.timeline .tl-open::before { background: var(--bad); }
.timeline .tl-fwd::before { background: var(--brand); }
.timeline .tl-ok::before { background: var(--ok); }
.timeline .tl-note::before { background: var(--dark-3); }
.timeline .tl-next::before { background: var(--surface); border: 2px dashed var(--line); width: 7px; height: 7px; }
.tl-photo { display: inline-block; margin-top: 6px; width: 110px; height: 80px; border-radius: var(--r-sm); overflow: hidden; }
.tl-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Dashboard */
.ys-link { text-decoration: none; color: inherit; }
.ys-link:hover { background: var(--surface-2); }
.pbd-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.pbd-body h3 { font-size: 13.5px; color: var(--muted); font-weight: 600; margin: 0; padding: 14px 18px 4px; }
.pbd-list { border-right: 1px solid var(--line-2); }
.pbd-chart .chart-box { margin: 8px 18px 18px; }
.pbd-item { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; width: 100%; }
.pbd-item .umur { min-width: 64px; }
.pbd-item:hover strong { text-decoration: underline; }
#pbdOld li { padding: 10px 18px; }

@media (max-width: 1180px) {
  .pb-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pbd-body { grid-template-columns: minmax(0, 1fr); }
  .pbd-list { border-right: 0; border-bottom: 1px solid var(--line-2); }
}
@media (max-width: 640px) {
  .pb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pb-stat { padding: 10px 12px; }
  .pb-stat b { font-size: 20px; }
  .pd-photos { grid-template-columns: minmax(0, 1fr); }
  .timeline li { grid-template-columns: 1fr; gap: 2px; padding-left: 22px; }
  .timeline li::before { left: 0; }
  .timeline li::after { left: 5px; }
  .timeline .tl-date { text-align: left; }
  .timeline .tl-body { padding-left: 0; }
  .pb-photo { max-width: none; }
}


/* ---------- Info penyimpanan (dashboard admin) ---------- */
.disk { display: flex; align-items: center; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 16px; }
.disk-text { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.disk-text .ic { color: var(--muted); flex: none; }
.disk-text b { display: block; font-size: 13.5px; }
.disk-text span { font-size: 12.5px; color: var(--muted); }
.disk-bar { width: min(260px, 35%); height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; flex: none; }
.disk-bar i { display: block; height: 100%; background: var(--dark-3); border-radius: 99px; }
.disk.low { border-color: #EDB7B9; background: var(--bad-soft); }
.disk.low .ic, .disk.low b { color: var(--bad); }
.disk.low .disk-bar i { background: var(--bad); }
@media (max-width: 640px) { .disk { flex-direction: column; align-items: stretch; gap: 10px; } .disk-bar { width: 100%; } }

/* ---------- Tabel kegiatan: ringkasan foto & catatan ---------- */
button.photo-count { border: 0; background: var(--surface-2); border-radius: 999px; padding: 3px 10px; cursor: pointer; font: inherit; font-size: 13px; }
button.photo-count:hover { background: var(--brand-soft); color: var(--brand-ink); }
.td-note { max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }

/* ---------- Data ATM (v5.0) ---------- */
.form-sec { font-size: 13.5px; font-weight: 700; color: var(--dark); margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.modal-body > .form-sec:first-of-type { margin-top: 0; }
.atm-table td.atm-name { min-width: 220px; }
.atm-table td.atm-name .cell-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.atm-table td { font-size: 13.5px; }

.koor-link { display: inline-flex; align-items: center; gap: 4px; color: var(--petrol, var(--dark-3)); text-decoration: none; font-size: 12.5px; }
.koor-link .ic { width: 14px; height: 14px; color: var(--brand); }
.koor-link:hover { text-decoration: underline; }


/* ---------- Jadwal otomatis (v6.0) ---------- */
.jd { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.jd-hero { background: var(--dark); color: var(--on-dark); border-radius: var(--r-lg); padding: 22px 24px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px 24px; align-items: center; position: relative; overflow: hidden; }
.jd-hero::after { content: ""; position: absolute; inset: auto -10% -60% 55%; height: 120%; background: radial-gradient(closest-side, rgba(255, 69, 30, .18), transparent); pointer-events: none; }
.jd-hero h2 { font-size: 24px; font-weight: 800; color: #fff; margin: 8px 0 6px; letter-spacing: -.01em; }
.jd-sub { margin: 0; font-size: 13.5px; color: var(--on-dark-muted); max-width: 60ch; }
.jd-sub b { color: #fff; }
.jd-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #2A2826; color: #D6D2CD; }
.jd-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.jd-state.draf { background: rgba(255, 69, 30, .18); color: #FF9B80; }
.jd-state.ok { background: rgba(31, 122, 77, .25); color: #7FD1A6; }
.jd-hero-stats { display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end; position: relative; z-index: 1; }
.jd-hero-stats b { display: block; font-size: 24px; color: #fff; font-weight: 800; }
.jd-hero-stats span { font-size: 12px; color: var(--on-dark-muted); }
.jd-hero-actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.btn-ghost-dark { background: transparent; border-color: #3D3A37; color: #fff; }
.btn-ghost-dark:hover:not(:disabled) { border-color: #6A655F; }
.jd-cov { margin: 0; }
.jd-alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--r-md); font-size: 13.5px; margin-bottom: 8px; border: 1px solid var(--line); background: var(--surface); }
.jd-alert .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.jd-alert.warn { background: #FFF6E6; border-color: #F5D9A8; } .jd-alert.warn .ic { color: #B45309; }
.jd-alert.error { background: var(--bad-soft); border-color: #EDB7B9; } .jd-alert.error .ic { color: var(--bad); }
.jd-alert.info .ic { color: var(--muted); }
.jd-alert a { color: inherit; font-weight: 600; }
.jd-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.jd-map-wrap { position: sticky; top: 84px; overflow: hidden; }
.jd-map { height: min(68vh, 620px); background: #E8E4DF; }
.jd-routes { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.jd-card { overflow: visible; }
.jd-card-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); border-top: 4px solid var(--c); border-radius: var(--r-md) var(--r-md) 0 0; }
.jd-card-head small { display: block; color: var(--muted); font-size: 12.5px; }
.jd-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; }
.jd-swap select, .jd-act select { height: 32px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: 12.5px; padding: 0 6px; max-width: 150px; }
.jd-list { list-style: none; margin: 0; padding: 4px 0; }
.jd-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 14px; border-bottom: 1px solid var(--line-2); }
.jd-list li:last-child { border-bottom: 0; }
.jd-list .grow { flex: 1; min-width: 0; }
.jd-list strong { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jd-list small { display: block; color: var(--muted); font-size: 12px; }
.jd-num { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--c); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; margin-top: 1px; }
.jd-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.jd-badges .badge { height: 20px; font-size: 11.5px; padding: 0 8px; }
.jd-note { color: #B45309 !important; }
.jd-act { display: flex; gap: 4px; align-items: center; flex: none; }
.jd-add { padding: 10px 14px 12px; border-top: 1px solid var(--line-2); }
.jd-add .input { height: 36px; font-size: 13px; }
.jd-pin span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font: 700 11px/1 var(--font); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.jd-pin span.pend { outline: 2px dashed var(--bad); outline-offset: 1px; }
.jd-office { display: grid !important; place-items: center; background: var(--dark); color: #fff; border-radius: 8px; border: 2px solid #fff; box-shadow: 0 1px 6px rgba(0,0,0,.4); }
.jd-office .ic { width: 18px; height: 18px; color: var(--brand); }
.jd-all { display: flex; width: 100%; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.jd-kota { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 14px; }
.jd-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.jd-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.jd-cut { display: flex; gap: 8px; align-items: flex-start; margin: 10px 14px 0; padding: 8px 10px; border-radius: var(--r-sm); background: #FFF6E6; border: 1px solid #F5D9A8; font-size: 12.5px; }
.jd-cut .ic { width: 16px; height: 16px; color: #B45309; flex: none; margin-top: 1px; }
.jd-batas { display: inline-block; color: #D6D2CD; }
#dlgBanding { width: 1180px; }
.jd-band th, .jd-band td { padding-left: 10px; padding-right: 10px; }
.jd-band th { white-space: normal; line-height: 1.3; vertical-align: bottom; }
.jd-band th.grp { text-align: center; border-bottom: 1px solid var(--line); }
.jd-band th.grp + th.grp, .jd-band td:nth-child(6) { border-left: 1px solid var(--line-2); }
.jd-band tr.is-aktif td { background: var(--brand-soft); }
.jd-libur-add { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.jd-libur-add .input { width: auto; flex: 1 1 180px; }
.jd-libur { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; border: 1px solid var(--line-2); border-radius: var(--r-sm); }
.jd-libur li { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.jd-libur li span { flex: 1; color: var(--muted); }
/* Rute hari ini (teknisi) */
.rt-list { list-style: none; margin: 0; padding: 0; }
.rt-list li { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line-2); }
.rt-list li:last-child { border-bottom: 0; }
.rt-list .grow { flex: 1; min-width: 0; }
.rt-list strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.rt-list small { display: block; color: var(--muted); font-size: 12.5px; }
.rt-num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.rt-list li.done .rt-num { background: var(--ok); }
.rt-list li.done strong { color: var(--muted); }
.rt-actions { display: flex; gap: 6px; flex: none; }
.rt-gmaps { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line-2); background: var(--surface-2); }
@media (max-width: 1180px) { .jd-grid { grid-template-columns: minmax(0, 1fr); } .jd-map-wrap { position: static; } .jd-map { height: 420px; } }
@media (max-width: 640px) {
  .jd-hero { grid-template-columns: minmax(0, 1fr); padding: 18px; } .jd-hero-stats { justify-content: flex-start; }
  .jd-4, .jd-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .jd-act select { max-width: 96px; }
  .jd-list li { flex-wrap: wrap; } .jd-act { width: 100%; justify-content: flex-end; padding-left: 34px; }
  .jd-card-head { flex-wrap: wrap; } .jd-swap { width: 100%; } .jd-swap select { max-width: none; width: 100%; }
  .rt-list li { flex-wrap: wrap; } .rt-actions { width: 100%; justify-content: flex-end; }
}

/* ---------- Tambah kegiatan: banyak ATM (v6.2) ---------- */
#dlgBanyak .form-sec { margin-top: 22px; }
.bn-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bn-filter .search { flex: 1 1 260px; max-width: none; }
.bn-filter select { width: auto; flex: 0 1 200px; }
.bn-hasil { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--r-md); max-height: 300px; overflow-y: auto; }
.bn-info { margin: 0; padding: 8px 12px; font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line-2); position: sticky; top: 0; z-index: 1; }
.bn-list { list-style: none; margin: 0; padding: 0; }
.bn-list li { border-bottom: 1px solid var(--line-2); }
.bn-list li:last-child { border-bottom: 0; }
.bn-list label { display: flex; gap: 10px; align-items: center; padding: 8px 12px; cursor: pointer; }
.bn-list li.off label { cursor: not-allowed; opacity: .6; }
.bn-list input { width: 17px; height: 17px; accent-color: var(--dark); flex: none; }
.bn-list .grow { flex: 1; min-width: 0; }
.bn-list b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bn-list small { display: block; color: var(--muted); font-size: 12px; }
.bn-badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; flex: none; max-width: 45%; }
.bn-badges .badge { height: 20px; font-size: 11.5px; padding: 0 8px; }
.bn-sel-head { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 8px; }
.bn-sel { display: flex; flex-wrap: wrap; gap: 6px; max-height: 140px; overflow-y: auto; }
.bn-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: 12.5px; font-weight: 600; }
.bn-chip button { border: 0; background: none; color: inherit; cursor: pointer; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; }
.bn-chip button:hover { background: #FFD9CC; }
.bn-chip .ic { width: 12px; height: 12px; }
@media (max-width: 640px) { .bn-filter select { flex: 1 1 100%; } .bn-badges { max-width: 40%; } }

.import-gagal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 12px 0 6px; font-size: 13.5px; }

/* ---------- Contoh foto per isian (v8.0) ---------- */
.contoh-box { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; margin: 0 16px 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.contoh-box h3 { font-size: 15px; margin: 0 0 4px; }
.contoh-box .muted { font-size: 13px; margin: 0 0 10px; }
.contoh-prev a, .contoh-prev .contoh-none { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; background: var(--canvas); border: 1px solid var(--line); }
.contoh-prev img { width: 100%; height: 100%; object-fit: cover; }
.contoh-none { color: var(--muted); font-size: 12.5px; gap: 6px; align-content: center; border-style: dashed !important; }
.contoh-none .ic { width: 26px; height: 26px; }
.contoh-side { display: grid; gap: 10px; align-content: start; }
.contoh-act { display: flex; gap: 8px; flex-wrap: wrap; }
/* Form teknisi: contoh di samping kotak foto */
.photo-input.has-contoh .photo-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.photo-input.has-contoh .photo-pair .thumb { height: auto; aspect-ratio: 4 / 3; min-height: 0; }
.contoh-thumb { position: relative; display: block; width: 100%; padding: 0; border: 2px solid var(--brand); border-radius: var(--r-md); overflow: hidden; cursor: zoom-in; background: var(--brand-soft); aspect-ratio: 4 / 3; }
.contoh-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.contoh-thumb span { position: absolute; left: 0; right: 0; bottom: 0; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; text-align: center; padding: 2px 0; letter-spacing: .02em; }
.contoh-petunjuk { display: flex; gap: 6px; font-size: 12.5px; color: var(--muted); line-height: 1.45; margin: 2px 0 0; }
.contoh-petunjuk .ic { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--brand); }
#dlgContoh .modal-box { max-width: 560px; }
#dlgContoh figure { margin: 0; }
#dlgContoh figure img { width: 100%; max-height: 62vh; object-fit: contain; border-radius: var(--r-md); background: var(--canvas); }
#dlgContoh .bandingkan { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#dlgContoh .bandingkan span { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
@media (max-width: 760px) { .contoh-box { grid-template-columns: minmax(0, 1fr); } .contoh-prev { max-width: 280px; } }


/* =========================================================
   TAMPILAN 3D (v8.1)
   Kedalaman dibuat dengan CSS saja (bayangan berlapis, sisi timbul, perspektif):
   tanpa gambar atau library tambahan. Tabel data sengaja tetap rata agar ribuan baris tetap ringan.
   ========================================================= */
:root {
  --canvas: #ECE8E2;            /* kanvas sedikit lebih gelap agar kartu "terangkat" */
  --surface-3d: #FAF8F5;
  --edge: #D6D0C7;              /* sisi bawah kartu terang */
  --edge-dark: #0B0B0B;         /* sisi bawah kartu gelap */
  --brand-edge: #A3300E;        /* sisi bawah elemen jingga */
  --lift: 0 1px 0 #fff inset, 0 5px 0 var(--edge), 0 14px 26px -6px rgba(60, 40, 20, .18);
  --lift-sm: 0 1px 0 #fff inset, 0 3px 0 var(--edge), 0 8px 14px -6px rgba(60, 40, 20, .16);
  --lift-dark: 0 1px 0 #2E2B28 inset, 0 8px 0 var(--edge-dark), 0 24px 40px -10px rgba(0, 0, 0, .45);
}
body { background: var(--canvas); }
.topbar { background: rgba(236, 232, 226, .9); }

/* ---- Kartu & panel: terangkat ---- */
.panel, .stat, .pb-stat, .disk, .jd-card {
  background: var(--surface-3d); border-color: transparent; border-radius: var(--r-lg); box-shadow: var(--lift);
}
.panel-head { border-bottom-color: #ECE6DE; }
.stat, .pb-stat { transition: transform .18s ease, box-shadow .18s ease; }
a.stat:hover, .pb-stat:hover { transform: translateY(-3px); box-shadow: 0 1px 0 #fff inset, 0 8px 0 var(--edge), 0 20px 30px -8px rgba(60, 40, 20, .22); border-color: transparent; }
a.stat:active, .pb-stat:active { transform: translateY(2px); box-shadow: 0 1px 0 #fff inset, 0 2px 0 var(--edge), 0 6px 10px -6px rgba(60, 40, 20, .2); }
.stat b { font-weight: 800; }
.year-stats.panel, .ys { background: transparent; }

/* Tabel tetap rata: hanya kepala tabel diberi dasar halus */
.table-wrap { background: #fff; }

/* ---- Tombol timbul ---- */
.btn { transition: transform .1s ease, box-shadow .1s ease, background .15s; }
.btn-primary { box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 4px 0 #000, 0 10px 16px -6px rgba(0,0,0,.35); }
.btn-accent { background: var(--brand); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 4px 0 var(--brand-edge), 0 10px 18px -6px rgba(255,69,30,.45); }
.btn-accent:hover:not(:disabled) { background: #FF5A36; }
.btn-danger { box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 4px 0 #7E1419, 0 10px 16px -6px rgba(192,38,45,.4); }
.btn-ghost, .btn-danger-ghost { border-color: transparent; box-shadow: 0 1px 0 #fff inset, 0 3px 0 var(--edge), 0 6px 12px -6px rgba(60,40,20,.2); }
.btn-ghost:hover:not(:disabled) { border-color: transparent; background: #fff; }
.btn-danger-ghost { box-shadow: 0 3px 0 #EDB7B9, 0 6px 12px -6px rgba(192,38,45,.25); }
.btn-ghost-dark { border-color: transparent; background: #262422; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 4px 0 #000; }
.btn:not(:disabled):active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.25); }
.btn-sm { box-shadow: none; }
.btn-sm.btn-accent { box-shadow: 0 3px 0 var(--brand-edge); }
.btn-sm.btn-primary { box-shadow: 0 3px 0 #000; }
.btn-sm.btn-ghost, .btn-sm.btn-danger-ghost { box-shadow: 0 2px 0 var(--edge); background: #fff; }

/* ---- Isian: cekung ---- */
.field input, .field select, .field textarea, .input {
  border-color: transparent; background: #F1EDE7;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.10), inset 0 -1px 0 #fff;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  background: #fff; border-color: var(--brand); box-shadow: inset 0 2px 4px rgba(0,0,0,.06), 0 0 0 3px rgba(255,69,30,.18);
}
.filters { background: transparent; }

/* ---- Badge & penanda: sisi tipis ---- */
.badge { box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.nav-count { box-shadow: 0 2px 0 var(--brand-edge); }

/* ---- Sidebar: menu aktif timbul ---- */
.sidebar { box-shadow: 8px 0 28px rgba(0,0,0,.18); }
.nav a.active {
  background: linear-gradient(180deg, #2E2B28, #232120); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 3px 0 #000, 0 8px 14px -4px rgba(0,0,0,.5);
  border-radius: 10px;
}
.nav a.active .ic { color: var(--brand); filter: drop-shadow(0 0 6px rgba(255,69,30,.6)); }
.brand .brand-mark, .brand > svg, .brand > img { filter: drop-shadow(0 3px 0 var(--brand-edge)); }

/* ---- Kartu "hari ini": miring + ilustrasi mesin ATM 3D ---- */
.dash { perspective: 3200px; }
.today {
  position: relative; overflow: hidden; border-radius: 22px; box-shadow: var(--lift-dark);
  transform: rotateX(4deg); transform-origin: center bottom;
  grid-template-columns: minmax(0, 1fr) auto auto; padding: 26px 28px;
}
.today::after { content: ""; position: absolute; inset: auto -10% -70% 45%; height: 140%; background: radial-gradient(closest-side, rgba(255,69,30,.18), transparent); pointer-events: none; }
.today > * { position: relative; z-index: 1; }
.today-count { font-size: 50px; }
.ticks { gap: 6px; }
.ticks i { width: 15px; height: 22px; border-radius: 4px; background: #2E2B28; box-shadow: 0 4px 0 #000; }
.ticks i.done { background: var(--brand); box-shadow: 0 4px 0 var(--brand-edge), 0 0 12px rgba(255,69,30,.35); }
.ticks-bar { box-shadow: inset 0 2px 4px rgba(0,0,0,.5); }
.ticks-bar i { box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }

.atm3d { grid-row: 1 / span 3; grid-column: 3; align-self: center; width: 150px; height: 170px; position: relative; perspective: 700px; }
.atm3d .shadow { position: absolute; left: 22px; bottom: 0; width: 110px; height: 18px; border-radius: 50%; background: rgba(255,69,30,.28); filter: blur(9px); }
.atm3d .body { position: absolute; left: 32px; top: 8px; width: 86px; height: 132px; transform-style: preserve-3d; transform: rotateX(-12deg) rotateY(-32deg); }
.atm3d .face { position: absolute; }
.atm3d .front { inset: 0; background: #2A2826; border-radius: 10px 10px 4px 4px; transform: translateZ(24px); box-shadow: inset 0 0 0 1px #3D3A37; display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 12px; }
.atm3d .screen { width: 60px; height: 38px; border-radius: 6px; background: #0F2A33; box-shadow: inset 0 0 0 2px var(--brand), 0 0 14px rgba(255,69,30,.45); display: grid; place-items: center; color: #FF8C6E; font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.atm3d .keys { display: grid; grid-template-columns: repeat(3, 10px); gap: 4px; }
.atm3d .keys i { height: 7px; border-radius: 2px; background: #57524C; }
.atm3d .keys i:last-child { background: var(--brand); }
.atm3d .slot { width: 46px; height: 5px; border-radius: 3px; background: #0B0B0B; margin-top: 4px; }
.atm3d .left { top: 0; left: 0; width: 48px; height: 132px; background: #1E1C1A; transform-origin: left center; transform: rotateY(90deg) translateX(-24px); }
.atm3d .right { top: 0; right: 0; width: 48px; height: 132px; background: #3D3A37; transform-origin: right center; transform: rotateY(-90deg) translateX(24px); }
.atm3d .top { left: 0; top: 0; width: 86px; height: 48px; background: var(--brand); border-radius: 6px; transform-origin: top center; transform: rotateX(90deg) translateY(-24px); }

/* ---- Diagram cakupan: dasar terang di bawah cincin 3D ---- */
.cov-chart { background: radial-gradient(70% 40% at 50% 62%, rgba(255,69,30,.10), transparent 70%); }
.cov-item { border-color: transparent; background: #fff; box-shadow: var(--lift-sm); border-radius: 12px; transition: transform .15s, box-shadow .15s; }
.cov-item:hover { transform: translateY(-2px); border-color: transparent; }
.cov-item.active { border-color: transparent; box-shadow: 0 0 0 2px var(--dark), 0 4px 0 var(--dark); }
.cov-item i { box-shadow: 0 2px 0 rgba(0,0,0,.18); }
.month-nav { box-shadow: var(--lift-sm); border-color: transparent; background: #fff; }

/* ---- Login: kotak ATM isometrik ---- */
.lg-grid3d { position: relative; z-index: 1; height: 300px; perspective: 1100px; max-width: 34rem; }
.lg-grid3d .lg-grid {
  position: absolute; left: 8%; top: -4%; width: 78%; max-width: none; grid-template-columns: repeat(8, 1fr); gap: 14px;
  transform: rotateX(58deg) rotateZ(-38deg); transform-style: preserve-3d;
}
.lg-grid3d .lg-grid i:nth-child(n+49) { display: none; }   /* layar lebar: 48 kotak besar */
.lg-grid3d .lg-grid i { border-radius: 5px; background: #2A2826; box-shadow: 0 3px 0 #0B0B0B; transform: translateZ(3px); }
.lg-grid3d .lg-grid i.on {
  background: var(--brand); transform: translateZ(var(--h, 14px));
  box-shadow: 0 var(--h, 14px) 0 #8E2A10, 0 calc(var(--h, 14px) + 8px) 16px rgba(0,0,0,.5);
  animation: lgRise .6s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 10ms + 200ms);
}
@keyframes lgRise { from { transform: translateZ(3px); box-shadow: 0 3px 0 #0B0B0B; background: #2A2826; } }
.lg-form-wrap { perspective: 1400px; }
.lg-form {
  background: var(--surface-3d); border-radius: 26px; padding: 34px 34px 28px;
  box-shadow: 0 1px 0 #fff inset, 10px 12px 0 var(--edge), 28px 36px 56px rgba(60,40,20,.22);
  transform: rotateY(-5deg) rotateX(2deg);
}
.lg-form .btn-block { height: 50px; }

/* ---- Layar kecil & preferensi gerak: tetap timbul, tanpa kemiringan ---- */
@media (max-width: 960px) {
  .today, .lg-form { transform: none; }
  .atm3d { display: none; }
  .today { grid-template-columns: minmax(0, 1fr) auto; }
  .lg-grid3d { height: auto; perspective: none; }
  .lg-grid3d .lg-grid { position: relative; inset: auto; width: 100%; transform: none; grid-template-columns: repeat(21, 1fr); gap: 3px; }
  .lg-grid3d .lg-grid i, .lg-grid3d .lg-grid i.on { transform: none; box-shadow: 0 2px 0 #0B0B0B; }
  .lg-grid3d .lg-grid i:nth-child(n+49) { display: block; }
  .lg-grid3d .lg-grid i:nth-child(n+64) { display: none; }
  .lg-grid3d .lg-grid i.on { box-shadow: 0 2px 0 #8E2A10; }
  .lg-form { box-shadow: none; background: transparent; padding: 0; }
}
@media (max-width: 640px) {
  .panel, .stat, .pb-stat, .jd-card { box-shadow: var(--lift-sm); }
}
@media (prefers-reduced-motion: reduce) {
  .lg-grid3d .lg-grid i.on { animation: none; }
  .stat, .pb-stat, .btn, .cov-item { transition: none; }
}

/* ---------- Responsif ---------- */
@media (max-width: 1180px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-pop); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(22, 22, 22, .5); z-index: 35; }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-grid; }
  .topbar { padding-left: 16px; padding-right: 16px; }
  .content { padding: 16px 16px calc(32px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .me-text { display: none; }
  .page-title { font-size: 18px; }
  .form-grid, .detail-grid, .kform-meta { grid-template-columns: minmax(0, 1fr); }
  .stat-row { gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat b { font-size: 22px; }
  .today { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .today-count { font-size: 36px; }
  .toolbar .btn .label { display: none; }
  .toolbar .btn { padding: 0 12px; }
  .search { max-width: none; flex-basis: 100%; }
  .modal, .modal-sm, .modal-lg { width: 100vw; max-width: 100vw; max-height: 100dvh; margin: auto 0 0; }
  .modal-box { border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 94dvh; }
  .modal-foot { border-radius: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .modal-foot .btn { flex: 1; }
  .pager { justify-content: center; }
  .pager .info { text-align: center; flex-basis: 100%; }
  .toasts { left: 16px; right: 16px; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* =========================================================
   PETA SEBARAN ATM 3D (v8.2)
   ========================================================= */
.pt-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 12px 18px; }
.pt-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-chip { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 13px var(--font); padding: 6px 12px 6px 10px; border-radius: 999px; cursor: pointer; }
.pt-chip i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.pt-chip em { font-style: normal; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.pt-chip[aria-pressed="false"] { opacity: .45; }
.pt-chip[aria-pressed="false"] i { background: transparent; box-shadow: inset 0 0 0 2px var(--c); }
.pt-ctrls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pt-seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.pt-seg button { border: 0; background: transparent; color: var(--muted); font: 600 13px var(--font); padding: 5px 13px; border-radius: 6px; cursor: pointer; }
.pt-seg button[aria-pressed="true"] { background: var(--dark); color: #F3F0EC; }
.pt-ctrls .btn[aria-pressed="true"] { border-color: var(--brand); color: var(--brand-strong); background: var(--brand-soft); }
.pt-chip:focus-visible, .pt-seg button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pt-box { position: relative; height: clamp(380px, 64vh, 640px); background: #EDE8E1; border-block: 1px solid var(--line-2); }
.pt-box #ptMap { position: absolute; inset: 0; }
.pt-hint { position: absolute; left: 12px; bottom: 12px; z-index: 2; font-size: 12px; color: #F3F0EC; background: rgba(22, 22, 22, .72); padding: 6px 10px; border-radius: 8px; pointer-events: none; max-width: calc(100% - 24px); }
.pt-empty { padding: 36px 18px; text-align: center; display: grid; gap: 8px; justify-items: center; }
.pt-empty p { margin: 0; color: var(--muted); max-width: 46ch; }
.pt-foot { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; padding: 11px 18px; font-size: 12.5px; color: var(--muted); }
.pt-foot b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pt .maplibregl-popup-content { font-family: var(--font); border-radius: 10px; padding: 12px 14px; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .4); min-width: 200px; }
.pt-pop { display: grid; gap: 3px; }
.pt-pop b { font-size: 14px; line-height: 1.3; }
.pt-pop .pt-tid, .pt-pop .pt-addr { font-size: 12.5px; color: var(--muted); }
.pt-pop .pt-st { display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 12.5px; font-weight: 700; }
.pt-pop .pt-st i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.pt-pop a { margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--brand-strong); }
@media (max-width: 720px) { .pt-bar, .pt-foot { padding-inline: 14px; } }
