/**
 * ==========================================================================
 * MADARASATU ABU-HURAIRA ISLAMIYYA WATTAHFIZUL QUR'AN (ABHIWQ)
 * Connected Teacher Workspace Engine — Enterprise Premium Stylesheet
 * Standard Specification: International SaaS Portal Standard (Canvas / PowerSchool)
 * Version: 6.1.1 (Assignment-Filtered, IndexedDB, Professional UI)
 * ==========================================================================
 */

/* ==========================================================================
   01. DESIGN TOKENS & SYSTEM VARIABLES
   ========================================================================== */
:root {
    /* Font Foundations */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

    /* Institutional Corporate Palette */
    --clr-primary-rgb: 15, 23, 42;      /* #0f172a Deep Slate */
    --clr-primary: rgb(var(--clr-primary-rgb));
    --clr-brand-rgb: 30, 58, 138;       /* #1e3a8a Navy Blue */
    --clr-brand: rgb(var(--clr-brand-rgb));
    --clr-brand-light: #3b82f6;        /* #3b82f6 Azure Blue */
    --clr-accent: #047857;             /* Deep Emerald Accent */
    
    /* Semantic Status Scale */
    --clr-emerald: #10b981;
    --clr-emerald-bg: #ecfdf5;
    --clr-blue: #3b82f6;
    --clr-blue-bg: #eff6ff;
    --clr-amber: #f59e0b;
    --clr-amber-bg: #fef3c7;
    --clr-orange: #f97316;
    --clr-orange-bg: #fff7ed;
    --clr-slate: #64748b;
    --clr-slate-bg: #f8fafc;
    --clr-danger: #ef4444;
    --clr-danger-bg: #fef2f2;

    /* Neutral Base Elements */
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --border-color: #e2e8f0;
    --border-focus: #3b82f6;
    --text-main: #334155;
    --text-muted: #64748b;
    --text-dark: #0f172a;

    /* Layout Elevation Depth Matrix */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.05), 0 4px 6px -2px rgba(15, 23, 42, 0.02);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
    --shadow-inset: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);

    /* Animation Hardware Accelerated Easings */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Layout Sizing Constants */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --max-width-content: 1440px;
}

/* ==========================================================================
   02. GLOBAL RESET & BASE ARCHITECTURE
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

img, picture, svg, video {
    display: block;
    max-width: 100%;
    height: auto;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
    background: transparent;
    border: none;
}

button {
    cursor: pointer;
}

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

/* Base Headings Layout */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

/* ==========================================================================
   03. CORE INTERACTIVE UTILITY CLASSES
   ========================================================================== */
.abh-transition {
    transition: all var(--transition-fast);
}

.abh-premium-input {
    transition: all var(--transition-fast) !important;
    border: 1px solid var(--border-color) !important;
    font-family: var(--font-sans) !important;
}

.abh-premium-input:focus {
    border-color: var(--border-focus) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12) !important;
    outline: none !important;
    background: var(--bg-surface) !important;
}

.abh-hover-card {
    transition: all var(--transition-base) !important;
}

.abh-hover-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: var(--shadow-xl) !important;
    border-color: #94a3b8 !important;
}

.abh-custom-scroll::-webkit-scrollbar {
    height: 7px;
    width: 7px;
}

.abh-custom-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.abh-custom-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.abh-custom-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================================================
   04. VIEW 1: AUTHENTICATION INTERFACE (LOGIN PAGE)
   ========================================================================== */
.login-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1;
}

.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 58, 138, 0.92) 100%),
                url('../../../assets/images/login-pattern-bg.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-radius: 18px;
    width: 100%;
    max-width: 480px;
    padding: 40px 36px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: loginFadeIn 0.6s var(--transition-base);
}

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

.school-brand {
    text-align: center;
    margin-bottom: 32px;
}

.school-brand .school-logo {
    width: 90px;
    height: 90px;
    margin: 0 auto 16px auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.08));
}

