/* -- Variabel Warna & Global Styles -- */
:root {
    --primary-color: #0056b3;
    --secondary-color: #007bff;
    --accent-color: #17a2b8;
    --text-dark: #343a40;
    --text-light: #f8f9fa;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Lato', sans-serif;
}

body {
    font-family: var(--font-body);
    background-color: #f9fafb;
    color: var(--text-dark);
}

h1, h2, h3, h4, h5, h6, .navbar-brand-text {
    font-family: var(--font-heading);
    font-weight: 600;
}

/* -- Navbar Kustom -- */
.navbar-brand-text {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

.nav-link-custom {
    font-family: var(--font-heading);
    color: #555;
    font-weight: 600;
    margin-left: 1rem;
    padding: 0.5rem 1rem !important;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.nav-link-custom:hover, .nav-link-custom:focus {
    color: #fff;
    background-color: var(--secondary-color);
}

.navbar-toggler {
    border: none;
}

/* -- Hero Section / Header Halaman Depan -- */
.hero-section {
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-light);
    border-radius: 0 0 30px 30px;
    margin-bottom: 2rem;
}

.hero-section h1 {
    font-weight: 700;
}

/* -- Card & List Kustom -- */
.info-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

.info-card-header {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    padding: 1rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    border-bottom: 1px solid #eee;
}

.info-card-header .bi {
    font-size: 2rem;
    margin-right: 1rem;
    color: var(--secondary-color);
}

.list-group-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    border-right: 5px solid transparent;
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item:hover {
    transform: translateX(10px);
    background-color: #f8f9fa;
    border-right-color: var(--accent-color);
}

.schedule-details h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.schedule-details p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* -- Badge & Ikon dalam List -- */
.badge.bg-absen {
    font-size: 0.8rem;
    padding: 0.4em 0.8em;
}

.icon-absen {
    font-size: 1.2rem;
    margin-right: 10px;
}

.photo-link {
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}
.photo-link .bi {
    vertical-align: middle;
}
/* -- Gaya untuk Grid Fitur Utama -- */
.feature-section {
    padding: 2rem 0;
}

.feature-card {
    background-color: #ffffff;
    border-radius: 15px;
    padding: 1.5rem 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease-in-out;
    display: block; /* Agar seluruh kartu bisa diklik */
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
    color: var(--primary-color);
}

.feature-icon {
    max-width: 80px; /* Atur ukuran ikon */
    margin-bottom: 1rem;
}

.feature-card h5 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
}

/* -- Gaya untuk Galeri Karosel -- */
.gallery-carousel .carousel-item {
    height: 450px; /* Atur tinggi karosel di sini */
    background-color: #333; /* Warna latar jika gambar tidak penuh */
}

.gallery-carousel .carousel-image-fixed {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ini bagian terpenting: gambar akan menutupi area tanpa distorsi */
}

/* Membuat caption lebih mudah dibaca */
.gallery-carousel .carousel-caption {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 1rem;
}

/* -- Gaya Baru untuk Kalender Heatmap Statistik -- */
.heatmap-calendar {
    width: 100%;
    border-collapse: separate; /* Penting untuk memberi jarak antar sel */
    border-spacing: 5px; /* Jarak antar sel */
}

.heatmap-calendar th {
    border: none;
    font-weight: 600;
    color: #6c757d;
}

.heatmap-calendar td {
    border: none;
    text-align: center;
    padding: 0.5rem;
    height: 80px;
    width: 14%; /* Membagi rata 7 kolom */
    border-radius: 10px; /* Membuat sudut tumpul */
    transition: all 0.2s ease-in-out;
    font-family: var(--font-heading);
    vertical-align: middle;
}

