/* ============================================================
   FINA — app.css
   Audit UX 2026-09-02: sistem breakpoint (mobile / tablet 768 /
   desktop 1024), 100dvh, penanganan landscape, aksesibilitas,
   reduced-motion, + kelas komponen untuk kurangi inline-style.
   Identitas visual (warna, kartu glass, gradient) dipertahankan.
   ============================================================ */

:root {
  --brand-dark: #12172b;
  --brand-blue: #4f46e5;
  --brand-teal: #10b981;
  --accent-1: #4f46e5;
  --accent-2: #7c3aed;
  --accent-grad: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --sidebar-1: #0b0e1c;
  --sidebar-2: #161c36;
  --sidebar-text: #a7adc9;
  --bg-main: #f5f6fb;
  --card-bg: #ffffff;
  --stroke: #e5e8f2;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --good: #10b981;
  --bad: #ef4444;
  --warn: #f59e0b;
  --shadow-soft: 0 4px 20px rgba(18, 23, 43, 0.06);
  --shadow-hover: 0 14px 32px rgba(18, 23, 43, 0.12);
  --radius: 20px;

  --sidebar-w: 268px;
  --bottomnav-h: 64px;
  --content-max: 1180px;
  --focus-ring: 0 0 0 3px rgba(79, 70, 229, 0.45);
  --dur: 0.2s;
}

* { box-sizing: border-box; }

html, body {
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

/* Aksesibilitas: skip link + fokus terlihat */
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 10001;
  background: #fff; color: var(--brand-blue); font-weight: 800;
  padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-hover);
  transition: top var(--dur);
}
.skip-link:focus { top: 8px; }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 8px;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  z-index: -1;
  pointer-events: none;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 100%;
  overflow-x: hidden;
}

