/* Colors File */
@import './tailwind-colors.css';

/* RESET & GLOBAL */
:root {
    --header-height: 70px;
    --sidebar-width: 350px;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--gray-950);
    color: var(--gray-100);
    overflow: hidden;
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Scrollbar Kustom */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--gray-900);
}
::-webkit-scrollbar-thumb {
    background: var(--gray-600);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* ========== HEADER AREA ========== */
header {
    height: var(--header-height);
    background-color: var(--gray-900);
    border-bottom: 1px solid var(--gray-800);
    z-index: 1000;
    width: 100%;
    top: 0;
    left: 0;
}

.header-container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 30px;
    width: auto;
}

.title-subtitle h4 {
    font-weight: 600;
    font-size: 1.30rem;
    color: var(--gray-50);
}

.title-subtitle p {
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* Navbar Links */
.navbar a {
    color: var(--gray-400);
    margin-left: 20px;
    font-weight: 500;
    transition: all 0.3s;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
}

.navbar a:hover {
    color: var(--gray-50);
    background-color: var(--gray-800);
}

.navbar a.active {
    color: white;
    background-color: var(--indigo-600);
}

/* MAIN LAYOUT */
.main-content {
    margin-top: var(--header-height);
    height: calc(100vh - var(--header-height));
    display: flex;
    width: 100%;
    overflow: hidden;
}

/* ========== SIDEBAR AREA ========== */
.sidebar-wrapper {
    width: var(--sidebar-width);
    height: 100%;
    background-color: var(--gray-900);
    border-right: 1px solid var(--gray-800);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 10;
}

/* Header & Filter Sidebar */
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-800);
    background-color: var(--gray-900);
}

/* Area List Kecamatan */
.sidebar-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Item di Sidebar */
.sidebar-item {
    background-color: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    transition: transform 0.2s;
}

.sidebar-item:hover {
    transform: translateY(-2px);
    border-color: var(--gray-600);
}

.kecamatan-name {
    font-weight: 600;
    color: var(--gray-100);
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.kecamatan-info {
    font-size: 0.8rem;
    color: var(--gray-400);
    display: flex;
    justify-content: space-between;
}

/* ========== MAP AREA ========== */
.map-wrapper {
    flex-grow: 1;
    position: relative;
    height: 100%;
    background-color: var(--gray-950);
}

/* Iframe Peta */
.map-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ========== FLOATING CHART  ========== */
.floating-chart-container {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 320px;
    height: 260px;
    background-color: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid var(--gray-700);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: flex;
    flex-direction: column;
}

.chart-title {
    font-size: 0.85rem;
    text-align: center;
    color: var(--gray-300);
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}

.chart-canvas-wrapper {
    flex-grow: 1;
    position: relative;
    width: 100%;
    min-height: 0;
}

/* FORM ELEMENTS */
.form-label {
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-bottom: 8px;
    display: block;
}

/* Styling Checkbox & Radio Custom */
.filter-group input[type='radio'],
.filter-group input[type='checkbox'] {
    accent-color: var(--indigo-500);
}

.filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--gray-300);
}

.filter-option input {
    margin-right: 8px;
}

/* ========== CUSTOM ZOOM CONTROL ========== */
.leaflet-control-zoom a {
    background-color: var(--gray-900);
    color: var(--gray-100);
    border: 1px solid var(--gray-700);
}

.leaflet-control-zoom a:hover {
    background-color: var(--gray-800);
    color: var(--blue-400);
}

.leaflet-control-zoom a:active {
    background-color: var(--blue-700);
    color: var(--gray-100);
}

.leaflet-control-zoom a:last-child {
    border-bottom: none !important;
}

.leaflet-bar {
    border: 1px solid var(--gray-500);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important;
}

.leaflet-bar a:first-child {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}
.leaflet-bar a:last-child {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* ========== INFORMASI AREA ========== */

.executive-card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.image-container {
    position: relative;
    height: 320px;
    background: #000;
}

.img-minimal {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: bottom;
    transition: 0.5s ease;
}

/* Efek fade halus di sisi kanan gambar */
.edge-fade {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 30%;
    background: linear-gradient(to right, transparent, var(--gray-950));
}

.label-thin {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--indigo-500);
    font-weight: 500;
}

.name-clean {
    font-family: 'Poppins', sans-serif;
    font-weight: 200; /* Sangat tipis */
    font-size: 1.8rem;
    color: #fff;
    margin-top: 5px;
    letter-spacing: 1px;
}

