/* --- 1. BASE & LAYOUT --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f0f4f8;
    margin: 0;
    padding: 20px;
    scroll-behavior: smooth;
}

.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: #1a3a5f;
    padding: 20px 30px;
    border-radius: 12px;
    color: white;
}

.booking-header h1 { margin: 0; font-size: 1.5rem; }

.header-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-header {
    height: 45px; 
    width: auto;
    object-fit: contain; 
}

.header-left h1 {
    margin: 0;
}

.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.card-dashboard {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* --- 2. BUTTONS & CONTROLS --- */
.btn-icon {
    background: none;
    cursor: pointer;
    margin-left: 10px;
    padding: 5px;
    transition: 0.2s;

    width: 35px;
    height: 35px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-icon-detail {
    width: 32px;
    height: 32px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-icon-detail:hover {
    background: #f7fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    color: #2b6cb0;
    border-color: #2b6cb0;
}

.btn-danger-detail {
    color: #e53e3e;
    border-color: #fed7d7;
}

.btn-danger-detail:hover {
    background: #fff5f5;
    color: #c53030;
    border-color: #c53030;
}

.swal-professional-popup {
    padding: 1.25rem !important;
    border-radius: 1.25rem !important;
    width: 420px !important;
}

.swal2-close {
    font-size: 24px !important;
    top: 10px !important;
    right: 10px !important;
}

#detAcara, #detPIC {
    transition: border-color 0.3s;
}

.btn-login, .btn-link, .btn-ctrl {
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10 px 15px;
}

.btn-ctrl svg {
    flex-shrink: 0;
}

.btn-login {
    background: transparent;
    color: white;
    border: 1px solid white;
    padding: 8px 16px;
}
.btn-login:hover { background: white; color: #1a3a5f; }

.btn-link {
    background: #f6ad55;
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.control-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-ctrl {
    padding: 10px;
    border: none;
    background: #edf2f7;
    color: #2d3748;
}
.btn-ctrl:hover { background: #e2e8f0; }

.btn-ctrl.disabled {
    background-color: #e2e8f0 !important; /* Latar abu-abu */
    color: #94a3b8 !important;            /* Teks abu-abu pudar */
    border: 1px solid #cbd5e0 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}
.btn-ctrl.disabled svg {
    color: #94a3b8 !important;
}
.btn-ctrl.disabled:hover {
    background-color: #e2e8f0 !important;
    transform: none !important;
}

.btn-add-new { background: #48bb78; color: white; }
.btn-add-new:hover { background: #38a169; }
.btn-add-new.disabled { background: #a0aec0 !important; cursor: not-allowed; }

.btn-tab {
    padding: 8px 15px;
    border: 1px solid #e2e8f0;
    background: white;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.3s;
}
.btn-tab.active {
    background: #2b6cb0;
    color: white;
    border-color: #2b6cb0;
}
.btn-tab:hover:not(.active) {
    background: #f1f5f9;
}

/* --- 3. INTERACTIVE CALENDAR --- */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f4f8;
}

.btn-nav-cal {
    background: #1a3a5f;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px; height: 30px;
    cursor: pointer;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
}

.cal-day {
    padding: 10px 5px;
    border-radius: 8px;
    background: #f8fafc;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease; /* Transisi lebih halus */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 40px;
    color: #4a5568; /* Warna teks default */
}
.cal-dot {
    width: 6px;
    height: 6px;
    background-color: #f6ad55; /* Warna oranye kontras */
    border-radius: 50%;
    position: absolute;
    bottom: 4px;
}
.cal-day:hover { 
    background: #edf2f7; 
    color: #2b6cb0;
}
.cal-selected {
    background: #2b6cb0 !important; /* Biru pekat */
    color: white !important;         /* Teks putih */
    box-shadow: 0 4px 10px rgba(43, 108, 176, 0.3); /* Sedikit bayangan agar pop-out */
}
.cal-selected .cal-dot { 
    background-color: white !important; 
}
.cal-today { 
    border: 2px solid #2b6cb0; 
    color: #2b6cb0;
}
.cal-today.cal-selected {
    border: 2px solid #1a3a5f;
}
.cal-holiday {
    color: #e53e3e !important; /* Merah terang */
    font-weight: 800;
}

#holiday-list li {
    margin-bottom: 3px;
    list-style-type: none; /* Hilangkan dot bullet agar lebih bersih */
    position: relative;
}

#holiday-list li::before {
    content: "•";
    color: #e53e3e;
    font-weight: bold;
    display: inline-block; 
    width: 1em;
    margin-left: -1em;
}

/* Garis periodik */
.periodik-line {
    position: absolute;
    top: 4px; /* Letakkan di bagian atas kotak tanggal */
    left: 0;
    right: 0;
    height: 3px;
    background-color: #3182ce;
    z-index: 5;
    opacity: 0.6;
}

/* Rounded corner untuk awal dan akhir rentang */
.periodik-start { border-top-left-radius: 3px; border-bottom-left-radius: 3px; left: 4px; }
.periodik-end { border-top-right-radius: 3px; border-bottom-right-radius: 3px; right: 4px; }

/* --- 4. AGENDA TABLE --- */
#agendaTable {
    min-height: 400px; /* Atur agar tabel tidak menciut saat kosong */
}

.table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    position: relative;
}

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

#agendaTable {
    min-width: 2500px; 
    table-layout: fixed;
}

#listTableContainer table {
    min-width: 100% !important; 
    table-layout: fixed;
}

th, td {
    border: 1px solid #e2e8f0;
    padding: 12px;
    text-align: center;
    font-size: 0.85rem;
}

th {
    background: #edf2f7;
    position: sticky;
    top: 0;
    color: #4a5568;
    z-index: 10;
}

/* Lebar kolom Jam & Tanggal */
th:first-child, .time-column {
    width: 100px; /* Kolom pertama lebih sempit */
}

/* Semua kolom ruangan (RS.1, RS.2, dst) akan memiliki lebar yang sama */
th:not(:first-child), td:not(:first-child) {
    width: 100px; /* Lebar standar untuk setiap ruangan */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Judul Tabel Baru */
.table-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a3a5f;
    margin: 25px 0 15px 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-title::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 25px;
    background: #f6ad55;
    border-radius: 10px;
}

.table-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    min-width: max-content;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1000;
    pointer-events: all;
    display: block; 
    padding-top: 200px;
    align-items: center;
    justify-content: center;
}

