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

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f0f2f5;
    color: #333;
}

html, body {
    height: 100%;
    width: 100%;
}

/* ============ LOGIN OVERLAY ============ */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.login-overlay.active {
    opacity: 1;
    visibility: visible;
}

.login-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #667eea;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

#login-form .form-group {
    margin-bottom: 20px;
}

#login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

#login-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

#login-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-error {
    color: #d32f2f;
    font-size: 13px;
    margin-bottom: 15px;
    padding: 10px;
    background: #ffebee;
    border-radius: 4px;
    display: none;
}

.login-error.show {
    display: block;
}

.login-hint {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin-top: 15px;
}

/* ============ USER INFO BAR ============ */
.user-info-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-info-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.user-info-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.app-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.user-info-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

#current-user-display {
    font-weight: 600;
}

.role-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
}

.app-container {
    display: flex;
    overflow: hidden;
    height: 100%;
    width: 100%;
}

/* ============ SIDEBAR ============ */
.sidebar {
    width: 320px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.sidebar-header h1 {
    font-size: 28px;
    margin-bottom: 5px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 13px;
    opacity: 0.9;
    font-weight: 400;
}

.sidebar-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stats-card {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.stats-grid .stats-card:first-child {
    grid-column: 1 / -1;
}

.stats-card-compact {
    padding: 14px;
}

.stats-card-compact .stat-number {
    font-size: 26px;
    margin-bottom: 4px;
}

.stats-card-compact .stat-label {
    font-size: 11px;
}

/* ============ DASHBOARD ============ */
.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dashboard-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dashboard-title {
    color: white;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
}

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.dashboard-stat-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 6px;
    text-align: center;
}

.dashboard-stat-card .stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    margin-bottom: 5px;
}

.dashboard-stat-card .stat-value {
    color: white;
    font-size: 24px;
    font-weight: 700;
}

.dashboard-status-list,
.dashboard-priority-list,
.dashboard-area-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.dashboard-status-item,
.dashboard-priority-item,
.dashboard-area-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 6px;
    font-size: 12px;
    color: white;
}

.dashboard-area-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.dashboard-area-item-label {
    color: rgba(255, 255, 255, 0.8);
}

.dashboard-area-item-value {
    text-align: right;
    font-weight: 600;
}

/* ============ ADMIN PANEL ============ */
.admin-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.users-panel-shell {
    gap: 16px;
}

.users-hero {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 14px;
    padding: 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(8, 11, 32, 0.32), rgba(102, 126, 234, 0.22));
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 18px 50px rgba(0,0,0,0.16);
}

.users-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.users-kicker {
    display: inline-flex;
    align-self: flex-start;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.users-hero-text {
    color: rgba(255,255,255,0.82);
    font-size: 12px;
    line-height: 1.5;
    max-width: 340px;
}

.users-hero-badges {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    min-width: 170px;
}

.users-mini-stat {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.users-mini-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: rgba(255,255,255,0.72);
}

.users-mini-stat strong {
    font-size: 22px;
    color: #fff;
    line-height: 1;
}

.users-section-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 16px 42px rgba(0,0,0,0.10);
}

.users-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.users-section-header h4 {
    color: white;
    font-size: 14px;
    font-weight: 700;
    margin: 0;
}

.users-section-note {
    color: rgba(255,255,255,0.72);
    font-size: 11px;
}

.users-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.users-form-grid .form-group {
    margin: 0;
}

.users-create-btn,
.users-refresh-btn {
    width: 100%;
    border-radius: 12px;
    font-weight: 700;
}

.users-create-btn {
    margin-top: 12px;
}

.users-result {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.45;
}

.users-result.success {
    background: rgba(76,175,80,0.18);
    border: 1px solid rgba(76,175,80,0.35);
    color: #d8ffd8;
}

.users-result.error {
    background: rgba(211,47,47,0.18);
    border: 1px solid rgba(211,47,47,0.35);
    color: #ffd8d5;
}

.admin-panel .form-group {
    display: flex;
    flex-direction: column;
}

.admin-panel label {
    color: white;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.admin-panel input,
.admin-panel select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.admin-panel input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.admin-panel input:focus,
.admin-panel select:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

#user-creation-result {
    font-size: 12px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    border-radius: 4px;
}

#user-creation-result.success {
    background: rgba(76, 175, 80, 0.3);
    border: 1px solid rgba(76, 175, 80, 0.5);
}

#user-creation-result.error {
    background: rgba(211, 47, 47, 0.3);
    border: 1px solid rgba(211, 47, 47, 0.5);
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 340px;
    overflow-y: auto;
}

.user-item {
    background: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
    padding: 14px;
    border-radius: 14px;
    font-size: 12px;
    color: white;
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 12px;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 10px 24px rgba(0,0,0,0.10);
}

.user-item-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 8px 18px rgba(102,126,234,0.28);
}

