:root {
    --primary: #0f172a; /* Sleek Deep Slate */
    --primary-hover: #1e293b;
    --primary-light: #f1f5f9;
    
    --secondary: #10b981; /* Premium Emerald */
    --secondary-hover: #047857;
    --secondary-light: #ecfdf5;
    
    --accent: #f59e0b; /* Pastel Amber */
    
    /* Clean Light Theme Colors */
    --bg-main: #f8fafc;
    --bg-gradient: linear-gradient(to bottom, #f8fafc 0%, #f1f5f9 100%);
    --card-bg: #ffffff; /* Solid white pop-up card */
    --card-border: rgba(15, 23, 42, 0.04);
    --card-border-hover: rgba(59, 130, 246, 0.12);
    
    --text-main: #0f172a; /* Deep slate */
    --text-muted: #64748b; /* Slate gray */
    
    --success: #10b981;
    --success-light: #d1fae5;
    --error: #ef4444;
    --error-light: #fee2e2;
    
    --font-sans: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.01), 0 1px 2px -1px rgba(0, 0, 0, 0.01);
    --shadow-md: 0 10px 30px -5px rgba(15, 23, 42, 0.02), 0 8px 10px -6px rgba(15, 23, 42, 0.02);
    --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.03);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

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

body {
    font-family: var(--font-sans);
    background-color: #f1f5f9; 
    /* Gradasi toska-biru + masking tipis agar gambar instansi menyatu */
    background-image: 
        linear-gradient(to bottom, rgba(59, 130, 246, 0.05) 0%, rgba(16, 185, 129, 0.03) 20%, #f1f5f9 100%),
        linear-gradient(to bottom, rgba(241, 245, 249, 0.88), rgba(241, 245, 249, 0.92)),
        url('bg-kecamatan.png');
    /* Lebar 100% dan tinggi otomatis mengikuti rasio agar fit sempurna */
    background-size: 100% auto, 100% 100%, 100% auto;
    background-position: center top, center center, center top;
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-attachment: scroll; /* Scroll mengikuti halaman secara alami agar tetap fit */
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Header & Navigation - Royal Navy Gelap Premium */
header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    height: 44px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.brand-info h1 {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.6px;
    background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-info p {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

.auth-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #dbeafe 100%);
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.05);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    border: 1px solid transparent;
}

.btn:hover {
    transform: translateY(-1.5px);
}

.btn:active {
    transform: translateY(0.5px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.btn-primary:hover {
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.25);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-main);
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

.btn-outline:hover {
    background: #ffffff;
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.05);
}

.btn-danger {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.btn-danger:hover {
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.25);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-hover) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.btn-secondary:hover {
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.25);
}

/* Layout Main */
main {
    max-width: 1400px; /* Dikembalikan ke ukuran lebar asli dashboard */
    margin: 0 auto;
    padding: 32px 24px;
}

/* Khusus Workspace Halaman Admin */
main.admin-main {
    max-width: 1100px;
}

/* Filters Section */
.filter-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-grid label, .filter-group label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.filter-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: var(--radius-md);
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    outline: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-control:focus {
    border-color: var(--primary);
    background-color: var(--card-bg);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

select.filter-control option {
    background-color: var(--modal-bg);
    color: var(--text-main);
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.kpi-card {
    background: var(--card-bg); /* Premium Glass Card */
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.02), 0 8px 10px -6px rgba(15, 23, 42, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

/* Border-left aksen berwarna untuk menghilangkan kesan polos */
.kpi-grid .kpi-card:nth-child(1) { border-left: 5px solid #3b82f6; } /* Royal Blue */
.kpi-grid .kpi-card:nth-child(2) { border-left: 5px solid #10b981; } /* Emerald */
.kpi-grid .kpi-card:nth-child(3) { border-left: 5px solid #f59e0b; } /* Amber */
.kpi-grid .kpi-card:nth-child(4) { border-left: 5px solid #8b5cf6; } /* Purple */

.kpi-card:hover {
    transform: translateY(-6px);
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 25px 40px -10px rgba(59, 130, 246, 0.12), 0 10px 20px -5px rgba(15, 23, 42, 0.03);
}

.kpi-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.kpi-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -1px;
}

.kpi-desc {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 6px;
}

.kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.02);
}

.kpi-icon-blue {
    background: #eff6ff;
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.kpi-icon-teal {
    background: #ecfdf5;
    color: var(--secondary);
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.kpi-icon-orange {
    background: #fffbeb;
    color: var(--accent);
    border: 1px solid rgba(245, 158, 11, 0.1);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.chart-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.02), 0 8px 10px -6px rgba(15, 23, 42, 0.02);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    border-top: 4px solid #3b82f6; /* Aksen toska/biru di atas card */
}

.chart-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 25px 40px -10px rgba(59, 130, 246, 0.1), 0 10px 20px -5px rgba(15, 23, 42, 0.02);
}

.chart-card-lg {
    grid-column: span 8;
}

.chart-card-sm {
    grid-column: span 4;
}

.chart-card-full {
    grid-column: span 12;
}

.chart-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.2px;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 340px;
}

/* Tables */
.table-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.02), 0 8px 10px -6px rgba(15, 23, 42, 0.02);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    margin-bottom: 32px;
    overflow: hidden;
    border-top: 4px solid #3b82f6; /* Aksen Biru Royal Instansi */
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.table-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 25px 40px -10px rgba(59, 130, 246, 0.1), 0 10px 20px -5px rgba(15, 23, 42, 0.02);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.table-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.4px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

table.data-table th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-weight: 700;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    text-transform: uppercase;
    font-size: 11.5px;
    letter-spacing: 0.8px;
}

table.data-table td {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.03);
    color: var(--text-main);
    font-weight: 500;
}

table.data-table tr:nth-child(even) {
    background-color: #f8fafc; /* Zebra stripe row */
}

table.data-table tr:last-child td {
    border-bottom: none;
}

table.data-table tr:hover td {
    background-color: rgba(59, 130, 246, 0.03) !important;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.badge-error {
    background-color: var(--error-light);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.pagination-buttons {
    display: flex;
    gap: 8px;
}

/* Login Page Styling */
.login-body {
    background: #f1f5f9;
    background-image: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.05);
    width: 90%;
    max-width: 440px;
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

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

.login-logo {
    width: 72px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.05));
}

.login-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.6px;
}

