/* ============================================ */
/* STYLE APLIKASI TAHFIDZ QUR'AN */
/* Modern Islamic Premium Design */
/* ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #001f3f;    /* Biru Navy */
    --secondary-color: #003366;   /* Biru Menengah */
    --gold-color: #ffd700;       /* Kuning Emas */
    --gold-dark: #b8860b;        /* Emas Gelap */
    --white: #ffffff;
    --light-bg: #f4f6f9;
    --dark-text: #333333;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
}

/* ============================================ */
/* LOGIN PAGE */
/* ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, #001a33 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,215,0,0.1) 0%, transparent 50%);
    animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.login-container {
    background: rgba(255, 255, 255, 0.98);
    padding: 50px;
    border-radius: 20px;
    border: 3px solid var(--gold-color);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.4);
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo i {
    font-size: 60px;
    color: var(--primary-color);
}

.login-title {
    text-align: center;
    color: var(--primary-color);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.login-subtitle {
    text-align: center;
    color: var(--gold-dark);
    font-size: 14px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold-color);
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.2);
    background: white;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--gold-color);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 31, 63, 0.4);
    color: white;
}

/* ============================================ */
/* SIDEBAR */
/* ============================================ */
.sidebar {
    background: linear-gradient(180deg, var(--primary-color) 0%, #001a33 100%);
    min-height: 100vh;
    padding: 0;
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
}

.sidebar-brand {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.sidebar-brand h3 {
    color: var(--gold-color);
    font-size: 22px;
    font-weight: 700;
}

.sidebar-brand span {
    color: white;
    font-size: 12px;
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-menu a {
    display: block;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255, 215, 0, 0.15);
    color: var(--gold-color);
    border-left-color: var(--gold-color);
}

.sidebar-menu a i {
    margin-right: 12px;
    width: 20px;
}

.sidebar-logout {
    background: var(--danger);
    margin: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.sidebar-logout a {
    color: white;
    font-weight: 600;
}

.sidebar-logout:hover {
    background: #c82333;
}

/* ============================================ */
/* MAIN CONTENT */
/* ============================================ */
.main-content {
    padding: 30px;
    /* Tambahan Flexbox untuk mendorong footer ke bawah */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-header {
    background: white;
    padding: 25px 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.page-header h2 {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.page-header p {
    color: #666;
    margin: 0;
}

/* ============================================ */
/* STATISTIC CARDS */
/* ============================================ */
.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--gold-color);
}

.stat-card h3 {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.stat-card .number {
    color: var(--primary-color);
    font-size: 36px;
    font-weight: 700;
}

.stat-card i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    color: rgba(0, 31, 63, 0.1);
}

/* ============================================ */
/* TABLES */
/* ============================================ */
.table-container {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.table-container h3 {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gold-color);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: var(--primary-color);
    color: white;
}

.table th,
.table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: rgba(255, 215, 0, 0.1);
}

.table .btn-action {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    text-decoration: none;
    display: inline-block;
    margin-right: 5px;
}

.btn-edit {
    background: var(--info);
    color: white;
}

.btn-delete {
    background: var(--danger);
    color: white;
}

.btn-view {
    background: var(--success);
    color: white;
}

.btn-verify {
    background: var(--gold-color);
    color: var(--primary-color);
    font-weight: 600;
}

/* ============================================ */
/* FORMS */
/* ============================================ */
.form-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.form-card h3 {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 600;
}

.form-card .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-btn {
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.form-btn-save {
    background: var(--success);
}

.form-btn-reset {
    background: #6c757d;
}

/* ============================================ */
/* BUTTONS */
/* ============================================ */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-block;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: #333;
}

.btn-info {
    background: var(--info);
    color: white;
}

.btn-gold {
    background: var(--gold-color);
    color: var(--primary-color);
    font-weight: 600;
}

.btn-gold:hover {
    background: var(--gold-dark);
    color: white;
}

/* ============================================ */
/* CARDS */
/* ============================================ */
.card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 2px solid var(--gold-color);
    background: transparent;
}

.card-header h4 {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: 25px;
}

/* ============================================ */
/* BADGES */
/* ============================================ */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-pending {
    background: var(--warning);
    color: #333;
}

.badge-diterima {
    background: var(--success);
    color: white;
}

.badge-ditolak {
    background: var(--danger);
    color: white;
}

.badge-hadir {
    background: var(--success);
    color: white;
}

.badge-alpha {
    background: var(--danger);
    color: white;
}

.badge-sakit {
    background: var(--info);
    color: white;
}

.badge-izin {
    background: #6c757d;
    color: white;
}

/* ============================================ */
/* MENU DROPDOWN */
/* ============================================ */
.dropdown-menu {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 10px;
}

.dropdown-item {
    padding: 10px 15px;
    color: var(--primary-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: var(--gold-color);
    color: var(--primary-color);
}

/* ============================================ */
/* ALERTS */
/* ============================================ */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: none;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid var(--info);
}

/* ============================================ */
/* FOOTER */
/* ============================================ */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
    /* Tambahan margin top auto agar footer terdorong ke bawah */
    margin-top: auto; 
}

.footer p {
    margin: 0;
    font-size: 14px;
}

.footer span {
    color: var(--gold-color);
    font-weight: 600;
}

/* ============================================ */
/* RESPONSIVE */
/* ============================================ */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
        padding-bottom: 20px;
    }
    
    .stat-card {
        margin-bottom: 20px;
    }
    
    .form-card .form-row {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
}

/* ============================================ */
/* ANIMATIONS */
/* ============================================ */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* ============================================ */
/* SELECT OPTION */
/* ============================================ */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23001f3f' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}