/**
 * Data Anggota - Full-Screen Mobile-First Stylesheet (Tanpa CSS Bawaan Theme)
 * Version: 1.0.1
 * Author: WisanDev
 */

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

:root {
    --wisan-bg: #0f172a;
    --wisan-surface: #1e293b;
    --wisan-card: #ffffff;
    --wisan-body-bg: #f1f5f9;
    --wisan-text: #0f172a;
    --wisan-muted: #64748b;
    --wisan-border: #cbd5e1;
    --wisan-primary: #0284c7;
    --wisan-primary-hover: #0369a1;
    --wisan-green: #16a34a;
    --wisan-blue: #2563eb;
    --wisan-danger: #dc2626;
    --wisan-warning: #d97706;
    --wisan-radius: 12px;
    --wisan-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

html, body {
    width: 100%;
    min-height: 100vh;
    background-color: var(--wisan-body-bg);
    color: var(--wisan-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Header & Topbar Fullscreen */
.wisan-topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--wisan-bg);
    color: #ffffff;
    padding: 12px 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.wisan-topbar-inner {
    max-width: 1360px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.wisan-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wisan-logo-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #10b981, #0284c7);
    color: #ffffff;
    font-weight: 800;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
    flex-shrink: 0;
}

.wisan-brand-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.wisan-brand-sub {
    font-size: 11.5px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wisan-ver-pill {
    background: rgba(255, 255, 255, 0.12);
    color: #38bdf8;
    padding: 1px 6px;
    border-radius: 99px;
    font-size: 10.5px;
    font-weight: 600;
}

.wisan-user-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.wisan-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 700;
    background: #334155;
    color: #f8fafc;
}

.wisan-status-pill.status-super-admin {
    background: #7c3aed;
    color: #ffffff;
}
.wisan-status-pill.status-admin {
    background: #d97706;
    color: #ffffff;
}
.wisan-status-pill.status-koordinator {
    background: #2563eb;
    color: #ffffff;
}
.wisan-status-pill.status-sponsor {
    background: #16a34a;
    color: #ffffff;
}

.wisan-site-switcher {
    background: #1e293b;
    color: #f8fafc;
    border: 1px solid #475569;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
}

.wisan-btn-logout {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
    padding: 5px 11px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}
.wisan-btn-logout:hover {
    background: #dc2626;
    color: #ffffff;
}

/* Navigasi Tab Responsif */
.wisan-nav-tabs {
    background: #ffffff;
    border-bottom: 1px solid var(--wisan-border);
    position: sticky;
    top: 62px;
    z-index: 990;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.wisan-nav-inner {
    max-width: 1360px;
    margin: 0 auto;
    display: flex;
    gap: 6px;
    padding: 8px 14px;
}

.wisan-tab-btn {
    appearance: none;
    border: 1px solid transparent;
    background: #f1f5f9;
    color: #334155;
    font-size: 13.5px;
    font-weight: 600;
    padding: 9px 15px;
    border-radius: 9px;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.15s ease;
}

.wisan-tab-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.wisan-tab-btn.active {
    background: var(--wisan-primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

/* Main Container */
.wisan-main {
    max-width: 1360px;
    margin: 0 auto;
    padding: 18px 14px 60px;
}

.wisan-panel {
    display: none;
}
.wisan-panel.active {
    display: block;
}

/* Cards */
.wisan-card {
    background: var(--wisan-card);
    border-radius: var(--wisan-radius);
    box-shadow: var(--wisan-shadow);
    border: 1px solid #e2e8f0;
    padding: 20px;
    margin-bottom: 20px;
}

.wisan-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.wisan-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
}

.wisan-card-subtitle {
    font-size: 13px;
    color: var(--wisan-muted);
    margin-top: 2px;
}

/* Kotak Buat Link Formulir & Copy Link (Poin 3 & 4) */
.wisan-share-box {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
    display: none;
}

.wisan-share-box.active {
    display: block;
}

.wisan-share-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.wisan-share-input {
    flex: 1;
    min-width: 220px;
    padding: 9px 12px;
    font-size: 13.5px;
    color: #0f172a;
    background: #ffffff;
    border: 1.5px solid #7dd3fc;
    border-radius: 8px;
    outline: none;
    font-weight: 400;
}

/* KPI Stat Cards untuk Dashboard Koordinator & Sponsor */
.wisan-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.wisan-stat-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
}

.wisan-stat-label {
    font-size: 12.5px;
    color: #64748b;
    font-weight: 600;
}

.wisan-stat-value {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin-top: 4px;
}

/* Form Layout & Controls */
.wisan-form-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px;
}

.col-12 { grid-column: span 12; }
.col-6  { grid-column: span 6; }
.col-5  { grid-column: span 5; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }
.col-2  { grid-column: span 2; }

@media (max-width: 768px) {
    .col-6, .col-5, .col-4, .col-3, .col-2 {
        grid-column: span 12;
    }
    .col-mobile-6 {
        grid-column: span 6 !important;
    }
}

.wisan-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wisan-field label {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

.wisan-req {
    color: var(--wisan-danger);
    font-weight: 700;
}

.wisan-input, .wisan-select, .wisan-textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14.5px;
    color: #0f172a;
    background: #ffffff;
    border: 1.5px solid var(--wisan-border);
    border-radius: 9px;
    outline: none;
    font-weight: 400;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wisan-input:focus, .wisan-select:focus, .wisan-textarea:focus {
    border-color: var(--wisan-primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Poin 1e: Gunakan font biasa (bukan strong atau tebal) untuk hasil otomatis usia dan jenis kelamin */
.wisan-input[readonly],
.wisan-input-plain-readonly {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 400 !important;
    font-style: normal;
    cursor: default;
}

.wisan-help {
    font-size: 11.5px;
    color: var(--wisan-muted);
}

.wisan-nik-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 400;
    margin-top: 4px;
}
.wisan-nik-badge.invalid {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Kamera Selfie 3:4 dengan Panduan Frame */
.wisan-camera-box {
    border: 2px dashed #94a3b8;
    border-radius: 12px;
    padding: 16px;
    background: #f8fafc;
    text-align: center;
}

.wisan-selfie-stage {
    position: relative;
    width: 100%;
    max-width: 300px;
    aspect-ratio: 3 / 4;
    margin: 10px auto;
    background: #000000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
    display: none;
}

.wisan-selfie-stage.active {
    display: block;
}

.wisan-selfie-stage video,
.wisan-selfie-stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Panduan Frame (Frame Guide Overlay) agar posisi orang tepat di dalam frame 3:4 */
.wisan-frame-guide {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.wisan-frame-guide svg {
    width: 86%;
    height: 86%;
}

.wisan-frame-guide-caption {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.78);
    color: #38bdf8;
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 8px;
    border-radius: 6px;
    text-align: center;
}

/* Buttons */
.wisan-btn {
    appearance: none;
    border: none;
    border-radius: 9px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.wisan-btn-primary {
    background: var(--wisan-primary);
    color: #ffffff;
}
.wisan-btn-primary:hover {
    background: var(--wisan-primary-hover);
}

.wisan-btn-success {
    background: var(--wisan-green);
    color: #ffffff;
}
.wisan-btn-success:hover {
    background: #15803d;
}

.wisan-btn-warning {
    background: var(--wisan-warning);
    color: #ffffff;
}

.wisan-btn-danger {
    background: var(--wisan-danger);
    color: #ffffff;
}

.wisan-btn-outline {
    background: #ffffff;
    color: #1e293b;
    border: 1.5px solid var(--wisan-border);
}
.wisan-btn-outline:hover {
    background: #f1f5f9;
}

.wisan-btn-sm {
    padding: 6px 11px;
    font-size: 12.5px;
    border-radius: 7px;
}

.wisan-btn-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

/* Tabel Database & Kontrol Kolom / Grouping */
.wisan-table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.wisan-col-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    background: #f1f5f9;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 12.5px;
}

.wisan-col-toggles label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ffffff;
    padding: 4px 9px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    user-select: none;
}

.wisan-col-toggles label.locked {
    background: #e2e8f0;
    color: #475569;
    cursor: not-allowed;
}

.wisan-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.wisan-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    background: #ffffff;
}

.wisan-table th,
.wisan-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: middle;
}

.wisan-table th {
    background: #0f172a;
    color: #ffffff;
    font-weight: 600;
    white-space: nowrap;
}

.wisan-table th.sortable {
    cursor: pointer;
    user-select: none;
}
.wisan-table th.sortable:hover {
    background: #1e293b;
}

.wisan-sort-indicator {
    display: inline-block;
    margin-left: 4px;
    font-size: 11px;
    color: #38bdf8;
}

.wisan-table tbody tr:hover {
    background: #f8fafc;
}

.wisan-group-header-row td {
    background: #e0f2fe !important;
    color: #0369a1;
    font-weight: 700;
    font-size: 13.5px;
    padding: 9px 14px;
}

.wisan-member-sponsor {
    font-weight: 700 !important;
    color: #16a34a !important;
}

.wisan-member-koordinator {
    font-weight: 700 !important;
    color: #2563eb !important;
}

.wisan-role-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 10.5px;
    border-radius: 4px;
    font-weight: 700;
    vertical-align: middle;
}
.wisan-role-tag.tag-sponsor {
    background: #dcfce7;
    color: #15803d;
}
.wisan-role-tag.tag-koordinator {
    background: #dbeafe;
    color: #1d4ed8;
}

.wisan-link-foto {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e0f2fe;
    color: #0284c7;
    font-weight: 600;
    font-size: 12px;
    padding: 4px 9px;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid #bae6fd;
}
.wisan-link-foto:hover {
    background: #0284c7;
    color: #ffffff;
}

/* Peta Sebaran & Diagram Batang */
.wisan-map-box {
    width: 100%;
    height: 440px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    overflow: hidden;
    background: #e2e8f0;
    position: relative;
}

.wisan-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.wisan-bar-row {
    display: grid;
    grid-template-columns: 210px 1fr 70px;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

@media (max-width: 600px) {
    .wisan-bar-row {
        grid-template-columns: 130px 1fr 55px;
        font-size: 12px;
    }
}

.wisan-bar-label {
    font-weight: 600;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wisan-bar-track {
    width: 100%;
    height: 22px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
}

.wisan-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0284c7, #10b981);
    border-radius: 99px;
    transition: width 0.35s ease;
    min-width: 6px;
}

.wisan-bar-val {
    font-weight: 700;
    text-align: right;
    color: #0f172a;
}

/* Modal Pop-up Foto Selfie */
.wisan-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.wisan-modal-backdrop.active {
    display: flex;
}

.wisan-modal-content {
    background: #ffffff;
    border-radius: 14px;
    max-width: 420px;
    width: 100%;
    padding: 18px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    text-align: center;
}

.wisan-modal-img-wrap {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 3 / 4;
    margin: 12px auto;
    border-radius: 10px;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid #cbd5e1;
}

.wisan-modal-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Notifikasi / Alert */
.wisan-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    font-size: 13.5px;
    font-weight: 600;
    display: none;
    max-width: 360px;
}
.wisan-toast.show {
    display: block;
}
.wisan-toast.success { border-left: 5px solid #10b981; }
.wisan-toast.error   { border-left: 5px solid #ef4444; }

/* Login Card Fullscreen */
.wisan-login-wrapper {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wisan-login-card {
    background: #ffffff;
    max-width: 420px;
    width: 100%;
    padding: 28px 24px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
    border: 1px solid #e2e8f0;
}


/* =========================================================================
 * LANDING PAGE PUBLIK "DATA PENDUKUNG" (v1.3.0)
 * ========================================================================= */
.wisan-lp-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 16px 64px;
}

.wisan-lp-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-radius: 18px;
    padding: 42px 28px;
    text-align: center;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    margin-bottom: 28px;
}

.wisan-lp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 5px 14px;
    border-radius: 99px;
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 14px;
}

.wisan-lp-title {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 12px;
    color: #ffffff;
}

.wisan-lp-desc {
    max-width: 720px;
    margin: 0 auto 22px;
    font-size: 15.5px;
    color: #cbd5e1;
    line-height: 1.65;
}

.wisan-lp-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.wisan-lp-section-title {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.wisan-lp-section-sub {
    text-align: center;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 22px;
}

.wisan-lp-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 34px;
}

@media (max-width: 900px) {
    .wisan-lp-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .wisan-lp-features-grid {
        grid-template-columns: 1fr;
    }
    .wisan-lp-title {
        font-size: 26px;
    }
}

.wisan-lp-feature-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.wisan-lp-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #e0f2fe;
    color: #0284c7;
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.wisan-lp-feature-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.wisan-lp-feature-card p {
    font-size: 13.5px;
    color: #475569;
    line-height: 1.55;
}

/* Auth Card (Login / Daftar Baru di bagian bawah Landing Page) */
.wisan-lp-auth-wrap {
    max-width: 580px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.09);
    overflow: hidden;
}