.heatmap-calendar td:hover {
    transform: scale(1.05); /* Efek membesar saat disentuh kursor */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.heatmap-calendar .day-number {
    font-size: 1.5rem;
    font-weight: 700;
}

.heatmap-calendar .absen-count {
    font-size: 0.8rem;
    font-weight: 400;
    margin-top: -5px;
    display: block;
}

.heatmap-calendar .not-month {
    background-color: transparent !important; /* Kosongkan sel yang bukan bagian dari bulan */
}

/* Skema Warna Modern (Biru ke Oranye) */
.heatmap-color-0 { background-color: #e9f5ff; color: #0d6efd; } /* 0 Absen */
.heatmap-color-1 { background-color: #d1e7ff; color: #0a58ca; } /* 1-2 Absen */
.heatmap-color-2 { background-color: #ffeadb; color: #fd7e14; } /* 3-4 Absen */
.heatmap-color-3 { background-color: #ffd6d6; color: #dc3545; } /* 5+ Absen */

/* Legenda */
.heatmap-legend {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.legend-color-box {
    width: 20px;
    height: 20px;
    border-radius: 5px;
}

/* Warna untuk Heatmap */
.heatmap-level-0 { background-color: #d6f6e2; } /* Hijau - 0 absen */
.heatmap-level-1 { background-color: #fff2cc; } /* Kuning - 1-2 absen */
.heatmap-level-2 { background-color: #ffcccc; } /* Merah - 3+ absen */

/* -- Gaya Halaman Absensi Siswa -- */
.kiosk-mode {
    background-color: #eef2f5;
    font-family: 'Poppins', sans-serif;
    display: grid;
    grid-template-columns: 250px 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "header header"
        "sidebar main";
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

.kiosk-header { grid-area: header; background-color: #fff; padding: 0.5rem 1rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #ddd; }
.kiosk-sidebar { grid-area: sidebar; background-color: #fff; padding: 1rem; }
.kiosk-main { grid-area: main; padding: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; gap: 1.5rem; height: calc(100vh - 70px); overflow: auto;}
.kiosk-main-top { grid-column: 1 / -1; }
.kiosk-main-left { /*dibiarkan kosong untuk nanti*/ }
.kiosk-main-right { /*dibiarkan kosong untuk nanti*/ }
.kiosk-main-bottom { grid-column: 1 / -1; }

.clock-container { text-align: center; }
.clock-time { font-size: 2.5rem; font-weight: 700; line-height: 1; color: #333; }
.clock-date { font-size: 0.9rem; color: #666; }

.stat-box { display: flex; align-items: center; gap: 0.5rem; background-color: #f8f9fa; padding: 0.5rem 1rem; border-radius: 8px;}
.stat-box .icon { font-size: 1.5rem; }
.stat-box .text { line-height: 1.2; }
.stat-box .label { font-size: 0.8rem; color: #666; }
.stat-box .value { font-weight: bold; }

.sidebar-menu a { display: block; padding: 0.75rem 1rem; margin-bottom: 0.5rem; border-radius: 8px; text-decoration: none; color: #555; font-weight: 500; }
.sidebar-menu a.active, .sidebar-menu a:hover { background-color: #0d6efd; color: #fff; }

.absen-form-container { background-color: #fff; padding: 2rem; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.absen-form-container .profile-pic { width: 150px; height: 150px; background-color: #f0f0f0; border: 4px solid #ddd; border-radius: 12px; margin: 0 auto 1rem auto; display:flex; align-items:center; justify-content:center; }
.absen-form-container .profile-pic img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px;}

.notification-bar { padding: 1rem; text-align: center; font-weight: bold; border-radius: 8px; margin-top: 1rem; color: #fff; display: none; }
.notification-success { background-color: #198754; }
.notification-error { background-color: #dc3545; }

/* -- Gaya untuk Kartu Statistik di Sidebar -- */
.stat-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.stat-card {
    padding: 1rem;
    border-radius: 12px;
    color: white;
    position: relative;
    overflow: hidden;
}

.stat-card .stat-icon {
    font-size: 3rem;
    opacity: 0.2;
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
}

.stat-card .stat-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-detail {
    font-size: 0.8rem;
    text-decoration: none;
    color: white;
    opacity: 0.8;
}
.stat-card .stat-detail:hover {
    opacity: 1;
}
.stat-card .late-list {
    font-size: 0.8rem;
    padding-left: 1.2rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

/* Gradien Warna untuk Kartu */
.bg-gradient-purple { background: linear-gradient(45deg, #6a11cb 0%, #2575fc 100%); }
.bg-gradient-red { background: linear-gradient(45deg, #d53369 0%, #daae51 100%); }
.bg-gradient-orange { background: linear-gradient(45deg, #f7971e 0%, #ffd200 100%); }
.bg-gradient-blue { background: linear-gradient(45deg, #12c2e9 0%, #c471ed 50%, #f64f59 100%); }