/* Reset & Base */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: #f4f7fb;
    color: #333;
}

/* Layout Utama */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Putih dengan Teks Biru Dongker */
/* .sidebar {
    width: 250px;
    background-color: #ffffff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
} */

/* .sidebar { */
    /* width: 250px;
    background-color: #ffffff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    position: fixed; /* KUNCI DI SINI */
    /* height: 100vh; */
    /* left: 0; */
    /* top: 0; */
/* } */ 

/* --- ANIMASI SIDEBAR & KONTEN --- */
.sidebar {
    width: 250px;
    background-color: #ffffff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    transition: transform 0.3s ease; /* Transisi halus */
    z-index: 200;
}

/* Kelas saat disembunyikan: menggeser sidebar keluar layar ke kiri */
.sidebar.hidden {
    transform: translateX(-250px);
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 250px;
    min-height: 100vh;
    transition: margin-left 0.3s ease; /* Transisi halus area konten */
}

/* Kelas saat diperluas: margin hilang sehingga layar penuh */
.main-wrapper.expanded {
    margin-left: 0;
}

/* --- TOMBOL BURGER MENU --- */
.btn-icon {
    background: none;
    border: none;
    font-size: 22px;
    color: #000080;
    cursor: pointer;
    margin-right: 35px;
    padding: 0;
    transition: color 0.2s;
}

.btn-icon:hover {
    color: #000050;
}

.sidebar .brand {
    padding: 20px;
    background-color: #000080;
    color: #ffffff;
    text-align: center;
}

.sidebar .brand h2 { margin: 0; font-size: 20px;}

