/* =========================================================
   Desa Citerep — Design Tokens & Polished UI
   ========================================================= */
/* Background halaman: gradasi lembut + motif titik halus (tanpa gambar agar teks tetap terbaca) */
:root {
    --bg-image: none;
    --bg-glow-1: radial-gradient(circle at 28% 18%, rgba(217, 164, 65, 0.08), transparent 42%);
    --bg-glow-2: radial-gradient(circle at 74% 66%, rgba(44, 85, 48, 0.06), transparent 48%);
    --bg-dots: radial-gradient(rgba(44, 85, 48, 0.035) 1px, transparent 1px);
    --bg-dots-size: 24px 24px;
}

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap');

:root {
    --color-bg: #F6F1E4;
    --color-surface: #FFFFFF;
    --color-text: #2A2420;
    --color-text-muted: #6B5D4F;
    --color-primary: #2C5530;
    --color-primary-dark: #1B3620;
    --color-accent: #D9A441;
    --color-accent-soft: #F0DCA6;
    --color-line: #E3D6BC;
    --radius: 14px;
    --shadow: 0 4px 20px rgba(42, 36, 32, 0.07);
    --shadow-hover: 0 14px 34px rgba(42, 36, 32, 0.16);
}

/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
    font-family: 'Inter', Arial, sans-serif;
    color: var(--color-text);
    background-color: var(--color-bg);
    background-image: var(--bg-glow-1), var(--bg-glow-2), var(--bg-dots);
    background-size: auto, auto, var(--bg-dots-size);
    background-repeat: no-repeat, no-repeat, repeat;
    background-attachment: fixed;
    line-height: 1.7;
    font-size: 16px;
    min-height: 100vh;
    overflow-x: clip;
    position: relative;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(246, 241, 228, 0.35);
    z-index: -1;
    pointer-events: none;
}
/* Gambar background hero-desa.png — opacity sangat rendah agar teks di depannya tetap terbaca */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url('../../assets/img/hero-desa.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0.245;
    z-index: -2;
    pointer-events: none;
}
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}
a { text-decoration: none; color: var(--color-primary); transition: color 0.15s ease; }
a:hover { color: var(--color-primary-dark); }
img { max-width: 100%; display: block; }

h1, h2, h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    color: var(--color-primary-dark);
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-primary-dark);
    font-weight: 600;
    display: inline-block;
    margin-bottom: 12px;
    padding: 4px 10px;
    background: rgba(217, 164, 65, 0.18);
    border-radius: 20px;
}

/* ===== Woven strip — signature ===== */
.woven-strip {
    height: 6px;
    background:
        repeating-linear-gradient(45deg, var(--color-accent) 0, var(--color-accent) 2px, transparent 2px, transparent 9px),
        repeating-linear-gradient(-45deg, var(--color-accent) 0, var(--color-accent) 2px, transparent 2px, transparent 9px),
        var(--color-primary-dark);
}

/* ===== Papan pengumuman berjalan (marquee) ===== */
.announce-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    color: #fff;
    padding: 11px 0;
    overflow: hidden;
}
.announce-label {
    flex-shrink: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    padding: 5px 14px;
    margin-left: 16px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    white-space: nowrap;
}
.announce-track {
    flex: 1;
    overflow: hidden;
}
.announce-slide {
    display: flex;
    align-items: center;
    width: max-content;
    animation: announceScroll 30s linear infinite;
    will-change: transform;
}
.announce-slide:hover { animation-play-state: paused; }
.announce-item {
    white-space: nowrap;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    margin-right: 48px;
}
@keyframes announceScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .announce-slide { animation: none; }
}

/* ===== Header ===== */
.site-header {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(27, 54, 32, 0.25);
    width: 100%;
}
.site-header .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    flex-wrap: wrap;
    gap: 10px 16px;
    max-width: none;
    margin: 0;
}
.header-utils {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.main-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    gap: 2px 0;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.main-nav a {
    color: rgba(255,255,255,0.9);
    margin-left: 0;
    margin-right: 22px;
    font-size: 14px;
    font-weight: 500;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}
.logo {
    color: #fff;
    font-family: 'Fraunces', serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo-img {
    width: 30px;
    height: auto;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}
.main-nav a:hover {
    color: #fff;
    border-bottom-color: var(--color-accent);
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.25s ease;
}
.main-nav a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    padding: 7px 11px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
}
.nav-toggle:active {
    background: rgba(255, 255, 255, 0.24);
}

.header-search {
    display: flex;
    gap: 6px;
    align-items: center;
}
.header-search input[type="text"] {
    padding: 9px 12px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 13px;
    width: 260px;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}
.header-search input[type="text"]:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255,255,255,0.22);
    width: 320px;
}
.header-search input[type="text"]::placeholder {
    color: rgba(255,255,255,0.6);
}
.header-search .btn-sm {
    padding: 7px 10px;
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}
.header-search .btn-sm:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .header-search {
        width: 100%;
        margin-top: 10px;
        margin-bottom: 12px;
    }
    .header-search input[type="text"] {
        flex: 1;
        width: auto;
        min-width: 0;
    }
}

