/* =====================================================================
   SIMBANSOS SUMBA TENGAH — tema resmi pemerintah daerah
   Navy • Biru • Putih • Aksen Emas
   ===================================================================== */
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 400; font-display: swap; src: url('../vendor/fonts/plus-jakarta-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 500; font-display: swap; src: url('../vendor/fonts/plus-jakarta-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 600; font-display: swap; src: url('../vendor/fonts/plus-jakarta-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 700; font-display: swap; src: url('../vendor/fonts/plus-jakarta-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 800; font-display: swap; src: url('../vendor/fonts/plus-jakarta-sans-latin-800-normal.woff2') format('woff2'); }

:root {
  --navy-950: #061433;
  --navy-900: #0b1f4d;
  --navy-800: #102a63;
  --navy-700: #16387f;
  --blue-600: #1d4ed8;
  --blue-500: #2563eb;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;
  --gold-500: #d4a017;
  --gold-400: #e6b82e;
  --gold-100: #fbf1d3;
  --sidebar-w: 272px;
  --topbar-h: 64px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(11,31,77,.06), 0 1px 3px rgba(11,31,77,.08);
  --shadow: 0 4px 14px rgba(11,31,77,.08);
  --shadow-lg: 0 18px 40px rgba(11,31,77,.16);
  --app-bg: #f3f6fb;
  --card-bg: #ffffff;
  --border: #e3e8f2;
  --muted: #64748b;
  --heading: #0b1f4d;
  --bs-body-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-primary: #1d4ed8;
  --bs-primary-rgb: 29,78,216;
  --bs-link-color: #1d4ed8;
  --bs-link-color-rgb: 29,78,216;
  --bs-body-bg: var(--app-bg);
  --bs-border-color: var(--border);
}
[data-bs-theme="dark"] {
  --app-bg: #0a1224;
  --card-bg: #111c33;
  --border: #22314f;
  --muted: #94a3b8;
  --heading: #e2e8f0;
  --bs-body-bg: var(--app-bg);
  --bs-body-color: #cbd5e1;
  --bs-border-color: var(--border);
  --bs-secondary-bg: #16223d;
  --bs-tertiary-bg: #142039;
  --blue-50: #13234a;
  --blue-100: #1a2f63;
  --gold-100: #3a2f10;
}

body { background: var(--app-bg); font-size: .925rem; -webkit-font-smoothing: antialiased; }
h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6 { color: var(--heading); font-weight: 700; letter-spacing: -.01em; }
a { text-decoration: none; }
.text-muted { color: var(--muted) !important; }
.fw-800 { font-weight: 800; }
.text-gold { color: var(--gold-500) !important; }
.bg-navy { background: var(--navy-900) !important; color: #fff; }
.text-navy { color: var(--navy-900) !important; }
[data-bs-theme="dark"] .text-navy { color: #93c5fd !important; }
.small-xs { font-size: .75rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }

/* ---------------- Buttons ---------------- */
.btn { border-radius: var(--radius-sm); font-weight: 600; }
.btn-primary { --bs-btn-bg: var(--blue-600); --bs-btn-border-color: var(--blue-600); --bs-btn-hover-bg: var(--navy-700); --bs-btn-hover-border-color: var(--navy-700); --bs-btn-active-bg: var(--navy-800); }
.btn-navy { --bs-btn-color:#fff; --bs-btn-bg: var(--navy-900); --bs-btn-border-color: var(--navy-900); --bs-btn-hover-color:#fff; --bs-btn-hover-bg: var(--navy-700); --bs-btn-hover-border-color: var(--navy-700); }
.btn-gold { --bs-btn-color: var(--navy-950); --bs-btn-bg: var(--gold-400); --bs-btn-border-color: var(--gold-400); --bs-btn-hover-bg: var(--gold-500); --bs-btn-hover-border-color: var(--gold-500); --bs-btn-hover-color: var(--navy-950); }
.btn-soft { background: var(--blue-50); color: var(--blue-600); border: 1px solid transparent; }
.btn-soft:hover { background: var(--blue-100); color: var(--navy-800); }
[data-bs-theme="dark"] .btn-soft { color: #93c5fd; }
.btn-icon { width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.btn-xl { padding: 1rem 1.25rem; font-size: 1.05rem; border-radius: 16px; }

/* ---------------- Layout ---------------- */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 1040;
  background: linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 55%, #0e2a66 100%);
  color: #c7d2fe; display: flex; flex-direction: column; transition: transform .25s ease;
  box-shadow: 4px 0 24px rgba(6,20,51,.25);
}
.sidebar::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--gold-500), var(--gold-400), var(--gold-500)); }
.sidebar-brand { display: flex; align-items: center; gap: .75rem; padding: 1.1rem 1.1rem .9rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.sidebar-brand .t1 { color: #fff; font-weight: 800; font-size: 1rem; line-height: 1.1; letter-spacing: .02em; }
.sidebar-brand .t2 { color: var(--gold-400); font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-nav { overflow-y: auto; flex: 1; padding: .5rem .65rem 1.5rem; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.nav-section { font-size: .66rem; font-weight: 700; letter-spacing: .12em; color: rgba(199,210,254,.55); padding: 1rem .75rem .35rem; }
.nav-link-s { display: flex; align-items: center; gap: .7rem; color: #c7d2fe; padding: .52rem .75rem; border-radius: 10px; font-weight: 500; font-size: .87rem; position: relative; }
.nav-link-s i { width: 18px; text-align: center; opacity: .85; font-size: .9rem; }
.nav-link-s:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-link-s.active { background: linear-gradient(90deg, rgba(212,160,23,.22), rgba(212,160,23,.05)); color: #fff; font-weight: 600; }
.nav-link-s.active::before { content: ""; position: absolute; left: -0.65rem; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--gold-400); }
.nav-link-s.active i { color: var(--gold-400); opacity: 1; }
.nav-link-s .badge { margin-left: auto; font-size: .66rem; }
.sidebar-footer { padding: .85rem 1rem; border-top: 1px solid rgba(255,255,255,.08); font-size: .72rem; color: rgba(199,210,254,.6); }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 1030; height: var(--topbar-h);
  background: rgba(255,255,255,.88); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; padding: 0 1.25rem;
}
[data-bs-theme="dark"] .topbar { background: rgba(10,18,36,.85); }
.topbar .search-wrap { position: relative; flex: 1; max-width: 520px; }
.topbar .search-wrap input { padding-left: 2.4rem; border-radius: 12px; background: var(--app-bg); border-color: transparent; height: 42px; }
.topbar .search-wrap input:focus { background: var(--card-bg); border-color: var(--blue-500); box-shadow: 0 0 0 .2rem rgba(37,99,235,.12); }
.topbar .search-wrap > i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-results { position: absolute; top: 48px; left: 0; right: 0; background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 420px; overflow-y: auto; display: none; z-index: 1050; }
.search-results.show { display: block; }
.search-results a { display: flex; gap: .75rem; align-items: center; padding: .6rem .85rem; color: inherit; border-bottom: 1px solid var(--border); }
.search-results a:hover, .search-results a.focus { background: var(--blue-50); }
.search-results img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.topbar .avatar-sm { width: 36px; height: 36px; border-radius: 50%; background: var(--navy-900); color: var(--gold-400); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.notif-dot { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; border-radius: 9px; font-size: .62rem; background: #dc2626; color: #fff; display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid var(--card-bg); }
.notif-menu { width: 360px; max-height: 480px; overflow-y: auto; padding: 0; }
.notif-item { display: flex; gap: .7rem; padding: .7rem .9rem; border-bottom: 1px solid var(--border); color: inherit; }
.notif-item:hover { background: var(--blue-50); }
.notif-item .ic { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.content { padding: 1.25rem 1.5rem 2rem; flex: 1; }
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.page-header h1 { font-size: 1.45rem; margin: 0; }
.page-header .subtitle { color: var(--muted); margin-top: .2rem; font-size: .88rem; }
.breadcrumb { font-size: .78rem; margin-bottom: .35rem; --bs-breadcrumb-divider-color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb .active { color: var(--blue-600); font-weight: 600; }
.app-footer { padding: 1rem 1.5rem; font-size: .75rem; color: var(--muted); border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

.sidebar-backdrop { display: none; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(6,20,51,.5); z-index: 1035; }
  .main { margin-left: 0; }
  .content { padding: 1rem .85rem 5.5rem; }
  .topbar { padding: 0 .75rem; }
  .page-header h1 { font-size: 1.2rem; }
}

/* Bottom nav (mobile) */
.bottom-nav { display: none; }
@media (max-width: 991.98px) {
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030; background: var(--card-bg); border-top: 1px solid var(--border); padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(11,31,77,.08); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .15rem; font-size: .66rem; color: var(--muted); padding: .25rem 0; font-weight: 600; }
  .bottom-nav a i { font-size: 1.15rem; }
  .bottom-nav a.active { color: var(--blue-600); }
  .bottom-nav a.fab { margin-top: -26px; }
  .bottom-nav a.fab span.circle { width: 54px; height: 54px; border-radius: 50%; background: linear-gradient(135deg, var(--navy-800), var(--blue-600)); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 18px rgba(29,78,216,.4); border: 3px solid var(--card-bg); }
  .bottom-nav a.fab span.circle i { color: var(--gold-400); font-size: 1.3rem; }
}

/* ---------------- Cards ---------------- */
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-header { background: transparent; border-bottom: 1px solid var(--border); padding: .95rem 1.15rem; font-weight: 700; color: var(--heading); display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.card-header .card-title { margin: 0; font-size: .98rem; display: flex; align-items: center; gap: .5rem; }
.card-header .card-title i { color: var(--blue-600); }
.card-body { padding: 1.15rem; }

.stat-card { position: relative; overflow: hidden; padding: 1.05rem 1.1rem; height: 100%; display: flex; gap: .9rem; align-items: center; transition: transform .15s, box-shadow .15s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card .ic { width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.stat-card .val { font-size: 1.55rem; font-weight: 800; color: var(--heading); line-height: 1.1; }
.stat-card .lbl { font-size: .78rem; color: var(--muted); font-weight: 600; }
.stat-card .sub { font-size: .72rem; color: var(--muted); }
.stat-card::after { content: ""; position: absolute; right: -24px; bottom: -24px; width: 90px; height: 90px; border-radius: 50%; background: currentColor; opacity: .04; }
.ic-blue   { background: #dbeafe; color: #1d4ed8; }
.ic-navy   { background: #e0e7ff; color: #102a63; }
.ic-gold   { background: #fbf1d3; color: #a67c00; }
.ic-green  { background: #dcfce7; color: #15803d; }
.ic-red    { background: #fee2e2; color: #b91c1c; }
.ic-orange { background: #ffedd5; color: #c2410c; }
.ic-teal   { background: #ccfbf1; color: #0f766e; }
.ic-purple { background: #ede9fe; color: #6d28d9; }
.ic-gray   { background: #e2e8f0; color: #334155; }
.ic-cyan   { background: #cffafe; color: #0e7490; }
[data-bs-theme="dark"] [class^="ic-"], [data-bs-theme="dark"] [class*=" ic-"] { background: rgba(255,255,255,.07); }

.hero-banner {
  border-radius: var(--radius); color: #fff; padding: 1.4rem 1.5rem; position: relative; overflow: hidden;
  background: radial-gradient(circle at 85% 20%, rgba(230,184,46,.35), transparent 40%), linear-gradient(120deg, var(--navy-950), var(--navy-800) 60%, var(--blue-600));
  box-shadow: var(--shadow);
}
.hero-banner h2 { color: #fff; }
.hero-banner .big { font-size: 3rem; font-weight: 800; line-height: 1; color: var(--gold-400); }
.hero-banner .pattern { position: absolute; right: -40px; top: -40px; opacity: .12; font-size: 11rem; }

/* ---------------- Badges ---------------- */
.badge { font-weight: 600; border-radius: 8px; padding: .38em .62em; }
.badge-soft-primary   { background: #dbeafe; color: #1e40af; }
.badge-soft-secondary { background: #e2e8f0; color: #334155; }
.badge-soft-success   { background: #dcfce7; color: #166534; }
.badge-soft-info      { background: #cffafe; color: #155e75; }
.badge-soft-warning   { background: #fef3c7; color: #92400e; }
.badge-soft-danger    { background: #fee2e2; color: #991b1b; }
.badge-soft-orange    { background: #ffedd5; color: #9a3412; }
.badge-soft-teal      { background: #ccfbf1; color: #115e59; }
.badge-soft-dark      { background: #1f2937; color: #f9fafb; }
.badge-soft-light     { background: #f1f5f9; color: #64748b; }
.badge-soft-gold      { background: var(--gold-100); color: #7a5a00; }
.type-badge { background: color-mix(in srgb, var(--tc) 14%, transparent); color: var(--tc); border: 1px solid color-mix(in srgb, var(--tc) 30%, transparent); }
[data-bs-theme="dark"] .type-badge { color: color-mix(in srgb, var(--tc) 70%, white); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* ---------------- Tables ---------------- */
.table-modern { margin: 0; --bs-table-bg: transparent; }
.table-modern thead th { background: var(--app-bg); color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; border-bottom: 1px solid var(--border); white-space: nowrap; padding: .75rem .85rem; }
.table-modern thead th a { color: inherit; }
.table-modern td { padding: .7rem .85rem; vertical-align: middle; border-color: var(--border); }
.table-modern tbody tr:hover { background: var(--blue-50); }
.table-modern .person { display: flex; align-items: center; gap: .7rem; min-width: 200px; }
.table-modern .person img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; background: var(--app-bg); }
.table-modern .person .n { font-weight: 700; color: var(--heading); line-height: 1.2; }
.table-modern .person .s { font-size: .74rem; color: var(--muted); }
.table-responsive { border-radius: 0 0 var(--radius) var(--radius); }
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filter-bar .form-select, .filter-bar .form-control { min-width: 150px; width: auto; flex: 1 1 150px; max-width: 240px; }
.filter-bar .search { flex: 2 1 220px; max-width: 340px; }
.pagination { --bs-pagination-border-radius: 10px; --bs-pagination-active-bg: var(--navy-900); --bs-pagination-active-border-color: var(--navy-900); margin: 0; }

/* ---------------- Forms ---------------- */
.form-control, .form-select { border-radius: 10px; border-color: var(--border); padding: .55rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--blue-500); box-shadow: 0 0 0 .2rem rgba(37,99,235,.12); }
.form-label { font-weight: 600; font-size: .83rem; color: var(--heading); margin-bottom: .3rem; }
.form-label .req { color: #dc2626; }
.form-text { font-size: .75rem; }
.form-section { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card-bg); margin-bottom: 1rem; }
.form-section > .fs-head { padding: .85rem 1.1rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--heading); }
.form-section > .fs-head .num { width: 28px; height: 28px; border-radius: 8px; background: var(--navy-900); color: var(--gold-400); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }
.form-section > .fs-body { padding: 1.1rem; }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; background: var(--card-bg); border-top: 1px solid var(--border); padding: .8rem 1rem; display: flex; gap: .5rem; justify-content: flex-end; border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 -8px 20px rgba(11,31,77,.05); }
@media (max-width: 991.98px) { .sticky-actions { bottom: 64px; } }
.input-group-text { background: var(--app-bg); border-color: var(--border); border-radius: 10px; }

/* GPS widget */
.gps-box { border: 1px dashed var(--blue-500); border-radius: var(--radius); padding: 1rem; background: var(--blue-50); }
.gps-box .mini-map { height: 260px; border-radius: 12px; margin-top: .75rem; z-index: 1; }
.gps-status { font-size: .8rem; }
.btn-gps { background: linear-gradient(135deg, var(--navy-800), var(--blue-600)); color: #fff; border: 0; padding: .8rem 1.1rem; font-weight: 700; letter-spacing: .03em; }
.btn-gps:hover { color: var(--gold-400); }
.btn-gps.loading i { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Profil penerima ---------------- */
.profile-card { border-radius: var(--radius); overflow: hidden; background: var(--card-bg); border: 1px solid var(--border); box-shadow: var(--shadow); }
.profile-cover { height: 120px; background: radial-gradient(circle at 80% 10%, rgba(230,184,46,.45), transparent 45%), linear-gradient(120deg, var(--navy-950), var(--navy-700) 60%, var(--blue-600)); position: relative; }
.profile-cover .gov { position: absolute; top: 14px; left: 18px; color: rgba(255,255,255,.85); font-size: .7rem; letter-spacing: .12em; font-weight: 700; text-transform: uppercase; display: flex; gap: .5rem; align-items: center; }
.profile-cover .gov img { width: 26px; height: 26px; }
.profile-main { display: flex; gap: 1.25rem; padding: 0 1.4rem 1.2rem; flex-wrap: wrap; align-items: flex-end; margin-top: -58px; position: relative; }
.profile-photo { width: 124px; height: 124px; border-radius: 22px; border: 5px solid var(--card-bg); object-fit: cover; background: #e2e8f0; box-shadow: var(--shadow); cursor: zoom-in; }
.profile-id { font-family: ui-monospace, monospace; background: var(--gold-100); color: #7a5a00; padding: .2rem .55rem; border-radius: 8px; font-weight: 700; font-size: .82rem; }
.profile-name { font-size: 1.45rem; font-weight: 800; color: var(--heading); margin: .35rem 0 .15rem; }
.profile-qr { width: 92px; height: 92px; border-radius: 10px; background: #fff; padding: 4px; border: 1px solid var(--border); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: .45rem 1rem; font-size: .88rem; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; font-weight: 600; color: var(--heading); word-break: break-word; }
@media (max-width: 575.98px) { .kv { grid-template-columns: 1fr; gap: 0; } .kv dd { margin-bottom: .5rem; } }
.nav-tabs-modern { border: 0; gap: .25rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 1.2rem; border-top: 1px solid var(--border); }
.nav-tabs-modern .nav-link { border: 0; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 600; padding: .85rem .8rem; white-space: nowrap; border-radius: 0; font-size: .86rem; }
.nav-tabs-modern .nav-link.active { color: var(--blue-600); border-bottom-color: var(--gold-400); background: transparent; }
.nav-tabs-modern .nav-link .badge { font-size: .65rem; }

/* Timeline alur */
.flow { display: flex; align-items: flex-start; gap: 0; overflow-x: auto; padding: .5rem 0 .25rem; }
.flow-step { flex: 1; min-width: 108px; text-align: center; position: relative; }
.flow-step::before { content: ""; position: absolute; top: 18px; left: -50%; width: 100%; height: 3px; background: var(--border); z-index: 0; }
.flow-step:first-child::before { display: none; }
.flow-step.done::before, .flow-step.current::before { background: linear-gradient(90deg, var(--blue-600), var(--gold-400)); }
.flow-step .c { width: 38px; height: 38px; border-radius: 50%; margin: 0 auto .4rem; background: var(--card-bg); border: 3px solid var(--border); display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; color: var(--muted); font-size: .85rem; }
.flow-step.done .c { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.flow-step.current .c { border-color: var(--gold-400); color: var(--gold-500); box-shadow: 0 0 0 5px rgba(230,184,46,.2); }
.flow-step .l { font-size: .72rem; font-weight: 700; color: var(--heading); }
.flow-step .d { font-size: .66rem; color: var(--muted); }

.timeline { position: relative; padding-left: 1.6rem; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 1.1rem; }
.tl-item .tl-dot { position: absolute; left: -1.6rem; top: 2px; width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--card-bg); box-shadow: 0 0 0 2px var(--border); }
.tl-item .tl-card { background: var(--app-bg); border-radius: 12px; padding: .75rem .9rem; }

/* ---------------- Galeri ---------------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .8rem; }
.gallery-item { position: relative; border-radius: 12px; overflow: hidden; background: var(--app-bg); aspect-ratio: 4/3; box-shadow: var(--shadow-sm); cursor: zoom-in; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item .meta { position: absolute; inset: auto 0 0 0; padding: .5rem .6rem; background: linear-gradient(transparent, rgba(6,20,51,.85)); color: #fff; font-size: .7rem; }
.gallery-item .cat { position: absolute; top: 8px; left: 8px; }
.gallery-item .pdf { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; color: #b91c1c; font-size: 2.2rem; }
.gallery-item .actions { position: absolute; top: 6px; right: 6px; display: none; gap: 4px; }
.gallery-item:hover .actions { display: flex; }
.masonry { columns: 4 240px; column-gap: .9rem; }
.masonry .gallery-item { aspect-ratio: auto; break-inside: avoid; margin-bottom: .9rem; }
.lightbox { position: fixed; inset: 0; background: rgba(3,10,26,.94); z-index: 2000; display: none; align-items: center; justify-content: center; flex-direction: column; padding: 1rem; }
.lightbox.show { display: flex; }
.lightbox img { max-width: 100%; max-height: 78vh; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox .lb-info { color: #e2e8f0; margin-top: .9rem; text-align: center; font-size: .85rem; max-width: 760px; }
.lightbox .lb-close, .lightbox .lb-prev, .lightbox .lb-next { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 1.1rem; }
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox .lb-prev { left: 16px; top: 50%; }
.lightbox .lb-next { right: 16px; top: 50%; }

/* ---------------- Peta ---------------- */
.map-full { height: calc(100vh - var(--topbar-h) - 180px); min-height: 480px; border-radius: var(--radius); z-index: 1; }
.map-panel { position: absolute; top: 12px; left: 12px; z-index: 500; width: 300px; max-width: calc(100% - 24px); }
.map-legend { background: var(--card-bg); border-radius: 12px; padding: .6rem .8rem; box-shadow: var(--shadow); font-size: .78rem; }
.map-legend .it { display: flex; align-items: center; gap: .45rem; margin: .15rem 0; }
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.35); }
.pin i { transform: rotate(45deg); color: #fff; font-size: .75rem; }
.pin.ring { box-shadow: 0 0 0 3px var(--ring, #fff), 0 3px 8px rgba(0,0,0,.35); }
.leaflet-popup-content-wrapper { border-radius: 14px; }
.leaflet-popup-content { margin: 12px 14px; font-family: var(--bs-body-font-family); }
.map-popup { width: 240px; }
.map-popup img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.map-popup .nm { font-weight: 800; color: #0b1f4d; font-size: .95rem; }
.map-popup table { font-size: .76rem; width: 100%; margin: .5rem 0; }
.map-popup td { padding: 2px 0; vertical-align: top; }
.map-popup td:first-child { color: #64748b; width: 42%; }
.leaflet-container { font-family: var(--bs-body-font-family); }
.map-fs .map-full { height: 100vh !important; border-radius: 0; }
.cluster-agg { background: rgba(29,78,216,.85); border: 3px solid rgba(230,184,46,.9); border-radius: 50%; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-direction: column; line-height: 1; box-shadow: 0 6px 18px rgba(11,31,77,.35); }
.cluster-agg small { font-size: .55rem; font-weight: 600; opacity: .9; }

/* ---------------- Skeleton, empty, loader ---------------- */
.skeleton { background: linear-gradient(90deg, var(--app-bg) 25%, var(--border) 37%, var(--app-bg) 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-line { height: 12px; margin: .5rem 0; }
.sk-block { height: 220px; }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-state .ic { width: 84px; height: 84px; border-radius: 24px; background: var(--blue-50); color: var(--blue-600); display: inline-flex; align-items: center; justify-content: center; font-size: 2rem; margin-bottom: 1rem; }
.empty-state h5 { color: var(--heading); }
.page-loader { position: fixed; top: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--gold-400), var(--blue-500)); z-index: 3000; width: 0; transition: width .3s; }
.page-loader.active { width: 70%; transition: width 8s cubic-bezier(.1,.7,.1,1); }
.overlay-loading { position: fixed; inset: 0; background: rgba(6,20,51,.45); z-index: 2500; display: none; align-items: center; justify-content: center; }
.overlay-loading.show { display: flex; }
.overlay-loading .box { background: var(--card-bg); padding: 1.25rem 1.5rem; border-radius: 14px; display: flex; align-items: center; gap: .9rem; box-shadow: var(--shadow-lg); }

/* Toast */
.toast-container { z-index: 2100; }
.toast { border: 0; border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; background: var(--card-bg); }
.toast .bar { width: 5px; }
.toast.t-success .bar { background: #16a34a; } .toast.t-error .bar { background: #dc2626; }
.toast.t-warning .bar { background: #eab308; } .toast.t-info .bar { background: #2563eb; }

/* ---------------- Auth / Login ---------------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; background: var(--card-bg); }
.auth-visual { position: relative; color: #fff; padding: 2.5rem; display: flex; flex-direction: column; justify-content: space-between; background-size: cover; background-position: center; overflow: hidden; }
.auth-visual::before { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(6,20,51,.92), rgba(16,42,99,.75) 55%, rgba(29,78,216,.45)); }
.auth-visual > * { position: relative; z-index: 1; }
.auth-visual h1 { color: #fff; font-size: 2.3rem; font-weight: 800; letter-spacing: .01em; }
.auth-visual .gold-line { width: 72px; height: 4px; background: var(--gold-400); border-radius: 4px; margin: 1rem 0; }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .logo { width: 76px; height: 76px; }
.auth-card .form-control { height: 50px; }
.auth-feature { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: .9rem; font-size: .9rem; color: #dbeafe; }
.auth-feature i { color: var(--gold-400); margin-top: .2rem; }
@media (max-width: 991.98px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { min-height: 230px; padding: 1.5rem; }
  .auth-visual .features { display: none; }
  .auth-visual h1 { font-size: 1.6rem; }
}

/* ---------------- Lapangan (mobile) ---------------- */
.field-hero { background: linear-gradient(135deg, var(--navy-950), var(--navy-700)); color: #fff; border-radius: 20px; padding: 1.2rem; position: relative; overflow: hidden; }
.field-hero .greet { color: var(--gold-400); font-weight: 700; font-size: .8rem; }
.field-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.field-tile { background: var(--card-bg); border: 1px solid var(--border); border-radius: 18px; padding: 1.1rem; display: flex; flex-direction: column; gap: .6rem; color: var(--heading); font-weight: 700; box-shadow: var(--shadow-sm); min-height: 118px; }
.field-tile .ic { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.field-tile small { color: var(--muted); font-weight: 500; }
.field-tile:active { transform: scale(.98); }
.recipient-row { display: flex; gap: .8rem; align-items: center; padding: .8rem; border-radius: 14px; background: var(--card-bg); border: 1px solid var(--border); margin-bottom: .6rem; color: inherit; }
.recipient-row img { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; }
.wizard-steps { display: flex; gap: .35rem; margin-bottom: 1rem; }
.wizard-steps span { flex: 1; height: 5px; border-radius: 3px; background: var(--border); }
.wizard-steps span.on { background: linear-gradient(90deg, var(--blue-600), var(--gold-400)); }
.status-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.status-picker input { display: none; }
.status-picker label { border: 2px solid var(--border); border-radius: 12px; padding: .65rem .4rem; text-align: center; font-weight: 700; font-size: .78rem; cursor: pointer; background: var(--card-bg); }
.status-picker label .e { font-size: 1.3rem; display: block; }
.status-picker input:checked + label { border-color: var(--blue-600); background: var(--blue-50); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.photo-queue { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .5rem; }
.photo-queue .pq { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--app-bg); }
.photo-queue .pq img { width: 100%; height: 100%; object-fit: cover; }
.photo-queue .pq button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(220,38,38,.9); color: #fff; font-size: .7rem; }
.photo-queue .pq select { position: absolute; bottom: 0; left: 0; right: 0; font-size: .62rem; border: 0; border-radius: 0; background: rgba(6,20,51,.8); color: #fff; padding: 2px; }
.offline-banner { position: fixed; top: 0; left: 0; right: 0; background: #b45309; color: #fff; text-align: center; font-size: .8rem; padding: .35rem; z-index: 3001; display: none; }
body.is-offline .offline-banner { display: block; }

/* ---------------- Kartu penerima (cetak) ---------------- */
.id-card { width: 85.6mm; height: 54mm; border-radius: 3.2mm; overflow: hidden; position: relative; background: #fff; color: #0b1f4d; box-shadow: var(--shadow-lg); font-family: var(--bs-body-font-family); }
.id-card .ic-head { background: linear-gradient(120deg, #061433, #16387f); color: #fff; padding: 2mm 3mm; display: flex; gap: 2mm; align-items: center; height: 12mm; border-bottom: .8mm solid #e6b82e; }
.id-card .ic-head img { width: 8mm; height: 8mm; }
.id-card .ic-head .a { font-size: 2.3mm; font-weight: 700; letter-spacing: .15mm; line-height: 1.2; }
.id-card .ic-head .b { font-size: 2.9mm; font-weight: 800; color: #e6b82e; line-height: 1.1; }
.id-card .ic-body { display: flex; gap: 3mm; padding: 2.5mm 3mm; }
.id-card .ic-photo { width: 19mm; height: 24mm; object-fit: cover; border-radius: 1.5mm; border: .4mm solid #e3e8f2; }
.id-card .ic-info { flex: 1; font-size: 2.35mm; line-height: 1.35; }
.id-card .ic-info .nm { font-size: 3.4mm; font-weight: 800; line-height: 1.15; margin-bottom: .8mm; }
.id-card .ic-info .id { font-family: monospace; font-weight: 700; background: #fbf1d3; color: #7a5a00; padding: .2mm 1mm; border-radius: .8mm; display: inline-block; margin-bottom: .8mm; font-size: 2.6mm; }
.id-card .ic-qr { width: 18mm; height: 18mm; }
.id-card .ic-foot { position: absolute; bottom: 0; left: 0; right: 0; height: 4mm; background: #0b1f4d; color: #cbd5e1; font-size: 1.8mm; display: flex; align-items: center; justify-content: center; letter-spacing: .1mm; }

/* ---------------- Public ---------------- */
.public-nav { background: var(--navy-950); padding: .8rem 0; border-bottom: 3px solid var(--gold-400); }
.public-hero { background: radial-gradient(circle at 80% 0%, rgba(230,184,46,.3), transparent 45%), linear-gradient(135deg, var(--navy-950), var(--navy-800) 60%, var(--blue-600)); color: #fff; padding: 3rem 0 5rem; }
.public-hero h1 { color: #fff; font-weight: 800; }
.public-stats { margin-top: -3.5rem; }

/* ---------------- Utilities ---------------- */
.cursor-pointer { cursor: pointer; }
.min-w-0 { min-width: 0; }
.chart-box { position: relative; height: 290px; }
.chart-box.sm { height: 230px; }
.chart-box.lg { height: 360px; }
.list-compact .list-group-item { padding: .6rem .9rem; background: transparent; border-color: var(--border); }
.progress { border-radius: 10px; background: var(--app-bg); }
.progress-thin { height: 6px; }
.divider-text { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 1rem 0 .75rem; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.dropdown-menu { border-radius: 12px; border-color: var(--border); box-shadow: var(--shadow-lg); background: var(--card-bg); }
.modal-content { border-radius: var(--radius); border: 0; background: var(--card-bg); }
.modal-header { border-bottom-color: var(--border); }
.modal-footer { border-top-color: var(--border); }
.alert { border-radius: 12px; border: 0; }
.perm-matrix th, .perm-matrix td { text-align: center; }
.perm-matrix td:first-child, .perm-matrix th:first-child { text-align: left; }
.diff-old { background: #fee2e2; color: #991b1b; padding: 0 .3rem; border-radius: 4px; text-decoration: line-through; }
.diff-new { background: #dcfce7; color: #166534; padding: 0 .3rem; border-radius: 4px; }
[data-bs-theme="dark"] .diff-old { background: rgba(220,38,38,.2); color: #fca5a5; }
[data-bs-theme="dark"] .diff-new { background: rgba(22,163,74,.2); color: #86efac; }
.report-card { transition: all .15s; height: 100%; }
.report-card:hover { border-color: var(--blue-500); transform: translateY(-2px); box-shadow: var(--shadow); }
.report-card .ic { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }

@media print {
  .sidebar, .topbar, .bottom-nav, .app-footer, .no-print, .page-header .actions, .toast-container { display: none !important; }
  .main { margin: 0 !important; }
  .content { padding: 0 !important; }
  body { background: #fff !important; }
  .card { box-shadow: none !important; border-color: #ccc !important; }
}
