/* ============================================================
   Aplikasi Monitoring Hafalan Al-Quran - Style
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f4f8;
    color: #333;
    min-height: 100vh;
}

/* ===== HEADER ===== */
.header {
    background: linear-gradient(135deg, #1a5f3a, #2d8a4e);
    color: white;
    padding: 0 30px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 { font-size: 20px; font-weight: 600; }

.header .user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header .user-info span { font-size: 14px; }

.header .btn-logout {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.4);
    padding: 6px 16px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s;
}

.header .btn-logout:hover {
    background: rgba(255,255,255,0.35);
    border-color: white;
}

/* ===== NAVIGATION ===== */
.nav {
    background: white;
    padding: 0 30px;
    display: flex;
    gap: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-bottom: 1px solid #e0e6ed;
}

.nav a {
    text-decoration: none;
    color: #555;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.nav a:hover { color: #1a5f3a; background: #f0faf4; }

.nav a.active {
    color: #1a5f3a;
    border-bottom-color: #1a5f3a;
    font-weight: 600;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* ===== CARD ===== */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    overflow: hidden;
}

.card-header {
    padding: 18px 25px;
    border-bottom: 1px solid #e8edf2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2 { font-size: 18px; font-weight: 600; color: #1a5f3a; }

.card-body { padding: 25px; }

/* ===== STATS CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 18px;
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-card .stat-icon.green { background: #e6f7ee; color: #1a5f3a; }
.stat-card .stat-icon.blue { background: #e6f0fa; color: #2563eb; }
.stat-card .stat-icon.orange { background: #fef3e6; color: #d97706; }
.stat-card .stat-icon.purple { background: #f3e8ff; color: #7c3aed; }

.stat-card .stat-info h3 { font-size: 13px; color: #888; font-weight: 500; margin-bottom: 4px; }

.stat-card .stat-info .stat-value { font-size: 26px; font-weight: 700; color: #333; }

/* ===== TABLE ===== */
.table-responsive { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

table thead { background: #f8fafc; }

table th {
    padding: 12px 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e6ed;
}
/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary { background: #1a5f3a; color: white; }
.btn-primary:hover { background: #14522e; }
.btn-success { background: #059669; color: white; }
.btn-success:hover { background: #047857; }
.btn-warning { background: #d97706; color: white; }
.btn-warning:hover { background: #b45309; }
.btn-danger { background: #dc2626; color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-secondary { background: #6b7280; color: white; }
.btn-secondary:hover { background: #4b5563; }

.btn-sm { padding: 5px 12px; font-size: 12px; }

.btn-group { display: flex; gap: 6px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #1a5f3a;
    box-shadow: 0 0 0 3px rgba(26, 95, 58, 0.1);
}

select.form-control { cursor: pointer; }

textarea.form-control { resize: vertical; min-height: 80px; }

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* ===== ALERT ===== */
.alert {
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* ===== LOGIN PAGE ===== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a5f3a 0%, #2d8a4e 50%, #1a5f3a 100%);
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.login-box .logo { text-align: center; margin-bottom: 30px; }

.login-box .logo .icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #1a5f3a, #2d8a4e);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.login-box .logo h2 { font-size: 22px; color: #1a5f3a; font-weight: 700; }

.login-box .logo p { font-size: 13px; color: #888; margin-top: 5px; }

table td {
    padding: 12px 15px;
    font-size: 14px;
    border-bottom: 1px solid #eef2f7;
    color: #444;
}

table tbody tr:hover { background: #f8fafc; }

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.login-box .login-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid #e8edf2;
}

.login-box .login-tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #999;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.login-box .login-tab.active {
    color: #1a5f3a;
    border-bottom-color: #1a5f3a;
}

.login-box .login-form { display: none; }
.login-box .login-form.active { display: block; }

.login-box .btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #1a5f3a, #2d8a4e);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.login-box .btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(26, 95, 58, 0.4);
}

/* ===== CHECKLIST HAFALAN ===== */
.checklist-table th { text-align: center; font-size: 12px; }
.checklist-table td { text-align: center; vertical-align: middle; }
.checklist-table td:first-child,
.checklist-table td:nth-child(2) { text-align: left; }

/* ===== PRINT (LAPORAN) ===== */
@media print {
    .header, .nav, .btn, .no-print { display: none !important; }
    body { background: white; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header { padding: 0 15px; }
    .nav { padding: 0 10px; overflow-x: auto; }
    .nav a { padding: 12px 12px; font-size: 12px; white-space: nowrap; }
    .container { padding: 0 10px; margin: 20px auto; }
    .card-body { padding: 15px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
}
.badge-warning { background: #fef3c7; color: #92400e; }