/* Global Styles */
:root {
    --primary-color: #800000;
    /* School Maroon */
    --primary-dark: #660000;
    --accent-color: #fbbf24;
    /* School Yellow/Gold */
    --secondary-color: #64748b;
    /* Slate Grey */
    --bg-color: #f8fafc;
    /* Very Light Grey */
    --text-color: #1e293b;
    --sidebar-width: 260px;
    --header-height: 70px;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    color: var(--text-color);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: #4a0404;
    /* Deep Maroon */
    color: white;
    display: flex;
    flex-direction: column;
    padding: 0;
    position: fixed;
    height: 100%;
    z-index: 50;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    padding: 0 24px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.nav-links {
    padding: 20px;
    flex: 1;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #cbd5e1;
    /* Slate 300 */
    text-decoration: none;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Header */
.top-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 40;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.header-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-badge {
    text-align: right;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
}

.user-role {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    flex: 1;
    padding: 30px;
    width: 100%;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    /* Sharper corners for professional look */
    padding: 24px;
    box-shadow: var(--card-shadow);
    border: 1px solid #e2e8f0;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 8px;
    border-top: 4px solid var(--primary-color);
    /* Top border instead of left */
    border-left: none;
    box-shadow: var(--card-shadow);
}

.stat-title {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

/* Login Page with School Colors */
.login-body {
    background: #f1f5f9;
    /* Professional Light Grey */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-top: 5px solid var(--primary-color);
}

/* Forms & Buttons */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

button.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    width: 100%;
    transition: background-color 0.2s;
}

button.btn-primary:hover {
    background-color: var(--primary-dark);
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
}

th,
td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tr:last-child td {
    border-bottom: none;
}

/* Utilities */
.text-danger {
    color: #ef4444;
    font-weight: 600;
}

.text-success {
    color: #10b981;
    font-weight: 600;
}