/* src/pages/StudentPage.css - STUDENT PORTAL — "Executive Command" Style */

/* ─── Container ───────────────────────────────────────── */
.student-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ─── Theme Variables ─────────────────────────────────── */
.student-container[data-theme='dark'],
.student-container:not([data-theme]) {
    --bg-primary: #0d0d0d;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-glass: rgba(255,255,255,0.03);

    --role-primary: #1b8cf4;
    --role-glow: rgba(27,140,244,0.35);
    --sidebar-bg: linear-gradient(180deg,#0f0f0f 0%,#080808 100%);
    --sidebar-border: rgba(255,255,255,0.06);
    --nav-active-bg: rgba(27,140,244,0.15);
    --nav-active-bar: linear-gradient(180deg,#1b8cf4 0%,#0066cc 100%);
    --nav-hover-bg: rgba(255,255,255,0.04);
    --logo-gradient: linear-gradient(135deg,#1b8cf4,#0066cc);

    --text-primary: #ffffff;
    --text-muted: #6b7280;
    --border-color: rgba(255,255,255,0.06);
    --border-glass: rgba(255,255,255,0.06);
}

.student-container[data-theme='light'] {
    --bg-primary: #f4f6f8;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f0f2f5;
    --bg-glass: rgba(0,0,0,0.02);

    --role-primary: #1b8cf4;
    --role-glow: rgba(27,140,244,0.3);
    --sidebar-bg: linear-gradient(180deg,#ffffff 0%,#f8f9fa 100%);
    --sidebar-border: rgba(0,0,0,0.08);
    --nav-active-bg: rgba(27,140,244,0.12);
    --nav-active-bar: linear-gradient(180deg,#1b8cf4 0%,#0066cc 100%);
    --nav-hover-bg: rgba(0,0,0,0.04);
    --logo-gradient: linear-gradient(135deg,#1b8cf4,#0066cc);

    --text-primary: #111827;
    --text-muted: #6b7280;
    --border-color: rgba(0,0,0,0.06);
    --border-glass: rgba(0,0,0,0.06);
}

/* ─── Sidebar ─────────────────────────────────────────── */
.student-sidebar {
    position: fixed;
    left: 0; top: 0;
    height: 100vh;
    width: 80px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4,0,0.2,1);
    z-index: 100;
    overflow-x: hidden;
    overflow-y: auto;
}

.student-sidebar:not(.collapsed) { width: 260px; }

.student-sidebar::-webkit-scrollbar { width: 4px; }
.student-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ─── Sidebar Header ──────────────────────────────────── */
.student-sidebar-header {
    position: relative;
    padding: 20px 16px;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-primary);
    min-height: 72px;
    transition: padding 0.3s;
}

.student-sidebar:not(.collapsed) .student-sidebar-header { justify-content: flex-start; }

.student-logo-icon {
    font-size: 32px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 16px var(--role-glow));
}

.student-logo-text {
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
    display: none;
    color: var(--text-primary);
}

.student-sidebar:not(.collapsed) .student-logo-text { display: block; }

.student-role-badge {
    display: none;
    padding: 3px 10px;
    background: var(--role-primary);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.student-sidebar:not(.collapsed) .student-role-badge { display: inline-block; }

/* ─── Collapse Toggle ─────────────────────────────────── */
.student-sidebar-toggle {
    position: absolute;
    right: 12px;
    top: 20px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    flex-shrink: 0;
    transition: all 0.2s;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.student-sidebar-toggle:hover {
    background: var(--role-primary);
    border-color: var(--role-primary);
    color: #fff;
    transform: scale(1.05);
}

.student-sidebar.collapsed .student-sidebar-header {
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 12px 8px;
    min-height: 80px;
}

.student-sidebar.collapsed .student-logo-text,
.student-sidebar.collapsed .student-role-badge { display: none; }

.student-sidebar.collapsed .student-sidebar-toggle {
    position: static;
    width: 38px;
    height: 38px;
    font-size: 22px;
}

/* ─── Nav ─────────────────────────────────────────────── */
.student-nav-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.student-nav-scroll {
    flex: 1;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    overflow-x: hidden;
}

.student-nav-scroll::-webkit-scrollbar { width: 3px; }
.student-nav-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.student-nav-scroll button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    width: 100%;
    text-align: left;
    white-space: nowrap;
}

.student-sidebar:not(.collapsed) .student-nav-scroll button { justify-content: flex-start; }

.student-nav-scroll button:hover {
    background: var(--nav-hover-bg);
    color: var(--text-primary);
}

.student-nav-scroll button.nav-active {
    background: var(--nav-active-bg);
    color: #ffffff;
    box-shadow: 0 4px 20px var(--role-glow);
}

.student-nav-scroll button.nav-active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    height: 40px; width: 4px;
    background: var(--nav-active-bar);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 12px var(--role-glow);
}

.student-nav-icon-box {
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
    font-size: 22px;
}

.student-nav-scroll button.nav-active .student-nav-icon-box {
    background: rgba(27,140,244,0.28);
    border-color: rgba(27,140,244,0.35);
    box-shadow: 0 0 14px rgba(27,140,244,0.25), inset 0 0 10px rgba(27,140,244,0.12);
}

.student-nav-item-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.student-sidebar:not(.collapsed) .student-nav-item-label { display: block; }

.student-nav-active-dot {
    width: 6px; height: 6px;
    background: var(--role-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--role-glow);
    display: none;
    flex-shrink: 0;
}

.student-sidebar:not(.collapsed) .student-nav-scroll button.nav-active .student-nav-active-dot {
    display: block;
}

/* ─── Footer ──────────────────────────────────────────── */
.student-sidebar-footer {
    padding: 16px 8px;
    border-top: 1px solid var(--sidebar-border);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.student-sidebar-icons-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 4px;
}

.student-sidebar:not(.collapsed) .student-sidebar-icons-row {
    justify-content: flex-start;
    padding-left: 4px;
}

.student-sidebar-user-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--sidebar-border);
    border-radius: 14px;
    overflow: hidden;
}

.student-sidebar:not(.collapsed) .student-sidebar-user-row { justify-content: flex-start; }

.student-sidebar-user-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--role-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    overflow: hidden;
    flex-shrink: 0;
}

