/* ══════════════════════════════════════════════
   ATLASBAN Pasuruan — Design System v2.1
   Professional, Clean, Functional
   ══════════════════════════════════════════════ */

:root {
    --brand: #2563EB;
    --brand-dark: #1D4ED8;
    --brand-light: #DBEAFE;
    --danger: #DC2626;
    --danger-light: #FEE2E2;
    --warning: #D97706;
    --warning-light: #FEF3C7;
    --success: #059669;
    --success-light: #D1FAE5;
    --info: #0891B2;
    --info-light: #CFFAFE;
    --slate-50: #F8FAFC;
    --slate-100: #F1F5F9;
    --slate-200: #E2E8F0;
    --slate-300: #CBD5E1;
    --slate-400: #94A3B8;
    --slate-500: #64748B;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1E293B;
    --slate-900: #0F172A;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,.04), 0 2px 4px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.06), 0 4px 6px rgba(0,0,0,.04);
    --trans: all .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--slate-50);
    color: var(--slate-800);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

/* ═══════ HEADER ALERT ═══════ */
.header-alert {
    padding: 8px 0;
    font-size: .82rem;
    line-height: 1.4;
    color: #fff;
    font-weight: 500;
}
.header-alert a { color: #fff; }
.header-alert-danger { background: linear-gradient(135deg, #DC2626, #991B1B); }

.header-info-bar {
    background: #1E3A5F;
    color: #CBD5E1;
    font-size: .75rem;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-info-bar .container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.hib-item { white-space: nowrap; }
.hib-item i { margin-right: 2px; }
.hib-sumber {
    margin-left: auto;
    font-size: .65rem;
    color: rgba(255,255,255,.4);
    font-style: italic;
}

@media (max-width: 767px) {
    .header-info-bar {
        font-size: .68rem;
        padding: 3px 0;
        line-height: 1.3;
    }
    .hib-item {
        white-space: normal;
        flex: 1;
        min-width: 0;
    }
    .hib-sumber {
        margin-left: 0;
        font-size: .6rem;
        white-space: nowrap;
    }
}

/* ═══════ NAVBAR ═══════ */
.navbar {
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    background: var(--brand) !important;
    min-height: 56px;
}
.navbar-brand {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -.5px;
}
.navbar-cuaca {
    background: rgba(255,255,255,.15);
    color: rgba(255,255,255,.9);
    font-size: .75rem;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 12px;
    white-space: nowrap;
}
.nav-link {
    font-weight: 500;
    font-size: .85rem;
    padding: 6px 14px !important;
    border-radius: 8px;
    transition: var(--trans);
    margin: 0 2px;
}
.nav-link:hover { background: rgba(255,255,255,.12); }
.nav-link.active { background: rgba(255,255,255,.2); font-weight: 600; }

/* ═══════ HOME ═══════ */
.home-page { min-height: calc(100vh - 56px); }

.home-header {
    background: linear-gradient(165deg, #F0F9FF 0%, #E0F2FE 25%, #CCFBF1 60%, #F0FDFA 100%);
    padding: 56px 0 64px;
    position: relative;
    overflow: hidden;
    border-bottom: none;
}
.home-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 85%, rgba(14,165,233,.12) 0%, transparent 50%),
        radial-gradient(circle at 85% 15%, rgba(20,184,166,.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(56,189,248,.06) 0%, transparent 60%),
        repeating-linear-gradient(45deg, rgba(14,165,233,.03) 0px, rgba(14,165,233,.03) 1px, transparent 1px, transparent 14px),
        repeating-linear-gradient(-45deg, rgba(20,184,166,.03) 0px, rgba(20,184,166,.03) 1px, transparent 1px, transparent 14px);
}
.home-header::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; right: 0;
    height: 40px;
    background: var(--slate-50);
    clip-path: ellipse(55% 100% at 50% 100%);
}
.home-header .container {
    position: relative;
    z-index: 1;
}

.home-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}
.home-brand-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0EA5E9, #06B6D4);
    box-shadow: 0 4px 12px rgba(14,165,233,.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    flex-shrink: 0;
}
.home-brand h1 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -.4px;
    color: #0F172A;
    margin: 0;
    line-height: 1.2;
}
.home-brand span {
    font-size: .78rem;
    color: #64748B;
    font-weight: 500;
}

.home-cuaca {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff;
    border: 1px solid #E2E8F0;
    color: #334155;
    font-size: .75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.home-cuaca i {
    color: #F59E0B;
    font-size: .85rem;
}

.home-content { padding: 32px 0 40px; }

.home-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.home-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    text-decoration: none;
    transition: var(--trans);
}
.home-card:hover {
    border-color: transparent;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.home-card-dot {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: currentColor;
    flex-shrink: 0;
}
.home-card-dot i { color: #fff; }
.home-card-label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--slate-700);
    line-height: 1.3;
}

@media (min-width: 768px) {
    .home-header { padding: 72px 0 80px; }
    .home-brand-icon { width: 56px; height: 56px; font-size: 1.6rem; }
    .home-brand h1 { font-size: 1.5rem; }
    .home-card { padding: 20px; gap: 16px; }
    .home-card-dot { width: 48px; height: 48px; font-size: 1.35rem; }
    .home-card-label { font-size: .85rem; }
}

@media (max-width: 767px) {
    .home-header { padding: 40px 0 56px; }
    .home-header::after { height: 30px; }
    .home-brand { flex-direction: column; text-align: center; gap: 10px; }
    .home-brand-icon { width: 56px; height: 56px; font-size: 1.8rem; border-radius: 16px; }
    .home-brand h1 { font-size: 1.4rem; }
    .home-brand span { font-size: .82rem; }
    .home-cuaca {
        font-size: .85rem;
        padding: 8px 16px;
        border-radius: 22px;
        gap: 6px;
    }
    .home-content { padding: 20px 0 32px; }
    .home-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .home-card { padding: 14px 12px; gap: 10px; }
    .home-card-dot { width: 36px; height: 36px; font-size: 1rem; border-radius: 10px; }
    .home-card-label { font-size: .76rem; }
}

/* ═══════ STAT CARDS ═══════ */
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--slate-200);
    text-align: center;
    transition: var(--trans);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon { font-size: 1.4rem; margin-bottom: 6px; display: block; }
