/* =========================================================
   SIGAP RATUJAYA - STYLESHEET TUNGGAL
   Palet mengikuti logo Kota Depok (biru tua + aksen kuning)
   ========================================================= */

:root {
    --primary: #2b3f9e;
    --primary-dark: #1f2e78;
    --primary-deep: #16205a;
    --primary-soft: #eef1fb;
    --primary-line: #d6dcf3;
    --accent: #f5c518;

    --text: #14213d;
    --text-soft: #4a5875;
    --muted: #6b7a99;
    --border: #e1e7f3;
    --bg: #f5f8fd;
    --card: #ffffff;

    --ok: #15803d;      --ok-bg: #e8f7ee;
    --bad: #c62828;     --bad-bg: #fdecec;
    --warn: #b45309;    --warn-bg: #fff4e0;

    --c-normal: #16a34a;
    --c-stunting: #dc2626;
    --c-under: #f59e0b;
    --c-over: #7c3aed;
    --c-other: #94a3b8;
    --c-male: #2b5fd9;
    --c-female: #e0568f;

    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 6px 22px rgba(31, 46, 120, .07);
    --shadow-lg: 0 14px 40px rgba(31, 46, 120, .13);
    --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}
main { flex: 1 0 auto; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; color: var(--text); letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4.6vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.2rem, 2.8vw, 1.55rem); font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font-family: inherit; font-size: 1rem; }
:focus-visible { outline: 3px solid rgba(43, 63, 158, .35); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.eyebrow {
    display: inline-block;
    font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    color: var(--primary);
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 20px;
    border: 1.5px solid transparent; border-radius: 12px;
    font-weight: 700; font-size: .95rem; line-height: 1; white-space: nowrap;
    cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(43, 63, 158, .25); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary-line); }
