/**
 * Shulevora Pro - Teacher Portal Professional Redesign (Vibrant Dark 2.0)
 * Architecture: Glassmorphism + High-Contrast Slate + Emerald Neon
 */

:root {
    --tp-sidebar-width: 320px;
    
    /* --- VIBRANT DARK PALETTE --- */
    --tp-bg-main: #020617; /* Deep Slate Black */
    --tp-bg-accent: #0f172a; /* Slate 900 */
    --tp-card-bg: rgba(30, 41, 59, 0.7); /* Translucent Slate 800 */
    --tp-sidebar-bg: #0f172a;
    
    /* --- BRAND COLORS --- */
    --tp-emerald: #10b981;
    --tp-emerald-glow: rgba(16, 185, 129, 0.4);
    --tp-blue: #3b82f6;
    --tp-border: rgba(255, 255, 255, 0.1);
    
    /* --- TYPOGRAPHY --- */
    --tp-text-primary: #f8fafc; /* Slate 50 */
    --tp-text-secondary: #94a3b8; /* Slate 400 */
    --tp-text-muted: #64748b; /* Slate 500 */
}

/* --- CORE LAYOUT --- */
.dashboard-layout.teacher-theme {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: radial-gradient(circle at top right, #064e3b 0%, var(--tp-bg-main) 40%);
    font-family: 'Inter', sans-serif;
    color: var(--tp-text-primary);
}

/* --- VERTICAL SIDEBAR (GLASS RAIL) --- */
.sidebar.glass-sidebar {
    width: var(--tp-sidebar-width);
    height: 100%;
    background: var(--tp-sidebar-bg);
    border-right: 1px solid var(--tp-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon.emerald {
    width: 36px;
    height: 36px;
    background: var(--tp-emerald);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 0 15px var(--tp-emerald-glow);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    padding: 0 1rem;
    overflow-y: auto;
}

.nav-section {
    font-size: var(--font-size-xs);
    font-weight: 800;
    color: var(--tp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1.25rem 0.75rem 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    color: var(--tp-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    margin-bottom: 0.15rem;
}

.nav-item i {
    font-size: 1.25rem;
    opacity: 0.7;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: rgba(16, 185, 129, 0.15);
    color: white;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.nav-item.active i {
    color: var(--tp-emerald);
    opacity: 1;
    filter: drop-shadow(0 0 5px var(--tp-emerald-glow));
}

.pro-badge {
    margin-left: auto;
    font-size: 0.65rem;
    padding: 2px 6px;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    color: white;
    border-radius: 6px;
    font-weight: 800;
    text-transform: uppercase;
}

/* --- MAIN CONTENT & PANORAMA HERO --- */
.main-content {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    padding: 0; /* Hero touches edges */
    display: flex;
    flex-direction: column;
}

.teacher-hero {
    position: relative;
    padding: 2rem;
    background: radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 280px;
    border-bottom: 1px solid var(--tp-border);
}

.hero-content h1 {
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -0.04em;
    color: white;
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--tp-text-secondary);
    max-width: 480px;
    line-height: 1.6;
}

.hero-visual img {
    height: 380px;
    filter: drop-shadow(0 0 50px rgba(16, 185, 129, 0.2));
}

.status-pill.emerald {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--tp-emerald);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(16, 185, 129, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- GLASS CARDS (Inherited from design-system.css) --- */
.content-grid {
    padding: 1.5rem;
}

.stat-card-modern {
    display: flex;
    flex-direction: column;
}

.stat-card-modern .label {
    font-size: var(--font-size-xs);
    color: var(--tp-text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

.stat-card-modern .value {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin-top: 0.25rem;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.icon-box.emerald { background: rgba(16, 185, 129, 0.1); color: var(--tp-emerald); border: 1px solid rgba(16, 185, 129, 0.2); }
.icon-box.blue { background: rgba(59, 130, 246, 0.1); color: var(--tp-blue); border: 1px solid rgba(59, 130, 246, 0.2); }
.icon-box.amber { background: rgba(245, 158, 11, 0.1); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.2); }

/* --- PRECISION LEDGER & GRID --- */
.analytics-row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}

.students-roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.student-status-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(8px);
    border: 1px solid var(--tp-border);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

.student-status-card:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255,255,255,0.2);
}

.student-avatar {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.25rem;
    background: var(--tp-bg-main);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    border: 2px solid var(--tp-emerald);
    box-shadow: 0 0 20px var(--tp-emerald-glow);
}

.student-info h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

.student-info code {
    font-size: 0.75rem;
    color: var(--tp-text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* Status Buttons */
.status-selector {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.status-btn {
    cursor: pointer;
    position: relative;
}

.status-btn input {
    position: absolute;
    opacity: 0;
}

.status-btn .btn-inner {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--tp-border);
    color: var(--tp-text-muted);
    transition: all 0.2s;
}

.status-btn.present input:checked + .btn-inner { background: var(--tp-emerald); color: white; box-shadow: 0 0 15px var(--tp-emerald-glow); border-color: transparent; }
.status-btn.late input:checked + .btn-inner { background: #f59e0b; color: white; box-shadow: 0 0 15px rgba(245, 158, 11, 0.4); border-color: transparent; }
.status-btn.absent input:checked + .btn-inner { background: #ef4444; color: white; box-shadow: 0 0 15px rgba(239, 68, 68, 0.4); border-color: transparent; }

/* Filter Row */
.filter-row-modern {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
}

.form-group-premium {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group-premium label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--tp-text-muted);
    text-transform: uppercase;
}

.select-premium, .input-premium {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--tp-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
    width: 100%;
}

.select-premium:focus {
    border-color: var(--tp-emerald);
    outline: none;
    box-shadow: 0 0 10px var(--tp-emerald-glow);
}

/* --- RESPONSIVE MOBILE HARDENING --- */
@media (max-width: 1024px) {
    .teacher-dashboard-premium {
        padding: 1rem;
    }

    .teacher-hero-premium .hero-inner {
        grid-template-columns: 1fr !important;
        min-height: auto !important;
    }

    .hero-content {
        padding: 1.5rem !important;
        text-align: center;
        align-items: center;
    }

    .hero-content p {
        margin: 0 auto 1.5rem !important;
    }

    .hero-inner > div:last-child {
        border-left: none !important;
        border-top: 1px solid rgba(255,255,255,0.05);
        padding: 1.5rem !important;
    }

    .analytics-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .analytics-row .glass-card {
        padding: 1rem !important;
    }

    .analytics-row div:last-child {
        grid-column: span 2; /* Class Average gets more room or stacks */
    }

    .teacher-dashboard-premium > div:last-child {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Mobile Top Bar Teacher Overrides */
    .mobile-top-bar {
        background: rgba(15, 23, 42, 0.95) !important;
        border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    }

    .mtb-title {
        color: white !important;
    }

    .mtb-toggle {
        background: rgba(16, 185, 129, 0.1) !important;
        color: var(--tp-emerald) !important;
    }

    .mtb-avatar {
        background: var(--tp-emerald) !important;
        border-color: rgba(255,255,255,0.1) !important;
    }
}

@media (max-width: 480px) {
    .analytics-row div:last-child {
        grid-column: auto;
    }
    
    .analytics-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Animations */
.animation-fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