.student-sidebar-user-info {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.student-sidebar:not(.collapsed) .student-sidebar-user-info { display: flex; }

.student-sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-sidebar-user-role {
    font-size: 11px;
    color: var(--text-muted);
}

.student-sidebar-logout-btn {
    width: 100%;
    padding: 10px;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: 12px;
    color: #ef4444;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
}

.student-sidebar-logout-btn:hover {
    background: rgba(239,68,68,0.18);
    border-color: rgba(239,68,68,0.4);
}

/* ─── Main Content ────────────────────────────────────── */
.student-main {
    flex: 1;
    margin-left: 260px;
    width: calc(100% - 260px);
    min-height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s cubic-bezier(0.4,0,0.2,1), width 0.3s cubic-bezier(0.4,0,0.2,1);
    position: relative;
}

.student-main.sidebar-collapsed {
    margin-left: 80px;
    width: calc(100% - 80px);
}

/* Player mode: hide sidebar, full screen */
.student-main.player-mode {
    margin-left: 0 !important;
    width: 100% !important;
}

/* ─── Mobile ──────────────────────────────────────────── */
.student-mobile-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1001;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 20px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.student-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 99;
}

@media (max-width: 768px) {
    .student-mobile-toggle { display: flex; }

    .student-sidebar {
        width: 260px !important;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
        z-index: 1000;
    }

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

    .student-sidebar-backdrop.active { display: block; }

    .student-main {
        margin-left: 0 !important;
        width: 100% !important;
        padding-top: 0 !important;
    }

    .student-nav-item-label { display: block !important; }
    .student-role-badge { display: inline-block !important; }
    .student-logo-text { display: block !important; }
    .student-sidebar-user-info { display: flex !important; }
    .student-nav-active-dot { display: none !important; }
}