@media (min-width: 769px) {
    .header-search {
        flex: 1 1 100%;
        justify-content: center;
    }
    .header-search input[type="text"] {
        flex: 0 1 460px;
        width: auto;
        min-width: 0;
    }
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: flex-end;
    padding: 0;
    overflow: hidden;
    width: 100%;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    transform: scale(1.05);
    animation: heroZoom 20s ease-in-out infinite alternate;
}
@keyframes heroZoom {
    from { transform: scale(1.05); }
    to { transform: scale(1.15); }
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(27,54,32,0.2) 0%, rgba(27,54,32,0.7) 100%);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
    padding: 70px 24px 60px;
    width: 100%;
    color: #fff;
}
.hero-content .eyebrow {
    color: var(--color-accent-soft);
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
}
.hero-content h1 {
    color: #fff;
    font-size: 46px;
    line-height: 1.12;
    margin-bottom: 18px;
    text-shadow: 0 3px 16px rgba(0,0,0,0.35);
    max-width: 700px;
}
.hero-content p {
    color: #FBEBC6;
    font-family: 'Fraunces', serif;
    font-size: 20px;
    font-style: italic;
    line-height: 1.7;
    max-width: 680px;
    text-shadow: 0 1px 10px rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    gap: 14px;
}
.hero-content p::before {
    content: '';
    flex-shrink: 0;
    width: 42px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--color-accent), rgba(246, 216, 132, 0.08));
}
.hero-content .stat-strip {
    margin-top: 28px;
    max-width: 740px;
    gap: 0;
    background: rgba(0, 0, 0, 0.28);
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
}
.hero-content .stat-strip .stat-cell {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    padding: 18px 20px;
}
.hero-content .stat-strip .stat-cell:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: none;
}
.hero-content .stat-strip .stat-label {
    color: #F6D884;
}
.hero-content .stat-strip .stat-value {
    color: #FFE9AD;
}

/* ===== Stat strip ===== */
.stat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1px;
    background: var(--color-line);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 24px;
    box-shadow: var(--shadow);
}
.stat-cell {
    background: var(--color-surface);
    padding: 22px 20px;
    transition: transform 0.2s ease;
}
.stat-cell:hover {
    transform: translateY(-2px);
}
.stat-cell .stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}
.stat-cell .stat-value {
    font-family: 'Fraunces', serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--color-primary-dark);
}

/* ===== Section heading ===== */
.section-heading {
    margin: 60px 0 26px;
    position: relative;
    padding-bottom: 12px;
}
.section-heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), transparent);
    border-radius: 2px;
}
.section-heading h2 {
    font-size: 26px;
    display: inline-block;
}

/* ===== Main content ===== */
main.container {
    padding-top: 80px;
    padding-bottom: 80px;
    min-height: 60vh;
    animation: fadeIn 0.5s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.page-title {
    font-size: 32px;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

/* ===== Card grid ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 26px;
}
.card {
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    display: block;
    border: 1px solid rgba(227, 214, 188, 0.5);
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-accent-soft);
}
.card-media { position: relative; overflow: hidden; }
.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.card:hover .card-media img {
    transform: scale(1.05);
}
.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.card-body { padding: 18px 20px 22px; }
.card-title {
    font-family: 'Fraunces', serif;
    font-size: 19px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
    line-height: 1.35;
}
.card-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}
.card-desc {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.55;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 22px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(44, 85, 48, 0.2);
    font-family: 'Inter', sans-serif;
}
.btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(44, 85, 48, 0.3);
}
.btn:active {
    transform: translateY(0);
}
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    box-shadow: none;
}
.btn-wa { background: #25D366; color: #0d3319; box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25); }
.btn-wa:hover { background: #1ebc59; box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35); }
.btn-makanan-spf { background: #EE4D2D; color: #fff; }
.btn-makanan-spf:hover { background: #d13c1f; }
.btn-makanan-gbf { background: #00B14F; color: #fff; }
.btn-makanan-gbf:hover { background: #008f40; }
.btn-makanan-gof { background: #00AA13; color: #fff; }
.btn-makanan-gof:hover { background: #00880f; }
.btn-makanan-lain { background: #6c757d; color: #fff; }
.btn-makanan-lain:hover { background: #565e64; }
.umkm-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn-danger { background: #B3492F; box-shadow: 0 2px 8px rgba(179, 73, 47, 0.2); }
.btn-danger:hover { background: #8C3523; }

/* ===== Filter pills ===== */
.filter-pills {
    margin: 24px 0 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.filter-pills a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 8px 16px;
    border-radius: 24px;
    border: 1.5px solid var(--color-line);
    color: var(--color-text-muted);
    background: var(--color-surface);
    transition: all 0.2s ease;
}
.filter-pills a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-1px);
}
.filter-pills a.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 2px 10px rgba(44, 85, 48, 0.25);
}

/* ===== Forms ===== */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text);
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--color-line);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: var(--color-surface);
    transition: all 0.2s ease;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(44, 85, 48, 0.1);
    transform: translateY(-1px);
}
.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