.login-header p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 500;
}

.form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: var(--radius-md);
    background-color: rgba(255, 255, 255, 0.7);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-control:focus {
    background-color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-error {
    background: rgba(239, 68, 68, 0.08);
    color: var(--error);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 24px;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

/* Admin Dashboard CSS */
.admin-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Tabs - Segmented Pill Control */
.tabs-container {
    display: inline-flex;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.05);
    padding: 5px;
    border-radius: 9999px; /* Pill segment control */
    margin-bottom: 32px;
    gap: 4px;
}

.tab-btn {
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 9999px; /* Pill buttons */
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-bottom: none !important;
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    color: #ffffff !important;
    background: var(--primary) !important; /* Deep Slate */
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}

.tab-content {
    display: none;
}

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

/* Instruction Card style */
.instruction-card {
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid rgba(15, 23, 42, 0.04);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 22px;
    margin-bottom: 28px;
}

/* Upload Area - Hover Lift and Pulsing Glow */
.upload-zone {
    border: 2px dashed rgba(15, 23, 42, 0.12);
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    padding: 64px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    position: relative;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--secondary) !important;
    background-color: rgba(16, 185, 129, 0.02) !important;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.05) !important;
    transform: translateY(-2.5px);
}

.upload-icon {
    font-size: 48px;
    color: var(--text-muted);
    transition: color 0.25s;
}

.upload-zone:hover .upload-icon {
    color: var(--primary);
}

.upload-text {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.upload-text strong {
    color: var(--primary);
}

.upload-formats {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    font-weight: 500;
}

.upload-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
}

/* Preview Actions & Table */
.preview-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-top: 32px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--error);
}

/* Search and actions bar in Tables */
.actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.search-input {
    padding: 10px 14px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: var(--radius-md);
    background-color: rgba(255, 255, 255, 0.7);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    min-width: 280px;
    transition: all 0.25s ease;
}