.table-loading.hidden {
    display: none;
}

.table-loading .loader-content {
    position: sticky;
    left: 50vw;
    transform: translateX(-50%);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: fit-content;
}

.table-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0 15px 0;
}

/* Hilangkan margin default judul karena sudah diatur container */
.table-header-flex .table-title {
    margin: 0;
}

.btn-view-toggle {
    background: #2b6cb0 !important;
    color: white !important;
    font-size: 0.85rem;
    padding: 8px 15px;
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-view-toggle:hover {
    background: #2c5282 !important;
}

/* Tombol View List Per Agenda */
.btnListView {
    background: #2b6cb0 !important;
    color: white !important;
    font-size: 0.85rem;
    padding: 8px 15px;
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Efek Hover untuk Tombol View List Agenda */
#btnListView:hover {
    background: #2c5282 !important;
}

.modal-content .close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2100; /* Lebih tinggi dari konten modal */
    color: #aaa;
    line-height: 1;
}

.modal-content .close:hover {
    color: #1a3a5f;
}

/* Pastikan container tabel tidak memakan seluruh lebar jika modal sangat lebar */
#listTableContainer {
    width: 100%;
    margin-top: 10px;
}

/* --- TIME MARKER LINE --- */
.time-marker {
    position: absolute;
    left: 0;
    /* width diatur secara dinamis oleh JS scrollWidth */
    height: 1.5px; 
    background-color: rgba(246, 173, 85, 0.7); 
    z-index: 99;
    pointer-events: none;
    box-shadow: 0 0 4px rgba(246, 173, 85, 0.4);
}

/* Titik Indikator di ujung kiri kolom Jam */
.time-marker::before {
    content: '';
    position: absolute;
    left: 0;
    top: -3.5px;
    width: 8px;
    height: 8px;
    background-color: #f6ad55;
    border-radius: 50%;
    z-index: 100;
    animation: pulse-orange 2s infinite;
}

