/* ==============================================================================
   STUDENT ATTENDANCE MANAGEMENT SYSTEM - CUSTOM STYLESHEET
   ============================================================================== */

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --secondary-color: #64748b;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --bg-body: #f8fafc;
    --card-border: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==============================================================================
   APP LAYOUT & SIDEBAR
   ============================================================================== */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-icon-box {
    width: 36px;
    height: 36px;
}

.avatar-circle {
    width: 38px;
    height: 38px;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar .nav-link {
    color: #94a3b8;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.925rem;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
    color: #ffffff;
    background-color: var(--sidebar-hover);
}

.sidebar .nav-link.active {
    color: #ffffff;
    background-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.sidebar .nav-link i {
    font-size: 1.15rem;
}

/* Mobile Sidebar Drawer */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    }
    body.sidebar-open .sidebar {
        left: 0;
    }
    body.sidebar-open::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.6);
        backdrop-filter: blur(2px);
        z-index: 1020;
    }
}

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--bg-body);
}

.content-body {
    padding: 1.5rem 1.5rem 3rem;
    flex-grow: 1;
}

@media (max-width: 575.98px) {
    .content-body {
        padding: 1rem 0.75rem 2rem;
    }
}

/* ==============================================================================
   CARDS & STATS
   ============================================================================== */
.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--card-border);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.08) !important;
}

.stat-icon-box {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
}

/* ==============================================================================
   TABLES
   ============================================================================== */
.table-responsive {
    border-radius: 0.5rem;
}

.table thead th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    color: #64748b;
    border-bottom: 2px solid var(--card-border);
    padding: 0.75rem 1rem;
    background-color: #f8fafc;
}

.table tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    font-size: 0.925rem;
    border-bottom: 1px solid #f1f5f9;
}

/* Radio buttons for attendance marking */
.status-radio {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}
.status-present:checked {
    background-color: #198754;
    border-color: #198754;
}
.status-absent:checked {
    background-color: #dc3545;
    border-color: #dc3545;
}
.status-late:checked {
    background-color: #ffc107;
    border-color: #ffc107;
}

/* ==============================================================================
   AUTH & LANDING PAGES
   ============================================================================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    padding: 1.5rem;
}

.auth-card {
    max-width: 440px;
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    background: #ffffff;
}

.landing-hero {
    background: linear-gradient(135deg, #0f172a 0%, #312e81 100%);
    color: white;
    padding: 5rem 1rem;
}

/* ==============================================================================
   TOAST NOTIFICATIONS
   ============================================================================== */
.toast-container {
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    border-radius: 0.5rem;
}

/* ==============================================================================
   CUSTOM SCROLLBAR
   ============================================================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
