/* =========================================================================
   1. SYSTEM DESIGN TOKENS & VARIABLE ROOTS
   ========================================================================= */
:root {
    /* Font Families */
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Transition Rates */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Shadows */
    --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.05), 0 1px 3px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 12px 20px -8px rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 32px -12px rgba(0, 0, 0, 0.12), 0 8px 16px -4px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 24px var(--primary-shadow-color);
}

/* Dark Mode Variables (Default) */
[data-theme="dark"] {
    --bg-base: #070913;
    --bg-gradient: radial-gradient(circle at 50% 0%, #11142b 0%, #070913 100%);
    --bg-surface: rgba(15, 18, 36, 0.65);
    --bg-surface-solid: #0d1022;
    --border-color: rgba(255, 255, 255, 0.07);
    --border-highlight: rgba(255, 255, 255, 0.12);
    
    --primary-accent: #4f46e5;
    --primary-accent-glow: rgba(79, 70, 229, 0.4);
    --secondary-accent: #d946ef;
    --secondary-accent-glow: rgba(217, 70, 239, 0.4);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --primary-shadow-color: rgba(79, 70, 229, 0.15);

    --success-bg: rgba(16, 185, 129, 0.15);
    --success-text: #34d399;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --warning-text: #fbbf24;
    --danger-bg: rgba(239, 68, 68, 0.15);
    --danger-text: #f87171;
}

/* Light Mode Variables override */
[data-theme="light"] {
    --bg-base: #f5f7fc;
    --bg-gradient: radial-gradient(circle at 50% 0%, #e0e7ff 0%, #f5f7fc 100%);
    --bg-surface: rgba(255, 255, 255, 0.7);
    --bg-surface-solid: #ffffff;
    --border-color: rgba(0, 0, 0, 0.06);
    --border-highlight: rgba(0, 0, 0, 0.1);
    
    --primary-accent: #4f46e5;
    --primary-accent-glow: rgba(79, 70, 229, 0.2);
    --secondary-accent: #db2777;
    --secondary-accent-glow: rgba(219, 39, 119, 0.2);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --primary-shadow-color: rgba(79, 70, 229, 0.08);

    --success-bg: rgba(22, 163, 74, 0.1);
    --success-text: #16a34a;
    --warning-bg: rgba(217, 119, 6, 0.1);
    --warning-text: #d97706;
    --danger-bg: rgba(220, 38, 38, 0.1);
    --danger-text: #dc2626;
}

/* =========================================================================
   2. BASE SETUP & UTILITIES
   ========================================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-base);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    transition: background 0.5s ease, color 0.5s ease;
}

button, input, select, textarea {
    font-family: inherit;
    color: inherit;
}

.font-alt {
    font-family: var(--font-heading);
}

.glassmorphism {
    background: var(--bg-surface);
    backdrop-filter: blur(14px) saturate(190%);
    -webkit-backdrop-filter: blur(14px) saturate(190%);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.glassmorphism:hover {
    border-color: var(--border-highlight);
    box-shadow: var(--shadow-md);
}

.cursor-pointer {
    cursor: pointer;
}

.text-center {
    text-align: center;
}

.text-primary-gradient {
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-accent) 20%, var(--secondary-accent) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mt-1 { margin-top: 1rem; }
.mt-1-5 { margin-top: 1.5rem; }
.mt-2 { margin-top: 2rem; }
.hidden { display: none !important; }

/* Scrollbar styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* =========================================================================
   3. HEADER & NAVIGATION BRANDING
   ========================================================================= */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-radius: 0;
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 1rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.logo-badge {
    width: 44px;
    height: 44px;
}

.logo-svg {
    width: 100%;
    height: 100%;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 1.5px;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--primary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    background: transparent;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: rotate(15deg);
}

/* Show/hide icon on theme toggle */
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.05);
    color: #f87171 !important;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    transform: translateY(-1px);
}

.logout-icon {
    width: 16px;
    height: 16px;
}

/* =========================================================================
   4. HOME PAGE & HERO CONTAINER
   ========================================================================= */
