
:root {
    --red: #e32636;
    --red-dark: #b91c2c;
    --black: #101010;
    --sidebar: #090909;
    --panel: #191919;
    --panel-light: #222222;
    --white: #ffffff;
    --muted: #a7a7a7;
    --border: #303030;
}

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

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--black);
    color: var(--white);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font: inherit;
}

button, .btn {
    cursor: pointer;
}

.btn {
    display: inline-block;
    padding: 11px 18px;
    border: 0;
    border-radius: 7px;
    background: var(--red);
    color: white;
    font-weight: 700;
    transition: .2s;
}

.btn:hover {
    background: var(--red-dark);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--red);
    color: white;
}

.btn-outline:hover {
    background: var(--red);
}

.flash-container {
    padding: 12px 20px;
}

.flash {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 7px;
    background: #252525;
    border-left: 4px solid var(--red);
}

.flash.success { border-color: #27ae60; }
.flash.error { border-color: var(--red); }

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    background: #101010;
}

.auth-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 9%;
    background: linear-gradient(140deg, #26090d, #111111 70%);
}

.brand {
    font-size: 27px;
    font-weight: 800;
    letter-spacing: 1px;
}

.brand span { color: var(--red); }

.auth-info h1 {
    font-size: clamp(35px, 5vw, 58px);
    line-height: 1.12;
    margin: 35px 0 18px;
}

.auth-info p {
    color: var(--muted);
    max-width: 480px;
}

.auth-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 35px 22px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 35px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.auth-card h2 {
    font-size: 28px;
    margin-bottom: 7px;
}

.auth-card > p {
    color: var(--muted);
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 17px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    color: #dddddd;
}

.form-group input,
.form-group select,
.form-group textarea,
input, select, textarea {
    width: 100%;
    padding: 12px 13px;
    background: #101010;
    color: white;
    border: 1px solid #3b3b3b;
    border-radius: 7px;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
input:focus, select:focus, textarea:focus {
    border-color: var(--red);
}

.auth-card .btn {
    width: 100%;
    margin-top: 8px;
}

.auth-bottom {
    text-align: center;
    color: var(--muted);
    margin-top: 20px;
    font-size: 14px;
}

.auth-bottom a { color: #ff5965; }

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 7%;
    border-bottom: 1px solid var(--border);
    background: #0b0b0b;
}

.site-nav {
    display: flex;
    gap: 25px;
    align-items: center;
}

.hero {
    min-height: 570px;
    display: flex;
    align-items: center;
    padding: 80px 8%;
    background:
        radial-gradient(circle at 80% 35%, #4a1018 0, transparent 35%),
        linear-gradient(120deg, #151515, #090909);
}

.hero-content { max-width: 720px; }

.hero h1 {
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.08;
    margin-bottom: 22px;
}

.hero h1 span { color: var(--red); }

.hero p {
    color: var(--muted);
    max-width: 600px;
    font-size: 18px;
    margin-bottom: 28px;
}

.section {
    padding: 65px 8%;
}

.section h2 {
    font-size: 30px;
    margin-bottom: 12px;
}

.section-intro {
    color: var(--muted);
    margin-bottom: 25px;
}

.feature-grid, .stats-grid, .content-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.feature-card, .stat-card, .panel, .content-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 22px;
}

.feature-card h3, .panel h3, .content-card h3 {
    margin-bottom: 9px;
}

.feature-card p, .muted {
    color: var(--muted);
}

.dashboard-layout {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 245px;
    flex-shrink: 0;
    min-height: 100vh;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    padding: 25px 15px;
    position: fixed;
    inset: 0 auto 0 0;
    overflow-y: auto;
    z-index: 20;
}

.sidebar-brand {
    padding: 0 12px 25px;
    font-size: 23px;
    font-weight: 800;
}

.sidebar-brand span { color: var(--red); }

.sidebar-label {
    color: #777;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    padding: 15px 12px 8px;
}

.sidebar-link {
    display: block;
    padding: 11px 13px;
    margin: 4px 0;
    color: #c6c6c6;
    border-radius: 7px;
    font-size: 14px;
    transition: .2s;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: #321216;
    color: white;
    border-left: 3px solid var(--red);
}

.sidebar-link.logout { color: #ff727b; }

.dashboard-main {
    width: calc(100% - 245px);
    margin-left: 245px;
    min-width: 0;
    padding: 30px;
}

.dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 28px;
}

.dashboard-topbar h1 {
    font-size: 27px;
}

.user-chip {
    color: #ddd;
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 9px 14px;
    border-radius: 30px;
    font-size: 13px;
}

.welcome-panel {
    padding: 28px;
    border-radius: 12px;
    background: linear-gradient(110deg, #351116, #191919 75%);
    border: 1px solid #542027;
    margin-bottom: 25px;
}

.welcome-panel h2 { font-size: 25px; }
.welcome-panel p { color: #c7bfc0; }

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 25px;
}

.stat-card small {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}

.stat-card strong {
    font-size: 28px;
}

.stat-card .stat-accent { color: #ff5b66; }

.panel {
    margin-bottom: 20px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 17px;
}

.data-list {
    display: grid;
    gap: 12px;
}

.data-item {
    padding: 14px;
    border-radius: 8px;
    background: #222;
    border: 1px solid #333;
}

.data-item p { color: var(--muted); }

.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 550px;
}

th, td {
    text-align: left;
    padding: 13px;
    border-bottom: 1px solid var(--border);
}

th {
    color: #ff6872;
    font-size: 13px;
}

td { color: #ddd; }

.progress-track {
    height: 9px;
    background: #333;
    border-radius: 20px;
    overflow: hidden;
    margin-top: 9px;
}

.progress-fill {
    height: 100%;
    background: var(--red);
    border-radius: 20px;
}

.empty-state {
    color: var(--muted);
    padding: 18px;
    background: #202020;
    border-radius: 8px;
}

.action-link {
    color: #ff6872;
    font-weight: 700;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.tool-btn {
    display: block;
    padding: 15px;
    background: #242424;
    border: 1px solid #393939;
    border-radius: 8px;
    transition: .2s;
}

.tool-btn:hover {
    border-color: var(--red);
    background: #301519;
}

.tool-btn small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.dashboard-section {
    display: none;
}

.dashboard-section.active {
    display: block;
}

.mobile-menu {
    display: none;
    background: var(--red);
    color: white;
    border: 0;
    padding: 8px 12px;
    border-radius: 6px;
}

@media (max-width: 1000px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-grid, .content-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-info { display: none; }
    .site-header { padding: 15px 5%; }
    .site-nav { gap: 12px; font-size: 13px; }
    .hero { min-height: 450px; padding: 55px 7%; }
    .section { padding: 45px 7%; }

    .sidebar {
        transform: translateX(-100%);
        transition: transform .25s;
    }

    .sidebar.open { transform: translateX(0); }

    .dashboard-main {
        width: 100%;
        margin-left: 0;
        padding: 18px;
    }

    .mobile-menu { display: inline-block; }
    .dashboard-topbar h1 { font-size: 21px; }
    .stats-grid, .feature-grid, .content-grid, .tool-grid {
        grid-template-columns: 1fr;
    }
}
/* Student dashboard section navigation fix */
.dashboard-main .dashboard-section {
    display: none !important;
}

.dashboard-main .dashboard-section.active {
    display: block !important;
}