/* Definisi Gerakan Berkedip Lembut */
@keyframes pulse-orange {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(246, 173, 85, 0.7);
    }
    70% {
        transform: scale(1.3); /* Membesar sedikit */
        box-shadow: 0 0 0 10px rgba(246, 173, 85, 0); /* Efek lingkaran memudar */
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(246, 173, 85, 0);
    }
}

.loader {
    width: 36px;
    height: 36px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#filter-checkboxes label:hover {
    background-color: #f7fafc;
    border-radius: 4px;
}

#filter-checkboxes input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Kolom Jam & Tanggal Terintegrasi */
.time-column {
    background: #f8fafc !important;
    min-width: 80px;
    padding: 5px !important;
    vertical-align: middle;
    border-right: 2px solid #1a3a5f !important;
    font-weight: 700;
}

.date-label { font-size: 1.4rem; font-weight: 800; color: #1a3a5f; line-height: 1; }
.day-name { font-size: 0.7rem; text-transform: uppercase; color: #718096; margin-bottom: 5px; }
.hour-label { font-size: 0.85rem; color: #4a5568; border-top: 1px dashed #cbd5e0; padding-top: 2px; }


/* --- Blok Mingguan --- */
/* Container untuk blok di dalam cell mingguan agar tidak bertabrakan */
/* Sel mingguan harus bisa menampung blok yang bertumpuk */
.weekly-row {
    height: 80px !important; /* Tinggi baris hari yang seragam */
}

.weekly-cell {
    height: 80px !important; 
    vertical-align: middle !important; 
    padding: 0 !important; 
    background: white;
    position: relative; /* Penting untuk children */
    display: table-cell; /* Kembali ke standar tabel */
}

/* Hilangkan position absolute khusus untuk blok di dalam sel mingguan */
.weekly-cell .agenda-block {
    position: relative !important; /* Bukan absolute agar tidak melayang ke sel lain */
    inset: auto !important;
    width: 85% !important;
    height: 45px !important;
    margin: 5px auto !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transform: none !important; /* Hilangkan efek animasi harian */
}

/* Pastikan teks di dalam blok TERISI terlihat jelas */
.weekly-cell .agenda-block span {
    display: block;
    width: 100%;
    text-align: center;
    color: white;
}

.weekly-row:nth-child(6) .time-column,
.weekly-row:nth-child(7) .time-column {
    background-color: #fff5f5 !important;
    color: #e53e3e;
}

[id^="weekly-"] {
    height: 60px !important; /* Lebih ringkas */
    min-height: 60px !important;
    padding: 10px !important;
    vertical-align: middle !important;
    background-color: #ffffff;
}

[id^="weekly-"] .agenda-block {
    min-height: unset !important; /* Biarkan tinggi menyesuaikan konten */
    height: auto !important;
    white-space: normal;
}

.time-column:has(.day-name:contains("Sabtu")),
.time-column:has(.day-name:contains("Minggu")) {
    background-color: #fff5f5 !important;
}

[id^="weekly-"]:hover {
    background-color: #f1f5f9 !important;
}

/* --- GUIDE SECTION --- */
.guide-container {
    background: #fdfaf6; /* Latar belakang krem sangat tipis */
    padding: 15px 20px;
    border-radius: 12px;
    border-left: 5px solid #f6ad55; /* Aksen warna oranye */
    margin-bottom: 20px;
}

.guide-container h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: #1a3a5f;
}

.guide-list {
    margin: 0;
    padding-left: 20px;
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.6;
}

.guide-list li {
    margin-bottom: 8px;
    padding-left: 5px;
}

.guide-list li strong {
    color: #2d3748;
}

/* --- 5. AGENDA BLOCKS --- */
td.cell-filled { 
    position: relative; 
    padding: 0 !important; 
    border: none !important;
    border-top: none !important;
    border-bottom: none !important; 
    background: transparent;
}

.agenda-block {
    position: absolute;
    inset: 0;
    padding: 6px; 
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    width: 100%; 
    height: 100%; 
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    
    word-wrap: break-word;
    line-height: 1.1; 
    z-index: 10;
    margin: 0 !important;
    border-radius: 8px;
}

.agenda-block strong {
    display: block;
    margin-bottom: 1px;
    font-size: 0.68rem;
    width: 100%;
}

.agenda-block small {
    display: block;
    opacity: 0.9;
    font-weight: 400;
    font-size: 0.6rem;
}

.agenda-start { 
    border-radius: 8px 8px 0 0; 
    height: calc(100% - 2px) !important;
    margin-top: 2px !important; 
}

.agenda-mid { 
    border-radius: 0; 
    height: 100% !important;
    margin: 0 !important;
}

.agenda-end { 
    border-radius: 0 0 8px 8px; 
    height: calc(100% - 2px) !important;
    margin-bottom: 2px !important;
    border-bottom: 1px solid #e2e8f0 !important; 
}

/* --- 6. MODAL & UI --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    overflow-y: auto; 
    padding: 20px 0;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    width: 400px;
    border-radius: 16px;
    position: relative;
    max-height: none;
}
body.modal-open {
    overflow: hidden;
}

.form-group { margin-bottom: 15px; text-align: left; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; box-sizing: border-box;
}

.btn-submit {
    width: 100%; background: #2b6cb0; color: white; border: none; padding: 12px; 
    border-radius: 8px; cursor: pointer; font-weight: bold;
}

.close { position: absolute; right: 20px; top: 15px; font-size: 24px; cursor: pointer; }

.swal-professional-popup { border-radius: 20px !important; font-family: 'Inter', sans-serif !important; }
.swal-title-custom { color: #1a3a5f !important; font-weight: 700; font-size: 1.5rem; }

.watermark { text-align: center; margin-top: 30px; color: #a0aec0; font-size: 0.8rem; letter-spacing: 1px; }

/* Tooltip */
.tooltip-content {
    overflow: visible !important;
    visibility: hidden;
    opacity: 0;
    position: fixed;
    width: 260px;
    background-color: #ffffff;
    color: #1a3a5f;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    z-index: 9999 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    pointer-events: none; 
    transition: opacity 0.15s ease;
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: normal;
    text-align: left;
    filter: none !important; 
}

.tooltip-content {
    visibility: visible;
    opacity: 1;
}

.tooltip-content b {
    color: #2d3748;
    display: inline-block;
    width: 70px;
}

/* Style baru */
/* --- TIGHT LAYOUT MODIFIER (UPDATED) --- */

/* 1. Hilangkan canvas putih & matikan min-width 2500px */
#agendaTable.tight-layout {
    min-width: 0 !important; 
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
}

/* 2. Kolom Jam (Kiri) - Pertahankan tinggi baris */
#agendaTable.tight-layout th:first-child, 
#agendaTable.tight-layout td:first-child {
    width: 50px !important; 
    padding: 12px 2px !important;
}

