:root {
    --navy: #0b2545;
    --navy-dark: #081b34;
    --teal: #0d9488;
    --teal-light: #14b8a6;
    --bg: #f4f6f9;
    --present: #198754;
    --absent: #dc3545;
    --late: #fd7e14;
    --excused: #6f42c1;
}

body {
    background: var(--bg);
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ---------- Layout ---------- */
.wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: 250px;
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: #fff;
    flex-shrink: 0;
    transition: margin-left .3s;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}
.sidebar-brand {
    padding: 20px 18px;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,.1);
    display: flex; align-items: center; gap: 10px;
}
.sidebar-brand i { color: var(--teal-light); font-size: 1.4rem; }
.sidebar-menu { list-style: none; padding: 10px 0; margin: 0; }
.sidebar-menu li a {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 20px;
    color: #cfd8e3;
    text-decoration: none;
    font-size: .93rem;
    border-left: 3px solid transparent;
}
.sidebar-menu li a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-menu li.active a {
    background: rgba(20,184,166,.15);
    border-left-color: var(--teal-light);
    color: #fff;
    font-weight: 600;
}

.main-content { flex: 1; min-width: 0; display: flex; flex-direction: column; margin-left: 250px; }

.topbar {
    background: var(--navy);
    color: #fff;
    padding: 14px 24px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.content-body { padding: 24px; }

/* ---------- Cards ---------- */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.card-header {
    background: #fff;
    border-bottom: 1px solid #eef0f3;
    font-weight: 600;
    color: var(--navy);
    border-radius: 10px 10px 0 0 !important;
}

.stat-card {
    border-radius: 10px;
    padding: 20px;
    color: #fff;
}
.stat-card h3 { font-size: 1.8rem; margin-bottom: 0; font-weight: 700; }
.stat-card p { margin-bottom: 0; opacity: .9; font-size: .85rem; }
.stat-card.bg-navy { background: linear-gradient(135deg, var(--navy), #123a6b); }
.stat-card.bg-teal { background: linear-gradient(135deg, var(--teal), var(--teal-light)); }
.stat-card.bg-present { background: linear-gradient(135deg, #198754, #2fbf71); }
.stat-card.bg-absent { background: linear-gradient(135deg, #dc3545, #f0616f); }

/* ---------- Buttons ---------- */
.btn-navy { background: var(--navy); color: #fff; border: none; }
.btn-navy:hover { background: var(--navy-dark); color: #fff; }
.btn-teal { background: var(--teal); color: #fff; border: none; }
.btn-teal:hover { background: #0b7a70; color: #fff; }

/* ---------- Attendance status badges/buttons ---------- */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
    color: #fff;
}
.status-Present { background: var(--present); }
.status-Absent { background: var(--absent); }
.status-Late { background: var(--late); }
.status-Excused { background: var(--excused); }

.status-select {
    border: none;
    border-radius: 20px;
    padding: 5px 10px;
    font-weight: 600;
    font-size: .82rem;
    color: #fff;
}
.status-select option { color: #000; }
.status-select.status-Present { background: var(--present); }
.status-select.status-Absent { background: var(--absent); }
.status-select.status-Late { background: var(--late); }
.status-select.status-Excused { background: var(--excused); }

table.table thead { background: var(--navy); color: #fff; }
table.table thead th { border: none; vertical-align: middle; }

/* login page */
.login-wrapper {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--navy), var(--teal));
}
.login-card {
    width: 100%; max-width: 380px;
    background: #fff; border-radius: 14px; padding: 36px 32px;
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.login-card i.bi-calendar2-check-fill { font-size: 2.4rem; color: var(--teal); }

@media (max-width: 768px) {
    .sidebar { margin-left: -250px; }
    .sidebar.show { margin-left: 0; }
    .main-content { margin-left: 0; }
}
