/* =========================================================
   SIMONITA — Design tokens
   Palette: Hijau tua #1B7A4D (primary), Hijau muda #E8F5EC (bg),
            Aksen hijau terang #34C77B, Biru muda #EAF4FB / #3E8FD0,
            Netral: #10241C (teks gelap), #F7FAF8 (bg alt), #FFFFFF
   Font: Poppins (display + body), ukuran skala 12/14/16/20/28/40
========================================================= */

:root {
    --primary: #1B7A4D;
    --primary-dark: #145C3A;
    --primary-light: #E8F5EC;
    --accent: #34C77B;
    --blue: #3E8FD0;
    --blue-light: #EAF4FB;
    --danger: #E5484D;
    --warning: #F2A93B;
    --dark-danger: #8B1E1E;
    --text: #10241C;
    --text-muted: #5B6B62;
    --bg-alt: #F7FAF8;
    --white: #FFFFFF;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 8px 24px rgba(16, 36, 28, 0.08);
    --shadow-hover: 0 14px 32px rgba(16, 36, 28, 0.14);
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }

.section-eyebrow {
    display: inline-block;
    color: var(--primary);
    background: var(--primary-light);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 14px;
    letter-spacing: .3px;
}

.section-title { font-size: 32px; margin-bottom: 10px; color: var(--text); }
.section-subtitle { color: var(--text-muted); max-width: 620px; margin-bottom: 44px; font-size: 15px; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: .2s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-login { background: var(--primary); color: #fff; padding: 10px 22px; }
.btn-login:hover { background: var(--primary-dark); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-secondary { background: var(--blue); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline-danger { background: transparent; border: 1.5px solid var(--danger); color: var(--danger); }
.btn-outline-danger:hover { background: #fdecec; }
.btn-outline-secondary { background: transparent; border: 1.5px solid #ccc; color: var(--text); }

/* ============ NAVBAR PUBLIC ============ */
.navbar-public {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eef2ef;
}
.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 14px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--primary-dark); }
.nav-logo i { font-size: 22px; color: var(--accent); }
.nav-logo small { display: block; font-weight: 400; font-size: 11px; color: var(--text-muted); }
.nav-menu { display: flex; gap: 28px; flex: 1; justify-content: center; }
.nav-menu a { font-size: 14px; font-weight: 500; color: var(--text); transition: .2s; position: relative; }
.nav-menu a:hover { color: var(--primary); }
.nav-toggle { display: none; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--primary-dark); }

@media (max-width: 900px) {
    .nav-menu {
        position: absolute; top: 100%; left: 0; right: 0; background: #fff;
        flex-direction: column; padding: 16px 24px; gap: 14px;
        box-shadow: var(--shadow); display: none;
    }
    .nav-menu.show { display: flex; }
    .nav-toggle { display: block; }
}

/* ============ HERO ============ */
.hero {
    background: linear-gradient(135deg, var(--primary-light) 0%, #F2FBF6 60%, var(--blue-light) 100%);
    padding: 90px 0 60px;
    overflow: hidden;
}
.hero-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: #fff; padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--primary); box-shadow: var(--shadow); margin-bottom: 20px; }
.hero h1 { font-size: 44px; color: var(--primary-dark); margin-bottom: 18px; }
.hero p.lead { color: var(--text-muted); font-size: 16px; margin-bottom: 30px; max-width: 500px; }
.hero-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hero-actions .btn { width: 100%; min-width: 0; justify-content: center; text-align: center; }
.hero-illustration { position: relative; }
.hero-illustration svg { width: 100%; height: auto; }

@media (max-width: 900px) {
    .hero-container { grid-template-columns: 1fr; }
    .hero h1 { font-size: 32px; }
    .hero-illustration { order: -1; max-width: 320px; margin: 0 auto; }
}

/* ============ CARDS: MANFAAT ============ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; } }

.benefit-card {
    background: #fff; border-radius: var(--radius); padding: 30px 24px;
    box-shadow: var(--shadow); border: 1px solid #F0F3F1; transition: .25s ease;
}
.benefit-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: transparent; }
.benefit-icon {
    width: 54px; height: 54px; border-radius: 14px; background: var(--primary-light);
    color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 18px;
}
.benefit-card h4 { font-size: 17px; margin-bottom: 8px; }
.benefit-card p { font-size: 14px; color: var(--text-muted); }

/* ============ STATISTIK ============ */
.stat-card {
    background: #fff; border-radius: var(--radius); padding: 26px 20px; text-align: center;
    box-shadow: var(--shadow); border-top: 4px solid var(--primary);
}
.stat-card i { font-size: 26px; color: var(--primary); margin-bottom: 10px; }
.stat-number { font-size: 32px; font-weight: 700; color: var(--primary-dark); }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.stat-card.blue { border-top-color: var(--blue); }
.stat-card.blue i { color: var(--blue); }
.stat-card.warning { border-top-color: var(--warning); }
.stat-card.warning i { color: var(--warning); }
.stat-card.danger { border-top-color: var(--danger); }
.stat-card.danger i { color: var(--danger); }

/* ============ CHART CARD ============ */
.chart-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.chart-card h4 { font-size: 15px; margin-bottom: 16px; color: var(--text-muted); font-weight: 600; }

/* ============ JADWAL / PENGUMUMAN CARDS ============ */
.jadwal-card {
    background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
    border-left: 5px solid var(--accent);
}
.jadwal-card h4 { color: var(--primary-dark); margin-bottom: 10px; font-size: 17px; }
.jadwal-card .info-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-muted); margin-bottom: 6px; }
.jadwal-card .info-row i { width: 18px; color: var(--primary); }

.pengumuman-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: .2s; }
.pengumuman-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.pengumuman-card .tag { display: inline-block; background: var(--blue-light); color: var(--blue); font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; margin-bottom: 10px; }
.pengumuman-card .body { padding: 22px; }
.pengumuman-card h4 { font-size: 16px; margin-bottom: 8px; }
.pengumuman-card p { font-size: 13.5px; color: var(--text-muted); }
.pengumuman-card .date { font-size: 12px; color: #9CA8A0; margin-top: 12px; display: block; }

/* ============ FAQ ACCORDION ============ */
.faq-item { background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.faq-question { padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 600; font-size: 14.5px; }
.faq-question i { transition: .25s; color: var(--primary); }
.faq-item.open .faq-question i { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .3s ease; padding: 0 22px; font-size: 14px; color: var(--text-muted); }
.faq-item.open .faq-answer { max-height: 300px; padding-bottom: 18px; }

/* ============ KONTAK ============ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.contact-info-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
.contact-info-card .row { display: flex; gap: 14px; margin-bottom: 20px; }
.contact-info-card .row i { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-info-card .row h5 { font-size: 14px; margin-bottom: 3px; }
.contact-info-card .row p { font-size: 13.5px; color: var(--text-muted); }
.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 300px; }
.map-embed iframe { width: 100%; height: 100%; min-height: 300px; border: 0; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ============ CEK STATUS ============ */
.cek-status-box { background: var(--primary-dark); border-radius: var(--radius); padding: 40px; color: #fff; }
.cek-status-box h3 { font-size: 22px; margin-bottom: 8px; }
.cek-status-box p { color: #cfe9dc; margin-bottom: 22px; font-size: 14px; }
.cek-form { display: flex; gap: 10px; flex-wrap: wrap; }
.cek-form input { flex: 1; min-width: 200px; padding: 13px 18px; border-radius: 999px; border: none; font-family: inherit; }
.cek-result { margin-top: 24px; background: rgba(255,255,255,.1); border-radius: var(--radius-sm); padding: 18px 22px; }

/* ============ FOOTER PUBLIC ============ */
.footer-public { background: var(--primary-dark); color: #dcefe4; padding: 50px 0 0; }
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 24px 30px; display: flex; justify-content: flex-end; align-items: flex-end; text-align: right; flex-wrap: wrap; gap: 20px; }
.footer-brand { display: flex; align-items: center; justify-content: flex-end; gap: 10px; text-align: right; }
.footer-brand i { font-size: 24px; color: var(--accent); }
.footer-brand h3 { font-size: 18px; }
.footer-social { display: flex; justify-content: flex-end; gap: 14px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; transition: .2s; }
.footer-social a:hover { background: var(--accent); }
.footer-bottom { text-align: right; padding: 18px max(24px, calc((100% - 1200px) / 2 + 24px)); border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; color: #a9cdba; }

/* ============ ALERTS ============ */
.alert { padding: 14px 20px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 14px; font-weight: 500; }
.alert-success { background: #E4F8ED; color: #147445; }
.alert-danger { background: #FCEAEA; color: #B4232A; }
.alert-warning { background: #FEF4E3; color: #93630B; }
.alert-info { background: var(--blue-light); color: var(--blue); }

/* ============ BADGES ============ */
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-success { background: #E4F8ED; color: #147445; }
.badge-warning { background: #FEF4E3; color: #93630B; }
.badge-danger { background: #FCEAEA; color: #B4232A; }
.badge-dark-danger { background: #F6DADA; color: var(--dark-danger); }
.badge-secondary { background: #EEF1EF; color: var(--text-muted); }
.badge-admin { background: #E4F8ED; color: #147445; }
.badge-bidan { background: var(--blue-light); color: var(--blue); }

/* =========================================================
   LOGIN PAGE
========================================================= */
.login-page { position: relative; isolation: isolate; overflow-x: clip; background: radial-gradient(circle at 16% 12%, rgba(52,199,123,.12), transparent 28%), linear-gradient(135deg, #E8F5EC 0%, #F5FAF7 48%, #EAF4FB 100%); min-height: 100vh; min-height: 100svh; display: flex; align-items: center; justify-content: center; padding: max(20px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(20px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.login-wrapper { width: 100%; max-width: 440px; }
.login-card { position: relative; overflow: hidden; background: #fff; border: 1px solid rgba(20,92,58,.08); border-radius: 22px; box-shadow: 0 22px 56px rgba(16,52,35,.13); padding: 42px 36px; }
.login-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--primary), var(--accent), #8bcfbd); }
.login-brand { text-align: center; margin-bottom: 26px; }
.login-brand i { font-size: 36px; color: var(--primary); }
.login-brand h2 { margin: 10px 0 4px; color: var(--primary-dark); font-size: 25px; letter-spacing: -.035em; }
.login-brand p { font-size: 13px; color: var(--text-muted); }
.login-form .form-group { margin-bottom: 18px; }
.login-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #9CA8A0; }
.input-icon input { width: 100%; min-height: 52px; padding: 12px 16px 12px 44px; border: 1.5px solid #E4E9E6; border-radius: 12px; font-family: inherit; font-size: 16px; color: var(--text); background: #fff; transition: border-color .2s, box-shadow .2s; }
.input-icon input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(27,122,77,.10); }
.input-icon input[type="password"], .input-icon input[data-password-field] { padding-right: 54px; }
.input-icon .password-toggle { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; color: #68766e; background: transparent; cursor: pointer; }
.input-icon .password-toggle:hover, .input-icon .password-toggle:focus-visible { color: var(--primary-dark); background: var(--primary-light); outline: none; }
.input-icon .password-toggle i { position: static; transform: none; color: inherit; }
.login-submit { min-height: 52px; margin-top: 4px; box-shadow: 0 8px 18px rgba(27,122,77,.18); }
.login-submit i { font-size: 13px; opacity: .9; }
.login-submit:hover { box-shadow: 0 12px 24px rgba(27,122,77,.24); }
.back-link { display: block; text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }
.back-link:hover { color: var(--primary); }

/* =========================================================
   ADMIN PANEL LAYOUT
========================================================= */
.admin-body { background: var(--bg-alt); }
.admin-wrapper { display: flex; min-height: 100vh; }

.admin-sidebar {
    width: 250px; background: var(--primary-dark); color: #fff; flex-shrink: 0;
    position: sticky; top: 0; height: 100vh; overflow-y: auto; transition: .25s;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 24px 22px; font-size: 18px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-brand i { color: var(--accent); font-size: 22px; }
.sidebar-menu { padding: 16px 12px; }
.sidebar-menu li a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; color: #cfe4d7; margin-bottom: 4px; transition: .2s; }
.sidebar-menu li a i { width: 18px; text-align: center; }
.sidebar-menu li a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-menu li a.active { background: var(--accent); color: #fff; }

.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
    background: #fff; padding: 16px 28px; display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 2px 8px rgba(16,36,28,.04); position: sticky; top: 0; z-index: 10; gap: 16px;
}
.sidebar-toggle-btn { display: none; background: none; border: none; font-size: 18px; cursor: pointer; }
.page-title { font-size: 19px; flex: 1; }
.topbar-user { display: flex; align-items: center; gap: 14px; font-size: 13.5px; }
.topbar-user small { color: var(--text-muted); }

.admin-content { padding: 26px 28px; }

@media (max-width: 992px) {
    .admin-sidebar { position: fixed; left: -260px; z-index: 200; box-shadow: var(--shadow-hover); }
    .admin-sidebar.show { left: 0; }
    .sidebar-toggle-btn { display: block; }
}

/* ============ ADMIN STAT CARDS ============ */
.admin-stat-card {
    background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
    display: flex; align-items: center; gap: 16px;
}
.admin-stat-card .icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.admin-stat-card .icon.green { background: var(--primary-light); color: var(--primary); }
.admin-stat-card .icon.blue { background: var(--blue-light); color: var(--blue); }
.admin-stat-card .icon.warning { background: #FEF4E3; color: var(--warning); }
.admin-stat-card .icon.danger { background: #FCEAEA; color: var(--danger); }
.admin-stat-card .num { font-size: 24px; font-weight: 700; }
.admin-stat-card .label { font-size: 12.5px; color: var(--text-muted); }

/* ============ PANEL / TABLE CARD ============ */
.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 24px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
.panel-header h3 { font-size: 16px; }

.table-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.table-toolbar input, .table-toolbar select { padding: 10px 14px; border: 1.5px solid #E4E9E6; border-radius: var(--radius-sm); font-family: inherit; font-size: 13.5px; }

.table-responsive { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data-table th { text-align: left; padding: 12px 14px; background: var(--bg-alt); color: var(--text-muted); font-weight: 600; white-space: nowrap; }
table.data-table td { padding: 12px 14px; border-bottom: 1px solid #F0F3F1; vertical-align: middle; }
table.data-table tr:hover td { background: #FAFCFA; }
.table-photo { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }

.action-btns { display: flex; gap: 6px; }
.action-btns a, .action-btns button { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 13px; border: none; cursor: pointer; }
.action-btns .btn-view { background: var(--blue-light); color: var(--blue); }
.action-btns .btn-edit { background: #FEF4E3; color: var(--warning); }
.action-btns .btn-delete { background: #FCEAEA; color: var(--danger); }
.action-btns .btn-print { background: var(--primary-light); color: var(--primary); }

.pagination-nav { width: 100%; margin-top: 18px; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; width: 100%; }
.pagination .page-link { display: inline-flex; min-width: 40px; min-height: 40px; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; border-radius: 8px; background: var(--bg-alt); font-size: 13px; line-height: 1; white-space: nowrap; }
.pagination a.page-link { transition: background-color .18s ease, color .18s ease; }
.pagination a.page-link:hover { background: var(--primary-light); color: var(--primary-dark); }
.pagination .page-item.active .page-link { background: var(--primary); color: #fff; font-weight: 700; }
.pagination .page-item.disabled .page-link, .pagination .page-ellipsis .page-link { background: transparent; color: var(--text-muted); }
.pagination .page-item.disabled .page-link { opacity: .55; }
.pagination .page-item.page-step .page-link { padding-inline: 14px; }
@media (max-width: 560px) {
    .pagination { justify-content: center; gap: 5px; }
    .pagination .page-link { min-width: 38px; min-height: 38px; padding: 7px 10px; }
    .pagination .page-ellipsis .page-link { min-width: 18px; padding-inline: 0; }
    .pagination .page-step .page-link { min-width: 40px; padding-inline: 11px; }
    .pagination .page-step .page-link span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
}

/* ============ FORMS (ADMIN) ============ */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) { .form-grid, .form-grid.cols-3 { grid-template-columns: 1fr; } }
.form-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-field label .req { color: var(--danger); }
.form-field input, .form-field select, .form-field textarea {
    width: 100%; padding: 11px 14px; border: 1.5px solid #E4E9E6; border-radius: var(--radius-sm); font-family: inherit; font-size: 13.5px;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--primary); }
.form-field small.hint { color: var(--text-muted); font-size: 12px; }
.form-actions { display: flex; gap: 12px; margin-top: 26px; }

.photo-preview { width: 120px; height: 120px; border-radius: var(--radius-sm); object-fit: cover; border: 1.5px dashed #E4E9E6; margin-bottom: 10px; }

/* ============ DETAIL / PROFILE CARD ============ */
.detail-card { display: grid; grid-template-columns: 220px 1fr; gap: 30px; }
.detail-photo-box { text-align: center; }
.detail-photo-box img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; }
.detail-info dl { display: grid; grid-template-columns: 160px 1fr; row-gap: 12px; font-size: 14px; }
.detail-info dt { color: var(--text-muted); font-weight: 500; }
.detail-info dd { font-weight: 600; }
@media (max-width: 768px) { .detail-card { grid-template-columns: 1fr; } }

/* ============ COUNTER ANIMATION ============ */
.counter { transition: none; }

/* ============ PRINT CARD IDENTITAS ============ */
.id-card-print { width: 340px; border-radius: var(--radius); border: 2px solid var(--primary); padding: 20px; text-align: center; margin: 0 auto; }
.id-card-print h3 { color: var(--primary-dark); font-size: 16px; }
.id-card-print img.foto { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; margin: 12px auto; border: 3px solid var(--primary-light); }
.id-card-print .qr { margin-top: 14px; }
@media print {
    .no-print { display: none !important; }
    body { background: #fff; }
}


/* =========================================================
   UTILITAS TAMBAHAN (grid, form, ibu hamil, hero siluet)
========================================================= */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 20px; }
@media (max-width: 900px) { .grid-2, .grid-2-1 { grid-template-columns: 1fr; } }

.chart-box { position: relative; height: 270px; }
.chart-box.sm { height: 230px; }
.form-section-title { grid-column: 1 / -1; font-size: 13px; font-weight: 700; color: var(--primary-dark); text-transform: uppercase; letter-spacing: .6px; padding-bottom: 6px; border-bottom: 2px solid var(--primary-light); margin-top: 6px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { box-shadow: 0 0 0 3px rgba(27,122,77,.12); }
.form-field input[readonly], .form-field input[disabled] { background: #F2F6F4; color: var(--text-muted); }
.empty-state { text-align: center; padding: 22px; color: var(--text-muted); font-size: 13.5px; }
.indicator-box { grid-column: 1 / -1; background: var(--blue-light); border-radius: 12px; padding: 14px 18px; font-size: 13px; color: #1f5f93; }
.indicator-box ul { margin: 6px 0 0 18px; list-style: disc; }
.indicator-box li.warn { color: #B4232A; font-weight: 600; }
.alert-list { display: flex; flex-direction: column; gap: 10px; }
.alert-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: var(--bg-alt); border-radius: 12px; font-size: 13.5px; border-left: 4px solid var(--warning); }
.alert-item.danger { border-left-color: var(--danger); background: #FEF3F3; }
.alert-item.info { border-left-color: var(--blue); background: var(--blue-light); }
.alert-item .meta { margin-left: auto; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.stat-card.pink { border-top-color: #D6609B; }
.stat-card.pink i { color: #D6609B; }
.sidebar-overlay { display: none; }
table.data-table { min-width: 600px; }

@media (max-width: 768px) {
    .admin-content { padding: 18px 14px; }
    .panel { padding: 18px 14px; }
    .panel-header { flex-direction: column; align-items: flex-start; }
    .table-toolbar > * { flex: 1 1 100%; }
    .chart-box { height: 240px; }
    .form-grid > .form-field, .form-grid > .indicator-box { grid-column: auto !important; }
}

/* Hero: siluet Posyandu */
.hero { position: relative; isolation: isolate; padding-bottom: 150px; }
.hero::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 62%; z-index: -1; background: url('../images/posyandu-silhouette.svg') center bottom / cover no-repeat; opacity: .55; pointer-events: none; }
.hero-container { position: relative; z-index: 1; }
@media (max-width: 900px) { .hero { padding-bottom: 110px; } .hero::before { height: 45%; background-size: auto 100%; } }

/* =========================================================
   ANIMASI NOTIFIKASI & KONFIRMASI HAPUS
========================================================= */
.alert { display: flex; align-items: center; gap: 10px; animation: alertIn .5s cubic-bezier(.34,1.56,.64,1); transition: opacity .4s, transform .4s; }
.alert::before { font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 16px; }
.alert-success::before { content: "\f058"; }
.alert-danger::before { content: "\f057"; }
.alert-warning::before { content: "\f071"; }
.alert.hide { opacity: 0; transform: translateY(-10px); }
@keyframes alertIn { from { opacity: 0; transform: translateY(-14px) scale(.97); } to { opacity: 1; transform: none; } }

.cm-backdrop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10,30,20,.55); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s ease; }
.cm-backdrop.show { opacity: 1; }
.cm-box { background: #fff; width: 100%; max-width: 390px; border-radius: 22px; padding: 32px 28px 24px; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.3); opacity: 0; transform: scale(.7) translateY(24px); transition: transform .4s cubic-bezier(.34,1.56,.64,1), opacity .25s ease; }
.cm-backdrop.show .cm-box { opacity: 1; transform: none; }
.cm-icon { width: 82px; height: 82px; margin: 0 auto 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 34px; background: #FCEAEA; color: var(--danger); animation: cmPulse 1.6s ease-out infinite; }
.cm-icon i { display: inline-block; animation: cmShake .7s .3s ease both; transform-origin: 50% 80%; }
.cm-icon.tone-warning { background: #FEF4E3; color: var(--warning); animation-name: cmPulseW; }
@keyframes cmShake { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-16deg); } 40% { transform: rotate(14deg); } 60% { transform: rotate(-9deg); } 80% { transform: rotate(6deg); } }
@keyframes cmPulse { 0% { box-shadow: 0 0 0 0 rgba(229,72,77,.35); } 100% { box-shadow: 0 0 0 24px rgba(229,72,77,0); } }
@keyframes cmPulseW { 0% { box-shadow: 0 0 0 0 rgba(242,169,59,.4); } 100% { box-shadow: 0 0 0 24px rgba(242,169,59,0); } }
.cm-box h3 { font-size: 19px; margin-bottom: 8px; }
.cm-box p { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.cm-actions { display: flex; gap: 10px; }
.cm-actions .btn { flex: 1; justify-content: center; }
.cm-actions .btn-danger:hover { background: #c93a3f; transform: translateY(-2px); }
.cm-actions .btn[disabled] { opacity: .85; pointer-events: none; }
.cm-spin { display: inline-block; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: cmSpin .7s linear infinite; }
@keyframes cmSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cm-box, .cm-backdrop, .alert { animation: none !important; transition: none !important; } .cm-icon, .cm-icon i { animation: none !important; } }

/* =========================================================
   PERKECIL UKURAN STATISTIK & GRAFIK
========================================================= */
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat-card { padding: 16px 12px; border-top-width: 3px; border-radius: 12px; }
.stat-card i { font-size: 20px; margin-bottom: 6px; }
.stat-number { font-size: 24px; }
.stat-label { font-size: 12px; }

.chart-card { padding: 16px 18px; }
.chart-card h4 { font-size: 13px; margin-bottom: 10px; }
.chart-box { height: 220px; }
.chart-box.sm { height: 190px; }
#grafik .grid-2 { gap: 16px; }
#grafik .container { max-width: 1000px; }

.admin-stat-card { padding: 14px 16px; gap: 12px; border-radius: 12px; }
.admin-stat-card .icon { width: 42px; height: 42px; font-size: 17px; border-radius: 10px; }
.admin-stat-card .num { font-size: 20px; line-height: 1.2; }
.admin-stat-card .label { font-size: 12px; }
.grid-4 { gap: 14px; }
@media (max-width: 768px) { .chart-box { height: 200px; } .chart-box.sm { height: 180px; } }

/* =========================================================
   CEK STATUS PERKEMBANGAN BAYI (publik)
========================================================= */
.cs-section { background: linear-gradient(180deg, #fff 0%, var(--primary-light) 100%); }
.cs-wrap { max-width: 920px; margin: 0 auto; background: #fff; border-radius: 24px; overflow: hidden; box-shadow: 0 22px 55px rgba(16,36,28,.13); border: 1px solid #E3EEE8; }
.cs-head { position: relative; overflow: hidden; padding: 34px 36px 38px; color: #fff; background: linear-gradient(120deg, #145C3A 0%, #1B7A4D 55%, #2E9D70 100%); }
.cs-head::before, .cs-head::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); }
.cs-head::before { width: 220px; height: 220px; right: -60px; top: -80px; }
.cs-head::after { width: 140px; height: 140px; right: 120px; bottom: -70px; }
.cs-head > * { position: relative; z-index: 1; }
.cs-eyebrow { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.16); padding: 5px 14px; border-radius: 999px; margin-bottom: 12px; }
.cs-head h3 { font-size: 26px; margin-bottom: 6px; }
.cs-head p { font-size: 14px; color: #d3efe0; max-width: 520px; }
.cs-form { display: flex; align-items: center; gap: 6px; max-width: 560px; margin-top: 22px; background: #fff; border-radius: 999px; padding: 6px 6px 6px 20px; box-shadow: 0 10px 26px rgba(0,0,0,.18); }
.cs-form > i { color: var(--primary); }
.cs-form input { flex: 1; min-width: 0; border: none; outline: none; padding: 11px 6px; font: inherit; font-size: 14.5px; color: var(--text); background: transparent; }
.cs-form > button { border: none; cursor: pointer; font: inherit; font-weight: 600; font-size: 14px; color: #fff; padding: 11px 24px; border-radius: 999px; background: linear-gradient(135deg, var(--primary), #26A66A); transition: .2s; white-space: nowrap; }
.cs-form > button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(27,122,77,.4); }
.cs-form > button[disabled] { opacity: .8; }

.cs-body { padding: 30px 36px 34px; }
.cs-count { font-size: 13.5px; color: var(--text-muted); margin-bottom: 16px; font-weight: 500; }
.cs-count i { color: var(--primary); margin-right: 6px; }

/* Hasil */
.cs-result { border: 1px solid #E6EEE9; border-radius: 20px; padding: 22px; margin-bottom: 18px; background: linear-gradient(180deg, #fff, #FAFDFB); animation: csUp .6s cubic-bezier(.2,.8,.2,1) both; }
.cs-result:nth-of-type(2) { animation-delay: .12s; }
.cs-result:nth-of-type(3) { animation-delay: .24s; }
.cs-profile { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.cs-avatar { width: 62px; height: 62px; border-radius: 50%; color: #fff; font-size: 26px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 18px rgba(0,0,0,.15); animation: csPop .6s .15s cubic-bezier(.34,1.56,.64,1) both; }
.cs-avatar.m { background: linear-gradient(135deg, #3E8FD0, #34C77B); }
.cs-avatar.f { background: linear-gradient(135deg, #D6609B, #F2A93B); }
.cs-who h4 { font-size: 19px; margin-bottom: 6px; }
.cs-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.cs-chips span { font-size: 12px; font-weight: 500; padding: 4px 12px; border-radius: 999px; background: var(--primary-light); color: var(--primary-dark); }
.cs-chips i { margin-right: 4px; }

.cs-banner { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px; font-size: 13.5px; font-weight: 500; margin-bottom: 18px; }
.cs-banner i { font-size: 20px; }
.cs-banner.ok { background: #E4F8ED; color: #147445; }
.cs-banner.warn { background: #FEF4E3; color: #93630B; }
.cs-banner.warn i { animation: csRing 1.8s ease-in-out infinite; transform-origin: 50% 10%; }
.cs-banner.info { background: var(--blue-light); color: #1f5f93; }

.cs-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.cs-tile { background: #fff; border: 1px solid #E8EFEB; border-radius: 16px; padding: 16px; transition: .25s; animation: csUp .6s both; }
.cs-tile:nth-child(1) { animation-delay: .2s; } .cs-tile:nth-child(2) { animation-delay: .3s; } .cs-tile:nth-child(3) { animation-delay: .4s; }
.cs-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cs-tile .ico { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--primary-light); color: var(--primary); margin-bottom: 10px; }
.cs-tile .ico.blue { background: var(--blue-light); color: var(--blue); }
.cs-tile .ico.pink { background: #FBE7F1; color: #D6609B; }
.cs-tile small { display: block; font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.cs-tile strong { display: block; font-size: 14.5px; margin: 4px 0 2px; line-height: 1.35; }
.cs-tile em { display: block; font-style: normal; font-size: 12.5px; color: var(--text-muted); }
.cs-gizi { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 13px; }
.cs-gizi.good { background: #E4F8ED; color: #147445; } .cs-gizi.blue { background: var(--blue-light); color: var(--blue); }
.cs-gizi.warn { background: #FEF4E3; color: #93630B; } .cs-gizi.bad { background: #FCEAEA; color: #B4232A; }

/* Riwayat 6 bulan */
.cs-months p { font-size: 12.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 12px; }
.cs-track { display: flex; justify-content: space-between; position: relative; }
.cs-track::before { content: ""; position: absolute; left: 6%; right: 6%; top: 15px; height: 3px; background: #E4EBE7; border-radius: 3px; }
.cs-step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.cs-step .dot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; background: #fff; border: 2px solid #D6DFDA; color: #B6C2BB; }
.cs-step.done .dot { background: linear-gradient(135deg, var(--primary), var(--accent)); border-color: transparent; color: #fff; animation: csPop .5s both; box-shadow: 0 6px 14px rgba(27,122,77,.3); }
.cs-step:nth-child(2) .dot { animation-delay: .1s; } .cs-step:nth-child(3) .dot { animation-delay: .2s; } .cs-step:nth-child(4) .dot { animation-delay: .3s; } .cs-step:nth-child(5) .dot { animation-delay: .4s; } .cs-step:nth-child(6) .dot { animation-delay: .5s; }
.cs-step small { font-size: 11.5px; color: var(--text-muted); }

.cs-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.cs-note { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 16px; }
.cs-note i { color: var(--primary); margin-right: 4px; }

/* Error & kosong */
.cs-error { display: flex; gap: 14px; align-items: center; background: #FEF3F3; border: 1px solid #F8D3D4; color: #B4232A; padding: 18px 20px; border-radius: 16px; animation: csShake .5s; }
.cs-error i { font-size: 26px; }
.cs-error strong { display: block; font-size: 15px; } .cs-error span { font-size: 13.5px; }
.cs-empty { text-align: center; padding: 10px 0; }
.cs-empty-ico { width: 78px; height: 78px; border-radius: 50%; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-size: 32px; color: var(--primary); background: var(--primary-light); animation: csFloat 3s ease-in-out infinite; }
.cs-empty h4 { font-size: 16px; margin-bottom: 14px; }
.cs-feat { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.cs-feat span { font-size: 13px; padding: 8px 16px; border-radius: 999px; background: var(--bg-alt); border: 1px solid #E6EEE9; color: var(--text); }
.cs-feat i { color: var(--primary); margin-right: 6px; }

@keyframes csUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes csPop { 0% { opacity: 0; transform: scale(.3); } 100% { opacity: 1; transform: scale(1); } }
@keyframes csShake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes csRing { 0%,100% { transform: rotate(0); } 10%,30% { transform: rotate(-14deg); } 20%,40% { transform: rotate(14deg); } 50% { transform: rotate(0); } }
@keyframes csFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

@media (max-width: 768px) {
    .cs-head { padding: 26px 20px 28px; } .cs-head h3 { font-size: 21px; }
    .cs-body { padding: 22px 16px 26px; }
    .cs-tiles { grid-template-columns: 1fr; }
    .cs-form { padding-left: 14px; } .cs-form > button { padding: 11px 16px; } .cs-form > button span { display: none; }
    .cs-step .dot { width: 28px; height: 28px; }
}
@media (prefers-reduced-motion: reduce) { .cs-result, .cs-tile, .cs-avatar, .cs-step .dot, .cs-error, .cs-empty-ico, .cs-banner i { animation: none !important; } }

/* =========================================================
   HERO — FOTO KANTOR DESA SEBAGAI BACKGROUND SAMAR
========================================================= */
.hero { padding-bottom: 90px; }
.hero::before {
    height: auto; inset: 0; z-index: -2; opacity: 1;
    background: url('../images/bg_dashboard.jpg') center 40% / cover no-repeat;
    filter: saturate(.85);
}
.hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255,255,255,0) 70%, #fff 100%),
        linear-gradient(135deg, rgba(232,245,236,.90) 0%, rgba(242,251,246,.84) 55%, rgba(234,244,251,.90) 100%);
}
@media (max-width: 900px) { .hero { padding-bottom: 70px; } .hero::before { background-size: cover; background-position: center; } }

/* Hero: lambang Kabupaten Sidoarjo */
.hero-logo { display: flex; justify-content: center; align-items: center; }
.hero-logo img { width: 100%; max-width: 340px; height: auto; filter: drop-shadow(0 18px 28px rgba(16,36,28,.28)); animation: logoFloat 5s ease-in-out infinite; }
@keyframes logoFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (max-width: 900px) { .hero-logo img { max-width: 220px; } }
@media (prefers-reduced-motion: reduce) { .hero-logo img { animation: none; } }

/* =========================================================
   CEK STATUS: CHIP BISA DIKETUK
========================================================= */
.cs-tap { font-size: 12.5px; color: var(--text-muted); margin: -6px 0 14px; }
.cs-feat .cs-chip { font: inherit; font-size: 13px; cursor: pointer; padding: 10px 16px; min-height: 42px; border-radius: 999px; background: var(--bg-alt); border: 1.5px solid #E6EEE9; color: var(--text); transition: .2s; }
.cs-feat .cs-chip i { color: var(--primary); margin-right: 6px; }
.cs-feat .cs-chip:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(27,122,77,.15); }
.cs-feat .cs-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.cs-feat .cs-chip.active i { color: #fff; }
.cs-info { display: none; max-width: 460px; margin: 16px auto 0; padding: 16px 18px; border-radius: 16px; background: var(--primary-light); border: 1px solid #CFE8D9; text-align: center; }
.cs-info.show { display: block; animation: csUp .35s both; }
.cs-info p { font-size: 13.5px; color: var(--primary-dark); margin-bottom: 12px; }
.contact-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1ebe5b; transform: translateY(-2px); }
.contact-info-card p a[href^="tel:"] { color: var(--primary); font-weight: 600; }

/* =========================================================
   RAMAH PENGGUNA HP
========================================================= */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; -webkit-tap-highlight-color: rgba(27,122,77,.15); }
section[id] { scroll-margin-top: 72px; }
.mobile-bar { display: none; }

@media (max-width: 900px) {
    .container, .hero-container { padding-left: 16px; padding-right: 16px; }
    .nav-container { padding: 10px 16px; gap: 10px; }
    .nav-logo { order: 1; margin-right: auto; font-size: 16px; }
    .btn-login { order: 2; padding: 9px 16px; min-height: 42px; font-size: 13px; }
    .nav-toggle { order: 3; width: 44px; height: 44px; border-radius: 12px; background: var(--primary-light); font-size: 18px; }
    .nav-menu { order: 4; padding: 8px 16px 14px; gap: 0; max-height: calc(100vh - 70px); overflow-y: auto; border-top: 1px solid #eef2ef; }
    .nav-menu a { display: block; padding: 14px 4px; font-size: 15px; border-bottom: 1px solid #F0F3F1; }
    .nav-menu li:last-child a { border-bottom: none; }

    .hero { padding-top: 34px; }
    .hero h1 { font-size: clamp(26px, 7.5vw, 34px); }
    .hero p.lead { font-size: 14.5px; }
    .section { padding: 52px 0; }
    .section-title { font-size: 24px; }
    .section-subtitle { font-size: 14px; margin-bottom: 28px; }
}

@media (max-width: 768px) {
    body.public-site { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
    .mobile-bar {
        display: flex; gap: 6px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
        background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
        border-top: 1px solid #E3EEE8; box-shadow: 0 -8px 22px rgba(16,36,28,.09);
    }
    .mobile-bar a { flex: 1; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 14px; font-size: 11px; font-weight: 500; color: var(--text-muted); transition: .2s; }
    .mobile-bar a i { font-size: 18px; }
    .mobile-bar a.active { color: var(--primary); background: var(--primary-light); }
    .mobile-bar a.cta { color: #fff; background: linear-gradient(135deg, var(--primary), #26A66A); box-shadow: 0 6px 14px rgba(27,122,77,.35); }
    .mobile-bar a.cta.active { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }

    .hero-actions { flex-direction: column; gap: 10px; }
    .hero-actions .btn { width: 100%; justify-content: center; min-height: 48px; }
    .btn { min-height: 44px; }
    .btn-sm { min-height: 40px; }
    .grid-auto { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .contact-info-card { padding: 22px 18px; }
    .map-embed, .map-embed iframe { min-height: 240px; }
    .jadwal-card, .pengumuman-card .body { padding: 18px; }
    .footer-container { justify-content: flex-end; align-items: flex-end; text-align: right; flex-direction: column; }
    .cs-feat .cs-chip { flex: 1 1 100%; text-align: left; }
}

@media (max-width: 560px) {
    /* Kolom pencarian: input penuh, tombol di bawahnya (mudah diketuk) */
    .cs-form { flex-wrap: wrap; border-radius: 20px; padding: 8px 8px 8px 16px; }
    .cs-form input { flex: 1 1 calc(100% - 40px); font-size: 16px; min-height: 46px; }
    .cs-form > button { flex: 1 1 100%; min-height: 48px; margin-top: 4px; font-size: 15px; }
    .cs-wrap { border-radius: 18px; }
    .cs-banner { font-size: 13px; }
    .cs-track .cs-step small { font-size: 10.5px; }
    .login-card { padding: 32px 22px; }
}

/* Panel admin/bidan di HP: target ketuk lebih besar & tanpa zoom otomatis iOS */
@media (max-width: 768px) {
    .form-field input, .form-field select, .form-field textarea,
    .table-toolbar input, .table-toolbar select, .input-icon input { font-size: 16px; min-height: 44px; }
    .action-btns a, .action-btns button { width: 38px; height: 38px; }
    .sidebar-menu li a { padding: 14px 14px; }
    .admin-topbar { padding: 12px 14px; }
}
@media (max-width: 560px) { .topbar-user > span { display: none; } }

/* =========================================================
   CEK STATUS: DROPDOWN SARAN KATA KUNCI
========================================================= */
/* header & kartu tidak boleh memotong dropdown -> lingkaran dekorasi pindah ke background */
.cs-wrap { overflow: visible; }
.cs-head { overflow: visible; z-index: 5; border-radius: 24px 24px 0 0;
    background:
        radial-gradient(circle at 93% -8%, rgba(255,255,255,.10) 0 115px, transparent 116px),
        radial-gradient(circle at 80% 125%, rgba(255,255,255,.08) 0 75px, transparent 76px),
        linear-gradient(120deg, #145C3A 0%, #1B7A4D 55%, #2E9D70 100%); }
.cs-head::before, .cs-head::after { display: none; }
@media (max-width: 560px) { .cs-head { border-radius: 18px 18px 0 0; } }

.cs-form { position: relative; }
.cs-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 10px); z-index: 60; background: #fff; color: var(--text); border-radius: 18px; padding: 8px; text-align: left; max-height: min(50vh, 320px); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 22px 48px rgba(0,0,0,.3); animation: csDrop .22s cubic-bezier(.2,.8,.2,1); }
.cs-suggest[hidden] { display: none; }
@keyframes csDrop { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
.cs-sg-title { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); padding: 10px 10px 4px; }
.cs-sg-clear { border: none; background: none; color: var(--primary); font: inherit; font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.cs-sg-clear:hover { background: var(--primary-light); }
.cs-sg-row { display: flex; align-items: center; }
.cs-sg-item { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 12px; border: 1.5px solid transparent; background: none; font: inherit; font-size: 14px; color: var(--text); border-radius: 12px; cursor: pointer; text-align: left; transition: background .15s; }
.cs-sg-item i { color: var(--primary); width: 18px; text-align: center; }
.cs-sg-item span { flex: 1; letter-spacing: .4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-sg-item em { font-style: normal; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.cs-sg-item:hover, .cs-sg-item.hl { background: var(--primary-light); }
.cs-sg-item.live { background: var(--bg-alt); border: 1.5px dashed #CFE8D9; margin-bottom: 4px; }
.cs-sg-item.live em { font-weight: 600; }
.cs-sg-item.live.ready { background: var(--primary-light); border: 1.5px solid var(--primary); }
.cs-sg-item.live.ready em { color: var(--primary); }
.cs-sg-item.live.shake { animation: csShake .4s; }
.cs-sg-del { width: 38px; height: 38px; border: none; background: none; border-radius: 50%; color: #9CA8A0; cursor: pointer; flex-shrink: 0; }
.cs-sg-del:hover { background: #FCEAEA; color: var(--danger); }
.cs-sg-keys { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 10px 8px; }
.cs-sg-key { font: inherit; font-size: 13px; min-height: 40px; padding: 8px 14px; border: 1.5px solid #E6EEE9; background: var(--bg-alt); color: var(--text); border-radius: 999px; cursor: pointer; transition: .2s; }
.cs-sg-key i { color: var(--primary); margin-right: 6px; }
.cs-sg-key:hover { border-color: var(--primary); }
.cs-sg-key.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.cs-sg-key.active i { color: #fff; }
.cs-sg-tip { font-size: 12px; color: var(--text-muted); padding: 10px 12px 6px; margin-top: 4px; border-top: 1px solid #F0F3F1; }
.cs-sg-tip i { color: var(--blue); margin-right: 6px; }
@media (max-width: 560px) { .cs-suggest { top: calc(100% + 8px); max-height: min(48vh, 280px); border-radius: 16px; } }
@media (prefers-reduced-motion: reduce) { .cs-suggest { animation: none; } }

/* Cek status: tanpa hasil, hanya header (sudut membulat penuh) */
.cs-head.solo { border-radius: 24px; }
@media (max-width: 560px) { .cs-head.solo { border-radius: 18px; } }


/* =========================================================
   BRANDING POSYANDU DESA KEBOHARAN & KREDIT
========================================================= */
.nav-logo .brand-logo { width: 42px; height: 42px; object-fit: contain; }
.nav-logo { line-height: 1.2; }
.nav-logo.nav-logo-lockup { flex-direction: column; gap: 2px; text-align: center; font-size: 11px; line-height: 1.1; }
.nav-logo.nav-logo-lockup .brand-logo { width: 40px; height: 40px; }
.nav-logo.nav-logo-lockup > span { display: block; }
.nav-logo.nav-logo-lockup small { display: none; }
.footer-brand img { width: 46px; height: 46px; object-fit: contain; }
.sidebar-brand img.brand-logo-img { width: 36px; height: 36px; object-fit: contain; background: #fff; border-radius: 10px; padding: 3px; }
.login-brand img { display: block; width: min(200px, 100%); height: auto; object-fit: contain; margin: 0 auto 8px; }
.made-by { display: block; margin-top: 6px; }
.footer-bottom strong { color: #fff; }
.admin-footer { padding: 16px 28px; margin-top: 8px; font-size: 12px; color: var(--text-muted); text-align: right; border-top: 1px solid #E6EEE9; background: #fff; }
.login-credit { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 16px; }
@media (max-width: 768px) { .admin-footer { padding: 14px; } }

/* =========================================================
   NAVBAR PUBLIK — RAPI SATU BARIS
========================================================= */
.nav-container { max-width: 1320px; gap: 24px; }
.nav-logo { white-space: nowrap; flex-shrink: 0; }
.nav-logo small { font-size: 10.5px; margin-top: 1px; }
.nav-menu { gap: clamp(14px, 1.6vw, 26px); flex-wrap: nowrap; justify-content: center; }
.nav-menu li { flex-shrink: 0; }
.nav-menu a { white-space: nowrap; font-size: 13.5px; padding: 8px 0; display: inline-block; }
.nav-menu a::after { content: ""; position: absolute; left: 0; bottom: 2px; width: 0; height: 2px; border-radius: 2px; background: var(--primary); transition: width .25s ease; }
.nav-menu a:hover::after { width: 100%; }
.btn-login { white-space: nowrap; flex-shrink: 0; }

/* Layar < 1200px: menu jadi hamburger agar tidak pernah turun baris */
@media (max-width: 1200px) {
    .nav-container { padding: 10px 16px; gap: 10px; }
    .nav-logo { order: 1; margin-right: auto; }
    .btn-login { order: 2; padding: 9px 16px; min-height: 42px; font-size: 13px; }
    .nav-toggle { display: flex; align-items: center; justify-content: center; order: 3; width: 44px; height: 44px; border-radius: 12px; background: var(--primary-light); font-size: 18px; }
    .nav-menu { order: 4; position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 0; padding: 6px 20px 14px; background: #fff; box-shadow: var(--shadow); border-top: 1px solid #eef2ef; max-height: calc(100vh - 70px); overflow-y: auto; }
    .nav-menu.show { display: flex; }
    .nav-menu a { display: block; padding: 14px 4px; font-size: 15px; border-bottom: 1px solid #F0F3F1; }
    .nav-menu a::after { display: none; }
    .nav-menu li:last-child a { border-bottom: none; }
}

.badge-resepsionis { background: #F3E8FB; color: #7A3FA0; }

/* ===== Bilah progres gulir & munculnya konten (CSS Scroll-driven Animations) ===== */
.scroll-progress { position: fixed; left: 0; top: 0; z-index: 300; width: 100%; height: 3px; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--accent), var(--blue)); }
@supports (animation-timeline: scroll()) {
    .scroll-progress { animation: spGrow linear both; animation-timeline: scroll(root); }
    @keyframes spGrow { to { transform: scaleX(1); } }
}
@supports (animation-timeline: view()) {
    /* overflow: clip (bukan hidden) agar hero tidak menjadi wadah gulir yang membuat animasi tidak mengikuti halaman */
    .hero { overflow: clip; }
    /* Hero: teks dan logo bergeser pelan & memudar saat hero digulir keluar (tanpa JavaScript, tanpa menambah tinggi halaman) */
    .hero > .hero-container > div:first-child, .hero > .hero-container > .hero-logo { animation: heroOut linear both; animation-timeline: view(); animation-range: exit 0% exit 85%; }
    @keyframes heroOut { to { opacity: .15; transform: translateY(-36px); } }
    .section-eyebrow, .section-title, .section-subtitle, .benefit-card, .stat-card, .chart-card, .jadwal-card, .pengumuman-card, .faq-item, .contact-info-card, .map-embed, .cs-wrap {
        animation: rvUp linear backwards; animation-timeline: view(); animation-range: entry 0% entry 45%;
    }
    .benefit-card:nth-child(3n+2), .stat-card:nth-child(3n+2) { animation-range: entry 8% entry 53%; }
    .benefit-card:nth-child(3n), .stat-card:nth-child(3n) { animation-range: entry 16% entry 61%; }
    @keyframes rvUp { from { opacity: 0; transform: translateY(34px) scale(.98); } to { opacity: 1; transform: none; } }
}
/* Peramban tanpa dukungan: dikerjakan JS (IntersectionObserver) */
.rv-fallback .rv { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.rv-fallback .rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .scroll-progress { display: none; }
    .section-eyebrow, .section-title, .section-subtitle, .benefit-card, .stat-card, .chart-card, .jadwal-card, .pengumuman-card, .faq-item, .contact-info-card, .map-embed, .cs-wrap { animation: none !important; }
    .rv-fallback .rv { opacity: 1; transform: none; transition: none; }
    .hero > .hero-container > div:first-child, .hero > .hero-container > .hero-logo { animation: none !important; }
}

/* Menu samping: label panjang (Pemeriksaan Ibu Hamil) muat satu baris */
.sidebar-menu li a { gap: 10px; padding: 12px 12px; font-size: 13.5px; line-height: 1.3; }


/* Aturan tambahan rekam medis yang ditambahkan setelah arsip sumber */


/* Pusat Rekam Medis */
.record-add-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.record-search { align-items: stretch; }
@media (max-width: 768px) {
    .record-add-actions { display: grid; grid-template-columns: 1fr; gap: 12px; }
    .record-add-actions .btn { min-height: 48px; width: 100%; justify-content: center; }
    .record-search { display: grid; grid-template-columns: 1fr; gap: 10px; }
    .record-search > * { width: 100%; min-height: 46px; }
}

/* =========================================================
   RESPONSIVE PUBLIC HOME + LOGIN
   Track 1fr dengan minimum intrinsik dapat melebar melewati konten
   343px iPhone SE; minmax(0, 1fr) menjaga kartu tetap di viewport.
========================================================= */
.public-site { width: 100%; min-width: 0; }
.public-site .nav-container, .public-site .hero-container, .public-site .container { width: 100%; min-width: 0; }
.hero-container { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.hero-container > * { min-width: 0; }
.hero-logo { min-width: 0; }
.hero-logo img, .public-site canvas, .public-site iframe { max-width: 100%; }
.stat-card { min-width: 0; }
.stat-number, .stat-label { overflow-wrap: anywhere; }

@media (max-width: 900px) {
    .hero-container { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    .hero-logo { width: 100%; max-width: 320px; }
    .hero::before { background-size: cover; background-position: center 40%; }
}

@media (max-width: 768px) {
    .public-site { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
    .public-site .nav-container { padding: 8px 14px; gap: 8px; }
    .public-site .nav-logo { min-width: 0; margin-right: auto; }
    .public-site .btn-login { min-height: 44px; padding: 9px 13px; }
    .public-site .nav-toggle { flex: 0 0 44px; width: 44px; min-height: 44px; }
    .public-site .nav-menu { max-width: 100%; box-sizing: border-box; }
    .public-site .hero { padding: 30px 0 74px; }
    .public-site .hero::after { background: linear-gradient(180deg, rgba(255,255,255,.10) 62%, #fff 100%), linear-gradient(135deg, rgba(232,245,236,.95) 0%, rgba(242,251,246,.93) 55%, rgba(234,244,251,.96) 100%); }
    .public-site .hero-container { padding-left: 16px; padding-right: 16px; gap: 14px; }
    .public-site .hero-logo { order: -1; max-width: 210px; margin: 0 auto; }
    .public-site .hero-logo img { width: min(100%, 200px); max-height: 200px; object-fit: contain; }
    .public-site .hero h1 { max-width: 100%; font-size: clamp(26px, 7.6vw, 34px); line-height: 1.16; overflow-wrap: anywhere; }
    .public-site .hero p.lead { max-width: 100%; font-size: clamp(14px, 3.8vw, 15px); }
    .public-site .hero-badge { max-width: 100%; white-space: normal; padding: 8px 13px; line-height: 1.4; }
    .public-site .hero-actions { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; gap: 10px; }
    .public-site .hero-actions .btn { width: 100%; min-width: 0; min-height: 50px; justify-content: center; padding: 12px 16px; text-align: center; }
    .public-site .grid-auto { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .public-site .stat-card { padding: 16px 12px; }
    .public-site .stat-number { font-size: clamp(23px, 7vw, 30px); }
    .public-site .stat-label { font-size: 12px; line-height: 1.4; }
    .public-site .mobile-bar { left: 0; right: 0; bottom: 0; box-sizing: border-box; padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)); }
    .public-site .mobile-bar a { min-width: 0; flex: 1 1 0; }
}

@media (max-width: 560px) {
    .public-site .container { padding-left: 16px; padding-right: 16px; }
    .public-site .section { padding: 46px 0; }
    .public-site .section-title { font-size: clamp(22px, 6.2vw, 26px); overflow-wrap: anywhere; }
    .public-site .section-subtitle { margin-bottom: 24px; }
    .login-page { align-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
    .login-wrapper { max-width: 400px; }
    .login-card { padding: 34px 24px 30px; border-radius: 20px; }
    .login-brand { margin-bottom: 22px; }
    .login-brand img { width: min(174px, 62vw); }
    .login-brand h2 { font-size: 23px; }
    .login-credit { margin-top: 12px; }
}


/* Penyempurnaan proporsi hero tanpa mengubah markup atau perilaku navigasi */
@media (min-width: 901px) {
    .public-site .hero-container {
        grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr);
        gap: clamp(28px, 4vw, 48px);
        align-items: center;
    }

    .public-site .hero-logo {
        width: 100%;
        max-width: 280px;
        justify-self: center;
    }

    .public-site .hero-logo img {
        display: block;
        width: min(100%, 260px);
        max-width: 260px;
        height: auto;
        aspect-ratio: 175 / 158;
        object-fit: contain;
    }

    .public-site .hero-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: clamp(8px, 1vw, 14px);
    }

    .public-site .hero-actions .btn {
        min-width: 0;
        min-height: 56px;
        padding: 11px clamp(8px, 1vw, 14px);
        white-space: normal;
        line-height: 1.3;
    }
}

@media (min-width: 769px) and (max-width: 900px) {
    .public-site .hero-container {
        grid-template-columns: minmax(0, 1.1fr) minmax(240px, .9fr);
        gap: clamp(20px, 3vw, 32px);
        align-items: center;
    }

    .public-site .hero-logo {
        width: 100%;
        max-width: 260px;
        justify-self: center;
    }

    .public-site .hero-logo img {
        display: block;
        width: min(100%, 240px);
        max-width: 240px;
        height: auto;
        aspect-ratio: 175 / 158;
        object-fit: contain;
    }

    .public-site .hero-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .public-site .hero-actions .btn {
        min-width: 0;
        min-height: 56px;
        padding: 10px 8px;
        font-size: 12.5px;
        white-space: normal;
        line-height: 1.3;
    }
}

@media (max-width: 768px) {
    .public-site .hero-container > div:first-child { grid-row: 2; }
    .public-site .hero-logo { grid-row: 1; }

    .public-site .hero-logo img {
        aspect-ratio: 175 / 158;
        object-fit: contain;
    }

    .public-site .hero-actions .btn {
        white-space: normal;
        overflow-wrap: break-word;
        line-height: 1.3;
    }
}