.search-input:focus {
    border-color: var(--primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Loading Overlay (Component/Table level) */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: var(--radius-lg);
    display: none;
    transition: all 0.3s ease;
}

.spinner {
    width: 46px;
    height: 46px;
    border: 4px solid rgba(59, 130, 246, 0.1);
    border-left-color: var(--primary);
    border-right-color: var(--secondary);
    border-radius: 50%;
    animation: spinPremium 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}

/* Premium Full Page Loader Overlay */
.page-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    color: #ffffff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    gap: 20px;
}

.page-loader-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.page-loader-box {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-lg);
    padding: 32px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    text-align: center;
    color: var(--text-main);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.page-loader-overlay.show .page-loader-box {
    transform: scale(1);
}

.premium-spinner {
    width: 54px;
    height: 54px;
    border: 4px solid rgba(59, 130, 246, 0.1);
    border-left-color: var(--primary);
    border-right-color: var(--secondary);
    border-radius: 50%;
    animation: spinPremium 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    margin-bottom: 16px;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.loading-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    animation: bounceDot 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes spinPremium {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes bounceDot {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

/* Modal Dialog */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.08);
    position: relative;
    overflow: hidden;
    transform: scale(0.94) translateY(10px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    opacity: 0;
}

.modal-overlay.show .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.modal-body {
    margin-bottom: 28px;
    font-size: 14px;
    color: var(--text-muted);
}

.modal-content form {
    display: block;
    width: 100%;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.05);
    padding-top: 20px;
}

/* Responsive breakdowns */
@media (max-width: 1024px) {
    .chart-card-lg {
        grid-column: span 12;
    }
    
    .chart-card-sm {
        grid-column: span 12;
    }
    .bottom-card-4 {
        grid-column: span 12;
    }
}

/* Custom Legend for Doughnut Chart */
.chart-container-doughnut {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    height: 100%;
}
.doughnut-wrapper {
    position: relative;
    width: 50%;
    height: 100%;
}
.chart-center-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}
.center-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.center-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
    margin: 4px 0;
}
.center-subtitle {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}
.custom-legend-container {
    width: 50%;
    max-height: 100%;
    overflow-y: auto;
    padding-left: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.legend-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.03);
}
.legend-item-row:last-child {
    border-bottom: none;
}
.legend-label-left {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 60%;
}
.legend-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.legend-text {
    font-weight: 600;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
}
.legend-values-right {
    display: flex;
    gap: 12px;
    font-weight: 700;
}
.legend-val-num {
    color: var(--text-main);
}
.legend-val-pct {
    color: var(--text-muted);
    font-size: 11px;
    min-width: 40px;
    text-align: right;
}

/* Bottom Grid layout */
.bottom-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}
.bottom-card-4 {
    grid-column: span 4;
}

/* Officer Performance row */
.performance-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}
.officer-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.officer-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
}
.officer-name {
    color: var(--text-main);
}
.officer-completed {
    color: var(--text-muted);
}
.officer-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}
.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 9999px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 9999px;
}
.officer-rate {
    font-size: 12px;
    font-weight: 700;
    min-width: 32px;
    text-align: right;
}

/* Feedback Card styles */
.feedback-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.smiley-icon-box {
    width: 48px;
    height: 48px;
    background: #ecfdf5;
    color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}
.rating-big-num {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
}
.rating-scale {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}
.rating-star-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.star-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}
.star-label {
    min-width: 24px;
    display: flex;
    align-items: center;
    gap: 2px;
}
.star-fill-bar-bg {
    flex-grow: 1;
    height: 6px;
    background: #f1f5f9;
    border-radius: 9999px;
    overflow: hidden;
}
.star-fill-bar-fill {
    height: 100%;
    background: #10b981;
    border-radius: 9999px;
}
.star-pct {
    min-width: 28px;
    text-align: right;
}

.feedback-testimonial-box {
    margin-top: 18px;
    background: #eff6ff;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--primary-hover);
    font-weight: 500;
    border-left: 3px solid var(--primary);
}