/* ===================== SIDEBAR (desktop >=1024) ===================== */
.sidebar {
  width: var(--sidebar-w); padding: 20px 16px;
  background: linear-gradient(180deg, var(--sidebar-1), var(--sidebar-2));
  display: none;
  flex-direction: column;
  position: fixed; top: 0; left: 0;
  height: 100vh; height: 100dvh;
  overflow-y: auto;
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding: 8px 10px 24px; }
.brand-name { font-weight: 800; letter-spacing: 0.5px; font-size: 19px; color: #fff; }
.brand-sub { font-size: 10px; color: var(--sidebar-text); font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; }

.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--sidebar-text);
  padding: 12px 14px; border-radius: 12px;
  font-weight: 600; font-size: 14px; transition: color var(--dur), background var(--dur);
}
.nav-item svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.07); }
.nav-item.active { color: #fff; background: var(--accent-grad); box-shadow: 0 6px 16px rgba(79,70,229,0.35); }
.nav-item.danger { color: #fca5a5; margin-top: 8px; }
.nav-item.danger:hover { background: rgba(239,68,68,0.12); color: #fecaca; }

.sidebar-security {
  margin-top: 16px; padding: 16px; border-radius: 16px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
}
.sidebar-security .sec-icn { width: 32px; height: 32px; border-radius: 10px; background: var(--accent-grad); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.sidebar-security .sec-icn svg { width: 17px; height: 17px; stroke: #fff; fill: none; stroke-width: 2; }
.sidebar-security-title { font-size: 12.5px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.sidebar-security-desc { font-size: 11.5px; color: var(--sidebar-text); line-height: 1.5; }
.sidebar-security a { color: #fff; font-size: 11.5px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; }

/* ===================== MAIN ===================== */
.main {
  flex: 1;
  padding: 16px;
  padding-bottom: calc(var(--bottomnav-h) + 28px + env(safe-area-inset-bottom));
  max-width: 100%;
  width: 100%;
}
.content { max-width: var(--content-max); margin: 0 auto; }

.glass, .card, .auth-card {
  background-color: var(--card-bg) !important;
  border: 1px solid var(--stroke) !important;
  box-shadow: var(--shadow-soft) !important;
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow var(--dur), border-color var(--dur);
}
.card:hover, .glass:hover { box-shadow: var(--shadow-hover) !important; border-color: #94a3b8 !important; }

/* ===================== TOPBAR ===================== */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 20px; padding: 14px 18px;
}
.title, h2, h3 { font-weight: 800; color: var(--brand-dark); margin-top: 0; }
.title { font-size: clamp(19px, 5vw, 24px); margin-bottom: 0; }
.subtitle { font-size: 12px; color: var(--text-muted); margin-top: 3px; font-weight: 500; }
.top-left { min-width: 0; }
.top-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.pill {
  padding: 8px 16px; border-radius: 999px;
  background: #f1f5f9; border: 1px solid var(--stroke);
  font-size: 13px; font-weight: 700; color: var(--brand-dark);
}

.search-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-main); border: 1px solid var(--stroke);
  border-radius: 12px; padding: 9px 12px; flex: 1; max-width: 340px;
  color: var(--text-muted); min-width: 0;
}
.search-box svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.search-box input { border: none !important; background: transparent !important; padding: 0 !important; margin: 0 !important; width: 100%; font-size: 13px; font-weight: 500; }
.search-box input:focus { box-shadow: none !important; }
.search-kbd { font-size: 11px; font-weight: 700; color: var(--text-muted); background: #fff; border: 1px solid var(--stroke); border-radius: 6px; padding: 2px 6px; flex-shrink: 0; }

/* dropdown hasil pencarian */
.search-wrap { position: relative; flex: 1; max-width: 340px; min-width: 0; display: none; }
.search-wrap .search-box { max-width: none; width: 100%; }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  background: #fff; border: 1px solid var(--stroke); border-radius: 12px;
  box-shadow: var(--shadow-hover); overflow: hidden; z-index: 200; display: none;
}
.search-results.show { display: block; }
.search-results a {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  color: var(--text-main); text-decoration: none; font-size: 13px; font-weight: 600;
  border-bottom: 1px solid #f1f5f9;
}
.search-results a:last-child { border-bottom: none; }
.search-results a:hover, .search-results a.active { background: #f8fafc; color: var(--brand-blue); }
.search-empty { padding: 14px; font-size: 12px; color: var(--text-muted); }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-main); border: 1px solid var(--stroke); color: var(--text-muted); text-decoration: none;
  position: relative; transition: color var(--dur), border-color var(--dur); flex-shrink: 0; cursor: pointer;
}
.icon-btn:hover { color: var(--brand-blue); border-color: var(--brand-blue); }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; border: 2px solid #fff; }

.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 14px; background: var(--bg-main); border: 1px solid var(--stroke); text-decoration: none; }
.user-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-grad); color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; letter-spacing: -0.5px; }
.user-meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.user-name-sm { font-size: 13px; font-weight: 800; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.user-role-sm { font-size: 11px; color: var(--text-muted); font-weight: 600; }

/* ===================== MODAL WAJIB EMAIL ===================== */
.mandatory-modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,0.68); backdrop-filter: blur(6px);
  z-index: 10000; display: flex; align-items: flex-start; justify-content: center;
  padding: 20px; overflow-y: auto;
}
.mandatory-modal-box {
  background: #fff; border-radius: 24px; padding: 32px 26px; max-width: 420px; width: 100%;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35); text-align: center; margin: auto;
}
.mandatory-modal-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--accent-grad); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.mandatory-modal-icon svg { width: 24px; height: 24px; }
.mandatory-modal-box p { color: var(--text-muted); font-size: 13.5px; line-height: 1.6; margin: 0 0 22px; }
.mandatory-modal-box form { text-align: left; }
.mandatory-modal-logout { display: inline-block; margin-top: 16px; font-size: 12.5px; color: var(--text-muted); text-decoration: underline; }
.mandatory-modal-logout:hover { color: var(--bad); }