.wisan-lp-auth-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.wisan-lp-auth-tab {
    appearance: none;
    border: none;
    background: transparent;
    padding: 14px 16px;
    font-size: 14.5px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.wisan-lp-auth-tab.active {
    background: #ffffff;
    color: #0284c7;
    box-shadow: inset 0 -3px 0 #0284c7;
}

.wisan-lp-auth-body {
    padding: 24px 22px;
}

.wisan-demo-info-banner {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}


/* =========================================================================
 * LABEL PINPOINT PETA DI BAWAH MARKER & DIAGRAM BATANG VERTIKAL (v1.4.0)
 * ========================================================================= */
.wisan-pin-tooltip {
    background: rgba(15, 23, 42, 0.92) !important;
    color: #ffffff !important;
    border: 1px solid #38bdf8 !important;
    border-radius: 6px !important;
    padding: 2px 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25) !important;
    white-space: nowrap !important;
}

.wisan-pin-tooltip.leaflet-tooltip-bottom::before {
    border-bottom-color: rgba(15, 23, 42, 0.92) !important;
}

/* Container Diagram Batang Vertikal */
.wisan-vchart-wrap {
    width: 100%;
    overflow-x: auto;
    padding: 16px 10px 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.wisan-vchart {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    min-height: 270px;
    padding: 24px 14px 10px;
    min-width: max-content;
}

.wisan-vbar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 78px;
    flex-shrink: 0;
}