/* KPI Helper Icon Tooltips */
.kpi-info-icon {
    font-size: 10px;
    margin-left: 6px;
    cursor: help;
    color: var(--text-muted);
    opacity: 0.6;
    transition: opacity 0.2s, color 0.2s;
    background: rgba(15, 23, 42, 0.05);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}
.kpi-info-icon:hover {
    opacity: 1;
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

/* Real Trend Badges */
.trend-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    line-height: 1;
}
.trend-badge-up {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}
.trend-badge-down {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Modern Print Layout Optimization */
@media print {
    /* Force background colors and graphics to print in Chrome/Safari/Edge */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-family: 'Plus Jakarta Sans', Arial, sans-serif !important;
        min-height: auto !important;
    }
    
    /* Fluid widths to prevent scale-down squishing */
    main, header, .header-container {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 8px !important;
        box-shadow: none !important;
        background: #ffffff !important;
    }
    
    header {
        position: static !important;
        border-bottom: 2px solid #e2e8f0 !important;
        margin-bottom: 15px !important;
    }
    
    /* Solid text color for brand h1 instead of clip-text gradients which break on printing */
    .brand-info h1 {
        -webkit-text-fill-color: #0f172a !important;
        color: #0f172a !important;
        background: none !important;
        font-size: 20px !important;
        line-height: 1.2 !important;
    }
    
    .brand-logo {
        height: 38px !important;
    }
    
    /* Hide non-printable elements */
    .filter-card, 
    .auth-nav,
    .pagination,
    .table-header button,
    .table-header input,
    #loading-overlay,
    .kpi-info-icon,
    p[style*="margin-bottom: 24px"] {
        display: none !important;
    }
    
    /* KPI Grid layout in Print: 2 columns to prevent squishing */
    .kpi-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
        margin-bottom: 24px !important;
    }
    .kpi-card {
        border: 1px solid #cbd5e1 !important;
        box-shadow: none !important;
        background: #ffffff !important;
        padding: 16px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        page-break-inside: avoid !important;
    }
    
    .kpi-value {
        font-size: 26px !important;
        margin-bottom: 4px !important;
    }
    
    .kpi-icon {
        width: 42px !important;
        height: 42px !important;
        font-size: 18px !important;
    }
    
    /* Trend Badges styling in Print */
    .trend-badge {
        font-size: 10px !important;
        padding: 2px 6px !important;
        border-radius: 4px !important;
        border: 1px solid rgba(0,0,0,0.05) !important;
    }
    
    /* Charts layout in Print: Full-width stacked */
    .charts-grid {
        display: block !important;
    }
    .chart-card {
        page-break-inside: avoid !important;
        border: 1px solid #cbd5e1 !important;
        box-shadow: none !important;
        margin-bottom: 24px !important;
        background: #ffffff !important;
        padding: 20px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .chart-card-lg, .chart-card-sm, .chart-card-full {
        width: 100% !important;
        grid-column: span 12 !important;
    }
    
    .chart-container-doughnut {
        gap: 16px !important;
    }
    
    /* Table print layout */
    .table-card {
        box-shadow: none !important;
        border: 1px solid #cbd5e1 !important;
        page-break-before: always !important; /* Starts table on Page 2 */
        padding: 20px !important;
    }
    .data-table {
        width: 100% !important;
        border-collapse: collapse !important;
    }
    .data-table th {
        background-color: #f8fafc !important;
        color: #0f172a !important;
        border-bottom: 2px solid #cbd5e1 !important;
    }
    .data-table td, .data-table th {
        padding: 10px 12px !important;
        border-bottom: 1px solid #e2e8f0 !important;
        font-size: 11px !important;
    }
}