.school-brand .school-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.school-brand .portal-title {
    font-size: 0.95rem;
    color: var(--clr-brand-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Authentication Forms Configuration */
#teacherLoginForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group label i {
    color: var(--text-muted);
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    background-color: var(--bg-base);
    color: var(--text-dark);
    transition: all var(--transition-fast);
}

.form-group input:focus {
    border-color: var(--border-focus);
    background-color: var(--bg-surface);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
    outline: none;
}

/* Password Input Context Block */
.password-box {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.password-box input {
    padding-right: 44px !important;
}

.password-toggle {
    position: absolute;
    right: 14px;
    color: var(--text-muted);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--text-dark);
}

/* Runtime Client-Facing Validation Outputs */
.login-message {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    display: none;
    animation: flashAlert 0.3s var(--transition-base);
}

@keyframes flashAlert {
    from { transform: scale(0.96); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.login-message.error, .login-message {
    background-color: var(--clr-danger-bg);
    color: var(--clr-danger);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.login-button {
    background: linear-gradient(135deg, var(--clr-brand) 0%, #1d4ed8 100%);
    color: white;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.3);
    transition: all 0.25s;
    margin-top: 8px;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.45);
    filter: brightness(1.05);
}

.login-button:active {
    transform: translateY(0);
}

/* ==========================================================================
   05. VIEW 2: OPERATIONAL WORKSPACE (DASHBOARD FRAMEWORK)
   ========================================================================== */
.dashboard-wrapper {
    width: 100%;
    max-width: var(--max-width-content);
    margin: 0 auto;
    padding: 24px;
    animation: dashboardFadeIn 0.5s var(--transition-slow) forwards;
}

@keyframes dashboardFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 05.1 Dashboard Institutional Header */
.dashboard-header {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-left .school-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.school-information {
    display: flex;
    flex-direction: column;
}

.school-information .school-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}

.school-information .school-session,
.school-information .school-term {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.school-information span {
    color: var(--text-dark);
}

.header-right .logout-button {
    background-color: #fff;
    color: var(--clr-danger);
    border: 1px solid #fee2e2;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(239, 68, 68, 0.05);
    transition: all var(--transition-fast);
}

.header-right .logout-button:hover {
    background-color: var(--clr-danger);
    color: white;
    border-color: var(--clr-danger);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

/* 05.2 Welcome Banner Component */
.welcome-banner {
    background: linear-gradient(135deg, var(--text-dark) 0%, var(--clr-brand) 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.welcome-text h2 {
    color: white;
    font-size: 1.65rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.welcome-text span {
    color: var(--clr-brand-light);
}

.welcome-text p {
    color: #94a3b8;
    font-size: 0.95rem;
    font-weight: 500;
}

.welcome-status .online-indicator {
    background-color: rgba(16, 185, 129, 0.15);
    color: #34d399;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.welcome-status .online-indicator i {
    font-size: 0.65rem;
    animation: indicatorPulse 2s infinite ease-in-out;
}

@keyframes indicatorPulse {
    0% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0.4; transform: scale(0.9); }
}

/* 05.3 Teacher Identity & Profile Component Layer */
.teacher-profile-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 32px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.teacher-photo-section {
    position: relative;
}

.teacher-photo-section .teacher-photo {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 3px solid #f1f5f9;
    box-shadow: var(--shadow-sm);
    background-color: var(--bg-base);
}

.teacher-information .teacher-name,
.teacher-information h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 14px;
}

.teacher-basic-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(200px, 1fr));
    gap: 12px 24px;
}

.profile-item {
    font-size: 0.875rem;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-item strong {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.profile-item span {
    font-weight: 600;
    color: var(--text-dark);
}

.teacher-identity-box {
    background-color: var(--bg-base);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 240px;
    border: 1px solid var(--border-color);
}

.identity-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    gap: 16px;
}

.identity-row strong {
    color: var(--text-muted);
    font-weight: 500;
}

.identity-row span {
    font-weight: 700;
    color: var(--text-dark);
    background-color: var(--bg-surface);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

#teacherStatus {
    color: var(--clr-emerald) !important;
    background-color: var(--clr-emerald-bg) !important;
    border-color: rgba(16, 185, 129, 0.15) !important;
}

/* ==========================================================================
   06. MAIN OPERATIONAL WORKSPACE (ACADEMIC SCORING LEDGER)
   ========================================================================== */
.dashboard-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.dashboard-card .card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.dashboard-card .card-header i {
    font-size: 1.4rem;
    color: var(--clr-brand-light);
}

.dashboard-card .card-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
}

.assignment-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* 06.1 Interactive Cards Architecture (Class & Subject Matrix UI) */
.assignment-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.class-select-card,
.subject-select-card {
    will-change: transform, box-shadow;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
}

.class-select-card:hover,
.subject-select-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.02);
    border-color: #93c5fd;
}

.class-select-card:hover div,
.subject-select-card:hover div {
    filter: brightness(0.95);
}

/* 06.2 Global Statistics Grid Injection Subsystem */
#workspaceStatistics {
    animation: statsFadeIn 0.4s var(--transition-base);
}

@keyframes statsFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

#workspaceStatistics > div {
    border-right: 1px solid var(--border-color);
}

#workspaceStatistics > div:last-child {
    border-right: none;
}

/* ==========================================================================
   07. INTERACTIVE INPUT BROADSHEET LEDGER TABLE
   ========================================================================== */
.abh-sticky-header th {
    box-shadow: inset 0 -2px 0 var(--border-color) !important;
}

table tr:hover {
    background-color: #f8fafc !important;
}

/* Input Fields inside Broadsheet */
table input[type="number"] {
    -moz-appearance: textfield;
}

table input[type="number"]::-webkit-outer-spin-button,
table input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