.user-item-avatar.admin { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.user-item-avatar.petugas { background: linear-gradient(135deg, #00bcd4, #3b82f6); }
.user-item-avatar.pimpinan { background: linear-gradient(135deg, #22c55e, #16a34a); }

.user-item-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-item-username {
    font-weight: 700;
    font-size: 13px;
}

.user-item-email {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.78);
}

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

.user-item-role,
.user-item-status {
    font-size: 10px;
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.user-item-role {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

.user-item-status.status-active {
    background: rgba(76,175,80,0.20);
    color: #d8ffd8;
}

.user-item-status.status-inactive {
    background: rgba(244,67,54,0.20);
    color: #ffd9d6;
}

.user-item-actions {
    display: flex;
    gap: 8px;
}

.user-item-actions button {
    padding: 8px 10px;
    font-size: 11px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    font-weight: 700;
}

.user-item-actions button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-edit-user {
    background: rgba(33, 150, 243, 0.7);
    color: white;
}

.btn-delete-user {
    background: rgba(211, 47, 47, 0.7);
    color: white;
}

.users-empty {
    color: rgba(255,255,255,0.78);
    text-align: center;
    padding: 24px 16px;
    border: 1px dashed rgba(255,255,255,0.22);
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
}

@media (max-width: 520px) {
    .users-hero,
    .users-section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .users-form-grid {
        grid-template-columns: 1fr;
    }

    .user-item {
        grid-template-columns: 36px 1fr;
    }

    .user-item-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

/* ============ KPI CARDS (BERANDA TAB) ============ */
.kpi-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.kpi-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.kpi-card:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.kpi-icon {
    font-size: 32px;
    min-width: 50px;
    text-align: center;
}

.kpi-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.kpi-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.7);
}

.kpi-value {
    font-size: 28px;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.kpi-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.kpi-trend {
    font-size: 11px;
    margin-top: 4px;
    color: rgba(255,255,255,0.8);
    padding: 4px 8px;
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}

.kpi-trend.positive {
    color: #4CAF50;
    background: rgba(76,175,80,0.2);
}

.kpi-trend.negative {
    color: #f44336;
    background: rgba(244,67,54,0.2);
}

/* ============ TREND SECTION ============ */
.trend-section {
    margin-top: 20px;
}

.trend-section h3 {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.trend-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 15px;
    display: block;
}

/* ============ REGION DATA SECTION ============ */
.region-data-section {
    margin-top: 20px;
}

.region-list h3,
.map-preview h3 {
    color: white;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}

.region-list p,
.map-preview p {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    margin-bottom: 10px;
}

.view-all-link {
    color: #667eea;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s;
}

.view-all-link:hover {
    color: #764ba2;
}

.btn-peta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-peta:hover {
    box-shadow: 0 8px 24px rgba(102,126,234,0.4);
    transform: translateY(-2px);
}

/* ============ LAPORAN TAB ============ */
.laporan-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px 0;
}

.laporan-container h2 {
    color: white;
    font-size: 18px;
    margin-bottom: 5px;
}

.laporan-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}

.report-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.report-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s;
}

.report-card:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.report-card h3 {
    color: white;
    font-size: 13px;
    font-weight: 600;
}

.report-card p {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    line-height: 1.4;
}

.report-preview {
    background: rgba(0,0,0,0.2);
    border-left: 3px solid #667eea;
    padding: 10px;
    border-radius: 4px;
    font-size: 11px;
}

.report-preview strong {
    color: white;
    display: block;
    margin-bottom: 6px;
}

.report-preview ul {
    color: rgba(255,255,255,0.8);
    list-style: none;
    padding-left: 10px;
}

.report-preview li {
    margin-bottom: 4px;
    padding-left: 8px;
    position: relative;
}

.report-preview li:before {
    content: "▹ ";
    position: absolute;
    left: 0;
    color: #667eea;
}

.btn-download {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s;
    align-self: flex-start;
}

.btn-download:hover {
    box-shadow: 0 8px 24px rgba(102,126,234,0.4);
    transform: translateY(-2px);
}

.report-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px 0 12px;
}

.report-header h2 {
    color: white;
    font-size: 18px;
    margin-bottom: 6px;
}

.report-preview-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.14);
}

.report-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.report-preview-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(102,126,234,0.22);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.report-preview-meta {
    color: rgba(255,255,255,0.78);
    font-size: 11px;
}

#report-preview-frame {
    width: 100%;
    height: 520px;
    border: none;
    border-radius: 12px;
    background: #f7f8fc;
}

.report-footer-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}

.report-download-fab {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(102,126,234,0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
}

.report-download-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(102,126,234,0.42);
}

/* ============ BUTTONS ============ */
.btn-primary,
.btn-secondary {
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 12px 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-primary.btn-lg {
    padding: 16px 24px;
    font-size: 15px;
}

.btn-primary.btn-masjid {
    background-color: #1976d2;
}

.btn-primary.btn-masjid:hover {
    background-color: #1565c0;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.35);
}

.btn-primary.btn-need-point {
    background-color: #fb8c00;
}

.btn-primary.btn-need-point:hover {
    background-color: #ef6c00;
    box-shadow: 0 4px 12px rgba(251, 140, 0, 0.35);
}

.btn-primary.btn-household {
    background-color: #00897b;
}

.btn-primary.btn-household:hover {
    background-color: #00796b;
    box-shadow: 0 4px 12px rgba(0, 137, 123, 0.35);
}

/* Map shortcut buttons (overlay) */
#map-shortcuts {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 2200;
}

.map-shortcut-btn {
    background: rgba(255,255,255,0.9);
    border: none;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.map-shortcut-btn:hover {
    transform: translateY(-2px);
}

.map-shortcut-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(102,126,234,0.35);
}

/* Improve visibility for number-of-points inputs in line/polygon forms */
#line-points,
#polygon-points {
    background-color: #667eea !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.12);
}

/* Also make the drawing toolbar counter more visible */
#drawing-toolbar .drawing-progress span {
    background: #667eea;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
}

.btn-primary.btn-assistance {
    background-color: #8e24aa;
}

.btn-primary.btn-assistance:hover {
    background-color: #7b1fa2;
    box-shadow: 0 4px 12px rgba(142, 36, 170, 0.35);
}

.btn-primary.btn-verification {
    background-color: #546e7a;
}

.btn-primary.btn-verification:hover {
    background-color: #455a64;
    box-shadow: 0 4px 12px rgba(84, 110, 122, 0.35);
}