/* User Profile Widget in Header - Minimalis Modern Tanpa Kapsul */
.user-profile-widget {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
    gap: 16px;
    transition: none;
}
.user-profile-widget:hover {
    background: transparent;
    border-color: transparent;
}
.user-avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    flex-shrink: 0;
}
.user-info-text {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}
.user-name-label {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff; /* Putih kontras */
}
.user-role-label {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8; /* Abu-abu terang kontras */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.widget-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    padding-left: 16px;
}
.widget-btn {
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.btn-admin {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.btn-admin:hover {
    background: #ffffff;
    color: #0f172a !important;
    border-color: #ffffff;
    transform: translateY(-1.5px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}
.btn-logout {
    color: #94a3b8 !important;
    background: transparent;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-logout:hover {
    color: #f87171 !important; /* Merah lembut saat hover */
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
}

/* Custom Styled Action Buttons for Tables */
.btn-action-reset {
    background: rgba(16, 185, 129, 0.08) !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
    color: #047857 !important;
    padding: 6px 14px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    text-decoration: none !important;
}
.btn-action-reset:hover {
    background: #10b981 !important;
    color: white !important;
    border-color: #10b981 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2) !important;
}

.btn-action-delete {
    background: rgba(239, 68, 68, 0.08) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    color: #b91c1c !important;
    padding: 6px 14px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    text-decoration: none !important;
}
.btn-action-delete:hover {
    background: #ef4444 !important;
    color: white !important;
    border-color: #ef4444 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2) !important;
}

.btn-action-edit {
    background: rgba(14, 165, 233, 0.08) !important;
    border: 1px solid rgba(14, 165, 233, 0.25) !important;
    color: #0369a1 !important;
    padding: 6px 14px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    text-decoration: none !important;
}
.btn-action-edit:hover {
    background: #0ea5e9 !important;
    color: white !important;
    border-color: #0ea5e9 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.25) !important;
}

/* Eye-Catching Direct Input Form Styles */
.input-form-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 16px 16px 0 0;
    padding: 32px;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid rgba(14, 165, 233, 0.2);
}

.input-form-header-glow {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, rgba(0,0,0,0) 70%);
    filter: blur(20px);
    pointer-events: none;
}

.input-form-body {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--card-border, rgba(15, 23, 42, 0.08));
    border-top: none;
    border-radius: 0 0 16px 16px;
    padding: 32px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.input-field-card {
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
}

.input-field-card:focus-within {
    border-color: rgba(14, 165, 233, 0.4);
    background: rgba(14, 165, 233, 0.01);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.03);
}

.input-field-label {
    font-size: 11px;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    display: block;
    margin-bottom: 8px;
}

.input-field-control {
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    background: #fff !important;
    transition: all 0.2s ease !important;
    width: 100%;
}

.input-field-control:focus {
    border-color: #0ea5e9 !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15) !important;
}

.input-kel-locked {
    padding: 12px 14px;
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.15);
    border-radius: 8px;
    font-weight: 700;
    color: #0369a1;
    font-size: 14px;
}

.input-section-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 32px 0 20px;
}

.input-section-divider::before,
.input-section-divider::after {
    content: '';
    flex: 1;
    border-bottom: 2px dashed rgba(15, 23, 42, 0.06);
}

.input-section-divider span {
    padding: 0 16px;
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 1.5px;
}

/* Pelayanan Rows Modern Layout (3-Column Grid) */
.pelayanan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

.pelayanan-row {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    background: rgba(15, 23, 42, 0.015);
    border: 1px solid rgba(15, 23, 42, 0.04);
    border-radius: 10px;
    transition: all 0.15s ease;
}

.pelayanan-row:hover {
    background: rgba(14, 165, 233, 0.02);
    border-color: rgba(14, 165, 233, 0.15);
    transform: translateX(2px);
}

.pelayanan-num {
    width: 32px;
    height: 24px;
    background: rgba(15, 23, 42, 0.05);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    margin-right: 14px;
}

.pelayanan-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.pelayanan-input-styled {
    width: 90px !important;
    text-align: center !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    border-radius: 8px !important;
    padding: 6px 10px !important;
    transition: all 0.2s ease !important;
}

.pelayanan-input-styled:focus {
    border-color: #0ea5e9 !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15) !important;
    background: #fff !important;
}

.pelayanan-input-styled:not([value="0"]):not(:placeholder-shown) {
    border-color: rgba(14, 165, 233, 0.5) !important;
    background: rgba(14, 165, 233, 0.03) !important;
}

/* Submit Area Modern Styles */
.input-submit-area {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    flex-wrap: wrap;
}