table input[type="number"]:focus {
    background-color: var(--bg-surface) !important;
    border-color: var(--border-focus) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

/* Dynamic Grade and Remark Badges Matrix */
#broadsheetTableBody span {
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

/* Action Control Buttons in Row */
#broadsheetTableBody button {
    will-change: transform;
}

#broadsheetTableBody button:active {
    transform: scale(0.95);
}

/* ==========================================================================
   08. ENTERPRISE TOAST NOTIFICATION COMPONENT
   ========================================================================== */
#abh-toast-container {
    box-sizing: border-box;
}

#abh-toast-container * {
    box-sizing: border-box;
}

/* ==========================================================================
   09. RESPONSIVE BREAKPOINTS & LAYOUT ADAPTATION MATRIX
   ========================================================================== */

/* 09.1 Ultra Wide and Desktop Displays */
@media (max-width: 1200px) {
    .teacher-profile-card {
        grid-template-columns: 1fr;
        justify-content: center;
        text-align: center;
        gap: 20px;
    }

    .teacher-photo-section .teacher-photo {
        margin: 0 auto;
    }

    .teacher-basic-details {
        justify-content: center;
    }

    .teacher-identity-box {
        margin: 12px auto 0 auto;
        width: 100%;
        max-width: 400px;
    }
}

/* 09.2 Medium Tablets Layout */
@media (max-width: 992px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .header-right {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    .welcome-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
    }

    .welcome-status {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    #workspaceStatistics {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    #workspaceStatistics > div {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 12px;
    }
}

/* 09.3 Small Devices & Portrait Mobile Terminals */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .login-card {
        padding: 28px 20px;
    }

    .dashboard-wrapper {
        padding: 12px;
    }

    .dashboard-header {
        padding: 16px;
        gap: 16px;
    }

    .header-left {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .teacher-basic-details {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dashboard-card {
        padding: 16px;
    }

    #workspaceStatistics {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    #saveAllScoresBtn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    #workspaceStatistics {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   10. HIGH-FIDELITY PRINT DEGRADATION SYSTEM
   ========================================================================== */
@media print {
    body {
        background: white;
        color: black;
        font-size: 10pt;
    }

    #authViewport, 
    .logout-button, 
    #saveAllScoresBtn,
    .password-toggle,
    #abhStudentSearchInput,
    th:last-child, 
    td:last-child {
        display: none !important;
    }

    .dashboard-wrapper {
        padding: 0;
        margin: 0;
    }

    .dashboard-header, 
    .teacher-profile-card, 
    .dashboard-card {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin-bottom: 20px !important;
    }

    table {
        page-break-inside: auto;
        width: 100% !important;
    }

    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    th, td {
        border: 1px solid #000 !important;
        padding: 6px !important;
        font-size: 9pt !important;
    }

    input {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        text-align: center;
    }
}

/* ==========================================================================
   11. UPGRADED STUDENT AVATAR IN SCORE TABLE
   ========================================================================== */
.student-score-avatar {
    width: 105px;               /* 2.5× larger */
    height: 135px;              /* rectangular passport-photo style */
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ==========================================================================
   12. BEAUTIFUL, LARGE SCORE INPUT CELLS
   ========================================================================== */
.score-cell-input {
    width: 100%;
    padding: 12px 4px;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: #0f172a;
    background: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

.score-cell-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    outline: none;
    background: #f8faff;
}

.score-cell-input::placeholder {
    color: transparent;   /* blank cells have no placeholder text */
}

/* ==========================================================================
   13. SCORE TABLE ROW SPACING
   ========================================================================== */
#broadsheetTableBody td {
    padding: 12px 8px;
    vertical-align: middle;
}
/* ============================================================
   COMPACT TABLE & SCROLLING FIXES
   ============================================================ */

/* Table container - only this scrolls */
.table-scroll-container {
    overflow: auto;
    max-height: 65vh;
    width: 100%;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* Compact table rows */
.table-scroll-container table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.8rem;
}

.table-scroll-container th {
    padding: 8px 10px;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    background: #f8fafc;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-scroll-container td {
    padding: 6px 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.table-scroll-container tr:hover {
    background: #f8fafc;
}

/* Score input fields */
.score-cell-input {
    width: 55px;
    padding: 4px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.8rem;
    text-align: center;
    background: #ffffff;
    transition: border-color 0.2s;
}

.score-cell-input:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Class/subject cards */
.class-select-card:hover,
.subject-select-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(15, 23, 42, 0.08);
    border-color: #94a3b8;
}

/* Save indicator */
.save-indicator {
    transition: opacity 0.5s ease;
}

/* History view styling */
.history-view .record-group {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.history-view .record-group-header {
    background: #f8fafc;
    padding: 8px 14px;
    font-weight: 700;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .table-scroll-container {
        max-height: 50vh;
    }
    
    .table-scroll-container table {
        min-width: 700px;
    }
    
    .score-cell-input {
        width: 45px;
        padding: 3px 4px;
        font-size: 0.7rem;
    }
}