.stat-num { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.stat-lbl { font-size: .73rem; color: var(--slate-500); margin-top: 3px; }
.stat-blue::before, .stat-blue .stat-icon, .stat-blue .stat-num { color: var(--brand); }
.stat-blue::before { background: var(--brand); }
.stat-red::before, .stat-red .stat-icon, .stat-red .stat-num { color: var(--danger); }
.stat-red::before { background: var(--danger); }
.stat-green::before, .stat-green .stat-icon, .stat-green .stat-num { color: var(--success); }
.stat-green::before { background: var(--success); }
.stat-amber::before, .stat-amber .stat-icon, .stat-amber .stat-num { color: var(--warning); }
.stat-amber::before { background: var(--warning); }

/* ═══════ NEWS ═══════ */
.news-card {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    margin-bottom: 8px;
    transition: var(--trans);
}
.news-card:hover {
    border-color: var(--brand);
    background: #FAFBFC;
    box-shadow: var(--shadow);
}
.news-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--slate-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.news-card strong { display: block; font-size: .85rem; color: var(--slate-800); line-height: 1.35; }
.news-card small { font-size: .73rem; color: var(--slate-400); }

/* ═══════ MAP PAGE ═══════ */
.map-page { position: relative; display: flex; height: calc(100vh - 56px); }
#map { flex: 1; }

/* Fullscreen mode: #map directly covers entire viewport */
body.fs-active .navbar,
body.fs-active .mobile-nav,
body.fs-active .map-sidebar,
body.fs-active .map-legend-mobile,
body.fs-active .map-info-mobile { display: none !important; }

body.fs-active .main-content { min-height: auto !important; height: 0 !important; overflow: hidden !important; padding: 0 !important; margin: 0 !important; }

body.fs-active #map {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 2000 !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.fs-active .map-fs-toggle {
    position: fixed !important;
    right: 12px !important;
    top: 12px !important;
    z-index: 2001 !important;
}
.map-sidebar {
    width: 320px; background: #fff; border-left: 1px solid var(--slate-200);
    overflow-y: auto; padding: 16px; flex-shrink: 0; font-size: .8rem;
    display: flex; flex-direction: column; gap: 12px;
}
.map-sidebar h5 {
    font-size: .88rem; font-weight: 700; color: var(--slate-800);
    margin: 0; padding-bottom: 10px; border-bottom: 2px solid var(--brand);
}
.sidebar-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sidebar-stat { text-align: center; padding: 10px 8px; background: var(--slate-50); border-radius: 8px; border: 1px solid var(--slate-100); }
.sidebar-stat strong { font-size: 1.1rem; display: block; color: var(--slate-800); }
.sidebar-stat span { font-size: .65rem; color: var(--slate-500); }
.sidebar-section-title { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--slate-400); margin-bottom: 6px; }
.sidebar-legend { display: flex; flex-direction: column; gap: 4px; }
.sl-item { display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 600; color: var(--slate-700); }
.sl-line { display: inline-block; width: 20px; height: 5px; border-radius: 2px; flex-shrink: 0; }
.sl-foot { display: flex; gap: 12px; font-size: .68rem; color: var(--slate-500); margin-top: 2px; }
.sidebar-bencana { display: flex; flex-wrap: wrap; gap: 6px; }
.sb-item { font-size: .72rem; color: var(--slate-600); display: flex; align-items: center; gap: 4px; background: var(--slate-50); padding: 3px 8px; border-radius: 6px; border: 1px solid var(--slate-100); }
.map-sidebar .list-group-item { display: flex; align-items: center; gap: 8px; border: 1px solid var(--slate-100); border-radius: 8px !important; margin-bottom: 5px; padding: 9px 10px; font-size: .78rem; text-decoration: none; color: var(--slate-700); transition: var(--trans); }
.map-sidebar .list-group-item:hover { border-color: var(--brand); background: #F8FAFF; }
.map-sidebar .badge { font-size: .6rem; }

/* Mobile legend */
.map-legend-mobile { display: none; position: absolute; bottom: 60px; left: 8px; background: rgba(255,255,255,.97); backdrop-filter: blur(8px); padding: 6px 10px; border-radius: 10px; box-shadow: var(--shadow-md); font-size: .68rem; font-weight: 600; color: var(--slate-700); z-index: 999; align-items: center; gap: 10px; border: 1px solid var(--slate-200); }
.ml-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.ml-sep { width: 1px; height: 16px; background: var(--slate-200); }
.ml-info-btn { border: none; background: var(--brand); color: #fff; border-radius: 6px; padding: 3px 8px; font-size: .7rem; font-weight: 600; cursor: pointer; }

/* Fullscreen toggle */
.map-fs-toggle {
    display: none;
    position: absolute; top: 10px; right: 10px; z-index: 1000;
    width: 36px; height: 36px; border-radius: 10px;
    background: #fff; border: 1px solid var(--slate-200); box-shadow: var(--shadow-md);
    font-size: 1.1rem; cursor: pointer; align-items: center; justify-content: center;
    transition: var(--trans);
}
.map-fs-toggle:hover { background: var(--slate-100); }
.map-fs-toggle.active { background: var(--slate-800); color: #fff; border-color: var(--slate-800); }
.map-fs-toggle.active i { transform: rotate(45deg); }

/* Fullscreen mode: hide all overlays */
body.no-bottom-nav .mobile-nav { display: none !important; }

/* Mobile info panel */
.map-info-mobile {
    display: none;
    position: absolute;
    bottom: 60px; left: 8px; right: 8px;
    max-height: 50vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 998;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid var(--slate-200);
}
.map-info-mobile.open { display: flex; }
.mim-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; border-bottom: 1px solid var(--slate-100);
    background: var(--slate-50);
}
.mim-header strong { font-size: .82rem; color: var(--slate-800); }
.mim-body { padding: 12px 14px; overflow-y: auto; }
.mim-body .list-group-item { font-size: .76rem; padding: 8px 10px; }
.mim-body .sidebar-row { margin-bottom: 8px; }
.mim-body .sidebar-bencana { margin-bottom: 8px; }

/* Popup */
.leaflet-popup-content-wrapper { border-radius: var(--radius) !important; padding: 0 !important; box-shadow: var(--shadow-lg) !important; overflow: hidden; }
.leaflet-popup-content { margin: 0 !important; min-width: 260px; font-size: .8rem; }
.popup-header { padding: 12px 14px; color: #fff; }
.popup-header h6 { margin: 0; font-size: .88rem; font-weight: 700; }
.popup-body { padding: 10px 14px; }
.popup-body p { margin-bottom: 6px; line-height: 1.4; }
.popup-disasters { border-top: 1px solid var(--slate-100); padding-top: 8px; margin-top: 6px; }
.popup-disaster-item { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; font-size: .74rem; }
.disaster-dot { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; flex-shrink: 0; margin-top: 1px; }
.popup-footer { padding: 8px 14px; border-top: 1px solid var(--slate-100); background: #FAFBFC; text-align: right; }

@media (max-width: 991px) {
    .map-sidebar { display: none; }
    .map-legend-mobile { display: flex; }
    .map-fs-toggle { display: flex; }
    .map-info-mobile.open { display: flex; }
    .mobile-nav { display: flex; }
}

/* ═══════ RISK PAGE ═══════ */
.risk-summary-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 18px 14px;
    text-align: center;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--slate-200);
    border-top: 4px solid var(--c);
    transition: var(--trans);
}
.risk-summary-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.rs-num { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--c); }
.rs-lbl { font-size: .78rem; color: var(--slate-600); margin-top: 2px; font-weight: 600; }
.rs-pct { font-size: .7rem; color: var(--slate-400); margin-top: 2px; }
.risk-bar-container {
    display: flex;
    height: 14px;
    border-radius: 7px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,.06);
}
.risk-bar-segment { transition: all .3s; }

