:root {
    /* Gradien sesuai desain admin (Biru ke Pink/Ungu) */
    --bg-gradient: linear-gradient(135deg, #4f6ea2 0%, #f089c8 100%);
    --text-light: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    
    /* Glassmorphism Variables */
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-bg-hover: rgba(255, 255, 255, 0.25);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
    
    /* Status Colors */
    --status-ongoing: #4bb657; /* Disesuaikan agar lebih menyatu dengan bg */
    --status-finish: #3a5c88;
    --status-complete: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg-gradient);
    min-height: 100vh;
    padding: 2rem 3rem;
    color: var(--text-light); /* Semua teks default jadi putih */
}

.app-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

header { 
    display: flex;
    justify-content: space-between; /* Mendorong teks ke kiri dan hamburger ke kanan */
    align-items: center; /* Membuatnya sejajar lurus secara vertikal */
    margin-bottom: 1.5rem; 
}
.header h1 { font-size: 28px; font-weight: 700; }
.header p { font-size: 16px; font-weight: 600; opacity: 0.8; }
.hamburger-menu {
    display: none; /* Sembunyikan ikon hamburger di Desktop */
}

/* Layout Utama */
.main-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* --- KOLOM KIRI --- */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 35px;
    align-items: center;
    width: 80px;
    padding-top: 15px;
}

