/* ==============================
   SIKAP - Custom Styles
   ============================== */

/* Font utama — lebih mudah dibaca */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    background-color: #f8f9fa;
}

/* ==============================
   Sidebar
   ============================== */
.sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, #1a3a5c 0%, #0d2137 100%);
    width: 250px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 200;
    padding-top: 1rem;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.75);
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    border-radius: 0.5rem;
    margin: 0.1rem 0.5rem;
    transition: all 0.2s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255,255,255,0.15);
}

.sidebar .nav-link i {
    width: 22px;
    margin-right: 8px;
}

.sidebar-brand {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    padding: 0.5rem 1.25rem 1.5rem;
    text-decoration: none;
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 0.5rem;
}

/* ==============================
   Main Content
   ============================== */
.main-content {
    margin-left: 250px;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: calc(100% - 250px);
}

.main-content .content-wrapper {
    padding: 1.5rem;
    flex-grow: 1;
}
/* ==============================
   Navbar
   ============================== */
.top-navbar {
    position: sticky;
    top: 0;
    z-index: 99;
    background: #1a3a5c;
    width: 100%;
}
/* Overlay gelap saat sidebar terbuka di mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 199;
}

.sidebar-overlay.show {
    display: block;
}

/* Tombol besar untuk guru (mobile-friendly) */
.btn-catat {
    font-size: 1.4rem;
    padding: 1.2rem 2.5rem;
    border-radius: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: transform 0.1s;
}

.btn-catat:active {
    transform: scale(0.97);
}

/* Tombol pilihan kelas / pelanggaran (3 tap UI) */
.card-tap {
    cursor: pointer;
    border: 2px solid #dee2e6;
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s;
    background: #fff;
}

.card-tap:hover,
.card-tap.selected {
    border-color: #0d6efd;
    background: #e8f0fe;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13,110,253,0.2);
}

.card-tap .label {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 0.4rem;
}

/* Ukuran teks lebih besar untuk daftar siswa (ramah lansia) */
.list-siswa .list-group-item {
    font-size: 1.05rem;
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
}

.list-siswa .list-group-item:hover,
.list-siswa .list-group-item.active {
    background-color: #e8f0fe;
    color: #0d47a1;
    font-weight: 600;
}

/* Badge kategori */
.badge-ringan  { background-color: #198754; }
.badge-sedang  { background-color: #ffc107; color: #000; }
.badge-berat   { background-color: #dc3545; }

/* ==============================
   Responsive Mobile
   ============================== */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-250px);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .top-navbar {
        width: 100%;
    }

    /* Konten tidak meluber ke kanan */
    body {
        overflow-x: hidden;
    }

    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Tombol catat lebih kecil di mobile */
    .btn-catat {
        font-size: 1.1rem;
        padding: 1rem 1.5rem;
    }
}

/* Card statistik dashboard */
.stat-card {
    border: none;
    border-radius: 1rem;
    padding: 1.5rem;
    color: #fff;
}

/* Tabel lebih rapi */
.table th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: #f1f3f5;
}
/* ==============================
   DataTables Custom Style
   ============================== */

/* Bungkus semua kontrol DataTables dalam padding */
.dataTables_wrapper {
    padding: 1rem 1.25rem;
}

/* Baris kontrol atas: show entries & search */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 0.75rem;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    font-size: 0.875rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.dataTables_wrapper .dataTables_length select {
    padding: 0.3rem 2rem 0.3rem 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    font-size: 0.875rem;
    background-color: #fff;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    padding: 0.3rem 0.75rem;
    font-size: 0.875rem;
    width: 220px;
    background-color: #fff;
}

.dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,.15);
}

/* Tabel itu sendiri */
.dataTables_wrapper table.dataTable {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-top: 1px solid #dee2e6;
}

/* Baris kontrol bawah: info & pagination */
.dataTables_wrapper .dataTables_info {
    font-size: 0.82rem;
    color: #6c757d;
    padding-top: 0.75rem;
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 0.5rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 0.4rem !important;
    font-size: 0.85rem;
    padding: 0.3rem 0.65rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #e9ecef !important;
    border-color: #dee2e6 !important;
    color: #212529 !important;
}

/* Header kolom sortable */
table.dataTable thead th {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    background-color: #f8f9fa;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 1rem;
}

table.dataTable thead th:last-child {
    cursor: default;
}

table.dataTable tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    font-size: 0.9rem;
}

/* Hilangkan border bawah baris terakhir */
table.dataTable tbody tr:last-child td {
    border-bottom: none;
}