/* ===================== GUEST TOPBAR ===================== */
.guest-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.guest-brand-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-grad); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.guest-brand-icon svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2; }
.guest-brand span { font-weight: 800; font-size: 18px; color: var(--text-main); letter-spacing: 0.3px; }
.guest-nav-links { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.guest-link { color: var(--text-muted); font-weight: 700; font-size: 14px; text-decoration: none; }
.guest-link:hover { color: var(--brand-blue); }

/* ===================== TOAST ===================== */
.toast, .alert {
  margin-top: 12px; margin-bottom: 18px; padding: 14px 16px; border-radius: 16px;
  font-weight: 600; font-size: 14px; line-height: 1.45;
  background: #fee2e2; color: #991b1b; border: 1px solid #ef4444;   /* default: error */
}
.toast.success, .alert.success { background: #d1fae5; color: #065f46; border-color: #10b981; }
.toast.error, .alert.error { background: #fee2e2; color: #991b1b; border-color: #ef4444; }

/* toast floating (dipakai app.js untuk feedback client-side) */
.toast-stack { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottomnav-h) + 16px + env(safe-area-inset-bottom)); z-index: 10050; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
.toast-float {
  padding: 13px 16px; border-radius: 14px; font-weight: 700; font-size: 13.5px;
  box-shadow: var(--shadow-hover); animation: toastIn 0.25s ease; display: flex; align-items: center; gap: 10px;
}
.toast-float.ok { background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; }
.toast-float.err { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.toast-float.info { background: #eff6ff; color: #1e40af; border: 1px solid #93c5fd; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ===================== GRID & DASHBOARD ===================== */
.grid { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.hero-label { font-size: 13px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.hero-balance {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand-blue));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  font-weight: 900; line-height: 1.12;
  /* audit U5: JANGAN nowrap/ellipsis — angka saldo harus selalu terbaca penuh */
  overflow-wrap: anywhere; word-break: break-word;
}
.hero-row { display: flex; gap: 12px; flex-wrap: wrap; }
.mini { flex: 1 1 140px; padding: 16px; border-radius: 16px; background: var(--bg-main); border: 1px solid var(--stroke); min-width: 0; }
.mini-label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.mini-val { font-size: clamp(15px, 4.5vw, 20px); font-weight: 800; margin-top: 6px; overflow-wrap: anywhere; }

.badge { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--stroke); background: #fff; font-size: 12px; font-weight: 700; color: var(--brand-blue); }
.entity-name { font-weight: 800; font-size: 18px; margin-top: 14px; color: var(--brand-dark); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.muted { color: var(--text-muted); }

/* ===================== FORMS & BUTTONS ===================== */
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 14px 0; }
label { display: block; font-size: 13px; color: var(--text-main); font-weight: 700; margin-bottom: 6px; }

input, select, button, textarea { font: inherit; box-sizing: border-box; }
input, select, textarea {
  width: 100%; padding: 13px 15px; border-radius: 12px;
  border: 2px solid var(--stroke); background: #f8fafc;
  color: var(--text-main); outline: none; font-weight: 500; transition: border-color var(--dur), background var(--dur);
  margin-bottom: 12px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand-blue); background: #fff;
  box-shadow: var(--focus-ring);
}
.field-error { color: var(--bad); font-size: 12px; margin-top: -6px; margin-bottom: 12px; font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px;
  border: 1px solid var(--stroke); background: #fff;
  color: var(--text-main); font-weight: 700; font-size: 14px;
  text-decoration: none; cursor: pointer; transition: background var(--dur), border-color var(--dur), transform var(--dur), box-shadow var(--dur);
  min-height: 44px;
}
.btn:hover { background: #f1f5f9; border-color: #94a3b8; }
.btn.primary { background: linear-gradient(135deg, var(--brand-dark), var(--brand-blue)); border: none; color: #fff; box-shadow: 0 4px 15px rgba(15, 40, 87, 0.2); }
.btn.primary:hover { background: linear-gradient(135deg, var(--brand-blue), var(--brand-teal)); box-shadow: 0 6px 20px rgba(15, 40, 87, 0.3); transform: translateY(-2px); }
.btn.danger { background: #fef2f2; color: var(--bad); border-color: #fecaca; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--brand-blue); }
.btn.block { width: 100%; }
.btn.sm { padding: 8px 14px; font-size: 13px; min-height: 38px; }

.divider { height: 1px; background: var(--stroke); margin: 24px 0; }
.hint { color: var(--text-muted); font-size: 13px; margin-top: 10px; line-height: 1.5; font-weight: 500; }

/* ===================== LISTS ===================== */
.list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.list-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px; border-radius: 16px; border: 1px solid var(--stroke); background: #fff; transition: border-color var(--dur); }
.li-title { font-weight: 800; font-size: 14px; color: var(--brand-dark); }
.li-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }
.li-amt { font-weight: 800; font-size: 15px; white-space: nowrap; }
.li-amt.pos { color: var(--good); }
.li-amt.neg { color: var(--text-main); }
.li-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--stroke); background: #f8fafc; color: var(--text-muted); text-decoration: none; font-size: 12px; font-weight: 700; cursor: pointer; transition: background var(--dur); }
.chip:hover { background: #eef2f7; }

/* ===================== KELAS UTILITAS (audit U8: kurangi inline style) ===================== */
.stack { display: flex; flex-direction: column; }
.stack-8 { display: flex; flex-direction: column; gap: 8px; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; }
.stack-24 { display: flex; flex-direction: column; gap: 24px; }
.hstack { display: flex; align-items: center; gap: 8px; }
.hstack-12 { display: flex; align-items: center; gap: 12px; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.center { justify-content: center; align-items: center; }
.grow { flex: 1; min-width: 0; }
.tar { text-align: right; }
.tac { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; } .mb-24 { margin-bottom: 24px; }
.text-muted { color: var(--text-muted); }
.text-good { color: var(--good); } .text-bad { color: var(--bad); }
.fw-700 { font-weight: 700; } .fw-800 { font-weight: 800; }
.fs-11 { font-size: 11px; } .fs-12 { font-size: 12px; } .fs-13 { font-size: 13px; }
.scroll-y { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }

/* kartu full-lebar di grid multi-kolom */
.fina-fullspan { grid-column: 1 / -1; }

/* quick-links (hub "Akun") */
.quicklinks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.quicklink {
  display: flex; flex-direction: column; gap: 8px; padding: 16px;
  border: 1px solid var(--stroke); border-radius: 14px; background: #f8fafc;
  color: var(--text-main); text-decoration: none; font-weight: 700; font-size: 13px;
  transition: border-color var(--dur), background var(--dur), transform var(--dur);
}
.quicklink:hover { border-color: var(--brand-blue); background: #fff; transform: translateY(-2px); }
.quicklink svg { width: 22px; height: 22px; stroke: var(--brand-blue); fill: none; stroke-width: 2; }
@media (min-width: 560px) { .quicklinks { grid-template-columns: repeat(4, 1fr); } }

/* ===================== BOTTOM NAV & FAB ===================== */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #fff; border-top: 1px solid var(--stroke);
  display: flex; justify-content: space-around; align-items: flex-end;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 50; box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}
.bottomnav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-muted); text-decoration: none; font-size: 10.5px; font-weight: 700;
  padding: 9px 4px; flex: 1 1 0; min-width: 0; transition: color var(--dur);
  gap: 3px; text-align: center;
}
.bottomnav-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bottomnav-item svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; }
.bottomnav-item.active, .bottomnav-item[aria-current="page"] { color: var(--brand-blue); }

.fab-container { position: relative; top: -18px; display: flex; justify-content: center; align-items: center; flex: 0 0 66px; }
.fab-center {
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-teal));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
  border: 4px solid #fff; transition: transform var(--dur); z-index: 60;
}
.fab-center svg { width: 26px; height: 26px; stroke: #fff; stroke-width: 2.5; fill: none; }
.fab-center:hover { transform: translateY(-3px) scale(1.04); }

/* bar aksi massal — DUDUK DI ATAS bottom nav (audit U11) */
.bulk-action-bar {
  position: fixed; bottom: calc(-140px); left: 50%; transform: translateX(-50%);
  background: #1e293b; color: #fff; padding: 12px 16px; border-radius: 16px;
  display: flex; align-items: center; gap: 10px;
  transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 55; box-shadow: 0 -10px 25px rgba(0,0,0,0.25);
  width: min(94vw, 500px); border: 1px solid #334155;
}
.bulk-action-bar.show { bottom: calc(var(--bottomnav-h) + 12px + env(safe-area-inset-bottom)); }
.bulk-action-bar select { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 8px; border: 1px solid #475569; background: #0f172a; color: #fff; font-size: 13px; margin: 0; }
.bulk-action-bar button { background: #10b981; color: #fff; border: none; padding: 9px 16px; border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 13px; }
.bulk-action-bar button:hover { background: #059669; }

/* ===================== AUTH PAGES ===================== */
.auth-wrap {
  display: flex; justify-content: center; align-items: flex-start;
  min-height: 100vh; min-height: 100dvh;
  padding: 24px 20px 60px;
}
.auth-card { width: 100%; max-width: 420px; padding: 34px 26px !important; margin: auto; }
.auth-links { display: flex; justify-content: center; gap: 12px; margin-top: 16px; font-size: 14px; font-weight: 700; flex-wrap: wrap; }
.auth-links a { color: var(--brand-blue); text-decoration: none; }

.btn-google, .btn-sdn {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; padding: 14px 20px; border-radius: 12px;
  font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: background var(--dur), box-shadow var(--dur), transform var(--dur);
  min-height: 48px;
}
.btn-google { background: #fff; color: #3c4043; border: 1px solid #dadce0; box-shadow: 0 4px 10px rgba(0,0,0,0.08); }
.btn-google svg { width: 22px; height: 22px; }
.btn-google:hover { background: #f8f9fa; border-color: #d2e3fc; box-shadow: 0 8px 20px rgba(66,133,244,0.15); transform: translateY(-2px); color: #1a73e8; }
.btn-google:active { transform: translateY(1px) scale(0.98); }
.btn-sdn { background: var(--brand-dark); color: #fff; border: 1px solid var(--brand-dark); margin-top: 10px; box-shadow: 0 4px 10px rgba(15,40,87,0.15); }
.btn-sdn svg { width: 20px; height: 20px; }
.btn-sdn:hover { background: #16376f; box-shadow: 0 8px 20px rgba(15,40,87,0.25); transform: translateY(-2px); color: #fff; }
.btn-sdn:active { transform: translateY(1px) scale(0.98); }

/* ===================== TABLET (>=768) ===================== */
@media (min-width: 768px) {
  .main { padding: 22px; }
  .content { max-width: 760px; }               /* audit U4: baris teks nyaman, tidak melar */
  .topbar { padding: 16px 20px; margin-bottom: 24px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .grid > * { min-width: 0; }
  .search-wrap { display: flex; }
}

/* ===================== DESKTOP (>=1024): sidebar ===================== */
@media (min-width: 1024px) {
  .sidebar { display: flex; }
  .sidebar + .main { margin-left: var(--sidebar-w); max-width: calc(100% - var(--sidebar-w)); }
  .main { padding: 30px; padding-bottom: 30px; }
  .content { max-width: var(--content-max); }
  .bottomnav { display: none; }
  .grid { grid-template-columns: 1.55fr 1fr; }
  .bulk-action-bar.show { bottom: 20px; }
}

/* ===================== LANDSCAPE PENDEK (audit U6) ===================== */
@media (orientation: landscape) and (max-height: 500px) {
  :root { --bottomnav-h: 52px; }
  .bottomnav-item { padding: 6px 4px; font-size: 0; gap: 0; }
  .bottomnav-item span { display: none; }
  .bottomnav-item svg { width: 20px; height: 20px; }
  .fab-container { top: -14px; flex-basis: 56px; }
  .fab-center { width: 48px; height: 48px; }
  .main { padding: 12px; padding-bottom: calc(var(--bottomnav-h) + 16px); }
  .topbar { margin-bottom: 12px; padding: 10px 14px; }
  .subtitle { display: none; }
  .card, .glass, .auth-card { padding: 16px; }
  .auth-wrap { padding: 12px 16px 40px; align-items: flex-start; }
}

/* ===================== HP SANGAT KECIL (<360) ===================== */
@media (max-width: 359px) {
  .user-chip { display: none; }
  .bottomnav-item { font-size: 9.5px; }
}

/* ===================== REDUCED MOTION ===================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  #bg-canvas { display: none; }
}

/* Banner "Install Aplikasi" (PWA) -- lihat pwa-install-banner.php + app.js */
.pwa-install-banner {
  display: flex; align-items: center; gap: 16px; width: 100%; max-width: 1100px;
  margin: 0 auto 24px; padding: 16px 20px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand-dark), var(--brand-blue));
  box-shadow: var(--shadow-soft);
}
.pwa-install-banner-icon { border-radius: 12px; flex-shrink: 0; }
.pwa-install-banner-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.pwa-install-banner-text strong { color: #fff; font-size: 15px; font-weight: 800; }
.pwa-install-banner-text span { color: rgba(255,255,255,0.75); font-size: 13px; font-weight: 500; line-height: 1.4; }
.pwa-install-banner-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pwa-install-banner-close {
  background: transparent; border: none; color: rgba(255,255,255,0.6); font-size: 22px;
  line-height: 1; cursor: pointer; padding: 4px 8px; border-radius: 8px;
}
.pwa-install-banner-close:hover { color: #fff; background: rgba(255,255,255,0.1); }
@media (max-width: 640px) {
  .pwa-install-banner { flex-wrap: wrap; }
  .pwa-install-banner-text { order: 1; width: calc(100% - 64px); }
  .pwa-install-banner-actions { order: 2; width: 100%; justify-content: space-between; }
  .pwa-install-banner-actions .btn { flex: 1; }
}