.profile-icon {
    width: 60px;
    height: 60px;
    background: var(--glass-bg);
    border: var(--glass-border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 25px;
    color: var(--text-light);
}

.sidebar {
    width: 60px;
    background: var(--glass-bg);
    border: var(--glass-border);
    border-radius: 40px;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-container {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.icon-btn:hover { background: var(--glass-bg-hover); }
/* Indikator menu aktif */
.icon-btn.active {
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* --- KOLOM KANAN --- */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow: hidden;
}

/* Top Controls */
.top-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 80px;
}

.search-wrapper { display: flex; flex: 1; height: 50px; }
.search-wrapper input {
    width: 100%;
    padding: 0 20px;
    border-radius: 30px;
    border: var(--glass-border);
    background: var(--glass-bg);
    font-size: 16px;
    outline: none;
    color: var(--text-light);
}
.search-wrapper input::placeholder { color: var(--text-muted); }

.btn-search {
    height: 50px;
    padding: 0 30px;
    border-radius: 30px;
        border: var(--glass-border);
    background: var(--glass-bg-hover);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-search:hover { background: rgba(255, 255, 255, 0.4); }

.filter-wrapper { display: flex; gap: 1rem; height: 50px; }
.select-box {
    position: relative;
    background: var(--glass-bg);
    border: var(--glass-border);
    border-radius: 30px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    min-width: 140px;
}
.select-box select {
    appearance: none;
    background: transparent;
    border: none;
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    outline: none;
    cursor: pointer;
    z-index: 1;
}
.select-box select option { color: #333; } /* Option harus gelap agar terbaca saat dropdown terbuka */
.select-box i { position: absolute; right: 15px; color: var(--text-light); }

/* Data Container */
.data-container {
    background: var(--glass-bg);
    border: var(--glass-border);
    border-radius: 30px;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Header di dalam Data Container */
.container-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 1rem;
}

.container-header h2 { font-size: 20px; font-weight: 700; }

.btn-add {
    padding: 8px 20px;
    border-radius: 20px;
    border: var(--glass-border);
    background: var(--glass-bg-hover);
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}
.btn-add:hover { background: rgba(255, 255, 255, 0.4); }

/* Dynamic Content & Views */
.dynamic-content {
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 10px;
}
.dynamic-content::-webkit-scrollbar { width: 6px; }
.dynamic-content::-webkit-scrollbar-track { background: transparent; }
.dynamic-content::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.5); border-radius: 10px; }

/* Konsep SPA: Sembunyikan semua, munculkan yang active */
.view-section { display: none; }
.view-section.active {
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: fadeIn 0.3s ease-in-out;
}

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

.empty-state {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    background: var(--glass-bg);
    border-radius: 20px;
}

/* Card Item */
.data-card {
    background: var(--glass-bg);
    border: var(--glass-border);
    border-radius: 20px;
    padding: 1.2rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-info { display: flex; flex-direction: column; gap: 4px; }
.card-title { font-size: 18px; font-weight: 700; margin-bottom: 2px; }
.asesor-name { font-size: 14px; color: var(--text-light); margin-bottom: 8px; }

.card-meta {
    display: grid;
    grid-template-columns: 50px 180px auto; 
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: var(--text-light);
}
.meta-item { display: flex; align-items: center; gap: 6px; white-space: nowrap; }

.card-actions { display: flex; gap: 1rem; }
.badge {
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    text-align: center;
    min-width: 150px;
}

/* --- Form Styles (Glassmorphism) --- */
.glass-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    animation: fadeIn 0.3s ease-in-out;
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-row .form-group {
    flex: 1;
}

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

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
}

.form-group input, .form-group select {
    padding: 12px 15px;
    border-radius: 15px;
    border: var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-light);
    font-size: 14px;
    outline: none;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group select option {
    color: #333; /* Supaya teks opsi dropdown terlihat gelap/jelas */
}

/* Field yang otomatis terisi tidak bisa diedit manual */
.form-group input[readonly] {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: not-allowed;
}

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

.btn-cancel {
    padding: 10px 25px;
    border-radius: 20px;
    border: var(--glass-border);
    background: transparent;
    color: var(--text-light);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-cancel:hover { background: rgba(255, 255, 255, 0.1); }

.btn-save {
    padding: 10px 25px;
    border-radius: 20px;
    border: none;
    background: rgba(188, 122, 109, 0.9);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-save:hover { background: rgba(188, 122, 109, 1); }

/* Tombol Edit pada List Jadwal */
.btn-edit {
    background: var(--glass-bg-hover);
    border: var(--glass-border);
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: 0.2s;
}

/* --- Multi-Select Skema Dinamis --- */
.btn-tambah-skema {
    background: rgba(255, 255, 255, 0.2);
    border: var(--glass-border);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    cursor: pointer;
    margin-left: 10px;
    transition: 0.2s;
}
.btn-tambah-skema:hover { background: rgba(255, 255, 255, 0.4); }

.skema-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    animation: fadeIn 0.3s ease-in-out;
}
.skema-row select {
    flex: 1;
    padding: 12px 15px;
    border-radius: 15px;
    border: var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-light);
    font-size: 14px;
    outline: none;
}
.skema-row select option { color: #333; }

.btn-remove-skema {
    background: rgba(255, 255, 255, 0.15);
    border: var(--glass-border);
    color: #ff6b6b;
    width: 44px;
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.2s;
}
.btn-remove-skema:hover { background: rgba(255, 255, 255, 0.3); color: #ff4c4c; }
.btn-edit:hover { background: rgba(255,255,255,0.4); }

/* --- Toggle Switch Styling --- */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 5px;
}
.toggle-wrapper span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
}
.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border: var(--glass-border);
    border-radius: 20px;
    transition: .4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}
input:checked + .slider { 
    background-color: rgba(76, 175, 80, 0.7); /* Hijau transparan */ 
    border-color: #4CAF50; 
}
input:checked + .slider:before { transform: translateX(16px); }

/* --- Statistik Dashboard --- */
.header-stats {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 60px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 20px;
    border-radius: 20px;
    border: var(--glass-border);
    margin: 0 20px;
    animation: fadeIn 0.5s ease-in-out;
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.stat-item span {
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 10px;
    border-radius: 12px;
    color: #fff;
}

/* --- View Toggles (Tombol Pilihan Tampilan) --- */
.view-toggles {
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    border-radius: 15px;
    border: var(--glass-border);
}
.btn-view {
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 35px;
    height: 35px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
}
.btn-view:hover { color: white; background: rgba(255, 255, 255, 0.15); }
.btn-view.active { 
    color: white; 
    background: rgba(255, 255, 255, 0.25); 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
}

/* --- Sheet View Styles (Desain Ala Excel) --- */
.sheet-wrapper {
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    border: var(--glass-border);
    animation: fadeIn 0.3s ease-in-out;
}
.sheet-item {
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sheet-item:last-child { border-bottom: none; }

/* Background Selang-Seling (Zebra) */
.sheet-item:nth-child(odd) { background: rgba(255, 255, 255, 0.05); }
.sheet-item:nth-child(even) { background: rgba(255, 255, 255, 0.15); }
.sheet-item:hover { background: rgba(255, 255, 255, 0.25); } /* Efek hover baris */

.sheet-row {
    display: grid;
    /* Rasio Kolom: 2 Bagian untuk Skema, 1 Bagian untuk Asesor, 1 Bagian untuk Tanggal */
    grid-template-columns: 2fr 1fr 1fr; 
    gap: 15px;
    align-items: center;
}

/* Nama Skema (Kolom 1 di Baris 1) tetap besar, tebal, dan putih */
.sheet-row.r1 > div:first-child { 
    font-size: 15px; 
    font-weight: 700; 
    color: white; 
}

/* Asesor 1, Tanggal, dan seluruh isi Baris 2 (Lokasi & Asesor 2) disamakan ukurannya */
.sheet-row.r1 > div:nth-child(2),
.sheet-row.r1 > div:nth-child(3),
.sheet-row.r2 { 
    font-size: 13px; 
    font-weight: 400; /* Memastikan font tidak ikut tebal */
    color: var(--text-light); 
}

.sheet-status {
    padding: 4px 15px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    display: inline-block;
}

/* --- CALENDAR VIEW STYLES --- */
.calendar-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 25px;
    align-items: start;
    animation: fadeIn 0.3s ease-in-out;
}
.calendar-box {
    background: rgba(255, 255, 255, 0.05);
    border: var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    
    /* --- Tambahan untuk efek Sticky --- */
    position: sticky;
    top: 0; 
    z-index: 10;
}
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 16px;
    color: white;
}
.calendar-header button {
    background: var(--glass-bg-hover);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}
.calendar-header button:hover { background: rgba(255, 255, 255, 0.4); }
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
}
.calendar-day-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.calendar-date {
    padding: 8px 0;
    font-size: 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    position: relative;
    color: white;
}
.calendar-date:hover { background: rgba(255, 255, 255, 0.15); }
.calendar-date.active {
    background: rgba(188, 122, 109, 0.9);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
/* Indikator titik jika ada jadwal di tanggal tersebut */
.calendar-date.has-event::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: #fff100;
    border-radius: 50%;
}
.calendar-date.empty { cursor: default; }
.calendar-date.empty:hover { background: transparent; }