.wilayah-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--slate-200);
    border-top: 4px solid var(--c);
    overflow: hidden;
    transition: var(--trans);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.wilayah-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.wilayah-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--c-soft);
    border-bottom: 1px solid var(--slate-50);
}
.wilayah-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}
.wilayah-header h6 { font-size: .9rem; margin: 0; }
.wilayah-header small { font-size: .7rem; color: var(--slate-500); }
.risk-pill {
    font-size: .6rem;
    font-weight: 800;
    color: #fff;
    padding: 3px 8px;
    border-radius: 10px;
    letter-spacing: .3px;
    flex-shrink: 0;
}
.wilayah-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 12px 14px;
}
.ws-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: var(--slate-50);
    border-radius: 8px;
}
.ws-item i { font-size: 1rem; }
.ws-item div { display: flex; flex-direction: column; line-height: 1.1; }
.ws-item strong { font-size: .85rem; color: var(--slate-800); }
.ws-item small { font-size: .65rem; color: var(--slate-500); }
.wilayah-desc {
    padding: 0 14px 10px;
    font-size: .76rem;
    color: var(--slate-600);
    line-height: 1.4;
    flex-grow: 1;
}
.wilayah-footer {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    border-top: 1px solid var(--slate-100);
    background: #FAFBFC;
}