.btn-primary.btn-score {
    background-color: #2e7d32;
}

.btn-primary.btn-score:hover {
    background-color: #1b5e20;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.35);
}

.btn-icon {
    font-size: 18px;
    font-weight: bold;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* ============ INSTRUCTION BOX ============ */
.instructions-box,
.info-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.instructions-box h3,
.info-box h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    opacity: 0.95;
}

.instructions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.instruction-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
}

.instruction-num {
    background: #4CAF50;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.info-box p {
    font-size: 12px;
    line-height: 1.5;
    opacity: 0.9;
}

/* ============ MANAGEMENT PANEL ============ */
.management-panel {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.08);
    padding: 16px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.management-panel h3 {
    margin: 0;
    color: white;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.management-panel p {
    margin: 0;
}

.management-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.management-panel .control-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

#rendering-mode-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.18);
    color: #fff;
}

#rendering-mode-hint {
    font-size: 12px;
    color: rgba(255,255,255,0.75);
}

.management-quick-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.management-quick-actions .btn-secondary {
    min-width: 140px;
}

@media (max-width: 720px) {
    .sidebar { width: 100%; position: relative; }
    .management-actions { grid-template-columns: 1fr; }
}

/* Management household carousel */
.management-household-section h4 { margin-bottom: 8px; }
.household-carousel {
    display:flex;
    align-items:center;
    gap:8px;
}
.carousel-arrow {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.06);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.household-list-viewport {
    width: 100%;
    min-height: 120px;
    background: rgba(8, 11, 32, 0.28);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 12px;
    padding: 10px;
    overflow: hidden;
}

#management-needpoint-list {
    display: block;
    overflow: auto;
    max-height: 360px;
}

.management-needpoint-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.management-needpoint-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
    font-size: 12px;
    color: rgba(255,255,255,0.95);
}

.management-needpoint-table th,
.management-needpoint-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.management-needpoint-table thead th {
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, rgba(18,22,52,0.95), rgba(13,16,40,0.92));
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.2px;
    z-index: 1;
}

.management-needpoint-table tbody tr:nth-child(odd) {
    background: rgba(255,255,255,0.02);
}

.management-needpoint-table tbody tr:hover {
    background: rgba(255,255,255,0.09);
}

.management-needpoint-table .col-id {
    font-weight: 700;
    color: #dce4ff;
}

.management-needpoint-table .verified-id {
    color: #9ff1b5;
}

.management-needpoint-table tbody tr.row-verified {
    background: rgba(89, 191, 117, 0.12);
}

.mini-icon-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mini-icon-btn.verify.is-off {
    background: rgba(244, 67, 54, 0.18);
    border-color: rgba(244, 67, 54, 0.38);
    color: #ffd8d5;
}

.mini-icon-btn.verify.is-on {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.38);
    color: #d7f6d8;
}

.mini-icon-btn.bantuan {
    background: rgba(33, 150, 243, 0.20);
    border-color: rgba(33, 150, 243, 0.38);
    color: #d9eeff;
}

.mini-icon-btn.disabled,
.mini-icon-btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(70%);
    pointer-events: none;
}

.management-needpoint-nav .carousel-arrow {
    width: auto;
    min-width: 110px;
    padding: 0 12px;
    height: 34px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.2);
}

.management-needpoint-nav .carousel-arrow:hover {
    background: rgba(255,255,255,0.24);
}

.management-score-preview {
    background: rgba(8, 11, 32, 0.30);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 12px;
    padding: 12px;
}

.management-score-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.management-score-preview-header h4 {
    margin: 0;
    color: #fff;
    font-size: 14px;
}

.management-score-preview-header .btn-primary {
    width: auto;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.management-score-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.score-chip {
    border-radius: 10px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.06);
}

.score-chip-label {
    font-size: 11px;
    color: rgba(255,255,255,0.82);
    margin-bottom: 6px;
}

.score-chip-value {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
}

.score-chip.very-high { border-color: rgba(244,67,54,0.4); }
.score-chip.high { border-color: rgba(255,152,0,0.4); }
.score-chip.medium { border-color: rgba(255,235,59,0.35); }
.score-chip.low { border-color: rgba(76,175,80,0.4); }
.score-chip.assisted { border-color: rgba(33,150,243,0.42); }

@media (max-width: 700px) {
    .management-score-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.econ-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
    border: 1px solid transparent;
}

.econ-badge.econ-sangat_miskin {
    background: rgba(244, 67, 54, 0.18);
    border-color: rgba(244, 67, 54, 0.38);
    color: #ffd8d5;
}

.econ-badge.econ-miskin {
    background: rgba(255, 152, 0, 0.18);
    border-color: rgba(255, 152, 0, 0.35);
    color: #ffe3bc;
}

.econ-badge.econ-rentan {
    background: rgba(255, 235, 59, 0.18);
    border-color: rgba(255, 235, 59, 0.35);
    color: #fff2a6;
}

.econ-badge.econ-cukup {
    background: rgba(33, 150, 243, 0.18);
    border-color: rgba(33, 150, 243, 0.35);
    color: #d0e9ff;
}