.btn-outline:hover { border-color: var(--primary); background: var(--primary-soft); }
.btn-light { background: #fff; color: var(--primary-dark); }
.btn-ghost-light { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .22); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-bad { background: var(--bad); color: #fff; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .82rem; border-radius: 9px; }

/* ---------- NAVBAR ---------- */
.site-navbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.nav-container {
    max-width: 1160px; margin: 0 auto; padding: 0 20px;
    min-height: 68px; display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--text); }
.brand-icon {
    width: 42px; height: 42px; flex: 0 0 42px; padding: 4px;
    display: flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid var(--border); border-radius: 12px;
}
.brand-icon img { width: 100%; height: 100%; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand-text strong { font-size: 1rem; font-weight: 800; color: var(--primary-dark); letter-spacing: .01em; }
.brand-text span { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main-menu { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-menu a {
    padding: 9px 15px; border-radius: 10px;
    font-size: .93rem; font-weight: 600; color: var(--text-soft);
    transition: background .15s, color .15s;
}
.main-menu a:hover { background: var(--primary-soft); color: var(--primary); }
.main-menu a.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.user-info {
    max-width: 210px; padding: 6px 12px; border-radius: 999px;
    background: var(--primary-soft); color: var(--primary-dark);
    font-size: .8rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-toggle {
    display: none; width: 44px; height: 44px; margin-left: auto;
    border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--primary-dark);
    font-size: 1.3rem; line-height: 1; cursor: pointer;
}

/* ---------- HERO (foto kelurahan) ---------- */
.hero {
    position: relative; color: #fff; overflow: hidden;
    background: var(--primary-deep) center / cover no-repeat;
}
.hero::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(105deg, rgba(22, 32, 90, .94) 0%, rgba(31, 46, 120, .84) 48%, rgba(43, 63, 158, .5) 100%);
}
.hero .container { position: relative; padding-top: 56px; padding-bottom: 96px; }
.hero.hero-short .container { padding-top: 44px; padding-bottom: 88px; }
.hero .eyebrow { color: var(--accent); }
.hero h1 { color: #fff; margin: 10px 0 14px; max-width: 760px; }
.hero p.lead { max-width: 640px; color: rgba(255, 255, 255, .88); font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-meta {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 22px;
    padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14);
    font-size: .8rem; font-weight: 600;
}
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .25); }

/* ---------- SECTION / PANEL ---------- */
.section { padding: 34px 0 10px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head p { color: var(--muted); font-size: .93rem; margin-top: 4px; }
.pull-up { margin-top: -56px; position: relative; z-index: 2; }

.panel {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 24px; min-width: 0;
}
.panel + .panel, .grid-2 + .panel, .panel + .grid-2, .grid-2 + .grid-2, .stat-grid + .grid-2 { margin-top: 20px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.panel-head p { color: var(--muted); font-size: .88rem; margin-top: 3px; }
.panel-icon {
    flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-soft); font-size: 1.15rem;
}
.grid-2 > .panel { margin-top: 0 !important; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

/* ---------- STAT CARDS ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-card {
    display: flex; align-items: center; gap: 14px; min-width: 0;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px; box-shadow: var(--shadow-lg);
}
.stat-icon {
    flex: 0 0 52px; width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.stat-icon.blue { background: #e7edff; }
.stat-icon.red { background: #fde8e8; }
.stat-icon.green { background: #e2f6ea; }
.stat-icon.yellow { background: #fff3cc; }
.stat-body { min-width: 0; }
.stat-body span { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); }
.stat-body strong { display: block; font-size: 1.75rem; line-height: 1.15; font-weight: 800; color: var(--text); }
.stat-body small { display: block; font-size: .76rem; color: var(--muted); }

/* ---------- CHARTS ---------- */
.chart-box { min-height: 220px; }
.chart-empty {
    min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; padding: 20px; text-align: center; color: var(--muted);
    background: repeating-linear-gradient(135deg, #f8faff, #f8faff 10px, #f3f6fd 10px, #f3f6fd 20px);
    border: 1.5px dashed var(--primary-line); border-radius: 14px;
}
.chart-empty .ico { font-size: 1.9rem; }
.chart-empty strong { color: var(--text-soft); font-size: .95rem; }
.chart-empty span { font-size: .83rem; max-width: 300px; }

.donut-wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: center; }
.donut-svg { width: 190px; height: 190px; flex: 0 0 190px; }
.donut-svg circle.seg { transition: stroke-dasharray .9s ease; }
.donut-center { font-family: var(--font); text-anchor: middle; }
.donut-center .n { font-size: 30px; font-weight: 800; fill: var(--text); }
.donut-center .l { font-size: 11px; font-weight: 600; fill: var(--muted); }
.legend { flex: 1 1 180px; min-width: 0; display: grid; gap: 10px; }
.legend-item { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.legend-dot { flex: 0 0 12px; width: 12px; height: 12px; border-radius: 4px; }
.legend-name { flex: 1; min-width: 0; font-weight: 600; color: var(--text-soft); }
.legend-val { font-weight: 800; color: var(--text); }
.legend-pct { width: 44px; text-align: right; font-size: .8rem; color: var(--muted); }

.legend-inline { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; }
.legend-inline .legend-name { flex: 0 1 auto; }
.hbars { display: grid; gap: 12px; }
.hbar-row { display: grid; grid-template-columns: 72px 1fr 44px; align-items: center; gap: 12px; font-size: .88rem; }
.hbar-label { font-weight: 700; color: var(--text-soft); white-space: nowrap; }
.hbar-track { height: 12px; background: #edf1fa; border-radius: 999px; overflow: hidden; }
.hbar-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--primary), #5b75e0); transition: width .9s ease; }
.hbar-val { text-align: right; font-weight: 800; }

.cols { display: flex; align-items: flex-end; gap: 6px; height: 220px; padding-top: 22px; }
.col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.col-val { font-size: .72rem; font-weight: 800; color: var(--text-soft); }
.col-bar {
    width: 100%; max-width: 38px; min-height: 4px; height: 0;
    border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #5b75e0, var(--primary));
    transition: height .9s ease;
}
.col-bar.zero { background: #dfe5f4; }
.col-label { font-size: .72rem; font-weight: 700; color: var(--muted); }

.line-svg { width: 100%; height: auto; display: block; }
.line-svg text { font-family: var(--font); font-size: 11px; fill: var(--muted); }

.stack-bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: #edf1fa; }
.stack-bar span { display: block; height: 100%; transition: width .9s ease; }

/* ---------- KATEGORI / TABEL RINGKAS ---------- */
.cat-list { display: grid; gap: 16px; }
.cat-item .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.cat-name { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.cat-name i { width: 11px; height: 11px; border-radius: 4px; display: inline-block; }
.cat-count { font-weight: 800; }
.cat-track { height: 10px; border-radius: 999px; background: #edf1fa; overflow: hidden; }
.cat-track span { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .9s ease; }
.cat-item small { display: block; margin-top: 5px; color: var(--muted); font-size: .78rem; }

/* gender */
.gender-list { display: grid; gap: 14px; }
.gender-item { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: #fbfcff; }
.gender-ico { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 800; color: #fff; }
.gender-ico.male { background: var(--c-male); }
.gender-ico.female { background: var(--c-female); }
.gender-info { flex: 1; min-width: 0; }
.gender-info strong { display: block; }
.gender-info span { font-size: .8rem; color: var(--muted); }
.gender-num { font-size: 1.5rem; font-weight: 800; }

/* posyandu cards */
.posyandu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 22px; }
.posyandu-card {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--text);
    background: #fbfcff; border: 1px solid var(--border); border-radius: 14px;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.posyandu-card:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: var(--shadow); }
.posyandu-num {
    flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary); color: #fff; font-weight: 800;
}
.posyandu-card strong { display: block; font-size: .92rem; line-height: 1.2; }
.posyandu-card small { display: block; font-size: .78rem; color: var(--muted); }

.empty-note { padding: 18px; text-align: center; color: var(--muted); font-size: .92rem; }

/* ---------- PROFIL WILAYAH + GALERI ---------- */
.profile-card { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; padding: 0; overflow: hidden; }
.profile-photo { position: relative; min-height: 320px; background: var(--primary-deep); }
.profile-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.profile-photo figcaption {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 22px 18px; color: #fff; font-size: .85rem; font-weight: 600;
    background: linear-gradient(180deg, transparent, rgba(22, 32, 90, .85));
}
.profile-body { padding: 28px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.profile-body p { color: var(--text-soft); font-size: .95rem; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.fact { padding: 12px 14px; background: var(--primary-soft); border-radius: 12px; }
.fact span { display: block; font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.fact strong { font-size: .98rem; color: var(--primary-dark); }

.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: 14px; aspect-ratio: 4 / 3; background: var(--primary-soft); box-shadow: var(--shadow); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 10px; color: #fff; font-size: .82rem; font-weight: 700;
    background: linear-gradient(180deg, transparent, rgba(22, 32, 90, .85));
}

/* ---------- NOTICE ---------- */
.notice { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--primary-line); background: #f6f8ff; }
.notice .ico { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; background: #e7ecff; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.notice strong { display: block; color: var(--primary-dark); margin-bottom: 2px; }
.notice p { color: var(--text-soft); font-size: .92rem; }
.notice .btn { margin-top: 12px; }
.notice p a { font-weight: 700; text-decoration: underline; }
.notice.warn { background: var(--warn-bg); border-color: #f6d9a8; }
.notice.warn strong { color: var(--warn); }

/* ---------- FILTER ---------- */
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.field label { display: block; margin-bottom: 6px; font-size: .82rem; font-weight: 700; color: var(--text-soft); }
.field input, .field select, .field textarea {
    width: 100%; min-height: 46px; padding: 10px 13px;
    border: 1.5px solid var(--border); border-radius: 12px; background: #fff; color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(43, 63, 158, .12); }
.field .hint { margin-top: 5px; font-size: .76rem; color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 18px; }
.toolbar .left, .toolbar .right { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.result-info { color: var(--text-soft); font-size: .9rem; }
.result-info strong { color: var(--primary-dark); font-size: 1.05rem; }

.mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.mini-stat { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: #fbfcff; }
.mini-stat span { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); }
.mini-stat strong { font-size: 1.6rem; font-weight: 800; line-height: 1.2; }
.mini-stat.wait strong { color: var(--warn); }
.mini-stat.ok strong { color: var(--ok); }
.mini-stat.bad strong { color: var(--bad); }

/* ---------- TABLE ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; margin-top: 16px; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; min-width: 940px; font-size: .86rem; background: #fff; }
.data-table th {
    position: sticky; top: 0; padding: 12px 12px; text-align: left; white-space: nowrap;
    background: var(--primary); color: #fff; font-size: .76rem; letter-spacing: .05em; text-transform: uppercase;
}
.data-table td { padding: 11px 12px; border-top: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr:nth-child(even) { background: #fafbff; }
.data-table tbody tr:hover { background: var(--primary-soft); }
.data-table .nowrap { white-space: nowrap; }
.data-table .note { display: block; margin-top: 4px; font-size: .74rem; color: var(--bad); max-width: 220px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table-empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.table-empty .ico { font-size: 2rem; display: block; margin-bottom: 6px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.badge.menunggu { background: var(--warn-bg); color: var(--warn); }
.badge.terverifikasi { background: var(--ok-bg); color: var(--ok); }
.badge.ditolak { background: var(--bad-bg); color: var(--bad); }
.badge.k-normal { background: #e2f6ea; color: var(--c-normal); }
.badge.k-stunting { background: #fde8e8; color: var(--c-stunting); }
.badge.k-underweight { background: #fff1d6; color: #b45309; }
.badge.k-overweight { background: #efe7fd; color: var(--c-over); }
.role-badge { padding: 6px 14px; border-radius: 999px; background: var(--primary); color: #fff; font-size: .75rem; font-weight: 800; letter-spacing: .06em; }

/* ---------- MODAL (verifikasi) ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 60, .55); }
.modal-box { width: 100%; max-width: 440px; padding: 24px; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); }
.modal-box h3 { margin-bottom: 6px; }
.modal-box p { color: var(--text-soft); font-size: .92rem; margin-bottom: 14px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }

/* ---------- TOAST ---------- */
.toast-stack { position: fixed; z-index: 200; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { padding: 13px 16px; border-radius: 12px; background: var(--primary-deep); color: #fff; font-size: .9rem; font-weight: 600; box-shadow: var(--shadow-lg); animation: toast-in .25s ease; }
.toast.ok { background: var(--ok); }
.toast.bad { background: var(--bad); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- FOOTER (biru Kota Depok) ---------- */
.site-footer {
    margin-top: 56px; color: rgba(255, 255, 255, .86);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    border-top: 4px solid var(--accent);
}
.footer-main { max-width: 1160px; margin: 0 auto; padding: 38px 20px 28px; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-logo { flex: 0 0 56px; width: 56px; height: 56px; padding: 6px; background: #fff; border-radius: 14px; }
.footer-logo img { width: 100%; height: 100%; object-fit: contain; }
.footer-brand strong { display: block; color: #fff; font-size: 1.1rem; letter-spacing: .02em; }
.footer-brand p { margin-top: 4px; font-size: .88rem; line-height: 1.55; color: rgba(255, 255, 255, .8); max-width: 360px; }
.footer-col h4 { color: var(--accent); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }
.footer-col a, .footer-col span { display: block; padding: 4px 0; font-size: .92rem; color: rgba(255, 255, 255, .86); }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .18); padding: 16px 20px; text-align: center;
    font-size: .82rem; color: rgba(255, 255, 255, .75);
}

/* ---------- INFORMASI ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.step-card { position: relative; padding: 22px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.step-card .no { width: 40px; height: 40px; margin-bottom: 14px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--primary); color: #fff; font-weight: 800; }
.step-card p { margin-top: 6px; color: var(--text-soft); font-size: .92rem; }
.status-guide { display: grid; gap: 12px; }
.status-guide .row { display: flex; gap: 12px; align-items: flex-start; }
.status-guide .row p { color: var(--text-soft); font-size: .92rem; }
.status-guide .badge { margin-top: 2px; flex: 0 0 auto; }

/* ---------- LOGIN ---------- */
.login-page { min-height: 100vh; background: linear-gradient(135deg, var(--primary-deep), var(--primary) 60%, #4f6ad6); display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-shell { flex: 0 0 auto; width: 100%; max-width: 980px; display: grid; grid-template-columns: 1fr 1fr; border-radius: 24px; overflow: hidden; box-shadow: 0 30px 70px rgba(10, 16, 60, .4); background: #fff; }
.login-side { position: relative; padding: 40px; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; min-height: 460px; background: var(--primary-deep) center / cover no-repeat; }
.login-side::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22, 32, 90, .55), rgba(22, 32, 90, .92)); }
.login-side > * { position: relative; }
.login-logo { width: 74px; height: 74px; padding: 8px; background: #fff; border-radius: 18px; margin-bottom: 18px; }
.login-logo img { width: 100%; height: 100%; object-fit: contain; }
.login-side h1 { color: #fff; font-size: 2rem; }
.login-side h1 span { color: var(--accent); }
.login-side p { margin-top: 8px; color: rgba(255, 255, 255, .86); font-size: .95rem; }
.login-card { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.login-card h2 { margin: 6px 0 4px; }
.login-card > p { color: var(--muted); font-size: .92rem; margin-bottom: 18px; }
.login-card form { display: grid; gap: 16px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 52px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 34px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-size: 1.05rem; }
.form-msg { display: none; padding: 11px 14px; border-radius: 10px; font-size: .9rem; font-weight: 600; margin-bottom: 14px; }
.form-msg.error { display: block; background: var(--bad-bg); color: var(--bad); }
.form-msg.success { display: block; background: var(--ok-bg); color: var(--ok); }
.login-links { margin-top: 18px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .9rem; font-weight: 600; }

/* ---------- INPUT FORM ---------- */
.form-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.form-section { padding: 24px; }
.form-section + .form-section { border-top: 1px solid var(--border); }
.form-section > header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.form-section > header .no { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.form-section > header p { color: var(--muted); font-size: .84rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.unit-input { position: relative; }
.unit-input input { padding-right: 56px; }
.unit-input em { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: .82rem; font-weight: 700; color: var(--muted); }
.cat-guide { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.cat-guide div { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: #fbfcff; }
.cat-guide i { flex: 0 0 12px; width: 12px; height: 12px; margin-top: 5px; border-radius: 4px; }
.cat-guide strong { display: block; font-size: .88rem; }
.cat-guide small { color: var(--muted); font-size: .76rem; line-height: 1.3; display: block; }
.form-foot { padding: 20px 24px; background: #f8faff; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.form-foot p { color: var(--text-soft); font-size: .86rem; max-width: 520px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cat-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .main-menu, .nav-actions { display: none; }
    .nav-container { flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
    .site-navbar.open .main-menu,
    .site-navbar.open .nav-actions { display: flex; width: 100%; }
    .site-navbar.open .main-menu { flex-direction: column; align-items: stretch; margin: 6px 0 0; }
    .site-navbar.open .main-menu a { padding: 12px 14px; }
    .site-navbar.open .nav-actions { padding-bottom: 6px; }
    .site-navbar.open .nav-actions .btn { flex: 1; }
    .site-navbar.open .user-info { max-width: none; flex: 1; }
    .grid-2, .profile-card { grid-template-columns: 1fr; }
    .profile-photo { min-height: 240px; }
    .footer-main { grid-template-columns: 1fr 1fr; }
    .footer-brand-wrap { grid-column: 1 / -1; }
    .login-shell { grid-template-columns: 1fr; }
    .login-side { min-height: 220px; padding: 28px; }
    .login-card { padding: 28px 24px; }
}

@media (max-width: 640px) {
    body { font-size: 15.5px; }
    .container { padding: 0 16px; }
    .nav-container { padding-left: 16px; padding-right: 16px; }
    .brand-text span { display: none; }
    .hero .container { padding-top: 38px; padding-bottom: 84px; }
    .hero-actions .btn { flex: 1 1 100%; }
    .pull-up { margin-top: -50px; }
    .stat-card { padding: 14px; gap: 10px; }
    .stat-icon { flex-basis: 42px; width: 42px; height: 42px; font-size: 1.2rem; border-radius: 12px; }
    .stat-body strong { font-size: 1.4rem; }
    .panel { padding: 18px; }
    .donut-wrap { flex-direction: column; }
    .hbar-row { grid-template-columns: 56px 1fr 38px; gap: 8px; }
    .cols { gap: 3px; height: 190px; }
    .col-val { font-size: .62rem; }
    .col-label { font-size: .62rem; }
    .posyandu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .posyandu-card { padding: 10px; gap: 9px; }
    .posyandu-num { flex-basis: 34px; width: 34px; height: 34px; font-size: .9rem; }
    .posyandu-card strong { font-size: .82rem; }
    .posyandu-card small { font-size: .7rem; }
    .gallery { grid-template-columns: 1fr; }
    .facts { grid-template-columns: 1fr; }
    .profile-body { padding: 20px; }
    .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .mini-stats { grid-template-columns: 1fr; }
    .toolbar .left, .toolbar .right, .toolbar .btn { width: 100%; }
    .toolbar .btn { flex: 1; }
    .steps { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .form-section { padding: 18px; }
    .cat-guide { grid-template-columns: 1fr; }
    .form-foot { flex-direction: column; align-items: stretch; }
    .form-foot .btn { width: 100%; }
    .footer-main { grid-template-columns: 1fr; gap: 24px; padding-top: 30px; }
    .field input, .field select, .field textarea { font-size: 16px; }

    /* tabel menjadi kartu di HP */
    .table-wrap { border: 0; background: transparent; overflow: visible; }
    .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; min-width: 0; }
    .data-table thead { display: none; }
    .data-table tbody tr { margin-bottom: 14px; padding: 6px 0; border: 1px solid var(--border); border-radius: 14px; background: #fff !important; box-shadow: var(--shadow); }
    .data-table td { display: flex; justify-content: space-between; gap: 14px; padding: 8px 14px; border: 0; text-align: right; }
    .data-table td::before { content: attr(data-label); flex: 0 0 auto; font-weight: 700; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; text-align: left; }
    .data-table td .cv { min-width: 0; text-align: right; }
    .data-table td[data-label="No"] { display: none; }
    .data-table td.cell-actions { flex-direction: column; text-align: left; }
    .data-table td.cell-actions .cv { text-align: left; }
    .data-table td.cell-actions::before { margin-bottom: 4px; }
    .data-table .note { max-width: none; }
}

@media (max-width: 380px) {
    .stat-grid { grid-template-columns: 1fr; }
    .filter-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
    .site-navbar, .site-footer, .toolbar, .filter-box, .hero { display: none !important; }
}