/* ═══════ ADMIN ═══════ */
.admin-wrapper { display: flex; min-height: calc(100vh - 56px); }
.admin-sidebar {
    width: 240px;
    background: var(--slate-900);
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}
.admin-sidebar-brand {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -.3px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    color: #fff;
}
.admin-user {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    font-size: .78rem;
    color: var(--slate-400);
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-user i { font-size: 1.2rem; color: var(--slate-500); }
.admin-nav { flex: 1; padding: 8px 0; overflow-y: auto; }
.admin-nav-section {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--slate-500);
    padding: 12px 20px 4px;
    font-weight: 700;
}
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    color: var(--slate-400);
    text-decoration: none;
    font-size: .84rem;
    transition: var(--trans);
    border-left: 3px solid transparent;
    font-weight: 500;
}
.admin-nav-item:hover {
    color: #fff;
    background: rgba(255,255,255,.04);
}
.admin-nav-item.active {
    color: #fff;
    background: rgba(37,99,235,.2);
    border-left-color: var(--brand);
    font-weight: 600;
}
.admin-nav-item i { font-size: .95rem; width: 20px; text-align: center; }
.admin-nav-item .badge {
    margin-left: auto;
    font-size: .65rem;
    padding: 2px 7px;
    border-radius: 8px;
}

.admin-main {
    flex: 1;
    padding: 28px 32px;
    overflow-x: auto;
    background: var(--slate-50);
    min-width: 0;
}
.admin-main h4 { font-size: 1.15rem; font-weight: 700; margin: 0 0 20px 0; color: var(--slate-800); }
.admin-tab { display: none; }
.admin-tab.active { display: block; animation: fadeIn .3s; }

/* Dashboard cards */
.admin-dash-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.admin-dash-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--slate-200);
    transition: var(--trans);
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.admin-dash-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.adc-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; color: #fff;
    flex-shrink: 0;
}
.adc-num { font-size: 1.5rem; font-weight: 800; line-height: 1; color: var(--slate-800); }
.adc-lbl { font-size: .72rem; color: var(--slate-500); margin-top: 2px; }

/* Admin table */
.admin-table {
    font-size: .84rem;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}
.admin-table thead th {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--slate-500);
    background: var(--slate-50);
    border-bottom: 2px solid var(--slate-200);
    padding: 10px 14px;
    font-weight: 700;
    white-space: nowrap;
}
.admin-table tbody td {
    padding: 10px 14px;
    vertical-align: middle;
    border-bottom: 1px solid var(--slate-100);
    font-size: .83rem;
}
.admin-table tbody tr { transition: var(--trans); }
.admin-table tbody tr:hover { background: #F8FAFC; }

/* Admin header row */
.admin-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}
.admin-header-row h4 { margin: 0 !important; }