.econ-badge.econ-baik {
    background: rgba(76, 175, 80, 0.18);
    border-color: rgba(76, 175, 80, 0.35);
    color: #d7f6d8;
}
.management-household-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.04);
    padding: 8px;
    border-radius: 8px;
    min-width: 220px;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    gap:6px;
}
.management-household-item .hh-title { font-weight:700; color: #fff; font-size:13px; }
.management-household-item .hh-meta { font-size:12px; color: rgba(255,255,255,0.8); }
.household-controls .btn-primary { flex:1; }
.household-controls .btn-assistance { flex:1; }
.household-controls .btn-score { flex:1; }

@media (max-width: 520px) {
    .management-household-item { min-width: 180px; max-width: 180px; }
}

/* ============ HOUSEHOLD PANEL ============ */
.household-panel {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.household-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.household-stats-grid .stats-card:first-child {
    grid-column: auto;
}

.household-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.household-list {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.household-item {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.household-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.household-code {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    opacity: 0.9;
}

.household-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.household-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    font-size: 11px;
    opacity: 0.9;
}

.household-meta span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.household-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.household-status.unverified {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.household-status.field_verified {
    background: rgba(76, 175, 80, 0.28);
    color: #d8ffd8;
}

.household-status.admin_approved {
    background: rgba(33, 150, 243, 0.28);
    color: #d8ecff;
}

.household-status.needs_review {
    background: rgba(255, 193, 7, 0.3);
    color: #fff5cc;
}

.household-status.rejected {
    background: rgba(244, 67, 54, 0.3);
    color: #ffd8d5;
}

.household-empty {
    font-size: 12px;
    opacity: 0.85;
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
}

.household-priority-box {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.household-priority-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    font-size: 11px;
    opacity: 0.92;
}

.household-priority-summary span {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 6px 8px;
}

.household-priority-list {
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.priority-item {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.priority-item-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.priority-item-code {
    font-size: 10px;
    font-weight: 700;
    opacity: 0.9;
}

.priority-item-name {
    font-size: 12px;
    font-weight: 700;
}

.assisted-point-name {
    color: #fff0b8;
    text-shadow: 0 0 0 rgba(0,0,0,0);
}

.management-needpoint-table td.assisted-point-name {
    color: #fff0b8;
    font-weight: 700;
}

.priority-item-score {
    font-size: 12px;
    font-weight: 700;
}

.priority-item-status {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 8px;
}

.priority-item-status.very_high {
    background: rgba(244, 67, 54, 0.3);
    color: #ffd8d5;
}

.priority-item-status.high {
    background: rgba(255, 152, 0, 0.3);
    color: #ffe9c8;
}

.priority-item-status.medium {
    background: rgba(255, 235, 59, 0.28);
    color: #fff9cc;
}

.priority-item-status.low {
    background: rgba(76, 175, 80, 0.28);
    color: #d8ffd8;
}

.priority-item-status.assisted {
    background: rgba(33, 150, 243, 0.28);
    color: #d9eeff;
}

/* ============ MAIN CONTENT ============ */
.main-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
    display: block;
}

/* ============ MODAL ============ */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease-in-out;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-in-out;
}

.modal-content-wide {
    width: min(92vw, 880px);
    max-width: 880px;
}

.modal-content-bantuan {
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
    border: 1px solid rgba(102, 126, 234, 0.18);
    box-shadow: 0 24px 70px rgba(18, 28, 60, 0.28);
}

.modal-content-manage {
    width: min(92vw, 760px);
    max-width: 760px;
}

.bantuan-modal-header {
    align-items: flex-start;
    gap: 12px;
}

.modal-header-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-kicker {
    display: inline-flex;
    align-self: flex-start;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(102, 126, 234, 0.12);
    color: #5262c9;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.35px;
    text-transform: uppercase;
}

.modal-subtitle {
    color: #5b6476;
    font-size: 13px;
    line-height: 1.45;
}

.bantuan-modal-hero {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.bantuan-hero-card {
    background: rgba(255,255,255,0.88);
    border: 1px solid rgba(102, 126, 234, 0.12);
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 10px 24px rgba(50, 68, 112, 0.08);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bantuan-hero-accent {
    background: linear-gradient(135deg, rgba(102,126,234,0.12), rgba(118,75,162,0.12));
}

.bantuan-hero-label,
.bantuan-point-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.45px;
    text-transform: uppercase;
    color: #6a7388;
}

.bantuan-hero-card strong,
.bantuan-point-title {
    font-size: 18px;
    color: #1f2a44;
}

.bantuan-hero-card small {
    color: #677086;
    line-height: 1.4;
}

.bantuan-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-group-span-2 {
    grid-column: 1 / -1;
}

.bantuan-form label {
    color: #29334d;
    font-weight: 700;
}

.bantuan-form input,
.bantuan-form select,
.bantuan-form textarea {
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(88, 104, 170, 0.18);
    color: #24314d;
    border-radius: 12px;
    padding: 11px 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.bantuan-form input:focus,
.bantuan-form select:focus,
.bantuan-form textarea:focus {
    outline: none;
    border-color: rgba(102,126,234,0.5);
    box-shadow: 0 0 0 4px rgba(102,126,234,0.12);
}

.form-actions-bantuan {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
}

.bantuan-point-banner {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(102,126,234,0.08);
    border: 1px solid rgba(102,126,234,0.14);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.bantuan-instructions {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.bantuan-step-list {
    display: grid;
    gap: 10px;
}

.bantuan-step-item {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 10px;
    align-items: start;
    padding: 10px 12px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(102,126,234,0.12);
    border-radius: 12px;
    color: #2b3550;
    box-shadow: 0 8px 20px rgba(37, 50, 91, 0.05);
}

.bantuan-step-number {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.bantuan-callout {
    background: linear-gradient(135deg, rgba(255, 208, 92, 0.22), rgba(255, 244, 198, 0.55));
    border: 1px solid rgba(212, 156, 0, 0.20);
    color: #7a5600;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}

.modal-actions-split {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.bantuan-modal-header .close {
    color: #4d5b7a;
    background: rgba(255,255,255,0.8);
    border-radius: 999px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(66, 80, 118, 0.12);
}

.bantuan-modal-header .close:hover {
    color: #1f2a44;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f2f5;
}

.modal-header h2 {
    color: #333;
    font-size: 20px;
    margin: 0;
}

.close {
    color: #999;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    background: none;
    border: none;
    padding: 0;
}

.close:hover {
    color: #333;
}

/* ============ FORM ============ */
#point-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.sidebar .form-group label,
.sidebar .form-group small {
    color: rgba(255, 255, 255, 0.95);
}

.sidebar .form-group select,
.sidebar .form-group input[type="text"],
.sidebar .form-group input[type="number"] {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.24);
    color: white;
}

/* Make the rendering mode select in the Konfigurasi sidebar clearly readable */
.sidebar #rendering-mode-select {
    background: #ffffff;
    color: #111111;
    border: 1px solid rgba(0,0,0,0.08);
    padding: 10px 12px;
    border-radius: 8px;
}

.sidebar #rendering-mode-select option {
    color: #111111;
}

.sidebar .form-group select:focus,
.sidebar .form-group input[type="text"]:focus,
.sidebar .form-group input[type="number"]:focus {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
}

.sidebar .form-group select option {
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="number"] {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    resize: vertical;
    min-height: 84px;
}

.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.sidebar .form-group textarea {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.24);
    color: white;
}

.sidebar .form-group textarea:focus {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
}

.form-group input[type="text"][readonly-display],
.form-group input[type="number"][readonly-display] {
    background-color: #f9f9f9;
    cursor: default;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.checkbox-group {
    flex-direction: row;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.form-info {
    padding: 10px 12px;
    background-color: #e8f4f8;
    border-left: 4px solid #667eea;
    border-radius: 4px;
    font-size: 12px;
    color: #555;
    display: none;
}

.form-info.show {
    display: block;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: flex-end;
}

.form-actions .btn-primary,
.form-actions .btn-secondary {
    width: auto;
    flex: 1;
}

/* ============ NOTIFICATIONS ============ */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 20px;
    border-radius: 8px;
    background-color: #4CAF50;
    color: white;
    z-index: 3000;
    animation: slideInRight 0.3s ease-in-out;
    max-width: 350px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
}

.notification.error {
    background-color: #f44336;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============ LEAFLET MARKER POPUPS ============ */
.leaflet-popup-content {
    margin: 0;
    padding: 0;
}

.leaflet-marker-icon {
    cursor: grab;
    transition: filter 0.2s;
}

.leaflet-marker-icon:hover {
    filter: brightness(1.1);
    cursor: grab;
}

.leaflet-marker-dragging {
    opacity: 0.7;
}

.marker-popup {
    padding: 12px;
    text-align: center;
}

.marker-popup-name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 10px;
    color: #333;
}

.marker-popup-hours {
    font-size: 13px;
    margin: 8px 0;
    color: #4CAF50;
    font-weight: 600;
}

.marker-popup-spbu {
    font-size: 12px;
    margin: 6px 0;
    color: #FF9800;
    font-weight: 500;
}

.marker-popup-info {
    font-size: 12px;
    color: #666;
    margin: 10px 0;
    line-height: 1.6;
}

.marker-popup-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-direction: column;
}

.marker-popup button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    margin-top: 0;
    font-size: 12px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.marker-popup button:first-button {
    margin-top: 10px;
}

.marker-popup button:hover {
    background-color: #da190b;
}

.marker-popup-actions button:nth-child(1) {
    background-color: #2196F3;
}

.marker-popup-actions button:nth-child(1):hover {
    background-color: #0b7dda;
}

.marker-popup-actions button:nth-child(2) {
    background-color: #FF9800;
}

.marker-popup-actions button:nth-child(2):hover {
    background-color: #e68900;
}

.marker-popup-actions button:nth-child(3) {
    background-color: #f44336;
}

.marker-popup-actions button:nth-child(3):hover {
    background-color: #da190b;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ============ SIDEBAR TABS ============ */
.sidebar-tabs {
    display: flex;
    gap: 5px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.tab-button {
    border: none;
    background: transparent;
    color: white;
    padding: 10px 12px;
    border-radius: 0;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 70px;
    opacity: 0.7;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    line-height: 1.2;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.08);
    opacity: 1;
}

.tab-button.tab-active {
    background: rgba(255, 255, 255, 0.14);
    opacity: 1;
    border-bottom: 2px solid white;
}

.tab-icon {
    font-size: 18px;
    line-height: 1;
}

.tab-label {
    font-size: 11px;
    letter-spacing: 0.2px;
}

.tab-content {
    display: none;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.tab-content.tab-active {
    display: flex;
}

/* ============ COLOR LEGEND ============ */
.color-legend {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.legend-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    opacity: 0.95;
    font-weight: 600;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* ============ DRAWING TOOLBAR ============ */
.drawing-toolbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1500;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.drawing-toolbar.hidden {
    display: none;
}

.drawing-instruction {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.drawing-progress {
    font-size: 13px;
    color: #666;
    padding: 5px 10px;
    background: #f0f0f0;
    border-radius: 4px;
}

.drawing-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    min-width: auto;
}

/* ============ FEATURE POPUPS ============ */
.feature-popup {
    padding: 12px;
    text-align: center;
    min-width: 200px;
}

.feature-popup-name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 8px;
    color: #333;
}

.feature-popup-type {
    font-size: 13px;
    margin: 6px 0;
    color: #666;
    font-weight: 600;
}

.feature-popup-info {
    font-size: 12px;
    color: #777;
    margin: 6px 0;
    line-height: 1.4;
}

.feature-popup-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-direction: column;
}

.feature-popup-actions button {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 11px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.feature-popup-actions button:nth-child(1) {
    background-color: #2196F3;
}

.feature-popup-actions button:nth-child(1):hover {
    background-color: #0b7dda;
}

.feature-popup-actions button:nth-child(2) {
    background-color: #FF9800;
}

.feature-popup-actions button:nth-child(2):hover {
    background-color: #e68900;
}

.feature-popup-actions button:nth-child(3) {
    background-color: #f44336;
}

.feature-popup-actions button:nth-child(3):hover {
    background-color: #da190b;
}

.feature-popup-actions button.edit-action {
    background-color: #ff9800;
}

.feature-popup-actions button.edit-action:hover {
    background-color: #e68900;
}

.feature-popup-actions button.delete-action {
    background-color: #f44336;
}

.feature-popup-actions button.delete-action:hover {
    background-color: #da190b;
}

/* ============ FORM ENHANCEMENTS ============ */
.form-group select {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    background-color: white;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input[readonly] {
    background-color: #f9f9f9;
    cursor: default;
    color: #999;
}

.form-group small {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #999;
}

@media (max-width: 768px) {
    .kpi-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .region-data-section {
        grid-template-columns: 1fr !important;
    }

    .report-options {
        grid-template-columns: 1fr;
    }

    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        max-height: 40vh;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        border-right: none;
        display: flex;
        flex-direction: column;
    }

    .sidebar-header {
        padding: 20px 15px;
    }

    .sidebar-header h1 {
        font-size: 24px;
    }

    .sidebar-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .tab-button {
        flex: 1;
        min-width: 80px;
        font-size: 11px;
        padding: 6px 10px;
    }

    .sidebar-content,
    .tab-content {
        flex-direction: column;
        gap: 15px;
        overflow-x: auto;
        padding: 15px;
    }

    .stats-card {
        min-width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .household-stats-grid {
        grid-template-columns: 1fr;
    }

    .household-meta {
        grid-template-columns: 1fr;
    }

    .stats-grid .stats-card:first-child {
        grid-column: auto;
    }

    .instructions-box,
    .info-box {
        display: none;
    }

    .modal-content {
        width: calc(100% - 20px);
        max-height: 80vh;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .notification {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .drawing-toolbar {
        bottom: 10px;
        left: 10px;
        right: 10px;
        transform: none;
    }
}

@media (max-width: 480px) {
    .kpi-cards-grid {
        grid-template-columns: 1fr;
    }

    .kpi-card {
        padding: 15px;
    }

    .kpi-value {
        font-size: 20px;
    }

    .report-options {
        grid-template-columns: 1fr;
    }

    .sidebar {
        max-height: 35vh;
    }

    .sidebar-header {
        padding: 15px 10px;
    }

    .sidebar-header h1 {
        font-size: 20px;
    }

    .tab-button {
        font-size: 10px;
        padding: 5px 8px;
        min-width: 60px;
    }

    .modal-content {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn-primary,
    .form-actions .btn-secondary {
        width: 100%;
    }

    .drawing-toolbar {
        flex-direction: column;
        gap: 8px;
        padding: 10px;
    }
}

/* ============ SEARCH/FILTER PANEL ============ */
.filter-group {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.filter-title {
    display: block;
    padding: 12px 15px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    user-select: none;
    transition: background 0.2s;
}

.filter-group[open] .filter-title {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.filter-title:hover {
    background: rgba(255, 255, 255, 0.05);
}

.filter-content {
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-actions {
    display: flex;
    gap: 8px;
    margin-top: 5px;
}

.btn-small {
    padding: 8px 12px;
    font-size: 12px;
    min-width: auto;
    flex: 1;
}

/* ============ LAYER SELECTOR ============ */
.layer-selector {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 15px;
}

.layer-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    opacity: 0.95;
    font-weight: 600;
}

.layer-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.layer-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    cursor: pointer;
    padding: 6px 0;
}

.layer-option input[type="checkbox"] {
    cursor: pointer;
    accent-color: #4CAF50;
}

.layer-group-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 10px;
    margin-bottom: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    opacity: 0.7;
    font-weight: 700;
    color: white;
}

.layer-group-title:first-child {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}

/* ============ CHOROPLETH LEGEND ============ */
.choropleth-legend {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 15px;
}

.legend-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    opacity: 0.95;
    font-weight: 600;
}

.legend-range {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Multi-layer legend sections */
.legend-section {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.legend-layer-name {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    opacity: 0.9;
}

/* ============ CHOROPLETH POPUP ============ */
.choropleth-popup {
    padding: 8px;
    text-align: center;
    font-size: 12px;
}

/* ============ NEW LAYOUT: MINIMAL SIDEBAR REDESIGN ============ */

/* Restructure app container for new layout */
.app-container {
    display: flex;
    flex-direction: row;
    height: 100vh;
}

/* Reduce sidebar to minimal width with vertical navigation */
.sidebar {
    width: 140px !important;
    padding: 10px !important;
    flex-shrink: 0;
}

.sidebar-header {
    display: none !important;
    padding: 15px 5px !important;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 10px;
}

.sidebar-header h1 {
    font-size: 28px;
    margin-bottom: 0 !important;
    margin: 0;
}

.subtitle {
    display: none !important;
}

/* Vertical navigation buttons in sidebar */
.sidebar-tabs {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    background: transparent;
    border-bottom: none;
}

.tab-button {
    flex: none;
    min-width: auto;
    width: auto;
    padding: 12px 10px;
    font-size: 12px;
    white-space: normal;
    line-height: 1.2;
    text-align: center;
    margin: 4px 0;
    background: transparent;
    opacity: 0.7;
    border: none;
    border-left: 3px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.tab-button:hover {
    opacity: 1;
}

.tab-button.tab-active {
    opacity: 1;
    border-left: 3px solid white;
}

.tab-icon {
    font-size: 18px;
    line-height: 1;
}

.tab-label {
    font-size: 11px;
    letter-spacing: 0.2px;
}

#users-tab-btn {
    margin-top: auto;
}

/* Hide all sidebar content - will show in main area */
.sidebar-content {
    display: none !important;
}

/* Main content area shows tab content */
.main-content {
    flex: 1;
    display: flex !important;
    flex-direction: column;
    overflow-y: auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Remove default map-only display */
.main-content > #map {
    display: none !important;
}

/* Peta tab map container - shows map when peta is selected */
#peta-tab {
    position: relative;
    min-height: calc(100vh - 140px);
}

#peta-map-container {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1 !important;
    border-radius: 8px;
}

#peta-tab #peta-map-container {
    display: block !important;
}

#peta-tab .household-panel {
    position: relative;
    z-index: 10;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    margin: 10px;
}

/* Toggle button for household panel */
.toggle-panel-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 100;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.toggle-panel-btn:hover {
    background: rgba(102, 126, 234, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Household panel wrapper - compact overlay */
.household-panel-wrapper {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 320px;
    max-height: 75vh;
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    z-index: 50;
    overflow-y: auto;
    display: none;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 0;
}

.household-panel-wrapper.visible {
    display: flex;
}

/* Panel header with close button */
.household-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(102, 126, 234, 0.2);
    border-bottom: 1px solid rgba(102, 126, 234, 0.3);
    color: white;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

.household-panel-header span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Close button */
.close-panel-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    min-width: auto;
    width: auto;
    transition: color 0.2s ease;
}

.close-panel-btn:hover {
    color: white;
}

/* Compact button styles for peta panel */
.btn-compact {
    padding: 8px 10px !important;
    font-size: 12px !important;
    gap: 4px !important;
}

.btn-compact .btn-text {
    display: inline;
}

.household-panel-wrapper .household-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
}

.household-panel-wrapper .form-group {
    padding: 8px 10px;
}

.household-panel-wrapper .form-group label {
    font-size: 11px;
    margin-bottom: 4px;
}

.household-panel-wrapper .form-group select {
    font-size: 11px;
    padding: 6px;
}

.household-panel-wrapper .stats-grid {
    gap: 4px;
    padding: 8px 10px;
}

.household-panel-wrapper .stats-card {
    padding: 6px;
}

.household-panel-wrapper .stat-number {
    font-size: 14px;
}

.household-panel-wrapper .stat-label {
    font-size: 10px;
}

.household-panel-wrapper .household-panel {
    padding: 8px;
}

.household-panel-wrapper .legend-title {
    font-size: 12px;
    padding: 8px 10px 4px;
}

.household-panel-wrapper .household-priority-box {
    padding: 8px 10px;
}

.household-panel-wrapper .household-priority-box .legend-title {
    padding: 0 0 4px 0;
}

/* Tab content displays in main area */
.main-content .tab-content {
    display: none !important;
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    width: 100%;
}

.main-content .tab-content.tab-active {
    display: flex !important;
    flex-direction: column;
    gap: 20px;
}

/* Style KPI cards for main area display */
.main-content .kpi-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.main-content .kpi-card {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.main-content .kpi-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.main-content .kpi-icon {
    font-size: 32px;
    margin-bottom: 15px;
}

.main-content .kpi-label {
    color: #999;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.main-content .kpi-value {
    color: #667eea;
    font-size: 36px;
    font-weight: 700;
    margin: 8px 0;
}

.main-content .kpi-subtitle {
    color: #999;
    font-size: 13px;
}

.main-content .kpi-trend {
    background: #f5f5f5;
    color: #333;
    font-size: 12px;
    margin-top: 10px;
    padding: 8px;
    border-radius: 4px;
}

.main-content .kpi-trend.positive {
    color: #4caf50;
}

.main-content .kpi-trend.negative {
    color: #f44336;
}

/* Report cards styling */
.main-content .report-card {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 25px;
    border-radius: 8px;
}

.main-content .report-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.main-content .report-card h3 {
    color: #333;
    margin: 0 0 10px 0;
}

.main-content .report-card p {
    color: #666;
    font-size: 13px;
}

.main-content .report-preview {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.main-content .report-preview strong {
    color: #667eea;
}

.main-content .report-preview ul {
    margin: 10px 0 0 20px;
}

.main-content .report-preview li {
    color: #666;
    font-size: 13px;
    margin: 5px 0;
}

.main-content .btn-download {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    width: 100%;
    margin-top: 10px;
}

.main-content .btn-download:hover {
    background: #5568d3;
}

/* Report options grid */
.main-content .report-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

/* Laporan container */
.main-content .laporan-container {
    color: #333;
}

.main-content .laporan-container h2 {
    color: #333;
    margin-bottom: 10px;
}

.main-content .laporan-subtitle {
    color: #999;
    margin-bottom: 30px;
}

/* Dashboard container */
.main-content .dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-content .dashboard-section {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    padding: 25px;
    border-radius: 8px;
}

.main-content .dashboard-title {
    color: #333;
    margin: 0 0 15px 0;
}

/* Stats cards in main area */
.main-content .stats-card {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.main-content .stat-number {
    color: #667eea;
    font-size: 28px;
}

/* Trend section */
.main-content .trend-section {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    padding: 25px;
    border-radius: 8px;
}

.main-content .trend-section h3 {
    color: #333;
    margin: 0 0 10px 0;
}

.main-content .trend-section p {
    color: #999;
    font-size: 13px;
}

/* Region data section */
.main-content .region-data-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.main-content .region-list {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.main-content .region-list h3 {
    color: #333;
    margin: 0 0 15px 0;
}

.main-content .map-preview {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 250px;
}

.main-content .map-preview h3 {
    color: #333;
    margin-bottom: 10px;
}

.main-content .map-preview p {
    color: #999;
    font-size: 13px;
}

.main-content .btn-peta {
    background: #667eea;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.main-content .btn-peta:hover {
    background: #5568d3;
}

/* Household panel styles */
.main-content .household-panel {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.main-content .household-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

.main-content .household-list {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

/* Responsive design adjustments */
@media (max-width: 1200px) {
    .main-content .report-options {
        grid-template-columns: 1fr;
    }
    
    .main-content .kpi-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-content .region-data-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px !important;
    }

    .tab-button {
        width: 100%;
        font-size: 9px;
        padding: 8px 4px;
    }

    .tab-icon {
        font-size: 16px;
    }

    .tab-label {
        font-size: 9px;
        line-height: 1.1;
    }

    .main-content {
        padding: 0;
    }

    .main-content .tab-content {
        padding: 15px;
    }

    .main-content .kpi-cards-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 15px;
    }

    .main-content .report-options {
        grid-template-columns: 1fr;
    }

    .main-content .kpi-card {
        padding: 15px;
    }

    .main-content .stats-card {
        padding: 15px;
    }
}

/* Compact Beranda tab styling */
#beranda-tab {
    overflow-y: visible !important;
}

#beranda-tab .dashboard-container {
    gap: 10px !important;
}

#beranda-tab .kpi-cards-grid {
    gap: 10px !important;
    margin-bottom: 10px !important;
}

#beranda-tab .kpi-card {
    padding: 12px !important;
    gap: 10px !important;
}

#beranda-tab .kpi-icon {
    font-size: 24px !important;
}

#beranda-tab .kpi-value {
    font-size: 22px !important;
}

#beranda-tab .kpi-label {
    font-size: 10px !important;
}

#beranda-tab .trend-section {
    padding: 10px !important;
    margin-bottom: 5px !important;
}

#beranda-tab .trend-section h3 {
    font-size: 13px !important;
    margin-bottom: 5px !important;
}

#beranda-tab .trend-section p {
    font-size: 10px !important;
    margin-bottom: 5px !important;
}

#beranda-tab canvas {

#beranda-tab .region-data-section {
    gap: 10px !important;
}

#beranda-tab .region-list,
#beranda-tab .map-preview {
    padding: 10px !important;
}

#beranda-tab .region-list h3,
#beranda-tab .map-preview h3 {
    font-size: 12px !important;
    margin-bottom: 5px !important;
}

/* ============ MAP VISUALIZATION CONTRAST FIXES ============ */
/* Improve contrast for Leaflet controls, popups, drawing toolbar, and map tools */
.leaflet-control {
    background: rgba(20, 20, 20, 0.65) !important;
    color: #fff !important;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.leaflet-control a,
.leaflet-control button,
.leaflet-control .leaflet-control-layers-toggle,
.leaflet-control-layers-list label {
    color: #fff !important;
}
.leaflet-control .leaflet-bar a,
.leaflet-control .leaflet-bar a:hover {
    background: rgba(0, 0, 0, 0.55) !important;
    color: #fff !important;
    border: none !important;
}
.leaflet-control-layers {
    background: rgba(20, 20, 20, 0.85) !important;
    color: #fff !important;
    border: none !important;
}
.leaflet-control-scale {
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    padding: 3px 6px;
    border-radius: 4px;
}
.leaflet-popup-content-wrapper {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #111 !important;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}
.leaflet-popup-content,
.leaflet-popup-tip {
    color: #111 !important;
}
.leaflet-popup-content p,
.leaflet-popup-content h1,
.leaflet-popup-content h2,
.leaflet-popup-content h3,
.leaflet-popup-content span {
    color: #111 !important;
}
.marker-popup-name,
.feature-popup-name {
    color: #111 !important;
}
.marker-popup-info,
.feature-popup-info {
    color: #333 !important;
}
.drawing-toolbar {
    background: rgba(20, 20, 20, 0.88);
    color: #fff;
}
.drawing-instruction,
.drawing-progress {
    color: #fff;
}
.feature-popup-actions button {
    color: #fff;
}
.feature-popup-actions button:nth-child(1) { background-color: #1976d2; }
.feature-popup-actions button:nth-child(2) { background-color: #fb8c00; }
.feature-popup-actions button:nth-child(3) { background-color: #e53935; }

/* Map tool buttons (IDs used in UI) */
.map-tools button,
.map-tools .btn-compact,
#add-point-btn,
#add-masjid-btn,
#add-need-point-btn,
#add-line-btn,
#add-polygon-btn {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 10px;
    border-radius: 6px;
}
.map-tools button:hover,
.map-tools .btn-compact:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.16);
}
.toggle-panel-btn {
    background: linear-gradient(90deg, #2b6cb0, #764ba2) !important;
    color: #fff !important;
}

/* Make household panel light so text is readable on dark map */
.household-panel-wrapper {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #111 !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}
.household-panel-header {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #111 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.leaflet-control-layers-list label { color: #fff !important; }
.legend-item, .legend-title { color: #fff !important; }

@media (max-width: 768px) {
    .leaflet-control {
        background: rgba(20, 20, 20, 0.85) !important;
    }
}

/* Responsive design for beranda chart grid */
@media (max-width: 900px) {
    #beranda-tab > .dashboard-container > div:nth-child(2) {
        grid-template-columns: 1fr !important;
    }
}
