/* File: /assets/css/style.css - TEMA KEMENAG DIKUNCI, TEMA MODERN & ELEGANT DIROMBAK TOTAL */

/* ==========================================================================
   GLOBAL UTAMA & CONTAINER 16:9 SCREEN RATIO
   ========================================================================== */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

.container {
    width: 100vw;
    height: 56.25vw; /* Rasio 16:9 */
    max-height: 100vh;
    max-width: 177.78vh;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 25px;
    flex-shrink: 0;
}
.header-kiri { display: flex; align-items: center; }
.header .logo { display: flex; align-items: center; padding-right: 25px; }
.header .logo img { height: 60px; margin-right: 15px; }
.header .identitas-sekolah h1 { margin: 0; font-size: 26px; font-weight: 700; }
.header .identitas-sekolah p { margin: 0; font-size: 13px; }
.header .waktu { text-align: right; }
.jam-digital { font-size: 34px; font-weight: bold; font-family: 'Consolas', 'Courier New', monospace; }
.tanggal-digital { font-size: 15px; }

.welcome-bar {
    padding: 4px 12px;
    font-weight: bold;
    font-size: 15px;
    flex-shrink: 0;
}

/* --- KARTU HADITS & KATA MUTIARA HARIAN --- */
.kata-mutiara-card {
    background: linear-gradient(135deg, #1b381e 0%, #2e5332 100%);
    color: #ffffff;
    border: 1px solid #3b4b20;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    min-height: 95px;
    box-sizing: border-box;
}
.kata-mutiara-card h4 {
    margin: 0 0 6px 0;
    font-size: 13px;
    font-weight: 800;
    color: #dcfce7;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 4px;
}
.quote-card-body {
    position: relative;
    z-index: 2;
    padding: 2px 4px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.quote-symbol-large {
    position: absolute;
    top: -12px;
    left: 0px;
    font-size: 52px;
    font-family: Georgia, serif;
    color: rgba(255, 255, 255, 0.12);
    line-height: 1;
    pointer-events: none;
}
.quote-card-text {
    font-size: 13px;
    line-height: 1.4;
    font-style: italic;
    color: #ffffff;
    margin: 0 0 4px 0;
    font-weight: 600;
    transition: opacity 0.35s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.quote-card-author {
    font-size: 12px;
    font-weight: 700;
    color: #facc15;
    text-align: right;
    transition: opacity 0.35s ease;
}

/* Theme overrides for Kata Mutiara Card */
body.theme-cyber .kata-mutiara-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.4);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}
body.theme-cyber .kata-mutiara-card h4 {
    color: #38bdf8;
    border-bottom-color: rgba(56, 189, 248, 0.3);
}
body.theme-cyber .quote-card-author {
    color: #38bdf8;
}

body.theme-executive .kata-mutiara-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #d4af37;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}
body.theme-executive .kata-mutiara-card h4 {
    color: #fef08a;
    border-bottom-color: rgba(212, 175, 55, 0.3);
}
body.theme-executive .quote-card-author {
    color: #fef08a;
}

/* --- TOGGLE BUTTON PAPAN DATA --- */
.btn-papan-toggle {
    background: #005a3a;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.4);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}
.btn-papan-toggle:hover {
    background: #007a4e;
    transform: translateY(-1px);
}
.btn-papan-toggle.active-papan {
    background: #d97706;
    color: #ffffff;
}

/* --- AUTOSLIDE BADGE BUTTON --- */
.btn-autoslide-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-autoslide-badge:hover {
    background: rgba(255, 255, 255, 0.25);
}
.btn-autoslide-badge.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

/* --- EFEK TRANSISI SMOOTH FADE & ZOOM SCALE ANTAR LAYAR TV --- */
.content-container, .papan-data-container {
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
    opacity: 1;
    transform: scale(1);
}
.view-fade-out {
    opacity: 0 !important;
    transform: scale(0.97) !important;
    pointer-events: none !important;
}
.view-fade-in-prep {
    opacity: 0 !important;
    transform: scale(0.97) !important;
}

/* --- BANNER PAPAN DATA GURU & TATA USAHA --- */
.papan-data-container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
    padding: 8px 12px 12px 12px;
    overflow: hidden;
    background-color: #ffffff;
    color: #111111;
    box-sizing: border-box;
}
.papan-data-header-banner {
    background-color: #556b2f;
    color: #ffffff;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
    padding: 5px 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 6px 6px 0 0;
    border: 2px solid #3b4b20;
    border-bottom: none;
    flex-shrink: 0;
}
.papan-data-scroll-area {
    display: block;
    flex: 1 1 auto;
    height: calc(100% - 32px);
    max-height: calc(100% - 32px);
    min-height: calc(100% - 32px);
    overflow-y: scroll !important;
    overflow-x: hidden;
    border: 2px solid #3b4b20;
    position: relative;
    box-sizing: border-box;
}
.tabel-papan-data {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 9.5px;
    white-space: nowrap;
    color: #111111;
}
.tabel-papan-data th, .tabel-papan-data td {
    border: 1px solid #2e3b18;
    padding: 2px 2px;
    height: 26px;
    max-height: 26px;
    line-height: 20px;
    vertical-align: middle;
    text-align: center;
    color: #111111;
    white-space: nowrap;
    overflow: hidden;
    font-size: 9px;
}
.tabel-papan-data tbody tr {
    height: 26px;
    max-height: 26px;
}
.tabel-papan-data thead {
    position: relative;
    z-index: 20;
}
.tabel-papan-data thead th {
    background-color: #608238; /* Hijau resmi Kemenag Papan Data persis gambar */
    color: #000000;
    font-weight: 800;
    vertical-align: middle;
    position: sticky;
    top: 0;
    z-index: 100;
    height: 24px;
    font-size: 9px;
}
.tabel-papan-data thead th.col-wrap-header {
    white-space: normal !important;
    line-height: 1.1;
    word-break: break-word;
}
.tabel-papan-data thead tr:nth-child(2) th {
    position: sticky;
    top: 24px;
    z-index: 99;
}
.tabel-papan-data tbody tr:nth-child(even) {
    background-color: #f4f8ef;
}
.tabel-papan-data tbody tr:hover {
    background-color: #e2eccf;
}
.tabel-papan-data td.text-left { text-align: left; }
.tabel-papan-data td.text-center { text-align: center; }

/* ================= PAPAN DATA UNTUK TEMA MODERN (.theme-modern) ================= */
.theme-modern .papan-data-container {
    background: radial-gradient(circle at 50% 0%, #0f172a 0%, #030712 100%);
    color: #f1f5f9;
}
.theme-modern .papan-data-header-banner {
    background: linear-gradient(90deg, #0284c7, #0f172a, #0284c7);
    color: #ffffff;
    border: 2px solid #00f2fe;
    border-bottom: none;
    text-shadow: 0 0 10px #00f2fe;
}
.theme-modern .papan-data-scroll-area {
    border: 2px solid rgba(0, 242, 254, 0.4);
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.2);
}
.theme-modern .tabel-papan-data {
    color: #f1f5f9;
}
.theme-modern .tabel-papan-data th, 
.theme-modern .tabel-papan-data td {
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #f1f5f9;
}
.theme-modern .tabel-papan-data thead th {
    background: rgba(30, 41, 59, 0.95);
    color: #00f2fe;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.6);
}
.theme-modern .tabel-papan-data tbody tr {
    background-color: rgba(15, 23, 42, 0.85);
}
.theme-modern .tabel-papan-data tbody tr:nth-child(even) {
    background-color: rgba(30, 41, 59, 0.5);
}
.theme-modern .tabel-papan-data tbody tr:hover {
    background-color: rgba(2, 132, 199, 0.35);
    color: #ffffff;
}

/* ================= PAPAN DATA UNTUK TEMA ELEGANT (.theme-elegant) ================= */
.theme-elegant .papan-data-container {
    background-color: #0f172a;
    color: #f8fafc;
}
.theme-elegant .papan-data-header-banner {
    background: linear-gradient(90deg, #b45309 0%, #f59e0b 50%, #b45309 100%);
    color: #0f172a;
    border: 2px solid #fbbf24;
    border-bottom: none;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 900;
}
.theme-elegant .papan-data-scroll-area {
    border: 2px solid #f59e0b;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.2);
}
.theme-elegant .tabel-papan-data {
    color: #f8fafc;
}
.theme-elegant .tabel-papan-data th, 
.theme-elegant .tabel-papan-data td {
    border: 1px solid #334155;
    color: #f8fafc;
}
.theme-elegant .tabel-papan-data thead th {
    background-color: #1e293b;
    color: #fbbf24;
    font-family: Georgia, 'Times New Roman', serif;
}
.theme-elegant .tabel-papan-data tbody tr {
    background-color: #1e293b;
}
.theme-elegant .tabel-papan-data tbody tr:nth-child(even) {
    background-color: #0f172a;
}
.theme-elegant .tabel-papan-data tbody tr:hover {
    background-color: rgba(245, 158, 11, 0.25);
    color: #ffffff;
}

main.content-container {
    display: flex;
    gap: 15px;
    padding: 15px;
    flex-grow: 1;
    overflow: hidden;
}

.content-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0;
}
.content-column:nth-child(1) { flex: 1.2; }
.content-column:nth-child(2) { flex: 1.5; }
.content-column:nth-child(3) { flex: 1; }

.grid-item {
    box-sizing: border-box;
    padding: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.grid-item h3, .grid-item h4 {
    margin: 0 0 8px 0;
    padding-bottom: 4px;
    text-transform: uppercase;
    text-align: center;
    flex-shrink: 0;
}

/* Visi Misi */
.visi-misi { padding: 6px; flex-shrink: 0; }
.visi-misi h4 { border: none; margin-bottom: 2px; }
.visi-misi .box-content { overflow: hidden; font-size: 12px; line-height: 1.35; }
.visi-misi .box-content p { text-align: center; margin-top: 2px; }
.visi-misi .box-content ol { padding-left: 20px; padding-right: 8px; text-align: justify; margin-top: 2px; }

/* Monitoring KBM Real-Time */
.kbm-realtime { flex: 1.1; min-height: 180px; padding: 6px 10px; display: flex; flex-direction: column; overflow: hidden; box-sizing: border-box; }
.kbm-header-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; flex-shrink: 0; gap: 4px; }
.kbm-header-bar h3 { margin: 0; font-size: 11px; font-weight: 800; text-transform: uppercase; white-space: nowrap; flex-shrink: 0; }
.badge-kbm-active { background: linear-gradient(90deg, #16a34a, #15803d); color: #ffffff; padding: 2px 7px; border-radius: 12px; font-size: 9.5px; font-weight: bold; box-shadow: 0 0 8px rgba(22, 163, 74, 0.4); animation: pulse-badge 2s infinite; white-space: nowrap; flex-shrink: 0; }
.badge-kbm-off { background-color: #64748b; color: #ffffff; padding: 2px 7px; border-radius: 12px; font-size: 9.5px; font-weight: bold; white-space: nowrap; flex-shrink: 0; }
@keyframes pulse-badge { 0% { transform: scale(1); } 50% { transform: scale(1.03); } 100% { transform: scale(1); } }
.kbm-table-shell { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; width: 100%; }
.kbm-scroll-wrapper { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; border: 1px solid #cccccc; border-radius: 4px; position: relative; width: 100%; }
.tabel-kbm { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 11px; }
.tabel-kbm th, .tabel-kbm td { padding: 4px 5px; text-align: center; line-height: 1.2; border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; box-sizing: border-box; word-break: break-word; overflow: hidden; }
.tabel-kbm th:last-child, .tabel-kbm td:last-child { border-right: none; }
.tabel-kbm thead th { position: sticky; top: 0; z-index: 10; background-color: #e0e0e0; color: #111111; }
.badge-kelas { background-color: #005a3a; color: #ffffff; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: bold; white-space: nowrap; display: inline-block; }
.badge-mapel { background-color: #2563eb; color: #ffffff; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: bold; white-space: nowrap; display: inline-block; }

/* Bell Toast Notification */
.bell-toast-notification {
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: #ffffff;
    padding: 12px 26px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 900;
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.6);
    border: 2px solid #fef08a;
    z-index: 99999;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    letter-spacing: 0.5px;
}
.bell-toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Jumlah Siswa */
.jumlah-siswa { flex-grow: 1; padding-top: 5px; padding-bottom: 5px; display: flex; flex-direction: column; overflow: hidden; }
.siswa-card-header { position: relative; display: flex; justify-content: center; align-items: center; margin-bottom: 4px; flex-shrink: 0; width: 100%; }
.siswa-card-header h3 { border: none; font-size: 13.5px; margin: 0; text-align: center; width: 100%; text-transform: uppercase; }
.badge-siswa-rotator { position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 9px; font-weight: 800; padding: 2px 7px; border-radius: 10px; background: #005a3a; color: #ffffff; text-transform: uppercase; letter-spacing: 0.5px; transition: all 0.3s ease; }
.siswa-rotator-wrapper { flex: 1; min-height: 0; position: relative; width: 100%; height: 100%; }
.siswa-slide-view { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; opacity: 0; visibility: hidden; transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out; }
.siswa-slide-view.active { opacity: 1; visibility: visible; position: relative; }
.siswa-chart-container { flex: 1; min-height: 0; position: relative; width: 100%; height: 100%; background-color: #ffffff; border: 1px solid #cccccc; border-radius: 4px; padding: 4px; box-sizing: border-box; }

/* Theme Overrides for Rotator & Chart */
body.theme-cyber .badge-siswa-rotator, body.theme-modern .badge-siswa-rotator { background: #00f2fe; color: #030712; box-shadow: 0 0 10px rgba(0, 242, 254, 0.6); }
body.theme-executive .badge-siswa-rotator, body.theme-elegant .badge-siswa-rotator { background: #f59e0b; color: #0f172a; box-shadow: 0 0 10px rgba(245, 158, 11, 0.4); }

body.theme-cyber .siswa-chart-container, body.theme-modern .siswa-chart-container { background-color: #0f172a; border-color: rgba(56, 189, 248, 0.3); }
body.theme-executive .siswa-chart-container, body.theme-elegant .siswa-chart-container { background-color: #0f172a; border-color: #334155; }

.siswa-table-shell { display: flex; flex-direction: column; flex: 1; min-height: 0; height: 100%; }
.siswa-scroll-wrapper { flex: 1; min-height: 0; height: 100%; overflow-y: auto; border: 1px solid #cccccc; border-radius: 4px; position: relative; }
.tabel-siswa { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.tabel-siswa th, .tabel-siswa td { font-size: 11px; text-align: center; padding: 3px 4px; word-wrap: break-word; border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; box-sizing: border-box; }
.tabel-siswa th:last-child, .tabel-siswa td:last-child { border-right: none; text-align: left; padding-left: 6px; }

.tabel-siswa thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #e0e0e0;
    color: #111111;
}
.tabel-siswa tfoot th {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background-color: #005a3a;
    color: #ffffff;
}

body.theme-cyber .tabel-siswa thead th {
    background-color: #1e293b;
    color: #00f2fe;
    border-color: rgba(56, 189, 248, 0.3);
}
body.theme-cyber .tabel-siswa tfoot th {
    background-color: #0284c7;
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.3);
}
body.theme-executive .tabel-siswa thead th {
    background-color: #1e293b;
    color: #fbbf24;
    border-color: #334155;
}
body.theme-executive .tabel-siswa tfoot th {
    background-color: #b45309;
    color: #ffffff;
    border-color: #334155;
}

/* Profil PTK */
.profil-pegawai { height: 165px; flex-shrink: 0; padding: 8px 12px 10px; }
.profil-pegawai h3 { border: none; margin-bottom: 4px; }
.profil-slider-container { width: 100%; height: 100%; position: relative; }
.profil-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; gap: 15px; opacity: 0; visibility: hidden; transition: opacity 0.8s ease-in-out; }
.profil-slide.active { opacity: 1; visibility: visible; }
.profil-foto { box-sizing: border-box; flex-shrink: 0; width: 76px; height: 94px; }
.profil-foto img { width: 100%; height: 100%; object-fit: cover; }
.profil-data table { font-size: 12px; line-height: 1.2; }
.profil-data table td:first-child { font-weight: bold; width: 90px; }

/* Video & Jadwal */
.main-video { flex-shrink: 0; min-height: 220px; max-height: 300px; aspect-ratio: 16 / 9; }
.video-container { position: relative; width: 100%; height: 100%; overflow: hidden; }
.video-container iframe, .video-container video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }

.jadwal { flex-grow: 1; min-height: 110px; display: flex; flex-direction: column; padding-top: 4px; }
.jadwal h3 { border: none; flex-shrink: 0; }
.agenda-list { font-size: 13px; line-height: 1.25; flex-grow: 1; overflow: hidden; }
.agenda-list ul { padding-left: 18px; margin: 0; }
.agenda-list li { padding-bottom: 4px; }
.agenda-list ul.is-scrolling-agenda { animation: scroll-up-loop linear infinite; }

@keyframes scroll-up-loop {
    from { transform: translateY(0); }
    to { transform: translateY(-50%); }
}

/* Jumlah Pegawai */
.jumlah-pegawai { flex: 1 1 auto; height: 100%; min-height: 0; padding: 6px 10px; display: flex; flex-direction: column; overflow: hidden; box-sizing: border-box; }
.jumlah-pegawai h3 { border-bottom: none; margin-bottom: 4px; font-size: 13.5px; flex-shrink: 0; }
.pegawai-content-flex { display: flex; gap: 6px; flex: 1; min-height: 0; height: 100%; align-items: stretch; width: 100%; }
.pegawai-table-shell { display: flex; flex-direction: column; width: 79%; flex: 0 0 79%; min-height: 0; height: 100%; min-width: 0; }
.pegawai-scroll-wrapper { flex: 1; min-height: 0; height: 100%; overflow-y: auto; border: 1px solid #cccccc; border-radius: 4px; position: relative; width: 100%; box-sizing: border-box; }
.tabel-pegawai { border-collapse: separate; border-spacing: 0; font-size: 10px; table-layout: fixed; width: 100%; }
.tabel-pegawai th, .tabel-pegawai td { padding: 2px 2px; text-align: center; line-height: 1.1; border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; }
.tabel-pegawai th:last-child, .tabel-pegawai td:last-child { border-right: none; }
.tabel-pegawai tbody td:first-child { text-align: left; word-break: break-word; }

.tabel-pegawai thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #e0e0e0;
    color: #111111;
    height: 18px;
}
.tabel-pegawai thead tr:nth-child(2) th {
    position: sticky;
    top: 18px;
    z-index: 9;
    height: 18px;
}
.tabel-pegawai tfoot th {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background-color: #005a3a;
    color: #ffffff;
}

body.theme-cyber .tabel-pegawai thead th {
    background-color: #1e293b;
    color: #00f2fe;
    border-color: rgba(56, 189, 248, 0.3);
}
body.theme-cyber .tabel-pegawai tfoot th {
    background-color: #0284c7;
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.3);
}
body.theme-executive .tabel-pegawai thead th {
    background-color: #1e293b;
    color: #fbbf24;
    border-color: #334155;
}
body.theme-executive .tabel-pegawai tfoot th {
    background-color: #b45309;
    color: #ffffff;
    border-color: #334155;
}

.summary-pegawai-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 20%;
    flex: 0 0 20%;
    box-sizing: border-box;
}
.summary-box {
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 4px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.summary-box.male {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}
.summary-box.female {
    background-color: #fdf2f8;
    border-color: #fbcfe8;
    color: #9d174d;
}
.summary-box.total {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}
.summary-label {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 2px;
}
.summary-val {
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1;
}
.summary-val small {
    font-size: 9.5px;
    font-weight: normal;
}
body.theme-cyber .summary-box.male {
    background-color: rgba(2, 132, 199, 0.2);
    border-color: #0284c7;
    color: #38bdf8;
}
body.theme-cyber .summary-box.female {
    background-color: rgba(236, 72, 153, 0.2);
    border-color: #ec4899;
    color: #f472b6;
}
body.theme-cyber .summary-box.total {
    background-color: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
    color: #4ade80;
}
body.theme-executive .summary-box.male {
    background-color: rgba(180, 83, 9, 0.2);
    border-color: #b45309;
    color: #fbbf24;
}
body.theme-executive .summary-box.female {
    background-color: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
    color: #fef08a;
}
body.theme-executive .summary-box.total {
    background-color: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #6ee7b7;
}

/* Galeri Foto */
.galeri-sekolah { flex: 1; min-height: 190px; padding: 6px 10px; }
.galeri-sekolah h3 { border-bottom: none; margin-bottom: 6px; font-size: 13.5px; }
.galeri-slider-container { position: relative; width: 100%; height: 100%; border-radius: 6px; overflow: hidden; }
.galeri-slider-container img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease-in-out; visibility: hidden; }
.galeri-slider-container img.active { opacity: 1; visibility: visible; }

/* Sholat Box */
.sholat { text-align: center; justify-content: center; align-items: center; flex-shrink: 0; height: 60px; padding: 2px 10px; display: flex; flex-direction: column; }
.sholat h4 { border-bottom: none; margin: 0; padding: 0; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.countdown { font-family: 'Consolas', 'Courier New', monospace; font-size: 28px; font-weight: bold; line-height: 1; letter-spacing: 2px; }


/* ==========================================================================
   TEMA 1: KLASIK KEMENAG (.theme-kemenag) - KUNCI TOTAL (UNTOUCHED)
   Gaya Resmi Instansi: Hijau Kemenag, Kartu Bergaris, Tanpa Garis Bawah Judul
   ========================================================================== */
body.theme-kemenag {
    background-color: #263238;
    color: #212529;
}
.theme-kemenag .container {
    background-color: #ffffff;
    border: 10px solid #005a3a;
    border-top: none;
}
.theme-kemenag .header {
    background-color: #005a3a;
    color: #ffffff;
}
.theme-kemenag .welcome-bar {
    background-color: #e0e0e0;
    color: #111111;
    border-bottom: 2px solid #005a3a;
}
.theme-kemenag .grid-item {
    background-color: #f8f9fa;
    border: 1px solid #005a3a;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.theme-kemenag .grid-item h3, 
.theme-kemenag .grid-item h4 {
    color: #005a3a;
    border-bottom: none !important;
}
.theme-kemenag .tabel-siswa th, .theme-kemenag .tabel-siswa td,
.theme-kemenag .tabel-pegawai th, .theme-kemenag .tabel-pegawai td {
    border: 1px solid #cccccc;
}
.theme-kemenag .tabel-siswa thead th, .theme-kemenag .tabel-pegawai thead th {
    background-color: #e9ecef;
    color: #212529;
}
.theme-kemenag .tabel-siswa tfoot th, .theme-kemenag .tabel-pegawai tfoot th {
    background-color: #005a3a;
    color: #ffffff;
}
.theme-kemenag .profil-foto img {
    border-radius: 10px;
    border: 3px solid #005a3a;
}
.theme-kemenag .video-container {
    border-radius: 8px;
    border: 3px solid #005a3a;
}
.theme-kemenag .galeri-slider-container img {
    border-radius: 8px;
}
.theme-kemenag .sholat {
    background-color: #005a3a;
    color: #ffffff;
    border-radius: 8px;
}
.theme-kemenag .sholat h4 {
    color: #e0e0e0;
}


/* ==========================================================================
   TEMA 2: MODERN CYBER GLASSMORPHISM (.theme-modern)
   ROMBAK TOTAL: Cyber Dark Space, Floating Glass Capsule, Bottom Ticker,
   Neon Cyan Pill Badges, Circular Neon Pulse Photos
   ========================================================================== */
body.theme-modern {
    background-color: #030712;
    color: #f1f5f9;
}
.theme-modern .container {
    background: radial-gradient(circle at 50% 0%, #0f172a 0%, #030712 100%);
    border: 2px solid rgba(0, 242, 254, 0.4);
    box-shadow: 0 0 35px rgba(0, 242, 254, 0.25);
    padding-bottom: 30px; /* Space for bottom ticker */
}

/* Floating Glass Capsule Header Bar */
.theme-modern .header {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 242, 254, 0.4);
    border-radius: 16px;
    margin: 8px 12px 0 12px;
    padding: 8px 20px;
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}
.theme-modern .header .logo img {
    filter: drop-shadow(0 0 12px rgba(0, 242, 254, 0.8));
}
.theme-modern .header .identitas-sekolah h1 {
    background: linear-gradient(90deg, #ffffff, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 242, 254, 0.6);
    font-size: 24px;
}
.theme-modern .jam-digital {
    color: #00f2fe;
    text-shadow: 0 0 15px #00f2fe;
}

/* Bottom Broadcast Ticker Tape Bar */
.theme-modern .welcome-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 20;
    background: linear-gradient(90deg, #0f172a, #0284c7, #0f172a);
    color: #ffffff;
    border-top: 1px solid rgba(0, 242, 254, 0.5);
    box-shadow: 0 -4px 15px rgba(0, 242, 254, 0.3);
    padding: 5px 12px;
    font-size: 14px;
}

/* Translucent Cyber Glass Panels */
.theme-modern .grid-item {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-top: 3px solid #00f2fe;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* Neon Cyan Floating Pill Badges */
.theme-modern .grid-item h3, 
.theme-modern .grid-item h4 {
    background: rgba(0, 242, 254, 0.15);
    color: #00f2fe;
    border: 1px solid rgba(0, 242, 254, 0.4);
    border-bottom: none !important;
    border-radius: 20px;
    padding: 4px 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-shadow: 0 0 12px rgba(0, 242, 254, 0.7);
}

/* Cyber Neon Grid Tables */
.theme-modern .tabel-siswa th, .theme-modern .tabel-siswa td,
.theme-modern .tabel-pegawai th, .theme-modern .tabel-pegawai td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}
.theme-modern .tabel-siswa thead th, .theme-modern .tabel-pegawai thead th {
    background-color: rgba(30, 41, 59, 0.95);
    color: #38bdf8;
}
.theme-modern .tabel-siswa tbody tr:nth-child(even),
.theme-modern .tabel-pegawai tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.04);
}
.theme-modern .tabel-siswa tfoot th, .theme-modern .tabel-pegawai tfoot th {
    background: linear-gradient(90deg, #0284c7, #0369a1);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.6);
}

/* Circular Pulse Neon Ring PTK Photo */
.theme-modern .profil-foto img {
    border-radius: 50%;
    border: 3px solid #00f2fe;
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.7);
}
.theme-modern .profil-data table {
    color: #f1f5f9;
}
.theme-modern .video-container {
    border-radius: 14px;
    border: 2px solid rgba(0, 242, 254, 0.6);
    box-shadow: 0 0 22px rgba(0, 242, 254, 0.4);
}
.theme-modern .galeri-slider-container img {
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

/* Cyber HUD Sholat Countdown Box */
.theme-modern .sholat {
    background: linear-gradient(135deg, #0284c7 0%, #0f172a 100%);
    border: 2px solid #00f2fe;
    border-radius: 14px;
    box-shadow: 0 0 22px rgba(0, 242, 254, 0.45);
}
.theme-modern .sholat h4 {
    color: #93c5fd;
    background: none;
    border: none !important;
}
.theme-modern .countdown {
    color: #00f2fe;
    text-shadow: 0 0 16px #00f2fe;
}


/* ==========================================================================
   TEMA 3: ELEGANT LUXURY EXECUTIVE (.theme-elegant)
   ROMBAK TOTAL: Dark Slate Navy, Executive Gold Top Banner, Gold Serif Titles,
   Gold Silk Ribbon Ticker, Executive Gold Top-Border Cards, Gold Foil Footers
   ========================================================================== */
body.theme-elegant {
    background-color: #080d1a;
    color: #f8fafc;
}
.theme-elegant .container {
    background-color: #0f172a;
    border: 3px solid #f59e0b;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.25);
}

/* Executive Gold Top Banner Header Bar */
.theme-elegant .header {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-bottom: 4px solid #f59e0b;
    border-top: 3px solid #b45309;
    color: #ffffff;
    padding: 10px 25px;
}
.theme-elegant .header .identitas-sekolah h1 {
    color: #fbbf24;
    font-family: Georgia, 'Times New Roman', serif;
    letter-spacing: 1.5px;
    font-size: 26px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}
.theme-elegant .jam-digital {
    color: #f59e0b;
    font-family: Georgia, 'Times New Roman', serif;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Gold Silk Ribbon Ticker Bar */
.theme-elegant .welcome-bar {
    background: linear-gradient(90deg, #b45309 0%, #f59e0b 50%, #b45309 100%);
    color: #0f172a;
    font-weight: 900;
    font-size: 15px;
    letter-spacing: 1px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

/* Executive Slate Cards with Beveled Gold Top Accent */
.theme-elegant .grid-item {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    border-top: 4px solid #f59e0b;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

/* Gold Foil Serif Crest Titles */
.theme-elegant .grid-item h3, 
.theme-elegant .grid-item h4 {
    color: #fbbf24;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
    border-bottom: none !important;
}

/* Executive Slate Tables & Gold Foil Footer */
.theme-elegant .tabel-siswa th, .theme-elegant .tabel-siswa td,
.theme-elegant .tabel-pegawai th, .theme-elegant .tabel-pegawai td {
    border: 1px solid #334155;
    color: #f1f5f9;
}
.theme-elegant .tabel-siswa thead th, .theme-elegant .tabel-pegawai thead th {
    background-color: #0f172a;
    color: #fbbf24;
    font-family: Georgia, 'Times New Roman', serif;
}
.theme-elegant .tabel-siswa tfoot th, .theme-elegant .tabel-pegawai tfoot th {
    background: linear-gradient(90deg, #d97706, #f59e0b);
    color: #0f172a;
    font-weight: 900;
    font-size: 12px;
}

/* Gold Certificate Frame PTK Photo */
.theme-elegant .profil-foto img {
    border-radius: 8px;
    border: 3px solid #f59e0b;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}
.theme-elegant .video-container {
    border-radius: 10px;
    border: 3px solid #f59e0b;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.25);
}
.theme-elegant .galeri-slider-container img {
    border-radius: 10px;
    border: 1px solid #f59e0b;
}

/* Royal Amber Gold Jewel Sholat Box */
.theme-elegant .sholat {
    background: linear-gradient(135deg, #d97706 0%, #78350f 100%);
    border: 2px solid #fbbf24;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.5);
    color: #ffffff;
}
.theme-elegant .sholat h4 {
    color: #fef3c7;
    border-bottom: none !important;
}
.theme-elegant .countdown {
    color: #fbbf24;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   TV DASHBOARD VIEWPORT AUTO-FIT FOR MOBILE LANDSCAPE & ALL SCREENS
   ========================================================================== */
.tv-scaler-wrapper {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #0d1317;
    position: relative;
}

@media (max-width: 1279px) {
    html, body {
        overflow: hidden !important;
        width: 100vw !important;
        height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
        background-color: #0d1317 !important;
    }
    .container {
        width: 1280px !important;
        height: 720px !important;
        max-height: 720px !important;
        min-width: 1280px !important;
        min-height: 720px !important;
        flex-shrink: 0 !important;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
    }
}