.calendar-details-header {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

/* --- Tombol Google Sheet --- */
.btn-gdsheet {
    padding: 8px 15px;
    border-radius: 15px;
    border: var(--glass-border);
    background: rgba(15, 157, 88, 0.8); /* Warna Hijau Khas Google Sheet */
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    text-decoration: none; /* Hilangkan garis bawah link */
}
.btn-gdsheet:hover { background: rgba(15, 157, 88, 1); }

.status-ongoing .badge-date, .status-ongoing .badge-status { background: var(--status-ongoing); }
.status-finish .badge-date, .status-finish .badge-status { background: var(--status-finish); }
.status-complete .badge-date, .status-complete .badge-status { background: var(--status-complete); }

/* --- Mobile Responsiveness --- */
@media (max-width: 900px) {
   body { padding: 1rem; }
   
   .header-stats { display: none !important; }
    
    .header { align-items: center; } /* Pastikan tetap rata tengah di mobile */
    .header h1 { font-size: 20px; }
    .header p { font-size: 12px; margin-bottom: 0; } /* Hapus margin-bottom agar tidak miring */
    .view-toggles { display: none !important; }
    /* Responsif untuk Kalender di Mobile */
    .calendar-layout { grid-template-columns: 1fr; gap: 15px; }
    
    /* Matikan sticky kalender di HP agar tidak menutupi layar */
    .calendar-box {
        position: relative;
        top: auto;
        z-index: 1;
    }
    
    /* --- Responsif & Fix Estetika Tombol Google Sheet di Mobile --- */
    .container-header { 
        flex-wrap: nowrap; /* Mencegah turun baris jika masih muat */
        align-items: center;
        justify-content: space-between;
    }
    .btn-gdsheet { 
        margin-left: auto; 
        font-size: 12px !important; 
        padding: 6px 12px !important; 
        background: rgba(15, 157, 88, 0.9) !important; /* Paksa warna hijau */
        color: white !important; /* Paksa teks putih */
        text-decoration: none !important; /* Hilangkan garis bawah biru */
        border-radius: 12px !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        display: flex !important;
        align-items: center !important;
        gap: 5px !important;
    }
    
    /* --- Sembunyikan Toggle Pilihan Tampilan secara paksa di Mobile --- */
    #viewToggles, .view-toggles { 
        display: none !important; 
    }
    /* Menampilkan tombol Hamburger */
    .hamburger-menu {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        background: var(--glass-bg);
        border: var(--glass-border);
        border-radius: 10px;
        font-size: 20px;
        color: white;
        cursor: pointer;
        z-index: 100;
    }

    /* Merubah Sidebar menjadi Dropdown Melayang */
    .left-column {
        position: absolute;
        top: 70px;
        right: 20px;
        width: auto;
        flex-direction: column;
        gap: 15px;
        padding-top: 0;
        z-index: 99;
        
        /* Efek Animasi Tersembunyi */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease;
    }

    /* Class ini akan dipanggil oleh JavaScript saat Hamburger diklik */
    .left-column.show-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .form-row {
        flex-direction: column;
        gap: 1.2rem;
    }

    .profile-icon {
        display: none; /* Sembunyikan ikon profil di mobile agar menu ringkas */
    }

    .sidebar {
        width: auto;
        padding: 1rem;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.25); /* Efek glass sedikit lebih tebal */
        backdrop-filter: blur(10px);
        box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    }

    .sidebar-container { gap: 1rem; }
    
    .top-controls {
        display: grid;
        grid-template-columns: 1fr auto; 
        gap: 1rem; height: auto;
    }
    .search-wrapper { width: 100%; grid-column: 1; height: 40px; }
    .search-wrapper input { font-size: 14px; padding: 0 15px; }
    .btn-search { width: auto; grid-column: 2; height: 40px; padding: 0 15px; font-size: 14px; }
    
    .filter-wrapper { grid-column: 1 / -1; justify-content: space-between; width: 100%; height: 40px; }
    .select-box { flex: 1; justify-content: center; padding: 0 15px; }
    .select-box select { font-size: 13px; }
    
    .data-container { padding: 1rem; }
    .container-header h2 { font-size: 16px; }
    .btn-add { padding: 6px 12px; font-size: 12px; }

    /* --- Teks otomatis turun ke bawah jika melebihi layar --- */
    .data-card { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 1rem; 
        padding: 20px 15px; 
        width: 100%; 
        box-sizing: border-box;
    }
    .card-info { width: 100%; }
    .card-title, .asesor-name { 
        white-space: normal; 
        word-wrap: break-word; 
        line-height: 1.4; 
    }
    
    .card-meta { display: flex; flex-wrap: wrap; gap: 1rem; }
    
    /* --- Tambahkan kode ini agar ikon & teks meta (seperti lokasi) bisa turun baris --- */
    .meta-item { 
        white-space: normal; 
        word-wrap: break-word; 
        align-items: flex-start; /* Agar ikon tetap di atas jika teksnya jadi 2 baris */
    }
    
    
    /* --- Mengatur Posisi Tombol & Badge di Mobile --- */
    .card-actions { 
        width: 100%; 
        display: flex; 
        flex-wrap: wrap; /* Mengizinkan elemen turun ke baris baru */
        gap: 10px; 
        align-items: center; 
    }
    
    /* Toggle dan Edit mengambil baris pertama */
    .toggle-wrapper { flex: 1; min-width: 50%; }
    .btn-edit { margin-left: auto; }
    
    /* Badge otomatis terdorong ke baris kedua dan dibagi 2 sama rata */
    .badge { 
        min-width: unset; 
        padding: 8px 10px; 
        flex: 1 1 45%; /* Lebar minimal 45% agar pas berdampingan */
        white-space: normal; /* Mengizinkan teks panjang turun ke bawah */
        word-wrap: break-word;
        line-height: 1.3;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .badge-date { font-size: 12px; }
    .badge-status { font-size: 13px; }
}