/* ========================================== */
/* 1. VARIABEL & GLOBAL STYLE                 */
/* ========================================== */
:root { 
    --primary: #004e92; 
    --accent: #000428; 
}

body { 
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    min-height: 100vh; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-family: 'Inter', sans-serif; 
    padding: 20px;
}

/* ========================================== */
/* 2. STYLE HALAMAN INDEX                     */
/* ========================================== */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 32px; 
    padding: 3rem 2rem;
    max-width: 400px; 
    width: 100%; 
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.logo-img { 
    width: 100px; 
    margin-bottom: 1.5rem; 
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1)); 
}

.btn-main {
    padding: 1rem; 
    border-radius: 16px; 
    font-weight: 700;
    transition: all 0.3s; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 10px;
}

.btn-absen { 
    background: var(--primary); 
    color: white; 
    border: none; 
}

.btn-absen:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 10px 20px rgba(0,78,146,0.3); 
}

.btn-admin { 
    background: #f8f9fa; 
    color: #333; 
    border: 2px solid #eee; 
    margin-top: 15px; 
}

.btn-admin:hover { 
    background: #eee; 
}

/* ========================================== */
/* 3. CUSTOM SWEETALERT2 STYLING              */
/* ========================================== */
.swal-mini-popup {
    width: 320px !important;
    padding: 1.5rem !important;
    border-radius: 20px !important;
}

.swal-mini-title {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
    margin-bottom: 1rem !important;
}

.swal-mini-input {
    height: 40px !important;
    font-size: 0.85rem !important;
    border-radius: 10px !important;
    border: 1px solid #edf2f7 !important;
    background: #f8fafc !important;
    box-shadow: none !important;
    margin: 0.5rem 0 !important;
}

.swal-mini-confirm {
    background-color: #2c3e50 !important;
    border-radius: 10px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    width: 100% !important;
}

.swal-mini-cancel {
    font-size: 0.8rem !important;
    color: #a0aec0 !important;
}

/* ========================================== */
/* 4. STYLE HALAMAN ADMIN                     */
/* ========================================== */
:root {
    --sidebar-w: 230px;
    --primary-admin: #2c3e50;
    --accent-admin: #3498db;
    --bg-body: #f1f3f5;
}

/* Override body khusus halaman admin jika diperlukan, atau biarkan menggunakan global body */
body.admin-body {
    background: var(--bg-body);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: #444;
    display: block; /* Membatalkan display flex dari index */
    min-height: 100vh;
    padding: 0;
}

#mobile-header {
    display: none;
    background: #fff;
    padding: 8px 15px;
    border-bottom: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 1001;
}

#sidebar {
    width: var(--sidebar-w);
    position: fixed;
    height: 100vh;
    background: #fff;
    border-right: 1px solid #e9ecef;
    z-index: 1000;
    transition: all 0.2s ease;
}

.sidebar-brand {
    padding: 25px 20px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-admin);
    letter-spacing: -0.5px;
}

.nav-link-admin {
    padding: 10px 20px;
    margin: 2px 10px;
    border-radius: 8px;
    color: #6c757d;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
    text-decoration: none;
}

.nav-link-admin i {
    font-size: 1rem;
}

.nav-link-admin:hover,
.nav-link-admin.active {
    color: var(--accent-admin);
    background: #f0f7ff;
}

#main-content {
    margin-left: var(--sidebar-w);
    padding: 25px 35px;
    transition: all 0.2s ease;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}

.card-slim {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.table {
    font-size: 0.85rem;
}

.table thead th {
    background: #f8f9fa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    border: none;
    padding: 12px;
}

.table td {
    padding: 12px;
    vertical-align: middle;
    border-bottom: 1px solid #f8f9fa;
}

@media (max-width: 768px) {
    #mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    #sidebar {
        margin-left: calc(-1 * var(--sidebar-w));
        transition: margin-left 0.3s ease-in-out;
    }

    #main-content {
        margin-left: 0;
        padding: 20px;
        transition: filter 0.3s ease;
    }

    body.show-sidebar #sidebar {
        margin-left: 0;
    }

    body.show-sidebar {
        overflow: hidden;
    }

    body.show-sidebar #main-content {
        filter: blur(4px);
    }
}

.swal2-popup {
    font-size: 0.85rem !important;
    border-radius: 15px !important;
}

/* ========================================== */
/* 5. STYLE HALAMAN ABSEN                     */
/* ========================================== */
body.absen-body {
    background: #f1f3f5; 
    font-family: 'Inter', sans-serif; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    min-height: 100vh;
    padding: 20px;
    flex-direction: column;
}

.absen-card {
    background: #fff; 
    width: 100%; 
    max-width: 400px;
    border-radius: 24px; 
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    text-align: center;
}

.brand-name { 
    color: #2c3e50; 
    font-weight: 800; 
    font-size: 1.5rem; 
    letter-spacing: -1px; 
}

.photo-frame {
    width: 120px; 
    height: 120px; 
    background: #f8f9fa;
    border-radius: 50%; 
    margin: 20px auto;
    border: 4px solid #fff; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.photo-frame img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.btn-absen {
    background: #2c3e50; 
    color: #fff; 
    border: none;
    padding: 15px; 
    border-radius: 15px; 
    font-weight: 700;
    width: 100%; 
    transition: 0.3s; 
    margin-top: 10px;
}

.btn-absen:active { 
    transform: scale(0.95); 
    background: #1a252f; 
}

.form-select { 
    border-radius: 12px; 
    padding: 12px; 
    border: 1px solid #e9ecef; 
    font-size: 0.9rem; 
}

.btn-riwayat {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #ced4da;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-riwayat:hover {
    background-color: #e2e6ea;
    border-color: #adb5bd;
}

/* ========================================== */
/* 6. STYLE HALAMAN VALIDASI                  */
/* ========================================== */
body.validasi-body { 
    background-color: #f4f7f6; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
}

.card-validasi { 
    max-width: 450px; 
    margin: 50px auto; 
    border: none; 
    border-radius: 20px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
    overflow: hidden; 
}

.header-valid { 
    background: linear-gradient(135deg, #1d976c, #93f9b9); 
    color: white; 
    padding: 30px 20px; 
    text-align: center; 
}

/* Animasi Centang */
.checkmark-wrapper { 
    width: 80px; 
    height: 80px; 
    background: white; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin: 0 auto 15px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
}

.checkmark-wrapper i { 
    font-size: 45px; 
    color: #1d976c; 
    animation: scaleUp 0.5s ease-out; 
}

@keyframes scaleUp {
    0% { transform: scale(0); }
    80% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.data-row { 
    display: flex; 
    justify-content: space-between; 
    padding: 12px 0; 
    border-bottom: 1px dashed #eee; 
    font-size: 0.95rem; 
}

.data-label { 
    color: #666; 
    font-weight: 500; 
}

.data-value { 
    color: #333; 
    font-weight: 700; 
    text-align: right; 
}

.footer-note { 
    font-size: 0.75rem; 
    color: #999; 
    text-align: center; 
    padding: 20px; 
}