main {
    margin-top: 80px;
    padding: 2.5rem;
    min-height: calc(100vh - 160px);
}

.view-section {
    display: none;
    max-width: 1440px;
    margin: 0 auto;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
    padding: 3rem 0;
}

.academic-badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-accent-glow);
    border: 1px solid rgba(79, 70, 229, 0.3);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.inline-svg-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 4.5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 580px;
}

.hero-cta-group {
    display: flex;
    gap: 1.25rem;
}

/* Premium Button Architecture */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-bounce);
    border: none;
    text-decoration: none;
}

.btn-large {
    padding: 1rem 2rem;
    border-radius: 14px;
    font-size: 1.05rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    color: #ffffff;
    box-shadow: 0 4px 15px var(--primary-shadow-color);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--primary-shadow-color);
}

.btn-secondary {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-3px);
}

.btn-block {
    display: flex;
    width: 100%;
    padding: 1rem;
}

.btn-arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(4px);
}

/* Hero visual glassmorphic dashboard block */
.visual-glass-card {
    background: rgba(15, 18, 36, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.card-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 1.5rem;
}

.card-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.charts-svg {
    width: 100%;
    height: auto;
    color: var(--border-color);
}

.chart-animated-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawPath 4s cubic-bezier(0.4, 0, 0.2, 1) forwards infinite;
}

.dashboard-badge-indicator {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: linear-gradient(135deg, var(--secondary-accent), var(--primary-accent));
    padding: 1.25rem;
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    animation: pulseGlow 3s infinite ease-in-out;
}

.indicator-inner {
    display: flex;
    flex-direction: column;
}

.indicator-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    font-family: var(--font-heading);
}

.indicator-lbl {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
}

/* =========================================================================
   5. PORTALS SELECTION LAYOUT
   ========================================================================= */
.portal-selection-section {
    padding: 6rem 0;
    border-top: 1px solid var(--border-color);
}