.menu {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.menu a {
    padding: 15px 25px;
    text-decoration: none;
    color: #000080;
    font-weight: 600;
    transition: background 0.2s;
}

.menu a:hover, .menu a.active {
    background-color: #eef2f9;
    border-left: 4px solid #000080;
}

/* Area Konten */
/* .main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
} */
 /* .main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 250px; /* Lebar harus sama dengan width sidebar */
    /* min-height: 100vh; */
/* }  */

/* Top Bar */
/* .top-bar {
    background-color: #ffffff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
} */
 .top-bar {
    background-color: #ffffff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    position: sticky; /* KUNCI DI SINI */
    top: 0;
    z-index: 100;
}

.page-title {
    margin: 0;
    color: #000080;
}

/* Quick Stats */
.quick-stats {
    display: flex;
    gap: 20px;
    padding: 20px 30px 0 30px;
}

.stat-card {
    background: #ffffff;
    flex: 1;
    padding: 20px;
    border-radius: 8px;
    border-top: 4px solid #000080;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.stat-card h4 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    color: #000080;
}

.stat-number.highlight { color: #f39c12; }
.stat-number.success { color: #27ae60; }

/* Grid Konten (Tabel & Panel) */
.content-grid {
    display: flex;
    gap: 20px;
    padding: 20px 30px;
}

.main-content {
    flex: 2;
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.main-content h3 { margin-top: 0; color: #000080; }

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eeeeee;
}

th { color: #000080; font-weight: bold; }

.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}
.status-badge.selesai { background: #e8f8f5; color: #1abc9c; }
.status-badge.menunggu { background: #fef9e7; color: #f39c12; }
.status-badge.akan-datang { background: #eaf2f8; color: #2980b9; }

.btn-detail {
    background-color: #ffffff;
    color: #000080;
    border: 1px solid #000080;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.btn-detail:hover {
    background-color: #000080;
    color: #ffffff;
}

/* Side Panel */
.side-panel {
    flex: 1;
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-top: 4px solid #000080;
}

.side-panel h3 { margin-top: 0; color: #000080; }

/* Dynamic Panel Content Styles */
.panel-title { color: #000080; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.panel-subtitle { color: #000080; margin-top: 20px; margin-bottom: 10px; }
.text-danger { color: #e74c3c; font-weight: bold; }
.medical-notes { background-color: #f4f7fb; padding: 12px; border-radius: 6px; }
.medical-notes p { margin: 5px 0; }

/* Tombol Utama (Primary) */
.btn-primary {
    background-color: #000080;
    color: #ffffff;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.btn-primary:hover {
    background-color: #000050;
}

/* Latar Belakang Gelap Transparan (Overlay) */
.modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
}

/* Kotak Formulir Putih */
.modal-content {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    width: 400px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-top: 5px solid #000080;
}

/* Tombol Tutup (X) */
.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-btn:hover { color: #000080; }

/* Input Formulir */
.form-group { margin-bottom: 15px; }

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #000080;
    font-weight: bold;
    font-size: 14px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
}

.form-group input:focus, .form-group select:focus {
    border-color: #000080;
    outline: none;
}/* Ganti atau tambahkan baris CSS berikut ke public/style.css Anda */

.modal-content.large {
    width: 650px; /* Diperlebar agar memuat dua kolom dengan rapi */
    max-height: 90vh;
    overflow-y: auto;
}

.form-title {
    color: #000080;
    margin-top: 0;
    border-bottom: 2px solid #eeeeee;
    padding-bottom: 10px;
}

/* Mengatur tata letak form menjadi 2 kolom */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Jika layar kecil, form otomatis kembali menjadi 1 kolom */
@media (max-width: 700px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .modal-content.large {
        width: 90%;
    }
}
/* --- GAYA KHUSUS HALAMAN PENGATURAN --- */
.settings-wrapper {
    display: flex;
    margin: 20px 30px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    min-height: 70vh;
    overflow: hidden;
}

/* Sidebar Tab Pengaturan (Kiri) */
.settings-sidebar {
    width: 220px;
    background-color: #f8fafc;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.settings-sidebar .tab-link {
    background-color: inherit;
    color: #333;
    padding: 15px 20px;
    width: 100%;
    border: none;
    outline: none;
    text-align: left;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: 0.3s;
    border-left: 4px solid transparent;
}

.settings-sidebar .tab-link:hover {
    background-color: #eef2f9;
}

.settings-sidebar .tab-link.active {
    background-color: #ffffff;
    color: #000080;
    font-weight: bold;
    border-left: 4px solid #000080;
}

/* Area Konten Pengaturan (Kanan) */
.settings-content {
    flex: 1;
    padding: 30px;
}

.tab-pane {
    display: none; /* Awalnya disembunyikan semua kecuali yang di-set block di HTML */
    animation: fadeIn 0.4s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eeeeee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.flex-header h3 {
    margin: 0;
    color: #000080;
}

/* Tabel Khusus Pengaturan */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    border: 1px solid #eeeeee;
    padding: 12px;
}

.data-table th { background-color: #f8fafc; }

/* List Sederhana untuk Kategori */
.simple-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.simple-list li {
    background-color: #f8fafc;
    margin-bottom: 10px;
    padding: 12px 15px;
    border-radius: 4px;
    border: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-text {
    background: none;
    border: none;
    color: #e74c3c;
    font-weight: bold;
    cursor: pointer;
}
.btn-text:hover { text-decoration: underline; }
/* Styling untuk Baris Filter */
.filter-bar {
    display: flex;
    gap: 15px;
    background-color: #f8fafc;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 12px;
    font-weight: bold;
    color: #000080;
    margin-bottom: 5px;
}

.filter-group input, .filter-group select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Styling Dropdown Status di dalam Tabel */
.status-dropdown {
    padding: 5px;
    border-radius: 4px;
    font-weight: bold;
    border: 1px solid #ccc;
    cursor: pointer;
}

.status-dropdown.rencana { background-color: #fff; color: #333; }
.status-dropdown.selesai { background-color: #e8f8f5; color: #1abc9c; border-color: #1abc9c; }
.status-dropdown.batal { background-color: #fdedec; color: #e74c3c; border-color: #e74c3c; }
.status-dropdown.reschedule { background-color: #fef9e7; color: #f39c12; border-color: #f39c12; }


/* --- OVERRIDE WARNA KALENDER FLATPICKR KE BIRU DONGKER --- */
.flatpickr-day.selected, 
.flatpickr-day.startRange, 
.flatpickr-day.endRange, 
.flatpickr-day.selected.inRange, 
.flatpickr-day.startRange.inRange, 
.flatpickr-day.endRange.inRange, 
.flatpickr-day.selected:focus, 
.flatpickr-day.startRange:focus, 
.flatpickr-day.endRange:focus, 
.flatpickr-day.selected:hover, 
.flatpickr-day.startRange:hover, 
.flatpickr-day.endRange:hover, 
.flatpickr-day.selected.prevMonthDay, 
.flatpickr-day.startRange.prevMonthDay, 
.flatpickr-day.endRange.prevMonthDay, 
.flatpickr-day.selected.nextMonthDay, 
.flatpickr-day.startRange.nextMonthDay, 
.flatpickr-day.endRange.nextMonthDay {
    background: #000080 !important;
    border-color: #000080 !important;
}

/* Warna latar belakang hari-hari di tengah rentang pilihan */
.flatpickr-day.inRange {
    background: #eef2f9 !important;
    border-color: transparent !important;
    box-shadow: none !important;
}