.btn-submit-main {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.3);
    transition: all 0.2s ease;
}

.btn-submit-main:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.btn-reset-form:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Premium Manage Data Section Styles */
.manage-data-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-top: 8px;
    transition: background 0.3s ease;
}

.manage-header-premium {
    padding: 32px 32px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border-bottom: 1px solid var(--card-border);
}

.manage-title-premium {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.3px;
    margin: 0;
}

.manage-top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
    min-width: 280px;
}

.search-input-premium {
    width: 100%;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 10px 40px 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    background: var(--bg-main);
    transition: all 0.2s ease;
}

.search-input-premium:focus {
    border-color: #0ea5e9;
    background: var(--card-bg);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
    outline: none;
}

.btn-danger-premium {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    font-size: 13px;
    font-weight: 700;
    border-radius: 10px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger-premium:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
}

.input-top-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

/* Premium Filter Panel */
.manage-filter-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    padding: 24px 32px;
    background: rgba(15, 23, 42, 0.005);
    border-bottom: 1px solid var(--card-border);
}

.filter-card-premium {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 10px 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.01);
}

.filter-label-premium {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}

.filter-select-premium {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    padding: 2px 0 0;
}

/* Override option background */
.filter-select-premium option {
    background-color: var(--modal-bg);
    color: var(--text-main);
}

.filter-select-premium:focus {
    outline: none;
}

/* Premium Table Styles */
.table-responsive-premium {
    overflow-x: auto;
    margin: 20px 0;
}

.table-premium {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Mencegah tabel melar melampaui kontainer 1100px */
}

.table-premium th {
    text-align: left;
    padding: 14px 16px;
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    border-bottom: 2px solid rgba(15, 23, 42, 0.06);
}

/* Penyesuaian lebar kolom piksel tetap yang aman dari wrap karakter */
.table-premium th:nth-child(1), .table-premium td:nth-child(1) { width: 140px; } /* Periode (Cukup untuk 2026 September) */
.table-premium th:nth-child(2), .table-premium td:nth-child(2) { width: 180px; } /* Unit Kerja (Cukup untuk Kecamatan Cibodas) */
.table-premium th:nth-child(3), .table-premium td:nth-child(3) { 
    width: auto; 
    word-break: break-word;
    white-space: normal; 
} /* Jenis Pelayanan (Mengambil sisa lebar secara fleksibel) */
.table-premium th:nth-child(4), .table-premium td:nth-child(4) { width: 150px; text-align: center; } /* Jumlah Pelayanan */
.table-premium th:nth-child(5), .table-premium td:nth-child(5) { width: 180px; text-align: center; } /* Aksi Data */

.table-row-premium {
    border-bottom: 1px solid rgba(15, 23, 42, 0.04);
    transition: all 0.15s ease;
}

.table-row-premium:hover {
    background: rgba(14, 165, 233, 0.015);
}

.table-row-premium td {
    padding: 16px;
    vertical-align: middle;
}

