/* --- 1. GOOGLE FONTS & VARIABLES --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #2563eb;
    --sidebar-bg: #0f172a;
    --body-bg: #f8fafc;
    --sidebar-width: 260px; /* CENTRAL VARIABLE FOR WIDTH */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--body-bg);
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* --- 2. SIDEBAR (DESKTOP) --- */
#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #fff;
    height: 100vh;
    position: fixed; /* STICKY */
    top: 0;
    left: 0;
    z-index: 999;
    transition: all 0.3s;
    overflow-y: auto; /* Scroll if menu is too long */
}

/* --- 3. CONTENT AREA (DESKTOP) --- */
#content {
    width: calc(100% - var(--sidebar-width)); /* PRECISE CALCULATION */
    margin-left: var(--sidebar-width);        /* PUSH RIGHT */
    padding: 40px;
    min-height: 100vh;
    transition: all 0.3s;
}

/* --- 4. RESPONSIVE / FLEXIBLE DESIGN (TABLETS & PHONES) --- */
@media (max-width: 991px) {
    /* Turn Sidebar into a Top Menu on smaller screens */
    #sidebar {
        width: 100%;
        max-width: 100%;
        min-width: 100%;
        height: auto;     /* Height fits content */
        position: relative; /* No longer fixed */
    }

    #sidebar .sidebar-header {
        text-align: center;
    }
    
    #content {
        width: 100%;
        margin-left: 0; /* No margin needed */
        padding: 20px;
    }
    
    /* Hide the huge timer on phones if it's too big */
    #liveTimer {
        font-size: 2.5rem !important; 
    }
}

/* --- 5. STYLING COMPONENTS --- */
.sidebar-header {
    padding: 25px;
    background: rgba(0,0,0,0.2);
}

#sidebar ul.components {
    padding: 15px 0;
}

#sidebar ul li a {
    padding: 15px 25px;
    font-size: 0.95rem;
    display: block;
    color: #94a3b8;
    text-decoration: none;
    border-left: 4px solid transparent;
}

#sidebar ul li a:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
    border-left: 4px solid var(--primary);
}

.dash-card {
    background: #fff;
    border-radius: 12px;
    /* Soft Shadow */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Fix for Table Overflow */
.table-responsive {
    overflow-x: auto;
}
/* --- 6. AUTHENTICATION PAGES (Login/Register) --- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--body-bg);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    padding: 40px;
    border-radius: 16px; /* Smooth rounded corners */
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); /* Deep soft shadow */
    text-align: center;
}

.auth-header {
    margin-bottom: 30px;
}

.auth-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 15px auto;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}

.form-control-lg {
    font-size: 0.95rem;
    padding: 12px 20px;
    border-radius: 8px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
}

.form-control-lg:focus {
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    border-color: var(--primary);
}