.section-header-centered {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 4rem auto;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.portals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.portal-card {
    padding: 2.5rem;
    border-radius: 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.portal-icon-box {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.portal-icon-box svg {
    width: 28px;
    height: 28px;
}

.primary-grad-bg {
    background: linear-gradient(135deg, var(--primary-accent), #6366f1);
}

.secondary-grad-bg {
    background: linear-gradient(135deg, var(--secondary-accent), #f43f5e);
}

.portal-card-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.portal-card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.portal-card-link {
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.portal-card:hover .portal-card-link {
    transform: translateX(4px);
}

/* Feature grid adjustments */
.platform-features-section {
    padding: 4rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-item {
    padding: 2rem;
    border-radius: 16px;
}

.feature-icon {
    color: var(--primary-accent);
    margin-bottom: 1rem;
}

.feature-icon svg {
    width: 32px;
    height: 32px;
}

.feature-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* =========================================================================
   6. PORTAL DASHBOARD (STUDENT & TEACHER LAYOUT)
   ========================================================================= */
.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: start;
}

.dashboard-sidebar {
    position: sticky;
    top: 105px;
}

.profile-card-glass {
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
}

.profile-avatar-area {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 1.5rem auto;
}

.avatar-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    padding: 4px;
    border: 2.5px double var(--primary-accent);
}

.avatar-ring.ring-secondary {
    border-color: var(--secondary-accent);
}

.avatar-svg {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.user-rank-medal {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: linear-gradient(135deg, var(--secondary-accent), var(--primary-accent));
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: var(--shadow-sm);
}

.student-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}

.student-role-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.student-meta-list {
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.meta-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.meta-val {
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-action-menu {
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-btn-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: transparent;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-smooth);
}

.sidebar-btn-link:hover, .sidebar-btn-link.active {
    background: var(--primary-accent-glow);
    color: var(--text-primary);
}

/* Dashboard statistics cards strip */
.metric-card-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card-glass {
    padding: 1.5rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.metric-header-lbl {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-body {
    margin-top: 1rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
}

.metric-growth {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.metric-growth.positive {
    color: var(--success-text);
}

.progress-bar-small {
    background: rgba(255, 255, 255, 0.08);
    height: 6px;
    border-radius: 50px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill-small {
    background: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent));
    height: 100%;
    border-radius: 50px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dashboard data grid/table cards */
.table-panel-card {
    padding: 2.25rem;
    border-radius: 20px;
}

.table-header-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.table-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
}

.table-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.action-btn-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.results-table-container {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    padding: 1rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1.5px solid var(--border-color);
    font-weight: 700;
}

.data-table td {
    padding: 1.15rem 1rem;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr {
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Status Indicator Pill badges */
.status-pill {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50px;
}

.status-pill.pass, .status-indicator-badge.approved {
    background: var(--success-bg);
    color: var(--success-text);
}

.status-pill.fail, .status-indicator-badge.locked {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.grade-badge-colored {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.85rem;
}

.grade-a { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.grade-b { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.grade-c { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.grade-d { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.grade-f { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

/* Dashboard columns splitting */
.dashboard-grid-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.subject-bars-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.subject-bar-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.subject-bar-lbls {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
}

.bar-bg-container {
    background: rgba(255, 255, 255, 0.06);
    height: 8px;
    border-radius: 50px;
    overflow: hidden;
}

.bar-fill-indicator {
    background: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent));
    height: 100%;
    border-radius: 50px;
    transition: width 1s ease-out;
}

.support-feedback-cards {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.feedback-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 12px;
}

.feedback-author {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feedback-body-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.4;
}

/* =========================================================================
   7. TEACHER WORKSPACE INTERFACES
   ========================================================================= */
.teacher-tab-view {
    display: none;
}

.teacher-tab-view.active {
    display: block;
    animation: fadeInUp 0.4s ease-out forwards;
}

.filters-panel-glass {
    padding: 1.5rem 2rem;
    border-radius: 16px;
}

.filter-controls-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 180px;
}

.input-lbl-small {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}

.form-input-control {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-smooth);
}

[data-theme="light"] .form-input-control {
    background: rgba(255, 255, 255, 0.8);
}

.form-input-control:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.2);
}

.align-self-end {
    align-self: flex-end;
}

.form-submit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.text-muted-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.marks-edit-input {
    width: 80px;
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
    font-weight: 700;
    color: var(--text-primary);
}

/* Stats view distribution bars */
.tier-chart-distribution {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.tier-bar-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tier-lbl {
    font-size: 0.85rem;
    font-weight: 700;
    width: 60px;
}

.tier-bar-track {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    height: 12px;
    border-radius: 50px;
    overflow: hidden;
}

.tier-bar-fill {
    height: 100%;
    background: var(--primary-accent);
    border-radius: 50px;
    transition: width 1s ease-out;
}

.tier-count {
    font-size: 0.85rem;
    font-weight: 700;
    width: 30px;
    text-align: right;
}

.summary-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.metric-block {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 12px;
}

.metric-block-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.metric-block-value {
    font-size: 1.75rem;
    font-weight: 800;
}

/* =========================================================================
   8. SECURE ADMINISTRATOR CONTROL CENTER (ADMIN PANELS)
   ========================================================================= */
.admin-workspace-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2.5rem;
}

.admin-submenu {
    border-radius: 20px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: sticky;
    top: 105px;
}

.admin-menu-btn {
    background: transparent;
    border: none;
    padding: 0.85rem 1.25rem;
    border-radius: 10px;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.admin-menu-btn:hover, .admin-menu-btn.active {
    background: var(--primary-accent-glow);
    color: var(--text-primary);
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
    animation: fadeInUp 0.4s ease-out forwards;
}

.search-control {
    width: 260px;
}

.admin-list-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.admin-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.admin-list-item-meta {
    display: flex;
    flex-direction: column;
}

.item-main-title {
    font-weight: 700;
    font-size: 0.95rem;
}

.item-sub-title {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.item-value-badge {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
}

/* Profile pictures in student registrar tables */
.profile-tb-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
}

/* Form layouts within admin setting pages */
.form-group-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.grading-info-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.grading-column h5 {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.meta-list-unstyled {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.meta-list-unstyled li {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.meta-list-unstyled li strong {
    color: var(--text-primary);
}

/* =========================================================================
   9. CUSTOM ACTION SPLASH SCREENS & OVERLAYS
   ========================================================================= */
.splash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 9, 19, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.splash-content {
    text-align: center;
    max-width: 480px;
    padding: 2rem;
}

.splash-logo-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem auto;
}

.spinner-ring {
    transform-origin: 50% 50%;
    animation: spin 1.5s linear infinite;
}

.splash-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.splash-message {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.splash-progress-bar {
    background: rgba(255, 255, 255, 0.08);
    height: 6px;
    border-radius: 50px;
    overflow: hidden;
    position: relative;
}

.splash-progress-fill {
    background: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent));
    height: 100%;
    width: 0%;
    border-radius: 50px;
    animation: loaderFill 3s ease-in-out forwards;
}

/* Keyboard Trigger Admin Overlay styling */
.admin-trigger-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 9, 19, 0.9);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trigger-card {
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 3rem;
    max-width: 460px;
    box-shadow: var(--shadow-lg);
}

.lock-icon-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem auto;
    animation: glassPulse 2s infinite ease-in-out;
}

.lock-svg {
    width: 100%;
    height: 100%;
}

.trigger-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.trigger-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.countdown-circle-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem auto;
}

.countdown-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.countdown-svg circle {
    fill: none;
    stroke-width: 6;
}

.countdown-svg .bg-ring {
    stroke: rgba(255, 255, 255, 0.05);
}

.countdown-svg .active-ring {
    stroke: url(#countdown-grad-grad);
    stroke-dasharray: 251.2;
    stroke-dashoffset: 251.2;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
}

.countdown-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.75rem;
}

.trigger-keys {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.trigger-keys span {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
}

/* Toast container styling */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast-message {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-success {
    background: rgba(16, 185, 129, 0.95);
    color: #ffffff;
}

.toast-danger {
    background: rgba(239, 68, 68, 0.95);
    color: #ffffff;
}

/* =========================================================================
   10. MODAL LAYERS ARCHITECTURE
   ========================================================================= */
.modal-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 9, 19, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-layer.active {
    display: flex;
}

.modal-window {
    width: 100%;
    max-width: 480px;
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    animation: zoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header-section {
    flex-shrink: 0;
}

.modal-window > form {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-accent) transparent;
}

.modal-window > form::-webkit-scrollbar {
    width: 6px;
}

.modal-window > form::-webkit-scrollbar-track {
    background: transparent;
}

.modal-window > form::-webkit-scrollbar-thumb {
    background-color: var(--primary-accent);
    border-radius: 3px;
}

/* Fix for Add Learner (Student Editor) Modal */
#modal-admin-student-editor .modal-window {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
#modal-admin-student-editor .modal-header-section {
    flex-shrink: 0;
}
#modal-admin-student-editor form {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.modal-header-section {
    margin-bottom: 2rem;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* =========================================================================
   11. PREMIUM REPORT CARD PRINT STYLING
   ========================================================================= */
.report-card-container {
    width: 100%;
    max-width: 800px;
    background: #ffffff;
    border-radius: 16px;
    color: #0f172a;
    padding: 3rem;
    position: relative;
    box-shadow: var(--shadow-lg);
    box-sizing: border-box;
}

.overflow-scroll-print {
    overflow-y: auto;
}

.report-watermark-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    pointer-events: none;
    z-index: 1;
}

.watermark-svg {
    width: 100%;
    height: 100%;
}

.report-header-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px double #1e293b;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.report-logo-left {
    width: 70px;
    height: 70px;
}

.report-logo-svg {
    width: 100%;
    height: 100%;
}

.report-school-details {
    text-align: center;
    flex: 1;
}

.report-school-name {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 850;
    color: #1e3a8a;
}

.report-school-motto {
    font-size: 0.85rem;
    font-weight: 600;
    font-style: italic;
    color: #475569;
}

.report-school-meta {
    font-size: 0.75rem;
    color: #475569;
}

.report-title-strip {
    background: #f1f5f9;
    padding: 0.5rem;
    text-align: center;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.rc-main-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #1e293b;
}

.report-demographics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    position: relative;
    z-index: 2;
}

.dem-col p {
    margin-bottom: 0.5rem;
}

.report-data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.report-data-table th {
    background: #1e3a8a;
    color: #ffffff;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid #1e3a8a;
}

.report-data-table td {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    border: 1px solid #cbd5e1;
}

.report-summary-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    position: relative;
    z-index: 2;
}

.summary-col p {
    margin-bottom: 0.35rem;
}

.report-signatures-area {
    display: grid;
    grid-template-columns: 1.1fr 1.1fr 0.8fr;
    gap: 1.5rem;
    font-size: 0.8rem;
    position: relative;
    z-index: 2;
}

.sign-comment-label {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.sign-comment-text {
    font-style: italic;
    color: #475569;
    line-height: 1.3;
    margin-bottom: 1rem;
    min-height: 34px;
}

.signature-line-block {
    border-top: 1px solid #0f172a;
    text-align: center;
    padding-top: 0.5rem;
    margin-top: 1rem;
}

.placeholder-signature-svg {
    height: 30px;
    margin-bottom: 0.25rem;
}

.sig-svg {
    height: 100%;
}

.sign-title {
    font-size: 0.75rem;
    font-weight: 600;
}

.stamp-box-area {
    display: flex;
    justify-content: center;
    align-items: center;
}

.school-seal-placeholder {
    width: 85px;
    height: 85px;
    opacity: 0.85;
}

.seal-svg {
    width: 100%;
    height: 100%;
}

/* Print Only directives mapping override */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    
    .main-header, .system-footer, .no-print, main > *:not(.overflow-scroll-print), .modal-close-btn {
        display: none !important;
    }

    main {
        margin: 0 !important;
        padding: 0 !important;
    }

    .modal-layer {
        position: static !important;
        background: none !important;
        backdrop-filter: none !important;
        display: block !important;
        padding: 0 !important;
        height: auto !important;
        width: auto !important;
    }

    .report-card-container {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        max-width: 100% !important;
        background: #ffffff !important;
    }

    .print-only-border {
        border: 1px solid #cbd5e1 !important;
        border-radius: 8px !important;
    }
}

/* =========================================================================
   12. MINIMALIST FOOTER SECTION
   ========================================================================= */
.system-footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    margin-top: 2.5rem;
    border-radius: 0;
}

/* =========================================================================
   13. TRANSITIONS & ANIMATION PATHS
   ========================================================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes drawPath {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 4px 15px var(--primary-accent-glow);
    }
    50% {
        box-shadow: 0 8px 30px var(--primary-accent-glow);
    }
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes loaderFill {
    to {
        width: 100%;
    }
}

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

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glassPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px var(--primary-accent-glow));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 15px var(--primary-accent-glow));
    }
}

/* =========================================================================
   14. SYSTEM RESPONSIVENESS (MEDIA QUERY VIEWS)
   ========================================================================= */
@media (max-width: 1100px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sidebar {
        position: static;
    }
    
    .admin-workspace-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-submenu {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        padding: 0.75rem;
    }
    
    .admin-menu-btn {
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-subtitle {
        margin: 0 auto 2.5rem auto;
    }
    
    .hero-cta-group {
        justify-content: center;
    }
    
    .header-container {
        padding: 1rem 1.5rem;
    }
    
    .main-nav {
        gap: 0.5rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
        padding: 0.35rem 0.65rem;
    }
    
    .dashboard-grid-two-cols {
        grid-template-columns: 1fr;
    }
    
    .grading-info-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .action-btn-row {
        flex-wrap: wrap;
    }
    
    .search-control {
        width: 100%;
    }
}