/* 3. Sel Tabel Ruangan - Pertahankan tinggi baris */
#agendaTable.tight-layout th:not(:first-child), 
#agendaTable.tight-layout td:not(:first-child) {
    width: auto !important; /* Biarkan browser membagi sisa layar rata ke 18 kolom */
    padding-left: 2px !important;
    padding-right: 2px !important;
    overflow: hidden !important; /* Tahan elemen di dalam agar tidak mendesak kolom ke luar */
}

/* 4. Header: Nama Ruang & Kapasitas (Vertikal + Jarak ke tabel) */
#agendaTable.tight-layout th:not(:first-child) {
    height: 120px; /* <--- UBAH INI: Kurangi dari 160px jadi 120px atau 110px */
    vertical-align: bottom;
    padding-bottom: 8px !important; 
    overflow: hidden !important; 
}

/* Terapkan orientasi vertikal untuk semua div di dalam header ruangan */
#agendaTable.tight-layout th:not(:first-child) div:first-child {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    margin: 0 auto;
    white-space: nowrap; /* Nama ruang tetap 1 baris vertikal */
    font-size: 0.8rem !important;
    margin-bottom: 8px !important; /* Jarak antara nama dan kapasitas */
}

#agendaTable.tight-layout th:not(:first-child) div:last-child {
    writing-mode: horizontal-tb !important; /* Kembalikan ke horizontal */
    transform: none !important;
    font-size: 0.55rem !important; /* Perkecil font agar muat di kolom sempit */
    white-space: normal !important; /* Kunci utama 2: Izinkan teks turun ke baris baru (wrap) */
    word-wrap: break-word !important;
    line-height: 1.2 !important;
    color: #718096 !important;
    display: block !important;
    margin: 0 auto;
    width: 100%; 
}