@media (max-width: 640px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ===== Upload berkas: Pilih File / Scan (kamera) ===== */
.file-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.file-row input[type="file"] { display: none; }
.file-label {
    font-size: 12.5px;
    color: var(--color-text-muted);
}
.btn-plain {
    background: #8C8879;
    box-shadow: none;
}
.btn-plain:hover {
    background: #6F6B5E;
}

/* ===== Table (admin) ===== */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
table th, table td {
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-line);
    font-size: 14px;
}
table th {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
table tr {
    transition: background 0.15s ease;
}
table tbody tr:hover {
    background: rgba(217, 164, 65, 0.06);
}
table tr:last-child td { border-bottom: none; }

/* ===== Pagination ===== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
    justify-content: center;
}
.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 8px 12px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text);
    background: var(--color-surface);
    transition: all 0.15s ease;
}
.pagination .page-link:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-1px);
}

/* ===== Alerts ===== */
.alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.alert-success {
    background: #E4EFE1;
    color: var(--color-primary-dark);
    border-color: #7CB468;
}
.alert-error {
    background: #FBE7E1;
    color: #8A2E1A;
    border-color: #E87A5A;
}

/* ===== Toast notifikasi (flash message) ===== */
.flash-container {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(400px, calc(100vw - 36px));
}
.flash-toast {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    margin-bottom: 0;
    animation: slideInRight 0.28s ease;
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.flash-toast.flash-hide {
    opacity: 0;
    transform: translateX(24px);
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== Status badge ===== */
.status-badge {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.status-diajukan { background: #EAE3D3; color: #6B5D4F; }
.status-diproses { background: #FBE9C6; color: #8A5E10; }
.status-selesai  { background: #DCEFDA; color: #1F6F3F; }
.status-ditolak  { background: #FBE0DA; color: #B3492F; }

.tracking-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: var(--color-accent-soft);
    padding: 16px 24px;
    border-radius: 10px;
    display: inline-block;
    margin: 12px 0;
    box-shadow: 0 4px 14px rgba(27, 54, 32, 0.3);
    border: 1px solid rgba(217, 164, 65, 0.3);
}

/* ===== Footer ===== */
.site-footer {
    background: linear-gradient(180deg, var(--color-primary-dark) 0%, #152E18 100%);
    color: rgba(255,255,255,0.8);
    text-align: center;
    padding: 30px 20px;
    font-size: 13px;
    position: relative;
}
.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(
        45deg,
        var(--color-accent) 0,
        var(--color-accent) 6px,
        transparent 6px,
        transparent 12px
    );
}
.site-footer p:first-child {
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 6px;
}
.site-footer a {
    color: var(--color-accent-soft);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.site-footer a:hover {
    color: var(--color-accent);
}

/* ===== Admin mobile sidebar toggle ===== */
.sidebar-toggle {
    display: none;
    width: 100%;
    padding: 14px 18px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-toggle::before {
    content: "☰ ";
    margin-right: 8px;
}
.sidebar-close {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 150;
}

/* ===== Admin layout ===== */
.admin-wrapper { display: flex; min-height: 100vh; position: relative; }
.admin-sidebar {
    width: 240px;
    background: linear-gradient(180deg, var(--color-primary-dark) 0%, #152E18 100%);
    color: #fff;
    padding: 28px 22px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 200;
}
.admin-sidebar h3 {
    color: var(--color-accent-soft);
    font-family: 'Fraunces', serif;
    font-size: 19px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}
.admin-sidebar a {
    display: block;
    color: rgba(255,255,255,0.8);
    padding: 11px 0;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    padding-left: 12px;
    margin-bottom: 2px;
    transition: all 0.15s ease;
}
.admin-sidebar a.sidebar-active {
    color: #fff;
    background: rgba(255,255,255,0.12);
    font-weight: 600;
    border-left: 3px solid var(--color-accent);
}
.admin-sidebar a:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
    padding-left: 16px;
}
.admin-sidebar .sidebar-section {
    color: rgba(255,255,255,0.4);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 22px 0 6px;
    padding: 10px 12px 0;
    border-top: 1px solid rgba(255,255,255,0.12);
    cursor: default;
    user-select: none;
}
.admin-sidebar .sidebar-section:first-of-type {
    margin-top: 8px;
}
.admin-sidebar .sidebar-section::before {
    content: "◆ ";
    color: var(--color-accent);
    font-size: 9px;
}
.admin-content {
    flex: 1;
    padding: 36px;
    background: var(--color-bg);
    min-height: 100vh;
}
.login-box {
    max-width: 400px;
    margin: 100px auto;
    background: var(--color-surface);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--color-line);
}
.login-box h2 {
    font-family: 'Fraunces', serif;
    font-size: 26px;
    color: var(--color-primary-dark);
    margin-bottom: 8px;
}
.login-box .subtitle {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

/* ===== Alur layanan (steps) ===== */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 20px;
}
.step {
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    padding: 18px 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    box-shadow: var(--shadow);
}
.step-num {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.step-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.step-content strong {
    font-size: 14px;
    color: var(--color-text);
}
.step-content span {
    font-size: 12.5px;
    color: var(--color-text-muted);
    line-height: 1.55;
}

/* ===== Tombol bagikan (share) ===== */
.share-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    color: #fff;
    transition: transform 0.15s ease, opacity 0.15s ease;
    text-decoration: none;
}
.share-btn:hover { transform: translateY(-2px); opacity: 0.9; }
.share-wa { background: #25D366; }
.share-fb { background: #1877F2; }
.share-tw { background: #0F1419; }
.share-tg { background: #229ED9; }
.share-copy { background: var(--color-text-muted); }

/* ===== Table wrapper (mobile horizontal scroll) ===== */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.table-wrap table {
    min-width: 640px;
}

/* ===== Admin mobile sidebar toggle ===== */
.sidebar-toggle {
    display: none !important;
    width: 100%;
    padding: 14px 18px;
    background: rgba(27, 54, 32, 0.92);
    color: #fff;
    border: 1px solid rgba(27, 54, 32, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    border-bottom: 1px solid rgba(27, 54, 32, 0.7);
}
.sidebar-toggle::before {
    content: "☰ ";
    margin-right: 8px;
}
.sidebar-close {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.35);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .header-inner { flex-wrap: wrap; }
    .main-nav a { margin-left: 0; margin-right: 18px; font-size: 13.5px; }
    .hero { min-height: 480px; }
    .hero-content h1 { font-size: 28px; }
    .hero-content p { font-size: 14px; }
    .hero-content { padding: 48px 18px 40px; }
    .page-title { font-size: 24px; }
    .section-heading h2 { font-size: 20px; }
    .grid { grid-template-columns: 1fr; gap: 18px; }
    .card img { height: 170px; }
    .admin-wrapper { flex-direction: column; }
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        padding-top: 50px;
    }
    .admin-sidebar.open {
        transform: translateX(0);
    }
    .admin-sidebar .sidebar-close {
        display: block;
    }
    .sidebar-backdrop {
        display: block;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }
    .sidebar-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }
    .admin-content { padding: 20px 16px; }
    .container { padding: 0 16px; }
    .login-box { margin: 60px 16px; padding: 28px; }
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px;
        padding: 13px 14px;
    }
    .login-box h2 { font-size: 24px; }
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    .filter-pills a {
        font-size: 11.5px;
        padding: 7px 12px;
    }
    table th, table td {
        padding: 10px 12px;
        font-size: 13px;
    }
    .status-badge {
        font-size: 10px;
        padding: 4px 10px;
    }
    .page-title { margin-bottom: 14px; }
    .section-heading { margin: 40px 0 20px; }
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .sidebar-toggle { display: block !important; }
    .site-header .header-inner {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "logo utils"
            "search search"
            "nav nav";
        align-items: center;
        column-gap: 14px;
        row-gap: 8px;
    }
    .logo { grid-area: logo; }
    .header-utils { grid-area: utils; justify-self: end; margin-left: 0; }
    .header-search { grid-area: search; width: 100%; }
    .header-search input[type="text"] {
        flex: 1;
        width: auto;
        min-width: 0;
    }
    .header-search input[type="text"]:focus { width: auto; }
    .main-nav {
        display: none;
        grid-area: nav;
        width: 100%;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0;
        margin-top: 14px;
        padding: 10px 0 26px;
    }
    .nav-check:checked ~ .main-nav {
        display: flex;
        max-height: calc(100vh - 124px);
        max-height: calc(100dvh - 124px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .main-nav::-webkit-scrollbar { display: none; }
    .main-nav a {
        margin-left: 0;
        margin-right: 0;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
}

@media (min-width: 769px) {
    .admin-sidebar {
        transform: translateX(0) !important;
        position: sticky !important;
        width: 240px !important;
        padding-top: 28px !important;
    }
    .sidebar-toggle { display: none !important; }
    .sidebar-close { display: none !important; }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 24px; }
    .hero-content p { font-size: 13px; }
    .page-title { font-size: 22px; }
    .section-heading h2 { font-size: 18px; }
    .card-title { font-size: 17px; }
    .card-body { padding: 14px 16px 18px; }
    .btn { width: 100%; justify-content: center; }
    .login-box { margin: 40px 12px; padding: 24px 20px; }
    .filter-pills { gap: 6px; }
    .filter-pills a { font-size: 10.5px; padding: 6px 10px; }
    .header-search {
        width: 100%;
        margin-bottom: 16px;
    }
    .header-search .btn-sm {
        flex-shrink: 0;
        width: auto;
        padding: 7px 10px;
        font-size: 14px;
        border-radius: 6px;
    }
    .stat-strip {
        grid-template-columns: 1fr 1fr;
        gap: 1px;
    }
    .stat-cell { padding: 14px; }
    .stat-cell .stat-value { font-size: 22px; }
    .login-box {
        margin: 40px 12px;
        padding: 24px 18px;
    }
    .login-box h2 {
        font-size: 22px;
    }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    .card, .btn, .header-search input, .form-group input, .form-group textarea, .form-group select {
        transition: none;
    }
    .hero-bg { animation: none; }
}

/* ===== Org Tree ===== */
.org-tree { margin-top: 10px; }
.tree-node { position: relative; }
.tree-card {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 20px;
    min-width: 260px;
    max-width: 420px;
    position: relative;
    z-index: 2;
    border: 1px solid var(--color-line);
    transition: all 0.2s ease;
}
.tree-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--color-accent-soft);
}
.tree-avatar img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-accent-soft);
    transition: transform 0.2s ease;
}
.tree-card:hover .tree-avatar img {
    transform: scale(1.05);
}
.tree-info { flex: 1; }
.tree-name {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 16px;
    color: var(--color-primary-dark);
}
.tree-jabatan {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 3px;
}
.tree-children {
    position: relative;
    margin-left: 44px;
    padding-left: 30px;
    border-left: 2px solid var(--color-line);
    margin-top: 20px;
}
.tree-children .tree-node { position: relative; }
.tree-children .tree-node::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 28px;
    width: 28px;
    height: 2px;
    background: var(--color-line);
}
.tree-children .tree-node:last-child > .tree-card::after {
    content: '';
    position: absolute;
    left: -32px;
    bottom: -20px;
    width: 2px;
    height: 20px;
    background: var(--color-line);
}
.tree-card::after {
    content: '';
    position: absolute;
    left: -32px;
    top: 50%;
    width: 28px;
    height: 2px;
    background: var(--color-line);
}
.tree-node:first-child > .tree-card::after { width: 32px; }
.org-tree > .tree-node > .tree-card { min-width: 300px; max-width: 500px; }
.org-tree > .tree-node > .tree-children { margin-left: 44px; padding-left: 30px; }

@media (max-width: 640px) {
    .tree-card { min-width: 220px; padding: 12px 14px; }
    .tree-children { margin-left: 22px; padding-left: 18px; }
    .tree-card::after { left: -20px; width: 16px; }
    .tree-children .tree-node::before { left: -18px; width: 14px; }
    .tree-avatar img { width: 44px; height: 44px; }
    .tree-name { font-size: 14px; }
}

/* ===== Kepala Desa card (posisi tertinggi) ===== */
.lead-chip {
    display: inline-block;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    border-radius: 20px;
    padding: 3px 12px;
    margin-bottom: 4px;
    align-self: flex-start;
}
.tree-card--lead {
        min-width: 340px;
        max-width: 560px;
        padding: 22px 28px;
        background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
        border-color: var(--color-accent);
        box-shadow: 0 14px 34px rgba(27, 54, 32, 0.28);
    }
    .tree-card--lead .tree-avatar img {
        width: 84px;
        height: 84px;
        border-color: var(--color-accent);
    }
    .tree-card--lead .tree-name { font-size: 21px; color: #fff; }
    html[data-theme="dark"] .tree-card--lead .tree-name { color: #fff; }
    .tree-card--lead .tree-jabatan { font-size: 14px; color: var(--color-accent-soft); margin-top: 4px; }
.org-tree > .tree-node--lead > .tree-card::after {
    border-left: 2px solid var(--color-accent);
    border-bottom: 2px solid var(--color-accent);
    width: 34px;
    bottom: -20px;
    height: 20px;
}
.org-tree > .tree-node--lead > .tree-children {
    margin-left: 58px;
}
.card-lead {
        background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
        border: 2px solid var(--color-accent) !important;
        box-shadow: 0 14px 34px rgba(27, 54, 32, 0.22);
    }
    .card-lead .card-title { color: #fff; }
    .card-lead .card-meta { color: var(--color-accent-soft); }

/* ===== Section lembaga ===== */
.section-title {
    font-family: 'Fraunces', serif;
    font-size: 24px;
    color: var(--color-primary-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 8px 0 4px;
}
.section-chip {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .5px;
    padding: 2px 10px;
    border-radius: 20px;
    background: var(--color-accent-soft);
    color: var(--color-primary-dark);
}

/* ===== BPD Chart (kemitraan) ===== */
.bpd-chart { display: flex; flex-direction: column; align-items: center; margin-top: 6px; }
.bpd-partner { display: flex; flex-direction: column; align-items: center; }
.bpd-partner-label { font-size: 12px; color: var(--color-text-muted); margin-top: 6px; letter-spacing: .3px; }
.bpd-dot { width: 15px; height: 15px; border-radius: 50%; background: #1F6F3F; box-shadow: 0 0 0 3px rgba(31, 111, 63, .25); }
.bpd-vline { width: 2px; height: 24px; background: var(--color-line); }
.bpd-vline.green { background: #1F6F3F; }
.bpd-hline { height: 2px; width: 72%; max-width: 640px; background: var(--color-line); }
.bpd-pimpinan-row {
    display: flex;
    gap: 26px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
}
.bpd-slot { display: flex; flex-direction: column; align-items: center; }
.rtrw-cols { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; width: 100%; margin-top: 4px; }
.rtrw-col { display: flex; flex-direction: column; align-items: center; }
.rtrw-col .bpd-hline { width: 200px; }
.rtrw-col .bpd-pimpinan-row { gap: 14px; }
.bpd-bidang-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 42px;
    width: 100%;
    max-width: 660px;
    margin-top: 8px;
}
.bpd-bidang-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: relative;
}
.bpd-bidang-block + .bpd-bidang-block::before {
    content: '';
    position: absolute;
    top: -21px;
    left: 50%;
    transform: translateX(-50%);
    width: 46%;
    height: 2px;
    background: var(--color-line);
}
.bpd-id {
    display: block;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 20px;
    padding: 1px 12px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1px;
    margin-bottom: 7px;
}
.responsive-only { display: none; }
.bpd-card {
    border-radius: 12px;
    padding: 13px 18px;
    min-width: 180px;
    max-width: 320px;
    text-align: center;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.bpd-name { font-family: 'Fraunces', serif; font-weight: 600; font-size: 15px; line-height: 1.35; }
.bpd-jab { font-size: 12px; opacity: .85; margin-top: 2px; }
.bpd-navy  { background: #1B2A4A; color: #fff; }
.bpd-green { background: #1F6F3F; color: #fff; }
.bpd-gold  { background: #D9A441; color: #1B3620; }
.bpd-lead  { min-width: 220px; padding: 18px 24px; }
.bpd-bidang { background: #1F6F3F; color: #fff; font-weight: 700; font-size: 13.5px; letter-spacing: .2px; max-width: none; width: 100%; line-height: 1.5; }
.bpd-rw { background: #D9A441; color: #1B3620; }
.bpd-rw .bpd-jab { opacity: .8; }
.bpd-gold .bpd-jab { opacity: .8; }
.bpd-member { background: #E7F4EC; color: #1B3620; border: 1px solid #CBE5D2; min-width: 0; width: 100%; max-width: 640px; }
.bpd-avatar img { width: 52px; height: 52px; min-height: 52px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255, 255, 255, .35); margin-bottom: 4px; }
.bpd-members { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 18px; width: 100%; }
.bpd-members::before { content: ''; width: 2px; height: 16px; background: var(--color-line); margin-bottom: 2px; }

html[data-theme="dark"] .bpd-member { background: #1F3326; color: #EAF3EC; border-color: #2E4A38; }
html[data-theme="dark"] .bpd-rw { background: #8A6A1E; color: #FFF6DD; }
html[data-theme="dark"] .bpd-gold { background: #8A6A1E; color: #FFF6DD; }
html[data-theme="dark"] .section-chip { background: #4A3F1E; color: #F7EFD8; }

@media (max-width: 640px) {
    .bpd-card { min-width: 150px; padding: 11px 14px; }
    .bpd-lead { min-width: 190px; }
    .bpd-pimpinan-row { gap: 14px; }
    .bpd-vline { height: 16px; }
    .bpd-bidang-list { gap: 30px; }
    .bpd-bidang-block + .bpd-bidang-block::before { width: 70%; }
}

/* ===== FAQ Accordion ===== */
.faq-item {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid var(--color-line);
    transition: all 0.2s ease;
}
.faq-item:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--color-accent-soft);
}
.faq-question {
    padding: 18px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--color-primary-dark);
    user-select: none;
}
.faq-question:hover { color: var(--color-primary); }
.faq-toggle {
    font-size: 20px;
    color: var(--color-accent);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 12px;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    color: var(--color-text-muted);
    line-height: 1.65;
}
.faq-item.open .faq-answer {
    max-height: 500px;
    padding: 0 20px 20px;
}
.faq-item.open .faq-toggle {
    transform: rotate(45deg);
}

/* ===== Agenda ===== */
.agenda-filter { margin-bottom: 22px; }
.agenda-timeline { display: flex; flex-direction: column; gap: 16px; }
.agenda-item {
    display: flex;
    gap: 18px;
    padding: 20px 22px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.agenda-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.agenda-item.agenda-highlight {
    border-color: #D9A441;
    box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.25);
}
.agenda-date {
    flex: 0 0 100px;
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: #fff;
    border-radius: 10px;
    padding: 14px 8px;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.agenda-date-day {
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    font-family: 'Fraunces', serif;
}
.agenda-date-month {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}
.agenda-date-year {
    font-size: 12px;
    opacity: 0.8;
}
.agenda-body { flex: 1; }
.agenda-body h3 {
    font-family: 'Fraunces', serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary-dark);
    margin-bottom: 6px;
    margin-top: 0;
}
.agenda-meta {
    font-size: 13.5px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

@media (max-width: 640px) {
    .agenda-item { flex-direction: column; }
    .agenda-date { flex: unset; width: fit-content; align-self: flex-start; padding: 10px 14px; flex-direction: row; gap: 8px; align-items: baseline; }
    .agenda-date-day { font-size: 20px; }
}

/* ===== Kalender Agenda ===== */
.cal-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.cal-table th {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.cal-table td {
    border: 1px solid var(--color-line);
    vertical-align: top;
    height: 88px;
    padding: 6px;
    position: relative;
    transition: background 0.15s ease;
}
.cal-empty { background: rgba(0, 0, 0, 0.015); }
.cal-num {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    color: var(--color-text);
}
.cal-day:hover { background: rgba(217, 164, 65, 0.07); }
.cal-today { background: rgba(44, 85, 48, 0.08); }
.cal-today .cal-num { background: var(--color-primary); color: #fff; }
.cal-dots {
    position: absolute;
    bottom: 6px;
    left: 6px;
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}
.cal-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-accent);
    display: inline-block;
}
.cal-dot-active { background: var(--color-primary); box-shadow: 0 0 0 2px rgba(44, 85, 48, 0.25); }
.cal-event-list {
    margin-top: 2px;
    max-height: 40px;
    overflow: hidden;
}
.cal-event-item {
    display: block;
    font-size: 11px;
    line-height: 1.3;
    color: var(--color-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cal-event-item:hover { color: var(--color-primary-dark); }
@media (max-width: 640px) {
    .cal-table td { height: 56px; padding: 4px; }
    .cal-event-list { display: none; }
    .cal-num { width: 20px; height: 20px; line-height: 20px; font-size: 11px; }
}

/* ===== Toggle Mode Gelap ===== */
.theme-toggle {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
    padding: 8px 11px;
    transition: all 0.2s ease;
}
.theme-toggle:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: translateY(-1px);
}

/* ===== Mode Gelap (dark theme) ===== */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] {
    --color-bg: #14110C;
    --color-surface: #1D1912;
    --color-text: #EDE4D3;
    --color-text-muted: #B3A68F;
    --color-line: #3A3327;
    --color-primary: #4C8A54;
    --color-primary-dark: #2C5530;
    --color-accent: #E0AE50;
    --color-accent-soft: #4A3F1E;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
    --shadow-hover: 0 14px 34px rgba(0, 0, 0, 0.6);
    --bg-glow-1: radial-gradient(circle at 25% 12%, rgba(224, 174, 80, 0.08), transparent 44%);
    --bg-glow-2: radial-gradient(circle at 78% 70%, rgba(76, 138, 84, 0.09), transparent 50%);
    --bg-dots: radial-gradient(rgba(237, 228, 211, 0.03) 1px, transparent 1px);
}
html[data-theme="dark"] body {
    color: var(--color-text);
    background-color: var(--color-bg);
}
html[data-theme="dark"] body::before {
    background:
        radial-gradient(1100px 520px at 50% -10%, rgba(224, 174, 80, 0.07), transparent 65%),
        linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.35) 100%);
}
html[data-theme="dark"] body::after {
    opacity: 0.025;
}
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3 {
    color: #F0E6D0;
}
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .faq-question,
html[data-theme="dark"] .agenda-body h3,
html[data-theme="dark"] .tree-name,
html[data-theme="dark"] .login-box h2 {
    color: #F0E6D0;
}
html[data-theme="dark"] .card,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .agenda-item {
    border-color: var(--color-line);
}
html[data-theme="dark"] .card:hover {
    border-color: rgba(224, 174, 80, 0.4);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.55);
}
html[data-theme="dark"] a { color: #9CCB9F; }
html[data-theme="dark"] a:hover { color: #C7E8C9; }
html[data-theme="dark"] .readonly-box,
html[data-theme="dark"] .readonly-box[style] {
    background: #2A2620 !important;
    color: var(--color-text) !important;
}
html[data-theme="dark"] .table-wrap table {
    background: var(--color-surface);
}
html[data-theme="dark"] .page-title { color: #F0E6D0; }
html[data-theme="dark"] .stat-cell .stat-value { color: #F0E6D0; }
html[data-theme="dark"] .cal-event-item { color: #9CCB9F; }
html[data-theme="dark"] .cal-event-item:hover { color: #C7E8C9; }
html[data-theme="dark"] .cal-empty { background: rgba(255, 255, 255, 0.015); }
html[data-theme="dark"] .cal-day:hover { background: rgba(224, 174, 80, 0.08); }
html[data-theme="dark"] .cal-today { background: rgba(76, 138, 84, 0.12); }
html[data-theme="dark"] .chatbot-chip { color: #F0E6D0; }
html[data-theme="dark"] select option { background: var(--color-surface); color: var(--color-text); }
html[data-theme="dark"] .alert-success { background: #1E2E22; color: #A6D6A6; border-color: #3E6B45; }
html[data-theme="dark"] .alert-error { background: #331F1A; color: #F0B7A6; border-color: #7A3A28; }
html[data-theme="dark"] .status-diajukan { background: #3A352B; color: #D6C9B2; }
html[data-theme="dark"] .status-diproses { background: #4A3F1E; color: #E0AE50; }
html[data-theme="dark"] .status-selesai { background: #1F3A28; color: #8FBF8F; }
html[data-theme="dark"] .status-ditolak { background: #3A241D; color: #E08A6E; }

/* ===== Tombol WhatsApp Melayang ===== */
.wa-float {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 58px;
    height: 58px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
    z-index: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wa-float:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.55);
    background: #1ebc59;
}
@media (max-width: 640px) {
    .wa-float { right: 14px; bottom: 14px; width: 52px; height: 52px; }
}

/* ===== Tombol kembali ke atas ===== */
.to-top {
    position: fixed;
    left: 22px;
    bottom: 22px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(180, 130, 30, 0.4);
    z-index: 500;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
}
.to-top--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.to-top:hover { background: #e3b25a; }
@media (max-width: 640px) {
    .to-top { left: 14px; bottom: 78px; width: 42px; height: 42px; }
}

/* ===== Kontak & struktur footer ===== */
.site-footer .container {
    max-width: none;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 30px 40px;
    text-align: left;
    margin-bottom: 24px;
}
.footer-brand-name {
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 6px;
}
.footer-tagline {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    line-height: 1.6;
    max-width: 330px;
}
.footer-col h4 {
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 12px;
}
.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 13px;
}
.footer-list a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
}
.footer-list a:hover { color: var(--color-accent); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.14);
    padding-top: 14px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 10px;
    font-size: 12px;
    color: rgba(255,255,255,0.65);
    text-align: center;
}
.footer-bottom a { color: var(--color-accent-soft); }
@media (max-width: 640px) {
    .footer-grid { gap: 24px 0; }
    .footer-bottom { text-align: center; justify-content: center; }
}

/* ===== Lightbox Galeri ===== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.86);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.lightbox-overlay[hidden] { display: none; }
.lightbox-overlay img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
.lightbox-caption {
    position: absolute;
    bottom: 18px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 14px;
    padding: 0 16px;
}
.lightbox-btn {
    position: absolute;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.lightbox-btn:hover { background: var(--color-accent); border-color: var(--color-accent); }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
}

/* ===== Komentar Berita ===== */
.komentar-item {
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 12px;
    background: var(--color-surface);
}
.komentar-nama {
    font-weight: 600;
    color: var(--color-primary-dark);
    font-size: 14px;
}
.komentar-waktu {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--color-text-muted);
}
.komentar-isi {
    margin-top: 6px;
    font-size: 14px;
    color: var(--color-text);
    line-height: 1.6;
    white-space: pre-wrap;
}
html[data-theme="dark"] .komentar-nama { color: #F0E6D0; }
.komentar-status { font-family: 'JetBrains Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; }
.komentar-status.menunggu { color: #8A5E10; }
.komentar-status.disetujui { color: #1F6F3F; }
.komentar-status.ditolak { color: #B3492F; }
html[data-theme="dark"] .komentar-status.menunggu { color: #D9A441; }
html[data-theme="dark"] .komentar-status.disetujui { color: #8FBF8F; }
html[data-theme="dark"] .komentar-status.ditolak { color: #E08A6E; }

/* ===== Chatbot Asisten Desa ===== */
.chatbot-toggle {
    position: fixed;
    left: 22px;
    bottom: 22px;
    width: 58px;
    height: 58px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(44, 85, 48, 0.45);
    z-index: 510;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.chatbot-toggle:hover {
    transform: scale(1.08);
    background: var(--color-primary-dark);
    box-shadow: 0 10px 28px rgba(44, 85, 48, 0.55);
}
.chatbot-panel {
    position: fixed;
    left: 22px;
    bottom: 92px;
    width: 370px;
    max-width: calc(100vw - 44px);
    height: min(520px, calc(100vh - 120px));
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(42, 36, 32, 0.28);
    z-index: 520;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: chatbot-pop 0.18s ease;
}
.chatbot-panel[hidden] { display: none; }
@keyframes chatbot-pop {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.chatbot-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--color-primary);
    color: #fff;
}
.chatbot-avatar {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.chatbot-header-info { flex: 1; min-width: 0; }
.chatbot-title { font-weight: 700; font-size: 15px; }
.chatbot-status { font-size: 12px; opacity: 0.85; }
.chatbot-close {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chatbot-close:hover { background: rgba(255, 255, 255, 0.18); }
.chatbot-msgs {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--color-surface);
}
.chatbot-msg { display: flex; flex-direction: column; }
.chatbot-msg.bot { align-items: flex-start; }
.chatbot-msg.user { align-items: flex-end; }
.chatbot-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.65;
    word-break: break-word;
}
.chatbot-msg.bot .chatbot-bubble {
    background: #EDE6D2;
    color: var(--color-text);
    border-bottom-left-radius: 4px;
}
.chatbot-msg.user .chatbot-bubble {
    background: var(--color-primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chatbot-msg.bot .chatbot-bubble strong { color: var(--color-primary-dark); }
.chatbot-link {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 16px;
    background: var(--color-accent);
    color: #2A2420;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.chatbot-link:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(217, 164, 65, 0.4); }
.chatbot-msg .typing { display: flex; gap: 4px; padding: 12px 16px; }
.chatbot-msg .typing span {
    width: 7px;
    height: 7px;
    background: var(--color-text-muted);
    border-radius: 50%;
    animation: typing-blink 1.2s infinite;
}
.chatbot-msg .typing span:nth-child(2) { animation-delay: 0.2s; }
.chatbot-msg .typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-blink {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-3px); }
}
.chatbot-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 10px;
}
.chatbot-chip {
    background: var(--color-accent-soft);
    color: var(--color-primary-dark);
    border: 1px solid var(--color-line);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}
.chatbot-chip:hover { background: var(--color-accent); transform: translateY(-1px); }
.chatbot-form {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--color-line);
    background: var(--color-surface);
}
.chatbot-input {
    flex: 1;
    border: 1px solid var(--color-line);
    background: var(--color-surface);
    color: var(--color-text);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
}
.chatbot-input:focus { outline: none; border-color: var(--color-primary); }
.chatbot-send {
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    width: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}
.chatbot-send:hover { background: var(--color-primary-dark); }
.chatbot-send:disabled { opacity: 0.6; cursor: wait; }
html[data-theme="dark"] .chatbot-panel { background: var(--color-surface); }
html[data-theme="dark"] .chatbot-msgs { background: var(--color-surface); }
html[data-theme="dark"] .chatbot-msg.bot .chatbot-bubble { background: #33302A; color: #EDE6D2; }
html[data-theme="dark"] .chatbot-msg.bot .chatbot-bubble strong { color: #D9A441; }
html[data-theme="dark"] .chatbot-form { background: var(--color-surface); }
@media (max-width: 640px) {
    .chatbot-toggle { left: 14px; bottom: 14px; width: 52px; height: 52px; }
    .chatbot-panel {
        left: 8px;
        right: 8px;
        bottom: 74px;
        width: auto;
        height: calc(100vh - 96px);
        max-height: none;
    }
}


