/* ================================== */
/* == FONDASI & GAYA GLOBAL == */
/* ================================== */

/* Impor Font Khas Google */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&family=Google+Sans:wght@400;500;700&display=swap');

:root {
    --sidebar-bg: #111827;
    --sidebar-hover: #374151;
    --sidebar-active: #4f46e5;
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --sidebar-width-expanded: 240px;
    --header-height: 64px;
}

html {
    height: 100%;
}

body {
    background-image: url('../img/bg_abstrak.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Roboto', sans-serif;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #888; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #555; }


/* ======================================= */
/* == STYLE HALAMAN LOGIN (RESPONSIVE) == */
/* ======================================= */
.login-container { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 1rem; }
body.login-page::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px); z-index: -1; }
.login-box { width: 100%; max-width: 900px; min-height: 550px; display: flex; background: rgba(30, 30, 30, 0.8); border-radius: 15px; overflow: hidden; box-shadow: 0 15px 35px rgba(0,0,0,0.5); border: 1px solid rgba(255, 255, 255, 0.1); }
.login-info { flex-basis: 50%; padding: 3rem; color: white; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.login-info img.school-logo { width: 100px; height: 100px; margin-bottom: 1.5rem; }
.login-form-container { flex-basis: 50%; padding: 3rem; background: rgba(255, 255, 255, 0.98); display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 800px) {
    .login-box { flex-direction: column; width: 95%; max-width: 450px; min-height: 0; }
    .login-info, .login-form-container { flex-basis: auto; width: 100%; padding: 2rem; }
    .login-info { border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
}


/* ================================== */
/* == HEADER BARU ALA GEMINI == */
/* ================================== */
.main-header { background-color: rgba(31, 31, 31, 0.8); backdrop-filter: blur(10px); padding: 0 16px; color: #e8eaed; position: fixed; top: 0; left: 0; right: 0; z-index: 1030; height: var(--header-height); font-family: 'Google Sans', sans-serif; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.navbar { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.nav-left, .nav-right { display: flex; align-items: center; gap: 16px; }
.brand-title { font-size: 22px; }
.icon-button { background: none; border: none; color: #bdc1c6; font-size: 24px; padding: 8px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background-color 0.2s ease; }
.icon-button:hover { background-color: rgba(255, 255, 255, 0.1); }
.user-avatar { width: 32px; height: 32px; border-radius: 6px; cursor: pointer; border: 2px solid #5f6368; object-fit: cover; }


/* ================================== */
/* == PENYESUAIAN SIDEBAR & KONTEN == */
/* ================================== */
.sidebar { position: fixed; top: 0; left: 0; height: 100vh; width: var(--sidebar-width-expanded); background-color: rgba(17, 24, 39, 0.85); backdrop-filter: blur(10px); border-right: 1px solid rgba(255, 255, 255, 0.1); display: flex; flex-direction: column; z-index: 1040; transform: translateX(-100%); transition: transform 0.3s ease-in-out; }
.sidebar.show { transform: translateX(0); }
.sidebar-content { flex-grow: 1; overflow-y: auto; }
.sidebar-footer { flex-shrink: 0; padding: 1rem; border-top: 1px solid var(--sidebar-hover); }
.content-wrapper { margin-top: var(--header-height); padding: 1.5rem; }
.main-header .sidebar-toggle { display: block; font-size: 24px; background: none; border: none; color: #bdc1c6; }
@media (min-width: 992px) {
    .sidebar { transform: translateX(0); }
    .content-wrapper { margin-left: var(--sidebar-width-expanded); }
    .main-header { left: var(--sidebar-width-expanded); }
    .main-header .sidebar-toggle { display: none; }
}


/* ================================== */
/* == GAYA ELEMEN SIDEBAR == */
/* ================================== */
.sidebar-brand a { display: flex; align-items: center; padding: 0 25px; margin-bottom: 1rem; text-decoration: none; height: var(--header-height); color: var(--text-primary); }
.logo-text { font-family: 'Google Sans', sans-serif; font-weight: 700; font-size: 20px; }
.nav-link { display: flex; align-items: center; height: 50px; padding: 0 25px; margin: 4px 10px; color: var(--text-secondary); border-radius: 8px; text-decoration: none; transition: all 0.2s; }
.nav-link:hover { color: #ffffff; background-color: var(--sidebar-hover); }
.nav-link.active { color: #ffffff; background-color: var(--sidebar-active); }
.nav-link i { font-size: 1.6rem; width: 30px; margin-right: 16px; }
.nav-link-text { white-space: nowrap; }
.logout-button { display: flex; align-items: center; height: 50px; padding: 0 25px; color: #dc3545; font-weight: 500; border-radius: 8px; text-decoration: none; transition: all 0.2s; }
.logout-button:hover { color: #ffffff; background-color: #dc3545; }
.logout-button i { font-size: 1.6rem; width: 30px; margin-right: 16px; }


/* =================================================================== */
/* == GAYA KONTEN DENGAN EFEK KACA (GLASSMORPHISM) == */
/* =================================================================== */
.card, .data-table-container, .welcome-card, .modal-content, .card-keterangan, .nav-tabs {
    width: 100% !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1) !important;
    border-radius: 0.75rem !important;
}
.card-header, .table-dark th, .modal-header {
    background-color: rgba(245, 245, 245, 0.7) !important;
    color: #333 !important;
}
.modal-backdrop {
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}
.nav-tabs .nav-link { color: #6c757d; }
.nav-tabs .nav-link:hover { color: #111827; }
.nav-tabs .nav-link.active { color: #ffffff !important; background-color: var(--sidebar-active) !important; }


/* =================================================================== */
/* == GAYA TEKS & JUDUL HALAMAN (FINAL) == */
/* =================================================================== */
.content-wrapper { color: #212529; }
.page-header-title, .page-header-subtitle, .tanggal-header, .title-on-bg {
    color: #e8eaed !important;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7) !important;
}
.card, .card *, .data-table-container, .data-table-container *, .card-keterangan, .card-keterangan * {
    text-shadow: none !important;
}


/* ================================== */
/* == GAYA WARNA STATUS KEHADIRAN == */
/* ================================== */
.legend-box { display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: middle; margin-right: 8px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15); border: none; }
.status-hadir { background-color: #d1e7dd !important; }
.status-sakit { background-color: #fff3cd !important; }
.status-izin { background-color: #cff4fc !important; }
.status-alfa { background-color: #f8d7da !important; }
.status-libur { background-color: #e9ecef !important; }
.text-hadir { color: #0f5132 !important; }
.text-sakit { color: #664d03 !important; }
.text-izin { color: #055160 !important; }
.text-alfa { color: #842029 !important; }
.text-libur { color: #495057 !important; }

/* =================================================================== */
/* == GAYA KHUSUS HALAMAN PAPAN INFORMASI DIGITAL (MADING) == */
/* =================================================================== */
.papan-informasi-body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.header-informasi {
    padding: 1.5rem;
    background-color: #1f1f1f;
    text-align: center;
}
.header-informasi h1 {
    font-family: 'Google Sans', sans-serif;
    font-weight: 700;
}
.clock { font-size: 2.5rem; font-weight: bold; letter-spacing: 2px; }
.date { font-size: 1.2rem; }

.stat-card {
    background-color: #1f1f1f;
    border: 1px solid #333;
    padding: 1.5rem;
    border-radius: .75rem;
    text-align: center;
}
.stat-value { font-size: 2.2rem; font-weight: bold; }
.stat-label { font-size: 1rem; color: #aaa; }

.info-card {
    background-color: #1f1f1f;
    border: 1px solid #333;
    border-radius: .75rem;
}
.info-card-header {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    font-weight: bold;
    font-size: 1.2rem;
}
.info-card-body { padding: 1.5rem; }
.info-card .table { color: #e0e0e0; }
.info-card .table th, .info-card .table td { border-color: #333; }

.marquee-container {
    background-color: #ffc107;
    color: #000;
    padding: 0.5rem;
    font-weight: bold;
    overflow: hidden;
    white-space: nowrap;
}
.marquee-text {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 25s linear infinite;
}
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* Mengatur Tampilan Link di Sidebar */
.sidebar .nav-link {
    /* Mengatur jarak dari tepi kiri sidebar */
    padding-left: 2px;
}

/* Mengatur Jarak antara Ikon dan Teks */
.sidebar .nav-link i {
    margin-right: 15px; /* Jarak antara ikon dan teks */
}

/* static/css/style.css */

/* ======================================================= */
/* ▼▼▼ ATURAN FINAL UNTUK POPUP TANDA TANGAN ▼▼▼ */
/* ======================================================= */

/* CSS untuk kanvas tanda tangan responsif */
.signature-pad-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 1; /* Rasio aspek untuk desktop */
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    border: 2px dashed #6c757d;
    border-radius: 5px;
    background-color: #fff;
}
.signature-pad {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

/* Aturan Khusus untuk Layar HP (Mobile) */
@media (max-width: 576px) {
    /* Paksa lebar maksimum popup di HP */
    .modal-dialog {
        max-width: 95vw !important; /* Lebar maksimal 95% dari lebar layar */
        margin: 0.5rem auto !important; /* Posisi di tengah dengan sedikit margin */
    }

    .modal-body {
        padding: 1rem; /* Kurangi bantalan di dalam popup */
    }

    .signature-pad-wrapper {
        /* Buat kanvas lebih ramping lagi khusus di HP */
        aspect-ratio: 4 / 1;
    }
}
/* static/css/style.css */

/* ======================================================= */
/* ▼▼▼ CSS UNTUK JADWAL BERJALAN OTOMATIS (MARQUEE) ▼▼▼ */
/* ======================================================= */

.jadwal-marquee-container {
    height: 450px; /* Tinggi "jendela" marquee, sesuaikan jika perlu */
    overflow: hidden; /* Sembunyikan konten yang keluar dari jendela */
    position: relative;
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
}

.jadwal-marquee-content {
    position: absolute;
    width: 100%;
    /* Menerapkan animasi yang akan kita buat di bawah */
    animation: marquee-up linear infinite;
}

/* Berhenti bergerak saat kursor mouse di atasnya */
.jadwal-marquee-container:hover .jadwal-marquee-content {
    animation-play-state: paused;
}

/* Definisi animasi 'marquee-up' */
@keyframes marquee-up {
    0% {
        transform: translateY(0%);
    }
    100% {
        /* Bergerak ke atas sejauh 50% dari total tingginya */
        /* Angka -50% ini penting untuk loop yang mulus */
        transform: translateY(-50%);
    }
}

/* static/css/style.css */

/* ======================================= */
/* == PERINTAH KHUSUS UNTUK LEBAR KONTEN == */
/* ======================================= */
.content-wrapper .container-fluid {
    max-width: 99%; /* Atur lebar maksimal konten di sini */
    margin-left: auto;
    margin-right: auto;
}