.wisan-vbar-count {
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.wisan-vbar-track {
    width: 42px;
    height: 185px;
    background: #e2e8f0;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-bottom: 2px solid #94a3b8;
}

.wisan-vbar-fill {
    width: 100%;
    background: linear-gradient(180deg, #0284c7 0%, #10b981 100%);
    border-radius: 8px 8px 0 0;
    transition: height 0.35s ease;
    min-height: 6px;
}

.wisan-vbar-fill.kecamatan-bar {
    background: linear-gradient(180deg, #2563eb 0%, #0284c7 100%);
}

.wisan-vbar-label {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
    line-height: 1.25;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}


/* =========================================================================
 * PERBAIKAN PINPOINT PETA, POP-UP KOORDINATOR/RW, & DIAGRAM BATANG (v1.5.0)
 * ========================================================================= */
.wisan-custom-pin-icon {
    background: transparent !important;
    border: none !important;
}

.wisan-pin-wrapper {
    position: relative;
    width: 28px;
    height: 38px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.wisan-pin-svg {
    width: 28px;
    height: 38px;
    display: block;
    filter: drop-shadow(0 3px 6px rgba(15, 23, 42, 0.38));
    transition: transform 0.15s ease;
}

.wisan-pin-wrapper:hover .wisan-pin-svg {
    transform: translateY(-2px) scale(1.06);
}

/* Tampilan nama Kelurahan/Desa tepat di bawah tanda pinpoint (Poin 1) */
.wisan-pin-underlabel {
    position: absolute;
    top: 39px;
    left: 50%;
    transform: translateX(-50%);
    background: #374151 !important;
    color: #ffffff !important;
    border: 1px solid #4b5563 !important;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    line-height: 1.35;
    z-index: 20;
    transition: background 0.15s ease, transform 0.15s ease;
}

.wisan-pin-underlabel:hover {
    background: #1f2937 !important;
    transform: translateX(-50%) scale(1.04);
}

/* Perbaikan Estetika Label Wilayah pada Diagram Batang Vertikal (Poin 2 & 6) */
.wisan-vchart {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    min-height: 285px;
    padding: 26px 14px 12px;
    min-width: max-content;
}

.wisan-vbar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 92px;
    flex-shrink: 0;
}

.wisan-vbar-col.clickable-region {
    cursor: pointer;
}

.wisan-vbar-col.clickable-region:hover .wisan-vbar-label {
    color: #0284c7;
    text-decoration: underline;
}

.wisan-vbar-count {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
    text-align: center;
    line-height: 1.25;
    white-space: nowrap;
}

.wisan-vbar-pct {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #0284c7;
}

.wisan-vbar-fill.gender-bar {
    background: linear-gradient(180deg, #8b5cf6 0%, #6366f1 100%);
}

.wisan-vbar-fill.age-bar {
    background: linear-gradient(180deg, #f59e0b 0%, #ea580c 100%);
}

.wisan-vbar-label {
    margin-top: 8px;
    font-size: 11.5px;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
    line-height: 1.3;
    width: 88px;
    min-height: 30px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
}

/* Styling Pop-up Info Wilayah (Nama Koordinator & Jumlah Anggota tiap RW - Poin 4) */
.wisan-region-popup-box {
    text-align: left;
    font-size: 13px;
    color: #0f172a;
    min-width: 220px;
}

.wisan-region-popup-title {
    font-size: 14.5px;
    font-weight: 800;
    color: #0f172a;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 6px;
    margin-bottom: 8px;
}

.wisan-region-popup-koord {
    margin-bottom: 8px;
    padding: 6px 9px;
    background: #eff6ff;
    border-left: 3px solid #2563eb;
    border-radius: 4px;
    font-size: 12.5px;
}

.wisan-region-popup-rw-list {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.wisan-region-popup-rw-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 10px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 12.5px;
}

.wisan-region-popup-rw-list li:last-child {
    border-bottom: none;
}


/* =========================================================================
 * KOLOM AKSI (EDIT / HAPUS), FONT NORMAL NIK, & TAMPILAN FULLSCREEN
 * PETA DAN DIAGRAM BATANG DENGAN JUDUL MASING-MASING (v1.6.0)
 * ========================================================================= */
.wisan-nik-normal {
    font-weight: 400 !important;
    font-style: normal;
    color: #0f172a;
}

.wisan-aksi-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.wisan-btn-edit-row {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.wisan-btn-edit-row:hover {
    background: #0284c7;
    color: #ffffff;
}

.wisan-btn-del-row {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.wisan-btn-del-row:hover {
    background: #dc2626;
    color: #ffffff;
}

/* Tombol View Fullscreen pada Peta & Semua Diagram (Poin 3) */
.wisan-btn-fullscreen {
    appearance: none;
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}
.wisan-btn-fullscreen:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

/* Mode Fullscreen untuk Card Peta atau Diagram Batang (Menampilkan Judul Masing-Masing) */
.wisan-fs-target.is-fullscreen,
.wisan-fs-target:fullscreen,
.wisan-fs-target:-webkit-full-screen {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    z-index: 9500 !important;
    background: #ffffff !important;
    padding: 20px 24px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
}

.wisan-fs-target.is-fullscreen .wisan-card-header,
.wisan-fs-target:fullscreen .wisan-card-header,
.wisan-fs-target:-webkit-full-screen .wisan-card-header {
    flex-shrink: 0;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.wisan-fs-target.is-fullscreen .wisan-card-title,
.wisan-fs-target:fullscreen .wisan-card-title,
.wisan-fs-target:-webkit-full-screen .wisan-card-title {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

.wisan-fs-target.is-fullscreen .wisan-map-box,
.wisan-fs-target:fullscreen .wisan-map-box,
.wisan-fs-target:-webkit-full-screen .wisan-map-box {
    flex: 1 !important;
    height: calc(100vh - 110px) !important;
    min-height: 420px !important;
}

.wisan-fs-target.is-fullscreen .wisan-vchart-wrap,
.wisan-fs-target:fullscreen .wisan-vchart-wrap,
.wisan-fs-target:-webkit-full-screen .wisan-vchart-wrap {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: calc(100vh - 130px) !important;
}

.wisan-fs-target.is-fullscreen .wisan-vchart,
.wisan-fs-target:fullscreen .wisan-vchart,
.wisan-fs-target:-webkit-full-screen .wisan-vchart {
    min-height: 420px !important;
    gap: 24px !important;
}

.wisan-fs-target.is-fullscreen .wisan-vbar-track,
.wisan-fs-target:fullscreen .wisan-vbar-track,
.wisan-fs-target:-webkit-full-screen .wisan-vbar-track {
    height: 320px !important;
    width: 54px !important;
}

/* Modal Edit Data Anggota */
.wisan-edit-modal-content {
    background: #ffffff;
    border-radius: 14px;
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 22px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    text-align: left;
}


/* =========================================================================
 * WARNA DIAGRAM BATANG KABUPATEN/KOTA & RW (v2.4.0)
 * ========================================================================= */
.wisan-vbar-fill.kabupaten-bar {
    background: linear-gradient(180deg, #0d9488 0%, #0284c7 100%);
}

.wisan-vbar-fill.rw-bar {
    background: linear-gradient(180deg, #16a34a 0%, #059669 100%);
}


/* =========================================================================
 * MODAL POP-UP PREVIEW SIMPAN PDF UKURAN A4 LANDSCAPE (v2.7.0)
 * ========================================================================= */
.wisan-pdf-modal-dialog {
    background: #1e293b;
    border-radius: 14px;
    max-width: 1180px;
    width: 96%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    border: 1px solid #475569;
}

.wisan-pdf-modal-header {
    background: #0f172a;
    color: #ffffff;
    padding: 14px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #334155;
}

.wisan-pdf-modal-viewport {
    flex: 1;
    overflow: auto;
    padding: 24px 16px;
    background: #334155;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Simulasi Lembar Kertas A4 Landscape (297mm x 210mm, rasio 1.414 : 1) */
.wisan-a4-landscape-sheet {
    background: #ffffff;
    color: #0f172a;
    width: 1080px;
    min-height: 763px;
    padding: 28px 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    border-radius: 2px;
    flex-shrink: 0;
}

.wisan-pdf-doc-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 10px;
    margin-bottom: 14px;
}

.wisan-pdf-doc-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
}

.wisan-pdf-doc-meta {
    font-size: 11.5px;
    color: #475569;
    text-align: right;
}

.wisan-pdf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    color: #0f172a;
}

.wisan-pdf-table th,
.wisan-pdf-table td {
    border: 1px solid #94a3b8;
    padding: 5px 7px;
    text-align: left;
    vertical-align: middle;
}

.wisan-pdf-table th {
    background: #0f172a;
    color: #ffffff;
    font-weight: 700;
    white-space: nowrap;
}

.wisan-pdf-table tr:nth-child(even) td {
    background: #f8fafc;
}

.wisan-pdf-group-row td {
    background: #e0f2fe !important;
    color: #0369a1;
    font-weight: 700;
}


/* =========================================================================
 * DASHBOARD SUPER ADMIN: MATRIKS FITUR & MODAL IMPORT DATA (v2.8.0)
 * ========================================================================= */
.wisan-access-yes {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 700;
    background: #dcfce7;
    color: #15803d;
}

.wisan-access-partial {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 700;
    background: #fef3c7;
    color: #b45309;
}

.wisan-access-no {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 600;
    background: #f1f5f9;
    color: #94a3b8;
}


/* =========================================================================
 * WARNA LATAR LABEL PINPOINT PETA SESUAI TINGKAT ZOOM (v2.9.0 - Poin 3b)
 * - Kecamatan: Latar warna Maroon
 * - Kabupaten/Kota: Latar warna Ungu
 * ========================================================================= */
.wisan-pin-underlabel.pin-level-kecamatan,
.wisan-pin-underlabel.pin-level-kabupaten {
    background: #374151 !important;
    color: #ffffff !important;
    border: 1px solid #4b5563 !important;
}

.wisan-pin-underlabel.pin-level-kecamatan:hover,
.wisan-pin-underlabel.pin-level-kabupaten:hover {
    background: #1f2937 !important;
}


/* =========================================================================
 * FITUR BROADCAST, RIWAYAT BROADCAST, & POP-UP PENERIMA (v3.0.0)
 * ========================================================================= */
.wisan-bc-char-counter {
    font-size: 12px;
    color: #64748b;
    text-align: right;
    margin-top: 3px;
}

.wisan-bc-char-counter.near-limit {
    color: #d97706;
    font-weight: 600;
}

.wisan-bc-options-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
}

.wisan-bc-check-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    user-select: none;
}

.wisan-bc-status-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

.wisan-bc-status-badge.sent {
    background: #dcfce7;
    color: #15803d;
}

.wisan-bc-status-badge.scheduled {
    background: #fef3c7;
    color: #b45309;
}

.wisan-bc-popup-card {
    background: #ffffff;
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.35);
    text-align: left;
}

.wisan-bc-popup-header {
    background: linear-gradient(135deg, #0284c7, #10b981);
    color: #ffffff;
    padding: 16px 20px;
}

.wisan-bc-popup-body {
    padding: 20px;
    font-size: 14.5px;
    color: #0f172a;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.wisan-bc-popup-footer {
    padding: 12px 20px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid #e2e8f0;
}


/* =========================================================================
 * TEMPLATE WARNA THEME SITE (7 PILIHAN) & MODE LIGHT / DARK (v3.1.0)
 * ========================================================================= */
:root,
html[data-wisan-theme="blue"] {
    --wisan-bg: #0c4a6e;
    --wisan-primary: #0284c7;
    --wisan-primary-hover: #0369a1;
    --wisan-accent: #38bdf8;
    --wisan-soft: #f0f9ff;
    --wisan-table-head: #0c4a6e;
}

html[data-wisan-theme="red"] {
    --wisan-bg: #5c0f0f;
    --wisan-primary: #991b1b;
    --wisan-primary-hover: #7f1d1d;
    --wisan-accent: #f87171;
    --wisan-soft: #fef2f2;
    --wisan-table-head: #5c0f0f;
}

html[data-wisan-theme="navy"] {
    --wisan-bg: #0f172a;
    --wisan-primary: #1e3a8a;
    --wisan-primary-hover: #1e40af;
    --wisan-accent: #60a5fa;
    --wisan-soft: #eff6ff;
    --wisan-table-head: #0f172a;
}

html[data-wisan-theme="green"] {
    --wisan-bg: #14532d;
    --wisan-primary: #16a34a;
    --wisan-primary-hover: #15803d;
    --wisan-accent: #6ee7b7;
    --wisan-soft: #f0fdf4;
    --wisan-table-head: #14532d;
}

html[data-wisan-theme="yellow"] {
    --wisan-bg: #a16207;
    --wisan-primary: #facc15;
    --wisan-primary-hover: #eab308;
    --wisan-accent: #fef08a;
    --wisan-soft: #fefce8;
    --wisan-table-head: #a16207;
}

html[data-wisan-theme="yellow"] .wisan-tab-btn.active,
html[data-wisan-theme="yellow"] .wisan-btn-primary,
html[data-wisan-theme="yellow"] .wisan-mode-btn.active {
    color: #0f172a !important;
}

html[data-wisan-theme="gray"] {
    --wisan-bg: #1f2937;
    --wisan-primary: #4b5563;
    --wisan-primary-hover: #374151;
    --wisan-accent: #d1d5db;
    --wisan-soft: #f9fafb;
    --wisan-table-head: #1f2937;
}

html[data-wisan-theme="purple"] {
    --wisan-bg: #4c1d95;
    --wisan-primary: #7c3aed;
    --wisan-primary-hover: #6d28d9;
    --wisan-accent: #c4b5fd;
    --wisan-soft: #f5f3ff;
    --wisan-table-head: #4c1d95;
}

/* Terapkan variabel warna theme ke komponen utama */
.wisan-topbar {
    background: var(--wisan-bg);
}

.wisan-table th {
    background: var(--wisan-table-head);
}

.wisan-tab-btn.active {
    background: var(--wisan-primary);
}

.wisan-btn-primary {
    background: var(--wisan-primary);
}
.wisan-btn-primary:hover {
    background: var(--wisan-primary-hover);
}

.wisan-bc-popup-header {
    background: linear-gradient(135deg, var(--wisan-bg), var(--wisan-primary));
}

.wisan-share-box {
    background: var(--wisan-soft);
    border-color: var(--wisan-accent);
}

/* Kotak Pilihan Warna Theme (Color Swatches) */
.wisan-theme-swatch-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 6px;
}

.wisan-color-swatch-btn {
    appearance: none;
    border: 2px solid transparent;
    background: #f8fafc;
    border-radius: 10px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    transition: all 0.15s ease;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.wisan-color-swatch-btn:hover {
    transform: translateY(-1px);
    border-color: #94a3b8;
}

.wisan-color-swatch-btn.active {
    border-color: #0f172a;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25);
}

.wisan-swatch-box {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.18);
    flex-shrink: 0;
}

.wisan-mode-toggle-group {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.wisan-mode-btn {
    appearance: none;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    color: #1e293b;
    padding: 8px 16px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.wisan-mode-btn.active {
    background: var(--wisan-primary);
    color: #ffffff;
    border-color: var(--wisan-primary);
}

/* =========================================================================
 * DARK MODE STYLING (data-wisan-mode="dark")
 * ========================================================================= */
html[data-wisan-mode="dark"],
html[data-wisan-mode="dark"] body {
    background-color: #0b1120 !important;
    color: #f1f5f9 !important;
}

html[data-wisan-mode="dark"] .wisan-nav-tabs {
    background: #111827 !important;
    border-bottom-color: #334155 !important;
}

html[data-wisan-mode="dark"] .wisan-tab-btn {
    background: #1e293b;
    color: #cbd5e1;
}

html[data-wisan-mode="dark"] .wisan-tab-btn:hover {
    background: #334155;
    color: #ffffff;
}

html[data-wisan-mode="dark"] .wisan-tab-btn.active {
    background: var(--wisan-primary) !important;
    color: #ffffff !important;
}

html[data-wisan-mode="dark"] .wisan-card,
html[data-wisan-mode="dark"] .wisan-login-card,
html[data-wisan-mode="dark"] .wisan-lp-feature-card,
html[data-wisan-mode="dark"] .wisan-lp-auth-wrap,
html[data-wisan-mode="dark"] .wisan-modal-content,
html[data-wisan-mode="dark"] .wisan-edit-modal-content,
html[data-wisan-mode="dark"] .wisan-bc-popup-card {
    background: #111827 !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

html[data-wisan-mode="dark"] .wisan-card-header {
    border-bottom-color: #334155 !important;
}

html[data-wisan-mode="dark"] .wisan-card-title,
html[data-wisan-mode="dark"] .wisan-stat-value,
html[data-wisan-mode="dark"] .wisan-field label,
html[data-wisan-mode="dark"] .wisan-bc-check-label,
html[data-wisan-mode="dark"] .wisan-bc-popup-body,
html[data-wisan-mode="dark"] .wisan-vbar-count,
html[data-wisan-mode="dark"] .wisan-vbar-label,
html[data-wisan-mode="dark"] .wisan-nik-normal,
html[data-wisan-mode="dark"] .wisan-lp-section-title,
html[data-wisan-mode="dark"] .wisan-lp-feature-card h3,
html[data-wisan-mode="dark"] h3,
html[data-wisan-mode="dark"] h4 {
    color: #f1f5f9 !important;
}

html[data-wisan-mode="dark"] .wisan-card-subtitle,
html[data-wisan-mode="dark"] .wisan-stat-label,
html[data-wisan-mode="dark"] .wisan-help,
html[data-wisan-mode="dark"] .wisan-lp-section-sub,
html[data-wisan-mode="dark"] .wisan-lp-feature-card p {
    color: #94a3b8 !important;
}

html[data-wisan-mode="dark"] .wisan-input,
html[data-wisan-mode="dark"] .wisan-select,
html[data-wisan-mode="dark"] .wisan-textarea,
html[data-wisan-mode="dark"] .wisan-share-input {
    background: #0f172a !important;
    color: #f1f5f9 !important;
    border-color: #475569 !important;
}

html[data-wisan-mode="dark"] .wisan-input[readonly],
html[data-wisan-mode="dark"] .wisan-input-plain-readonly {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

html[data-wisan-mode="dark"] .wisan-stat-card,
html[data-wisan-mode="dark"] .wisan-table-toolbar,
html[data-wisan-mode="dark"] .wisan-col-toggles,
html[data-wisan-mode="dark"] .wisan-camera-box,
html[data-wisan-mode="dark"] .wisan-bc-options-row,
html[data-wisan-mode="dark"] .wisan-vchart-wrap,
html[data-wisan-mode="dark"] .wisan-share-box {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

html[data-wisan-mode="dark"] .wisan-col-toggles label,
html[data-wisan-mode="dark"] .wisan-color-swatch-btn,
html[data-wisan-mode="dark"] .wisan-mode-btn,
html[data-wisan-mode="dark"] .wisan-btn-outline,
html[data-wisan-mode="dark"] .wisan-btn-fullscreen {
    background: #0f172a !important;
    color: #f1f5f9 !important;
    border-color: #475569 !important;
}

html[data-wisan-mode="dark"] .wisan-color-swatch-btn.active {
    border-color: #ffffff !important;
}

html[data-wisan-mode="dark"] .wisan-mode-btn.active {
    background: var(--wisan-primary) !important;
    color: #ffffff !important;
    border-color: var(--wisan-primary) !important;
}

html[data-wisan-mode="dark"] .wisan-table-wrap {
    border-color: #334155 !important;
}

html[data-wisan-mode="dark"] .wisan-table {
    background: #111827 !important;
    color: #f1f5f9 !important;
}

html[data-wisan-mode="dark"] .wisan-table td {
    border-bottom-color: #334155 !important;
    color: #f1f5f9 !important;
}

html[data-wisan-mode="dark"] .wisan-table tbody tr:hover {
    background: #1e293b !important;
}

html[data-wisan-mode="dark"] .wisan-vbar-track {
    background: #334155 !important;
}

html[data-wisan-mode="dark"] .wisan-fs-target.is-fullscreen,
html[data-wisan-mode="dark"] .wisan-fs-target:fullscreen {
    background: #0b1120 !important;
}


/* =========================================================================
 * TOMBOL PILIHAN TINGKAT WILAYAH PETA (v1.0.0)
 * ========================================================================= */
.wisan-map-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wisan-map-level-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.wisan-map-level-btn {
    appearance: none;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    padding: 6px 11px;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.25;
}

.wisan-map-level-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.wisan-map-level-btn.active {
    background: var(--wisan-primary, #0284c7);
    color: var(--wisan-on-primary, #ffffff);
    border-color: var(--wisan-primary, #0284c7);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.14);
}

html[data-wisan-mode="dark"] .wisan-map-level-btn {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #475569;
}

html[data-wisan-mode="dark"] .wisan-map-level-btn:hover {
    background: #334155;
}

html[data-wisan-mode="dark"] .wisan-map-level-btn.active {
    background: var(--wisan-primary, #0284c7);
    color: var(--wisan-on-primary, #ffffff);
    border-color: var(--wisan-primary, #0284c7);
}


/* =========================================================================
 * PAGINASI SEMUA TABEL & FOOTER PREVIEW PDF (v1.0.0)
 * ========================================================================= */
.wisan-paginated-hidden {
    display: none !important;
}

.wisan-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    padding: 8px 4px 2px;
    font-size: 12.5px;
    color: #475569;
}

.wisan-pager-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wisan-pager-size-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wisan-pager-size {
    padding: 4px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #0f172a;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.wisan-pager-info {
    font-size: 12.5px;
    color: #64748b;
}

.wisan-pager-nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.wisan-pager-btn {
    appearance: none;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.wisan-pager-btn:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.wisan-pager-btn.active {
    background: var(--wisan-primary, #0284c7);
    color: var(--wisan-on-primary, #ffffff);
    border-color: var(--wisan-primary, #0284c7);
}

.wisan-pager-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.wisan-pager-ellipsis {
    padding: 0 4px;
    color: #94a3b8;
    font-weight: 600;
}

html[data-wisan-mode="dark"] .wisan-pagination-bar,
html[data-wisan-mode="dark"] .wisan-pager-info {
    color: #94a3b8;
}

html[data-wisan-mode="dark"] .wisan-pager-size,
html[data-wisan-mode="dark"] .wisan-pager-btn {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #475569;
}

html[data-wisan-mode="dark"] .wisan-pager-btn:hover:not(:disabled) {
    background: #334155;
}

html[data-wisan-mode="dark"] .wisan-pager-btn.active {
    background: var(--wisan-primary, #0284c7);
    color: var(--wisan-on-primary, #ffffff);
    border-color: var(--wisan-primary, #0284c7);
}

.wisan-pdf-preview-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 8px;
    border-top: 1px solid #cbd5e1;
    font-size: 11px;
    color: #64748b;
}


/* =========================================================================
 * KETERANGAN WILAYAH PERMANEN & PENUTUPAN AKUN 24 JAM (v1.0.0)
 * ========================================================================= */
.wisan-permanent-region-note {
    font-size: 11.5px;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 6px 9px;
    margin-top: 6px;
    line-height: 1.45;
    font-weight: 500;
}

.wisan-danger-zone-card {
    border: 1.5px solid #fecaca !important;
    background: #fff5f5 !important;
}

.wisan-closure-pending-banner {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: 13px;
}

.wisan-countdown-display {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #dc2626;
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: 12px;
    padding: 14px 18px;
    font-variant-numeric: tabular-nums;
}

html[data-wisan-mode="dark"] .wisan-danger-zone-card {
    background: #2a1417 !important;
    border-color: #7f1d1d !important;
}

html[data-wisan-mode="dark"] .wisan-closure-pending-banner {
    background: #3b151a;
    border-color: #991b1b;
    color: #fecaca;
}

html[data-wisan-mode="dark"] .wisan-countdown-display {
    background: #3b151a;
    border-color: #991b1b;
    color: #fca5a5;
}


/* =========================================================================
 * FULLSCREEN DIAGRAM TERPADU DENGAN HEADER PILIHAN & DROPDOWN WILAYAH (v1.0.0)
 * ========================================================================= */
.wisan-cfs-overlay {
    display: none;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9600;
    background: #f1f5f9;
    flex-direction: column;
    overflow: hidden;
}

.wisan-cfs-overlay.active,
.wisan-cfs-overlay:fullscreen,
.wisan-cfs-overlay:-webkit-full-screen {
    display: flex !important;
}

.wisan-cfs-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 20px;
    background: #ffffff;
    border-bottom: 1.5px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    z-index: 30;
}

.wisan-cfs-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wisan-cfs-divider {
    width: 1.5px;
    height: 24px;
    background: #cbd5e1;
    margin: 0 4px;
    display: inline-block;
}

.wisan-cfs-btn {
    appearance: none;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1e293b;
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    line-height: 1.25;
}

.wisan-cfs-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.wisan-cfs-btn.active {
    background: var(--wisan-primary, #0284c7);
    color: var(--wisan-on-primary, #ffffff);
    border-color: var(--wisan-primary, #0284c7);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

.wisan-cfs-dropdown {
    position: relative;
    display: inline-block;
}

.wisan-cfs-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    max-width: 320px;
    max-height: 320px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
    padding: 6px;
    z-index: 60;
}

.wisan-cfs-dropdown.open .wisan-cfs-dropdown-menu {
    display: block;
}

.wisan-cfs-dropdown-item {
    display: block;
    width: 100%;
    text-align: left;
    appearance: none;
    border: none;
    background: transparent;
    color: #1e293b;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s ease;
}

.wisan-cfs-dropdown-item:hover {
    background: #f1f5f9;
}

.wisan-cfs-dropdown-item.active {
    background: var(--wisan-primary, #0284c7);
    color: var(--wisan-on-primary, #ffffff);
    font-weight: 700;
}

.wisan-cfs-stage {
    flex: 1;
    padding: 20px 24px;
    overflow: auto;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.wisan-cfs-canvas {
    width: 100%;
    max-width: 1360px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px 28px 28px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.wisan-cfs-chart-title {
    text-align: center;
    font-size: 21px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 22px 0;
    line-height: 1.35;
}

.wisan-cfs-chart-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
    min-height: 360px;
}

.wisan-cfs-chart-body .wisan-vchart {
    min-height: 380px;
}

html[data-wisan-mode="dark"] .wisan-cfs-overlay {
    background: #0b1120;
}

html[data-wisan-mode="dark"] .wisan-cfs-header,
html[data-wisan-mode="dark"] .wisan-cfs-canvas {
    background: #0f172a;
    border-color: #1e293b;
}

html[data-wisan-mode="dark"] .wisan-cfs-chart-title {
    color: #f8fafc;
}

html[data-wisan-mode="dark"] .wisan-cfs-btn {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

html[data-wisan-mode="dark"] .wisan-cfs-btn:hover {
    background: #334155;
}

html[data-wisan-mode="dark"] .wisan-cfs-btn.active {
    background: var(--wisan-primary, #0284c7);
    color: var(--wisan-on-primary, #ffffff);
    border-color: var(--wisan-primary, #0284c7);
}

html[data-wisan-mode="dark"] .wisan-cfs-dropdown-menu {
    background: #1e293b;
    border-color: #334155;
}

html[data-wisan-mode="dark"] .wisan-cfs-dropdown-item {
    color: #e2e8f0;
}

html[data-wisan-mode="dark"] .wisan-cfs-dropdown-item:hover {
    background: #334155;
}

html[data-wisan-mode="dark"] .wisan-cfs-dropdown-item.active {
    background: var(--wisan-primary, #0284c7);
    color: var(--wisan-on-primary, #ffffff);
}


/* =========================================================================
 * CATATAN FITUR NON-AKTIF / DEMO & KONTROL DAPIL SUPER ADMIN (v1.0.0)
 * ========================================================================= */
.wisan-demo-disabled-note,
.wisan-feature-locked-note {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 5px 10px;
    line-height: 1.4;
}

.wisan-feature-locked-note {
    display: block;
    margin-top: 10px;
}

.wisan-sa-inline-select {
    padding: 5px 8px;
    font-size: 12.5px;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #0f172a;
    cursor: pointer;
    min-width: 96px;
}

html[data-wisan-mode="dark"] .wisan-sa-inline-select {
    background: #1e293b;
    color: #f8fafc;
    border-color: #475569;
}

html[data-wisan-mode="dark"] .wisan-demo-disabled-note,
html[data-wisan-mode="dark"] .wisan-feature-locked-note {
    background: #451a03;
    border-color: #92400e;
    color: #fde68a;
}


/* =========================================================================
 * OFFLINE BAR, PROGRESS TARGET WILAYAH, & VERIFIKASI DATA (v1.0.0)
 * ========================================================================= */
.wisan-offline-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

html[data-wisan-mode="dark"] .wisan-offline-bar {
    background: #0f172a;
    border-color: #1e293b;
}

.wisan-prog-track {
    width: 140px;
    height: 10px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}

.wisan-prog-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.25s ease;
}

.wisan-verif-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
    margin-left: 4px;
}

.wisan-verif-pill.verified { background: #dcfce7; color: #166534; }
.wisan-verif-pill.rejected { background: #fee2e2; color: #991b1b; }
.wisan-verif-pill.pending  { background: #fef3c7; color: #92400e; }


/* =========================================================================
 * FLOATING HEADER & MENU UNTUK PC & TABLET + PANAH NAVIGASI FULLSCREEN (v1.0.0)
 * ========================================================================= */
@media (min-width: 768px) {
    .wisan-sticky-chrome {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
        box-shadow: 0 3px 14px rgba(15, 23, 42, 0.16);
    }

    .wisan-sticky-chrome .wisan-topbar {
        position: static !important;
        box-shadow: none !important;
    }

    .wisan-sticky-chrome .wisan-nav-tabs {
        position: static !important;
    }
}

.wisan-cfs-stage {
    position: relative;
    gap: 12px;
    align-items: center !important;
}

.wisan-cfs-nav-arrow {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    font-size: 28px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
    transition: all 0.15s ease;
    z-index: 25;
}

.wisan-cfs-nav-arrow:hover {
    background: var(--wisan-primary, #0284c7);
    color: var(--wisan-on-primary, #ffffff);
    border-color: var(--wisan-primary, #0284c7);
    transform: scale(1.06);
}

html[data-wisan-mode="dark"] .wisan-cfs-nav-arrow {
    background: #1e293b;
    color: #f8fafc;
    border-color: #475569;
}

html[data-wisan-mode="dark"] .wisan-cfs-nav-arrow:hover {
    background: var(--wisan-primary, #0284c7);
    color: var(--wisan-on-primary, #ffffff);
    border-color: var(--wisan-primary, #0284c7);
}

/* Perbaikan Tampilan Menu di Layar PC & Tablet agar Tidak Terpotong (v1.0.0) */
@media (min-width: 768px) {
    .wisan-nav-tabs {
        overflow-x: visible !important;
    }

    .wisan-nav-inner {
        flex-wrap: wrap !important;
        align-items: center;
        gap: 6px;
        padding: 8px 14px;
    }

    .wisan-tab-btn {
        font-size: 13px;
        padding: 7px 12px;
    }
}