.td-period-premium {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.manage-year-text {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
}

.manage-month-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.manage-jumlah-badge {
    background: var(--bg-main);
    padding: 6px 14px;
    border-radius: 9999px;
    font-weight: 800;
    color: var(--text-main);
    font-size: 13px;
    display: inline-block;
    min-width: 50px;
    text-align: center;
    border: 1px solid var(--card-border);
}

/* Premium Badges for Kelurahan */
.badge-premium-kel {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.1px;
}

.badge-kel-1 { background: rgba(14, 165, 233, 0.08); color: #0284c7; }
.badge-kel-2 { background: rgba(16, 185, 129, 0.08); color: #059669; }
.badge-kel-3 { background: rgba(139, 92, 246, 0.08); color: #7c3aed; }
.badge-kel-4 { background: rgba(245, 158, 11, 0.08); color: #d97706; }
.badge-kel-5 { background: rgba(236, 72, 153, 0.08); color: #db2777; }
.badge-kel-6 { background: rgba(79, 70, 229, 0.08); color: #4f46e5; }
.badge-kel-kec { background: rgba(100, 116, 139, 0.08); color: #475569; }
.badge-kelurahan-default { background: rgba(15, 23, 42, 0.05); color: #1e293b; }

/* Premium Action Buttons */
.btn-action-edit-premium {
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.15);
    color: #0284c7;
    font-size: 11px;
    font-weight: 700;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-action-edit-premium:hover {
    background: #0ea5e9;
    color: #ffffff;
    border-color: #0ea5e9;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.2);
    transform: translateY(-1px);
}

.btn-action-delete-premium {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #ef4444;
    font-size: 11px;
    font-weight: 700;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-action-delete-premium:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
}

/* Premium Pagination Bar */
.pagination-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-top: 1px solid rgba(15, 23, 42, 0.05);
    background: rgba(15, 23, 42, 0.005);
}

.btn-page-premium {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-page-premium:hover:not(:disabled) {
    border-color: rgba(15, 23, 42, 0.15);
    background: #fafafa;
    color: #0f172a;
}

.btn-page-premium:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Premium Glassmorphic Login Styles (Clean Light Theme - Senada dengan Dashboard & Admin) */
.login-page-premium {
    font-family: var(--font-sans);
    background: var(--bg-main);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 24px;
}

/* Orb cahaya lembut disesuaikan ke warna pastel terang */
.login-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

.orb-1 {
    width: 350px;
    height: 350px;
    background: #dbeafe; /* Soft blue */
    top: -50px;
    left: -50px;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: #d1fae5; /* Soft emerald */
    bottom: -50px;
    right: -50px;
}

.login-container-premium {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

.login-card-premium {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08),
                0 1px 3px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.login-card-premium:hover {
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.12);
}

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

.login-logo-ring {
    width: 72px;
    height: 72px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.login-logo-premium {
    height: 48px;
    width: auto;
}

.login-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    margin: 0 0 6px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    font-weight: 500;
}

.form-error-premium {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: var(--error);
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.form-label-premium {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: block;
    margin-bottom: 8px;
}

.input-icon-premium {
    position: absolute;
    left: 14px;
    top: 13px;
    font-size: 15px;
    color: #94a3b8;
    pointer-events: none;
}

.form-control-premium {
    width: 100%;
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: 10px !important;
    padding: 11px 16px 11px 40px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--text-main) !important;
    outline: none !important;
    transition: all 0.2s ease !important;
}

.form-control-premium::placeholder {
    color: var(--text-muted) !important;
}

.form-control-premium:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.btn-submit-premium {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 13px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
    transition: all 0.25s ease;
    margin-top: 8px;
}

.btn-submit-premium:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
    background: linear-gradient(135deg, var(--primary-hover) 0%, #030712 100%);
}

.btn-submit-premium:active {
    transform: translateY(0.5px);
}

.login-back-footer {
    margin-top: 24px;
    text-align: center;
    border-top: 1px solid var(--card-border);
    padding-top: 16px;
}

.btn-back-dashboard {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-back-dashboard:hover {
    color: var(--text-main);
}

/* Premium Reset Form Button */
.btn-reset-form {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    padding: 13px 20px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

.btn-reset-form:hover {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    transform: translateY(-1.5px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.08);
}

.btn-reset-form:active {
    transform: translateY(0.5px);
}

/* Premium Theme Toggle Button - Fixed Melayang di Pojok Kanan Atas */
.btn-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    cursor: pointer;
    font-size: 19px;
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
    position: fixed;
    top: 18px;
    right: 24px;
    z-index: 9999; /* Selalu di atas elemen apapun */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.dark-theme .btn-theme-toggle {
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f59e0b; /* Kuning bersinar matahari */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.btn-theme-toggle:hover {
    transform: scale(1.1) rotate(20deg);
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
}

body.dark-theme .btn-theme-toggle:hover {
    background: #1e293b;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.btn-theme-toggle:active {
    transform: scale(0.95);
}

/* Dynamic Update Badge */
.update-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.05);
    padding: 6px 14px;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

body.dark-theme .update-badge {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.update-badge-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.update-badge-time {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
}

.btn-update-refresh {
    padding: 2px;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 10px;
    transition: transform 0.3s ease;
}

.btn-update-refresh:hover {
    transform: rotate(180deg);
}