.divider-line {
    width: 30px;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.stats-clean .stat-box {
    margin-bottom: 15px;
}

.stats-clean small {
    display: block;
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: var(--gray-500);
    margin-bottom: 2px;
}

.stats-clean span {
    font-size: 0.9rem;
    color: var(--gray-300);
    font-weight: 400;
}

.social-minimal a {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-right: 25px;
    transition: 0.3s;
}

.social-minimal a:hover {
    color: #fff;
}

/* Feature Box Hover Effect */
.feature-box {
    transition: all 0.3s ease;
}
.feature-box:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Icon Circle */
.icon-circle {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Pill Overrides */
.nav-pills .nav-link {
    color: #adb5bd;
    font-weight: 500;
    border: 1px solid transparent;
}
.nav-pills .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
.nav-pills .nav-link.active {
    background-color: #0d6efd !important;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

/* Animasi Tab */
.transition-all {
    transition: all 0.3s ease-in-out;
}

.tab-pane {
    animation: fadeIn 0.4s ease-in-out;
}
.hover-white {
    transition: color 0.3s ease;
}

.hover-white:hover {
    color: #fff !important;
}

body.scrollable-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-container {
    flex: 1 0 auto;
}

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

/* RESPONSIVE (MOBILE) */
@media (max-width: 991px) {
    body {
        overflow: auto;
    }

    .main-content {
        height: auto;
        flex-direction: column-reverse;
    }

    /* Sidebar di HP */
    .sidebar-wrapper {
        width: 100%;
        height: auto;
        border-right: none;
        border-top: 1px solid var(--gray-800);
    }

    .sidebar-content {
        max-height: 400px;
    }

    /* Peta di HP */
    .map-wrapper {
        height: 50vh;
        width: 100%;
    }

    /* Chart pindahkan ke dalam layout */
    .floating-chart-container {
        position: static;
        width: 100%;
        margin: 0;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid var(--gray-800);
        background-color: var(--gray-900);
    }
}

/*# ========== data.html ========== */
.glass-panel {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.text-blue-400 {
    color: var(--blue-500);
}
.text-gray-300 {
    color: var(--gray-300);
}
.text-green-400 {
    color: var(--green-500);
}
.text-yellow-400 {
    color: var(--yellow-500);
}

/* -- sekolah -- */
.border-sekolah {
    background: rgba(13, 110, 253, 0.05);
    border: 1px solid rgba(13, 110, 253, 0.2);
}
.sekolah {
    color: rgba(13, 110, 253, 1);
}

/* -- guru -- */
.border-guru {
    background: rgba(25, 135, 84, 0.05);
    border: 1px solid rgba(25, 135, 84, 0.2);
}
.guru {
    color: rgba(25, 135, 84, 1);
}

/* -- murid -- */
.border-murid {
    background: rgba(255, 193, 7, 0.05);
    border: 1px solid rgba(255, 193, 7, 0.2);
}
.murid {
    color: rgba(255, 193, 7, 1);
}

/* -- jenjang -- */
.bg-sd {
    background-color: rgb(59, 130, 246, 0.2);
}
.bg-smp {
    background-color: rgb(16, 185, 129, 0.2);
}
.bg-sma {
    background-color: rgb(245, 158, 11, 0.2);
}
.bg-smk {
    background-color: rgb(239, 68, 68, 0.2);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Table */
.custom-table-container {
    max-height: 650px;
    overflow-y: auto;
    border-radius: 12px;
}

.table-dark-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

/* Header Tabel */
.table-dark-custom th {
    background-color: #212529;
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 18px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #adb5bd;
    border-bottom: 2px solid #343a40;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Isi Tabel */
.table-dark-custom td {
    padding: 16px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #e9ecef;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

/* Efek Hover Baris Tabel */
.table-dark-custom tr:hover td {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
}

/* Font Khusus Angka di Tabel */
.font-monospace {
    font-family: 'Consolas', 'Monaco', monospace;
    letter-spacing: -0.5px;
}

/* 5. Komponen Pencarian (Search Input) */
.input-glass-group .input-group-text {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    color: #adb5bd;
}

.input-glass-group .form-control {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: none;
    color: #fff;
}

.input-glass-group .form-control:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

.input-glass-group .form-control::placeholder {
    color: #6c757d;
}

/* 6. Badge Jenjang (Label Warna) */
.badge-jenjang {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 7. Scrollbar Kustom (Agar estetik di browser Chrome/Edge) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1d21;
}

::-webkit-scrollbar-thumb {
    background: #495057;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6c757d;
}

/* 8. Floating Icon pada Kartu Statistik */
/* Pastikan di HTML, ikon background memiliki class ini */
.card-icon-float {
    position: absolute;
    right: -10px;
    top: -15px;
    font-size: 5rem;
    opacity: 0.08;
    transform: rotate(15deg);
    pointer-events: none;
    transition: transform 0.3s ease;
}

.glass-panel:hover .card-icon-float {
    transform: rotate(0deg) scale(1.1);
    opacity: 0.12;
}

.data-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
/* Memastikan tabel mengikuti style.css Anda */
table {
    width: 100%;
    border-collapse: collapse;
}
th {
    background-color: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: var(--gray-300);
}