/* 5. Styling Blok Agenda di dalam sel */
#agendaTable.tight-layout .agenda-block {
    padding: 2px;
    font-size: 0.55rem;
}

#agendaTable.tight-layout .agenda-block strong {
    font-size: 0.6rem;
    line-height: 1.1;
    margin-bottom: 2px;
    /* Membatasi teks acara maksimal 2 baris agar tidak tumpah */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#agendaTable.tight-layout .agenda-block small {
    display: none; /* Sembunyikan PIC untuk menghemat ruang */
}

.table-wrapper:has(#agendaTable.tight-layout) {
    overflow-x: hidden !important;
}

/* =========================================================
   RESPONSIVE DESIGN (TAMPILAN MOBILE / SMARTPHONE)
   ========================================================= */
@media screen and (max-width: 768px) {
    /* 1. Bagian Header (Logo & Judul) ditumpuk ke bawah */
    .booking-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 15px;
    }
    .header-left {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .header-left h1 {
        font-size: 1.2rem;
        text-align: center;
    }
    .header-right {
        width: 100%;
        justify-content: center;
    }

    /* 2. Kartu Dashboard (Kalender & Panduan) menjadi 1 kolom (atas-bawah) */
    .dashboard-row {
        grid-template-columns: 1fr !important;
    }

    /* 3. TABEL HARUS BISA DI-SCROLL KE KANAN (TIDAK MENGECIL) */
    /* Kita paksa tabel tetap lebar (misal 1200px), sehingga user tinggal swipe/geser ke kanan */
    #agendaTable {
        min-width: 1200px !important; 
    }
    .table-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch; /* Efek scroll licin & halus di HP (iOS/Android) */
    }

    /* 4. Judul Tabel dan Tombol-tombol View ditumpuk rapi */
    .table-header-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px;
    }
    /* Tombol ganti view dan filter membungkus diri jika layar terlalu sempit */
    .table-header-flex > div:last-child {
        flex-wrap: wrap; 
        width: 100%;
        justify-content: flex-start;
    }

    /* 5. Perbaikan Popup Modal agar tidak menabrak pinggir layar HP */
    .modal-content {
        width: 95% !important;
        padding: 20px 15px !important;
        margin: 5% auto !important;
    }
    
    /* 6. Tombol Pesan Ruang, Filter, dll ditumpuk ke bawah agar mudah ditekan jari */
    .control-panel {
        grid-template-columns: 1fr !important; 
    }

    /* 7. Membiarkan judul tabel turun ke bawah (Word Wrap) di HP */
    .table-title {
        white-space: normal !important; /* Mengizinkan teks turun ke baris baru */
        word-wrap: break-word;
        font-size: 1.1rem !important; /* Mengecilkan sedikit ukuran font agar proporsional di HP */
        line-height: 1.4; /* Memberi jarak antar baris agar rapi saat terlipat */
        align-items: flex-start !important; /* Memastikan garis oranye tetap di atas jika teks menjadi 2 baris */
    }

    .table-title::before {
        margin-top: 3px; /* Menyesuaikan posisi garis oranye dengan baris pertama teks */
    }
}

/* =========================================================
   FITUR COLLAPSIBLE (FOCUS MODE)
   ========================================================= */

/* Transisi halus saat membuka/menutup */
.dashboard-row {
    transition: all 0.3s ease-in-out;
}

/* 1. Menyembunyikan Card Panduan & Melebarkan Kalender */
.dashboard-row.guide-hidden {
    grid-template-columns: 1fr !important; /* Paksa hanya 1 kolom */
}
.dashboard-row.guide-hidden #guidePanelCard {
    display: none !important; /* Hilangkan panel panduan */
}

/* 2. Menyembunyikan Seluruh Baris Atas (Fokus ke Tabel) */
.top-row-hidden .dashboard-row {
    display: none !important;
}