/* Responsive admin - keep sidebar always visible, just narrower */
@media (max-width: 992px) {
    .admin-sidebar { width: 200px; }
    .admin-main { padding: 20px; }
    .admin-dash-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 768px) {
    .admin-wrapper { flex-direction: column; }
    .admin-sidebar { width: 100%; flex-shrink: 1; }
    .admin-nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 2px;
        padding: 6px;
    }
    .admin-nav-item {
        border-left: none;
        border-bottom: 2px solid transparent;
        white-space: nowrap;
        padding: 8px 14px;
        font-size: .78rem;
        border-radius: 6px 6px 0 0;
    }
    .admin-nav-item.active {
        border-left-color: transparent;
        border-bottom-color: var(--brand);
    }
    .admin-nav-section { display: none; }
    .admin-sidebar-brand { padding: 12px 16px; font-size: .9rem; }
    .admin-user { display: none; }
    .admin-main { padding: 16px; }
    .admin-dash-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .admin-dash-card { padding: 14px; gap: 10px; }
    .adc-icon { width: 36px; height: 36px; font-size: 1.1rem; }
    .adc-num { font-size: 1.2rem; }
    .admin-table { font-size: .76rem; }
    .admin-table thead th, .admin-table tbody td { padding: 8px 10px; }
}

/* ═══════ FOOTER ═══════ */
.app-footer {
    background: #fff;
    border-top: 1px solid var(--slate-200);
    padding: 24px 0;
    font-size: .78rem;
    color: var(--slate-500);
}
.app-footer h6 { font-size: .82rem; font-weight: 700; color: var(--slate-700); margin-bottom: 8px; }
.app-footer p { margin-bottom: 4px; line-height: 1.5; }
.app-footer .sources code {
    font-size: .68rem;
    background: var(--slate-100);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--slate-600);
}

/* ═══════ LOADING SKELETON ═══════ */
.skeleton {
    background: linear-gradient(90deg, var(--slate-100) 25%, var(--slate-50) 50%, var(--slate-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
    height: 14px;
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ═══════ ALERTS ═══════ */
.alert {
    border-radius: var(--radius);
    border: none;
    font-size: .86rem;
    padding: 14px 16px;
}
.alert-danger { background: var(--danger-light); color: #991B1B; border-left: 4px solid var(--danger); }
.alert-warning { background: var(--warning-light); color: #92400E; border-left: 4px solid var(--warning); }
.alert-success { background: var(--success-light); color: #065F46; border-left: 4px solid var(--success); }

/* ═══════ CARDS / LISTS ═══════ */
.card {
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--slate-200);
    transition: var(--trans);
}
.card:hover { box-shadow: var(--shadow); }

.list-group-item {
    border: 1px solid var(--slate-200);
    border-radius: 10px !important;
    margin-bottom: 8px;
    transition: var(--trans);
}
.list-group-item:last-child { margin-bottom: 0; }
.list-group-item:hover { border-color: var(--brand); background: var(--brand-light); }

/* ═══════ BADGES ═══════ */
.badge {
    font-size: .68rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}
.badge.bg-danger { background: var(--danger-light) !important; color: #991B1B !important; }
.badge.bg-warning { background: var(--warning-light) !important; color: #92400E !important; }
.badge.bg-success { background: var(--success-light) !important; color: #065F46 !important; }
.badge.bg-info { background: var(--info-light) !important; color: #075985 !important; }
.badge.bg-primary { background: var(--brand-light) !important; color: #1E40AF !important; }
.badge.bg-secondary { background: var(--slate-100) !important; color: var(--slate-600) !important; }

/* ═══════ BUTTONS ═══════ */
.btn { font-weight: 500; border-radius: 8px; transition: var(--trans); }
.btn-sm { font-size: .8rem; padding: 4px 12px; border-radius: 6px; }
.btn-outline-primary { border-color: var(--brand); color: var(--brand); }
.btn-outline-primary:hover { background: var(--brand); color: #fff; }
.btn-outline-danger { border-color: var(--danger); color: var(--danger); }
.btn-outline-danger:hover { background: var(--danger); color: #fff; }
.btn-outline-success { border-color: var(--success); color: var(--success); }
.btn-outline-success:hover { background: var(--success); color: #fff; }

/* ═══════ MOBILE NAV ═══════ */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 1050;
    background: rgba(255,255,255,.97);
    border-top: 1px solid var(--slate-200);
    padding: 4px 0 calc(4px + env(safe-area-inset-bottom, 0));
    justify-content: space-around;
    backdrop-filter: blur(12px);
    box-shadow: 0 -1px 3px rgba(0,0,0,.04);
}
body.no-bottom-nav .mobile-nav { display: none !important; }
.mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--slate-400);
    font-size: .62rem;
    padding: 4px 6px;
    min-width: 48px;
    transition: var(--trans);
    gap: 2px;
}
.mobile-nav a i { font-size: 1.15rem; }
.mobile-nav a.active { color: var(--brand); font-weight: 600; }

/* ═══════ MODAL ═══════ */
.modal-content { border-radius: var(--radius-lg); border: none; box-shadow: var(--shadow-lg); overflow: hidden; }
.modal-header { padding: 14px 18px; border-bottom: none; }
.modal-body { padding: 18px; }
.modal-footer { padding: 12px 18px; border-top: 1px solid var(--slate-100); background: #FAFBFC; }

/* ═══════ TABLE ═══════ */
.table { margin-bottom: 0; }
.table th { font-weight: 600; color: var(--slate-600); }
.table td { color: var(--slate-700); }
.table-responsive {
    border-radius: var(--radius);
    border: 1px solid var(--slate-200);
    overflow: hidden;
    background: #fff;
}
.gempa-table thead th {
    background: var(--slate-50);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--slate-500);
    border-bottom: 1px solid var(--slate-200);
}
.gempa-table td {
    font-size: .8rem;
    padding: 10px 12px;
    vertical-align: middle;
}
.gempa-table tbody tr { transition: var(--trans); }
.gempa-table tbody tr:hover { background: #FAFBFC; }

/* ═══════ EVAKUASI ═══════ */
.evac-page { min-height: calc(100vh - 56px); }
.evac-map-wrap {
    position: relative;
    height: 360px;
    border-radius: 0 0 16px 16px;
    overflow: hidden;
    transition: height .3s ease;
}
.evac-map-wrap #evacMap { height: 100%; }
.evac-overlay {
    position: absolute;
    top: 12px; left: 12px; right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    z-index: 1000;
    pointer-events: none;
}
.evac-overlay > * { pointer-events: auto; }
.evac-locate-btn {
    background: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 600;
    color: #2563EB;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all .2s;
}
.evac-locate-btn:hover { background: #2563EB; color: #fff; }
.evac-locate-btn:disabled { opacity: .6; cursor: wait; }

.evac-nav-box {
    background: #fff;
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.18);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 300px;
    flex: 1;
}
.evac-nav-box.nav-active { border: 2px solid #2563EB; }
.evac-nav-inst {
    flex: 1;
    font-size: .82rem;
    font-weight: 600;
    color: #1E293B;
    line-height: 1.3;
    min-width: 0;
}
.evac-nav-stats {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex-shrink: 0;
}
.evac-nav-stats span {
    font-size: .72rem;
    font-weight: 700;
    color: #2563EB;
    white-space: nowrap;
}
.evac-nav-stats span + span { color: #64748B; font-weight: 500; }
.evac-nav-stop {
    background: none; border: none;
    color: #DC2626; font-size: 1.3rem;
    cursor: pointer; padding: 0; line-height: 1;
    display: none;
}
.nav-active .evac-nav-stop { display: block; }

.evac-center-btn {
    position: absolute;
    bottom: 60px; right: 12px;
    width: 38px; height: 38px;
    border-radius: 10px;
    background: #fff;
    border: none;
    color: #2563EB;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    z-index: 1000;
}
.evac-center-btn:hover { background: #2563EB; color: #fff; }

/* .evac-showlist-btn moved to EVACUASI PAGE section below */

.evac-loading {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,.75);
    color: #fff;
    padding: 10px 20px;
    border-radius: 22px;
    font-size: .82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1001;
    pointer-events: none;
}

.evac-transport {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.evac-transport-label {
    font-size: .75rem;
    font-weight: 600;
    color: #64748B;
    margin-right: 4px;
}
.evac-toggle-btn {
    width: 32px; height: 32px;
    border-radius: 8px;
    border: 1.5px solid #E2E8F0;
    background: #fff;
    color: #475569;
    font-size: .9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    flex-shrink: 0;
}
.evac-toggle-btn:hover { background: #F1F5F9; border-color: #CBD5E1; }
.evac-tbtn {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid #E2E8F0;
    background: #fff;
    font-size: .75rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.evac-tbtn:hover { border-color: #2563EB; color: #2563EB; }
.evac-tbtn.active {
    background: #2563EB;
    color: #fff;
    border-color: #2563EB;
}
.evac-tbtn i { font-size: .85rem; }

.evac-info {
    background: #fff;
    padding: 10px 16px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    text-align: center;
    min-width: 100px;
}
.evac-info-distance { font-weight: 700; font-size: 1rem; color: #DC2626; }
.evac-info-duration { font-size: .75rem; color: #64748B; }

.evac-list { display: flex; flex-direction: column; gap: 8px; }
.evac-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1.5px solid #E2E8F0;
    cursor: pointer;
    transition: all .2s;
    gap: 12px;
}
.evac-item:hover { border-color: #DC2626; box-shadow: 0 2px 8px rgba(220,38,38,.1); }
.evac-item.active { border-color: #DC2626; background: #FEF2F2; box-shadow: 0 2px 8px rgba(220,38,38,.15); }
.evac-item-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.evac-item-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: #FEE2E2;
    color: #DC2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.evac-item-info { min-width: 0; }
.evac-item-info strong { font-size: .88rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evac-item-info small { font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.evac-item-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.evac-dist {
    font-size: .78rem;
    font-weight: 700;
    color: #DC2626;
    background: #FEE2E2;
    padding: 4px 10px;
    border-radius: 12px;
}

@media (max-width: 767px) {
    .evac-map-wrap { height: 280px; }
    .evac-locate-btn { font-size: .75rem; padding: 8px 12px; }
    .evac-nav-box { padding: 8px 10px; max-width: 220px; gap: 6px; }
    .evac-nav-inst { font-size: .78rem; line-height: 1.4; }
    .evac-nav-stats span { font-size: .68rem; }
    .evac-tbtn { padding: 5px 10px; font-size: .7rem; gap: 3px; }
    .evac-tbtn i { font-size: .75rem; }
    .evac-center-btn { bottom: 50px; right: 8px; width: 34px; height: 34px; font-size: 1rem; }
    .evac-showlist-btn { padding: 8px 16px; font-size: .75rem; bottom: 12px; }
    .evac-item { padding: 12px; }
}

/* ═══════ UTILITY ═══════ */
.bg-primary { background: var(--brand) !important; }
.bg-success { background: var(--success) !important; }
.bg-warning { background: var(--warning) !important; color: #000 !important; }
.bg-info { background: var(--info) !important; }
.bg-dark { background: var(--slate-900) !important; }
.bg-danger { background: var(--danger) !important; }

.text-muted { color: var(--slate-500) !important; }
.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }

.container { max-width: 960px; }

/* ═══════ ANIMATIONS ═══════ */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 991px) {
    .mobile-nav { display: flex; }
}

@media (min-width: 768px) {
    .menu-desc { display: block; }
    .menu-card { padding: 22px 12px; }
    .menu-icon { width: 52px; height: 52px; font-size: 1.5rem; border-radius: 14px; }
    .menu-title { font-size: .82rem; }
}

@media (max-width: 767px) {
    .hero-title { font-size: 1.8rem; }
    .hero-sub { font-size: .85rem; }
    .hero-actions .btn { padding: 8px 16px; font-size: .85rem; }
    .admin-wrapper { flex-direction: column; }
    .admin-sidebar { width: 100%; }
    .admin-nav { flex-direction: row; overflow-x: auto; gap: 2px; padding: 4px; }
    .admin-nav-item {
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
        padding: 8px 12px;
        font-size: .78rem;
    }
    .admin-nav-item.active { border-left-color: transparent; border-bottom-color: var(--brand); }
    .admin-main { padding: 14px; }
    .quick-grid { gap: 8px; }
    .menu-card { padding: 14px 6px; }
    .menu-icon { width: 40px; height: 40px; font-size: 1.15rem; border-radius: 10px; }
    .menu-title { font-size: .7rem; }
    .admin-table { font-size: .76rem; }
}

/* ------- EVACUASI PAGE ------- */
.evac-page { display: flex; flex-direction: column; height: calc(100vh - 56px); overflow: hidden; }
.evac-map-wrap { flex: 1; position: relative; min-height: 0; }
#evacMap { width: 100%; height: 100%; }
body.evac-fs .navbar { display: none !important; }
body.evac-fs .mobile-nav { display: none !important; }
body.evac-fs .main-content { min-height: 0 !important; height: 0 !important; overflow: hidden !important; padding: 0 !important; margin: 0 !important; }
body.evac-fs .evac-page { display: block !important; height: 100vh !important; height: 100dvh !important; width: 100vw !important; overflow: hidden !important; }
body.evac-fs .evac-map-wrap { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; width: 100vw !important; height: 100vh !important; height: 100dvh !important; z-index: 2000 !important; }
body.evac-fs #evacMap { position: absolute !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; width: 100% !important; height: 100% !important; }
body.evac-fs .evac-panel { display: none !important; }
body.evac-fs .evac-locate-btn { padding: 6px 12px; font-size: .72rem; }
body.evac-fs .evac-center-btn { width: 32px; height: 32px; font-size: .85rem; bottom: 14px; right: 130px; }
body.evac-fs .evac-nav-box { top: 8px; left: 8px; right: 8px; padding: 10px 12px; }
.evac-panel { background: #fff; border-top: 1px solid var(--slate-200); box-shadow: 0 -2px 10px rgba(0,0,0,.06); max-height: 50vh; display: flex; flex-direction: column; flex-shrink: 0; }
.evac-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--slate-100); }
.evac-panel-body { padding: 12px 14px; overflow-y: auto; }
.evac-toggle-btn { border: none; background: var(--slate-100); width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-size: .9rem; transition: var(--trans); }
.evac-toggle-btn:hover { background: var(--slate-200); }
.evac-showlist-btn { position: absolute; z-index: 1000; background: rgba(255,255,255,.95); backdrop-filter: blur(6px); border: 1px solid var(--slate-200); border-radius: 18px; padding: 4px 10px; font-size: .72rem; font-weight: 600; cursor: pointer; box-shadow: var(--shadow); display: inline-flex; align-items: center; gap: 4px; pointer-events: auto; color: var(--slate-700); width: fit-content; max-width: 100px; white-space: nowrap; }
.evac-showlist-btn:hover { background: #fff; box-shadow: var(--shadow-md); color: var(--brand); border-color: var(--brand); }
.evac-showlist-btn i { font-size: .85rem; }
.evac-showlist-btn:hover { background: #fff; box-shadow: var(--shadow-md); color: var(--slate-800); }
.evac-overlay { position: absolute; bottom: 0; left: 0; right: 0; pointer-events: none; }
.evac-locate-btn { position: absolute; bottom: 16px; right: 16px; z-index: 1000; pointer-events: auto; background: var(--brand); color: #fff; border: none; border-radius: 24px; padding: 10px 18px; font-size: .82rem; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 6px; }
.evac-locate-btn:hover { background: var(--brand-dark); }
.evac-locate-btn:disabled { opacity: .6; }
.evac-center-btn { position: absolute; bottom: 16px; right: 160px; z-index: 1000; pointer-events: auto; background: rgba(255,255,255,.95); border: 1px solid var(--slate-200); border-radius: 24px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow); font-size: 1rem; }
.evac-nav-box { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 1000; pointer-events: auto; background: rgba(0,0,0,.85); color: #fff; border-radius: 14px; padding: 14px; display: flex; align-items: center; gap: 10px; backdrop-filter: blur(10px); }
.evac-nav-box.nav-active { background: rgba(37,99,235,.92); border: 2px solid rgba(255,255,255,.3); }
.evac-nav-inst { flex: 1; font-size: .88rem; font-weight: 600; line-height: 1.4; word-wrap: break-word; overflow-wrap: break-word; }
.evac-nav-stats { display: flex; flex-direction: column; align-items: flex-end; font-size: .8rem; font-weight: 700; min-width: 70px; text-align: right; }
.evac-nav-stats span:first-child small { font-size: .6rem; font-weight: 400; opacity: .6; margin-left: 2px; }
.evac-nav-stats span:last-child { font-size: .68rem; font-weight: 400; opacity: .7; }
.evac-nav-stats span:last-child small { font-size: .6rem; opacity: .5; margin-left: 2px; }
.evac-nav-stop { border: none; background: rgba(255,255,255,.15); color: #fff; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-size: 1.1rem; }
.evac-nav-stop:hover { background: rgba(239,68,68,.5); }
.evac-loading { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.7); color: #fff; padding: 6px 18px; border-radius: 20px; font-size: .78rem; display: flex; align-items: center; gap: 8px; z-index: 1000; }
.evac-transport { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.evac-transport-label { font-size: .75rem; font-weight: 600; color: var(--slate-500); margin-right: 4px; }
.evac-tbtn { border: 1px solid var(--slate-200); background: #fff; border-radius: 20px; padding: 5px 14px; font-size: .75rem; cursor: pointer; transition: var(--trans); }
.evac-tbtn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.evac-list { display: flex; flex-direction: column; gap: 8px; }
.evac-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--slate-200); border-radius: 10px; cursor: pointer; transition: var(--trans); }
.evac-item:hover { border-color: var(--brand); background: #F8FAFF; }
.evac-item.active { border-color: var(--brand); background: var(--brand-light); }
.evac-item-left { display: flex; align-items: flex-start; gap: 10px; flex: 1; min-width: 0; }
.evac-item-icon { width: 34px; height: 34px; border-radius: 50%; background: #DC2626; display: flex; align-items: center; justify-content: center; color: #fff; font-size: .9rem; flex-shrink: 0; }
.evac-item-info { min-width: 0; }
.evac-item-info strong { display: block; font-size: .84rem; color: var(--slate-800); }
.evac-item-info small { font-size: .72rem; color: var(--slate-400); }
.evac-item-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.evac-dist { font-size: .78rem; font-weight: 600; color: var(--slate-600); }