
/* Extracted Block */

        :root {
            /* design tokens (admin.html palette, kept under newadmin's var names) */
            --bg-body: #f4f5f7;
            --bg-main: #fafbfc;
            --bg-panel: #ffffff;
            --bg-surface: #ffffff;
            --surface-color: #ffffff;
            --white: #ffffff;

            --primary-color: #4f46e5;
            --primary-hover: #4338ca;
            --primary-light: #eef2ff;
            --primary-dark: #4338ca;
            --primary-grad: linear-gradient(135deg, #4f46e5, #7c3aed);

            --success-color: #10b981;
            --success-light: #ecfdf5;
            --danger-color: #ef4444;
            --danger-light: #fef2f2;
            --warning-color: #f59e0b;
            --warning-light: #fffbeb;
            --danger: #ef4444;
            --amber: #f59e0b;
            --slate: #475569;

            --text-main: #0f172a;
            --text-secondary: #475569;
            --text-muted: #94a3b8;
            --border-color: #e5e7eb;
            --border-light: #f1f2f4;

            --radius: 14px;
            --radius-sm: 10px;
            --radius-xs: 8px;

            --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
            --shadow-md: 0 1px 3px rgba(16, 24, 40, .05), 0 12px 28px -16px rgba(16, 24, 40, .12);
            --shadow-float: 0 24px 60px -20px rgba(15, 23, 42, .35);

            --sidebar-width: 264px;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: var(--bg-body);
            color: var(--text-main);
            display: flex;
            height: 100vh;
            overflow: hidden;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        ::selection {
            background: rgba(79, 70, 229, .15);
        }

        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }

        ::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 20px;
            border: 2px solid transparent;
            background-clip: content-box;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
            background-clip: content-box;
        }

        button {
            font-family: inherit;
        }

        input,
        select,
        textarea {
            font-family: inherit;
        }

        /* ============ AUTH OVERLAY ============ */
        .login-overlay {
            position: fixed;
            inset: 0;
            background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 40%, #fdf2f8 100%);
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: opacity 0.4s ease;
            padding: 20px;
        }

        .login-overlay.hidden {
            opacity: 0;
            pointer-events: none;
        }

        .login-card {
            background: var(--bg-surface);
            padding: 3rem 2.5rem 2.75rem;
            border-radius: 22px;
            box-shadow: var(--shadow-float);
            width: 100%;
            max-width: 420px;
            border: 1px solid var(--border-color);
            animation: cardIn .4s cubic-bezier(.2, .8, .25, 1);
        }

        .login-header {
            text-align: center;
            margin-bottom: 2rem;
        }

        .login-header .login-badge {
            width: 64px;
            height: 64px;
            border-radius: 18px;
            background: var(--primary-grad);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 26px;
            margin: 0 auto 1.1rem;
            box-shadow: 0 10px 26px -8px rgba(79, 70, 229, .6);
        }

        .login-header h2 {
            font-size: 1.6rem;
            font-family: 'Outfit', sans-serif;
            font-weight: 800;
            letter-spacing: -0.02em;
            color: var(--text-main);
        }

        .login-header p {
            color: var(--text-muted);
            font-size: 0.88rem;
            margin-top: 0.4rem;
        }

        .field-group {
            position: relative;
            margin-bottom: 1rem;
        }

        .field-group label {
            display: block;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .5px;
            color: var(--text-secondary);
            margin-bottom: 7px;
        }

        .field-group .field-icon {
            position: absolute;
            left: 14px;
            top: 40px;
            color: var(--text-muted);
            font-size: 13px;
            pointer-events: none;
        }

        .pwd-wrap {
            position: relative;
        }

        .pwd-wrap input {
            padding-right: 44px;
        }

        .pwd-toggle {
            position: absolute;
            right: 6px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            width: 34px;
            height: 34px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all .15s;
        }

        .pwd-toggle:hover {
            color: var(--primary-color);
            background: var(--primary-light);
        }

        #login-error {
            margin-bottom: 1rem;
        }

        /* ============ APP LAYOUT ============ */
        #app-container {
            display: flex;
            width: 100%;
            height: 100%;
            opacity: 0;
            transition: opacity 0.5s ease;
            background: var(--bg-body);
            overflow: hidden;
        }

        #app-container.visible {
            opacity: 1;
        }

        /* ============ SIDEBAR ============ */
        .sidebar {
            width: var(--sidebar-width);
            min-width: var(--sidebar-width);
            background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
            border-right: none;
            display: flex;
            flex-direction: column;
            z-index: 10;
            box-shadow: 8px 0 30px -12px rgba(15, 23, 42, .5);
        }

        .brand {
            padding: 20px 18px;
            display: flex;
            align-items: center;
            gap: 12px;
            border-bottom: 1px solid rgba(255, 255, 255, .07);
            text-decoration: none;
        }

        .brand-icon-wrapper {
            width: 42px;
            height: 42px;
            background: var(--primary-grad);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-size: 18px;
            box-shadow: 0 6px 18px rgba(99, 102, 241, .45);
            flex-shrink: 0;
        }

        .brand-text {
            display: flex;
            flex-direction: column;
            flex: 1;
            min-width: 0;
        }

        .brand-text h2 {
            font-weight: 800;
            font-size: 17px;
            color: #f1f5f9;
            letter-spacing: -.2px;
            margin: 0;
            font-family: 'Outfit', sans-serif;
        }

        .brand-text span {
            font-size: 9.5px;
            color: #64748b;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1.6px;
        }

        .pro-badge {
            margin-left: auto;
            font-size: 8px;
            font-weight: 800;
            letter-spacing: 1px;
            color: #fff;
            background: linear-gradient(135deg, #f59e0b, #ef4444);
            padding: 3px 7px;
            border-radius: 6px;
            text-transform: uppercase;
            box-shadow: 0 2px 8px rgba(239, 68, 68, .45);
        }

        .sidebar-nav {
            flex: 1;
            padding: 14px 12px;
            overflow-y: auto;
        }

        .nav-section {
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 1.8px;
            color: #64748b;
            padding: 16px 12px 8px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            user-select: none;
        }

        .nav-section i {
            font-size: 10px;
            transition: transform .3s ease;
            opacity: .7;
        }

        .nav-group-wrap.collapsed .nav-section i {
            transform: rotate(-90deg);
        }

        .nav-group {
            max-height: 600px;
            overflow: hidden;
            transition: max-height .35s ease;
        }

        .nav-group-wrap.collapsed .nav-group {
            max-height: 0;
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 14px;
            border-radius: 10px;
            cursor: pointer;
            font-size: 13.5px;
            font-weight: 500;
            color: #cbd5e1;
            transition: all .18s;
            margin-bottom: 3px;
            position: relative;
            list-style: none;
            user-select: none;
        }

        .nav-item i {
            width: 20px;
            text-align: center;
            font-size: 15px;
            opacity: .85;
        }

        .nav-item:hover {
            background: rgba(255, 255, 255, .06);
            color: #fff;
        }

        .nav-item.active {
            background: linear-gradient(90deg, rgba(99, 102, 241, .28), rgba(99, 102, 241, .08));
            color: #fff;
            font-weight: 600;
        }

        .nav-item.active::before {
            content: '';
            position: absolute;
            left: 0;
            top: 20%;
            bottom: 20%;
            width: 3px;
            border-radius: 0 3px 3px 0;
            background: #818cf8;
        }

        .nav-item.active i {
            opacity: 1;
            color: #a5b4fc;
        }

        .nav-badge {
            margin-left: auto;
            font-size: 10px;
            font-weight: 700;
            background: rgba(255, 255, 255, .1);
            color: #cbd5e1;
            padding: 2px 7px;
            border-radius: 20px;
            min-width: 22px;
            text-align: center;
        }

        .nav-item.active .nav-badge {
            background: rgba(129, 140, 248, .3);
            color: #a5b4fc;
        }

        .sidebar-footer {
            padding: 14px 18px;
            border-top: 1px solid rgba(255, 255, 255, .07);
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .sidebar-avatar {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            background: linear-gradient(135deg, #818cf8, #c084fc);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 13px;
            flex-shrink: 0;
        }

        .user-info {
            flex: 1;
            min-width: 0;
            overflow: hidden;
        }

        .user-name {
            font-size: 13px;
            font-weight: 600;
            color: #f1f5f9;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .user-role {
            font-size: 11px;
            color: #94a3b8;
            font-weight: 500;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .logout-icon {
            background: none;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 8px;
            border-radius: 9px;
            transition: all .2s;
            color: #cbd5e1;
            font-size: 15px;
            flex-shrink: 0;
        }

        .logout-icon:hover {
            background: rgba(239, 68, 68, .15);
            color: #fca5a5;
        }

        /* ============ MAIN / TOPBAR ============ */
        .main-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            min-width: 0;
            background: var(--bg-body);
        }

        .header {
            background: rgba(255, 255, 255, .85);
            backdrop-filter: blur(12px);
            padding: 0 28px;
            height: 64px;
            min-height: 64px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--border-color);
            gap: 1rem;
            z-index: 50;
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 14px;
            min-width: 0;
        }

        .header-title-wrap {
            min-width: 0;
        }

        .header-breadcrumb {
            font-size: 11.5px;
            color: var(--text-muted);
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .header-breadcrumb i {
            color: var(--primary-color);
            font-size: 12px;
        }

        .header-breadcrumb span:last-child {
            color: var(--text-secondary);
            font-weight: 600;
        }

        .header-title {
            font-size: 18px;
            font-family: 'Outfit', sans-serif;
            font-weight: 800;
            letter-spacing: -.3px;
            color: var(--text-main);
            line-height: 1.2;
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .icon-btn {
            width: 40px;
            height: 40px;
            border-radius: 11px;
            border: 1px solid var(--border-color);
            background: #fff;
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all .18s;
            position: relative;
            font-size: 15px;
        }

        .icon-btn:hover {
            border-color: var(--primary-color);
            color: var(--primary-color);
            background: #f5f3ff;
        }

        .icon-btn .dot {
            position: absolute;
            top: 9px;
            right: 10px;
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: var(--danger-color);
            border: 1.5px solid #fff;
        }

        .user-chip {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 5px 12px 5px 6px;
            border-radius: 12px;
            border: 1px solid var(--border-color);
            background: #fff;
            cursor: pointer;
            transition: all .18s;
        }

        .user-chip:hover {
            border-color: var(--primary-color);
            box-shadow: var(--shadow-sm);
        }

        .user-chip .header-avatar {
            width: 32px;
            height: 32px;
            border-radius: 9px;
            background: var(--primary-grad);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: 700;
            flex-shrink: 0;
        }

        .user-chip .chip-meta {
            line-height: 1.2;
        }

        .user-chip .chip-meta .name {
            font-size: 12.5px;
            font-weight: 700;
            color: var(--text-main);
        }

        .user-chip .chip-meta .role {
            font-size: 10.5px;
            color: var(--text-muted);
        }

        .user-chip>i {
            font-size: 10px;
            color: var(--text-muted);
        }

        /* ============ CONTENT ============ */
        .content-area {
            flex: 1;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
        }

        .content-inner {
            padding: 24px 28px 40px;
            width: 100%;
            max-width: 1440px;
            margin: 0 auto;
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        /* ============ FILTERS ============ */
        .filters-area {
            display: flex;
            gap: 14px;
            flex-wrap: wrap;
            align-items: flex-end;
            background: #fff;
            border-bottom: 1px solid var(--border-color);
            padding: 16px 28px;
        }

        .filter-group {
            display: flex;
            flex-direction: column;
            gap: 7px;
        }

        .filter-group label {
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .5px;
            color: var(--text-secondary);
            display: block;
        }

        /* ============ FIELDS ============ */
        select,
        input[type="text"],
        input[type="email"],
        input[type="password"],
        input[type="date"],
        input[type="number"],
        textarea {
            width: 100%;
            padding: 9px 12px;
            background: #fbfcfd;
            border: 1.5px solid var(--border-color);
            border-radius: 9px;
            font-family: inherit;
            font-size: 13px;
            color: var(--text-main);
            font-weight: 500;
            transition: border-color .15s, box-shadow .15s, background .15s;
            outline: none;
        }

        select:hover,
        input:hover,
        textarea:hover {
            border-color: #d1d5db;
        }

        select:focus,
        input:focus,
        textarea:focus {
            border-color: var(--primary-color);
            background: #fff;
            box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
        }

        select {
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 13px center;
            padding-right: 34px;
        }

        select:disabled {
            background-color: #f1f5f9;
            color: #94a3b8;
            cursor: not-allowed;
            opacity: .75;
        }

        /* ============ BUTTONS ============ */
        .btn {
            padding: 9px 18px;
            border-radius: 10px;
            font-weight: 600;
            font-size: 13px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            border: none;
            transition: all .18s;
            white-space: nowrap;
        }

        .btn:disabled {
            opacity: .5;
            cursor: not-allowed;
            pointer-events: none;
        }

        .btn-primary {
            background: var(--primary-grad);
            color: #fff;
            box-shadow: 0 4px 14px -4px rgba(79, 70, 229, .6);
        }

        .btn-primary:hover {
            box-shadow: 0 8px 22px -6px rgba(79, 70, 229, .7);
            transform: translateY(-1px);
            filter: brightness(1.05);
        }

        .btn-primary:active {
            transform: translateY(0);
        }

        .btn-outline {
            background: #fff;
            border: 1.5px solid var(--border-color);
            color: var(--text-main);
        }

        .btn-outline:hover {
            border-color: var(--primary-color);
            color: var(--primary-color);
            background: #fafaff;
        }

        .btn-danger {
            background: var(--danger-light);
            color: var(--danger-color);
        }

        .btn-danger:hover {
            background: #fee2e2;
            filter: brightness(.98);
        }

        .btn-sm {
            padding: 6px 12px;
            font-size: 12px;
            border-radius: 9px;
        }

        .btn-icon {
            padding: 8px;
            min-width: 34px;
            min-height: 34px;
            border-radius: 9px;
        }

        /* ============ SEARCH ============ */
        .action-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.25rem;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .action-bar-left {
            display: flex;
            align-items: center;
            gap: .75rem;
            flex: 1;
        }

        .action-bar-right {
            display: flex;
            align-items: center;
            gap: .5rem;
        }

        .search-box {
            position: relative;
        }

        .search-box i,
        .search-box svg {
            position: absolute;
            left: 13px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            font-size: 13px;
            pointer-events: none;
        }

        .search-box input {
            width: 100%;
            padding-left: 36px;
        }

        /* ============ STATS ============ */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 18px;
            margin-bottom: 22px;
        }

        .stat-card {
            background: var(--bg-surface);
            border-radius: 16px;
            padding: 20px 22px;
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            gap: 16px;
            transition: all .22s;
        }

        .stat-card:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-md);
            border-color: #d7d9e0;
        }

        .stat-card .stat-icon {
            width: 50px;
            height: 50px;
            border-radius: 13px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 19px;
            flex-shrink: 0;
        }

        .stat-card.teachers .stat-icon {
            background: #eef2ff;
            color: #4f46e5;
        }

        .stat-card.students .stat-icon {
            background: #ecfdf5;
            color: #10b981;
        }

        .stat-card.admin .stat-icon {
            background: #f5f3ff;
            color: #8b5cf6;
        }

        .stat-card.hod .stat-icon {
            background: #fffbeb;
            color: #f59e0b;
        }

        .stat-info {
            min-width: 0;
        }

        .stat-label {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: .4px;
        }

        .stat-number {
            font-size: 27px;
            font-weight: 800;
            letter-spacing: -.5px;
            line-height: 1.15;
            margin: 4px 0;
            color: var(--text-main);
        }

        .stat-value {
            font-size: 27px;
            font-weight: 800;
            letter-spacing: -.5px;
            line-height: 1.15;
            margin: 4px 0;
            color: var(--text-main);
        }

        .trend {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 11px;
            font-weight: 700;
            padding: 2px 8px;
            border-radius: 20px;
            margin-top: 5px;
        }

        .trend.up {
            background: var(--success-light);
            color: #059669;
        }

        .trend.flat {
            background: #f1f5f9;
            color: var(--text-secondary);
        }

        /* ============ CARDS ============ */
        .card {
            background: var(--bg-surface);
            border-radius: 16px;
            border: 1px solid var(--border-color);
            box-shadow: var(--shadow-sm);
            overflow: hidden;
            margin-bottom: 22px;
        }

        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            padding: 18px 22px;
            border-bottom: 1px solid var(--border-light);
            flex-wrap: wrap;
        }

        .card-title {
            font-size: 15px;
            font-weight: 700;
            font-family: 'Outfit', sans-serif;
            display: flex;
            align-items: center;
            gap: 9px;
            letter-spacing: -.2px;
        }

        .card-title i {
            color: var(--primary-color);
        }

        .card-body {
            padding: 20px 22px;
        }

        .card-body.no-pad {
            padding: 0;
        }

        .dash-row {
            display: grid;
            grid-template-columns: 1fr 1.4fr;
            gap: 18px;
            margin-bottom: 22px;
        }

        .quick-action {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 13px 14px;
            border: 1px solid var(--border-color);
            border-radius: 12px;
            cursor: pointer;
            transition: all .18s;
            margin-bottom: 10px;
            background: var(--bg-surface);
            text-align: left;
            width: 100%;
        }

        .quick-action:last-child {
            margin-bottom: 0;
        }

        .quick-action:hover {
            border-color: var(--primary-color);
            box-shadow: var(--shadow-sm);
            transform: translateX(3px);
        }

        .quick-action .qa-icon {
            width: 40px;
            height: 40px;
            border-radius: 11px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            flex-shrink: 0;
            background: var(--primary-light);
            color: var(--primary-color);
        }

        .quick-action.green .qa-icon {
            background: #ecfdf5;
            color: #10b981;
        }

        .quick-action.orange .qa-icon {
            background: #fffbeb;
            color: #f59e0b;
        }

        .quick-action .qa-text {
            min-width: 0;
        }

        .quick-action .qa-text .t {
            font-size: 13.5px;
            font-weight: 700;
            color: var(--text-main);
        }

        .quick-action .qa-text .s {
            font-size: 11.5px;
            color: var(--text-muted);
        }

        .qa-arrow {
            margin-left: auto;
            color: var(--text-muted);
            font-size: 12px;
        }

        .activity-item {
            display: flex;
            gap: 13px;
            padding: 11px 22px;
            border-bottom: 1px solid var(--border-light);
            align-items: flex-start;
        }

        .activity-item:last-child {
            border-bottom: none;
        }

        .activity-dot {
            width: 34px;
            height: 34px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            flex-shrink: 0;
            background: #eef2ff;
            color: #4f46e5;
        }

        .activity-dot.blue {
            background: #eef2ff;
            color: #4f46e5;
        }

        .activity-dot.green {
            background: #ecfdf5;
            color: #10b981;
        }

        .activity-dot.red {
            background: #fef2f2;
            color: #ef4444;
        }

        .activity-dot.orange {
            background: #fffbeb;
            color: #f59e0b;
        }

        .activity-item .txt {
            font-size: 13px;
            color: var(--text-secondary);
            line-height: 1.45;
        }

        .activity-item .txt strong {
            color: var(--text-main);
            font-weight: 600;
        }

        .activity-item .time {
            font-size: 11px;
            color: var(--text-muted);
            margin-top: 2px;
        }

        /* ============ TABLE ============ */
        .table-container {
            background: var(--bg-surface);
            border-radius: var(--radius-sm);
            overflow: hidden;
            flex: 1;
            display: flex;
            flex-direction: column;
            border: 1px solid var(--border-color);
            box-shadow: var(--shadow-sm);
        }

        .table-scroll {
            flex: 1;
            overflow: auto;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }

        th,
        td {
            padding: 12px 18px;
            text-align: left;
        }

        th {
            background: #fafbfc;
            color: var(--text-muted);
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .8px;
            font-size: 10.5px;
            position: sticky;
            top: 0;
            z-index: 1;
            border-bottom: 1px solid var(--border-color);
            white-space: nowrap;
        }

        td {
            border-bottom: 1px solid var(--border-light);
            font-weight: 500;
            color: var(--text-main);
            vertical-align: middle;
        }

        tr:last-child td {
            border-bottom: none;
        }

        tbody tr {
            transition: background .12s;
        }

        tbody tr:hover td {
            background: #f9fafb;
        }

        /* ============ BADGES / CHIPS ============ */
        .badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 4px 11px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 700;
        }

        .badge::before {
            content: '';
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: currentColor;
            opacity: .9;
        }

        .badge-blue {
            background: var(--primary-light);
            color: #4f46e5;
        }

        .badge-green {
            background: var(--success-light);
            color: #059669;
        }

        .badge-red {
            background: var(--danger-light);
            color: #dc2626;
        }

        .badge-gray {
            background: #f1f5f9;
            color: var(--text-muted);
        }

        .badge-purple {
            background: #f5f3ff;
            color: #7c3aed;
        }

        .status-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 11px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 700;
        }

        .status-badge::before {
            content: '';
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: currentColor;
        }

        .status-pending {
            background: #fef3c7;
            color: #d97706;
        }

        .status-success {
            background: #d1fae5;
            color: #059669;
        }

        .status-rejected {
            background: #fee2e2;
            color: #dc2626;
        }

        .chip {
            display: inline-block;
            background: #f1f5f9;
            color: var(--text-secondary);
            border: 1px solid var(--border-color);
            font-size: 11.5px;
            font-weight: 600;
            padding: 3px 9px;
            border-radius: 7px;
            margin: 2px 3px 2px 0;
        }

        /* ============ PAGINATION ============ */
        .pagination {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            gap: 10px;
            padding: 13px 18px;
            background: var(--bg-surface);
            border-top: 1px solid var(--border-color);
            flex-wrap: wrap;
        }

        .pagination-info {
            font-size: 12.5px;
            color: var(--text-muted);
            font-weight: 500;
            margin-right: auto;
        }

        .pagination-controls {
            display: flex;
            gap: 5px;
            align-items: center;
        }

        .pagination-controls .btn {
            min-width: 34px;
            height: 34px;
            padding: 0 10px;
            border-radius: 9px;
            font-size: 12.5px;
            border: 1.5px solid var(--border-color);
            background: #fff;
            color: var(--text-secondary);
        }

        .pagination-controls .btn:hover:not(:disabled) {
            border-color: var(--primary-color);
            color: var(--primary-color);
            background: #fafaff;
        }

        /* ============ EMPTY STATE ============ */
        .empty-state {
            padding: 52px 20px;
            text-align: center;
            color: var(--text-muted);
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .empty-state i {
            font-size: 38px;
            color: var(--text-muted);
            opacity: .4;
            margin-bottom: 12px;
        }

        .empty-state h3 {
            color: var(--text-secondary);
            font-size: 15px;
            margin-bottom: .35rem;
            font-weight: 700;
            font-family: 'Outfit', sans-serif;
        }

        .empty-state p {
            font-size: 12.5px;
            font-weight: 500;
        }

        /* ============ MODALS ============ */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, .5);
            backdrop-filter: blur(6px);
            z-index: 1000;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 24px;
            opacity: 0;
            transition: opacity .25s;
        }

        .modal-overlay.active {
            display: flex;
            opacity: 1;
        }

        .modal-panel {
            background: var(--bg-surface);
            width: 94vw;
            max-width: 920px;
            max-height: 92vh;
            border-radius: 18px;
            box-shadow: var(--shadow-float);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            border: 1px solid var(--border-color);
            transform: translateY(12px) scale(.98);
            transition: transform .3s cubic-bezier(.2, .8, .25, 1);
        }

        .modal-overlay.active .modal-panel {
            transform: translateY(0) scale(1);
        }

        .modal-header {
            padding: 16px 28px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-shrink: 0;
            background: #fcfcfd;
        }

        .modal-header-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .modal-title {
            font-size: 18px;
            font-weight: 800;
            font-family: 'Outfit', sans-serif;
            letter-spacing: -.2px;
        }

        .close-btn,
        .close-modal {
            background: #f1f5f9;
            border: none;
            cursor: pointer;
            color: var(--text-secondary);
            border-radius: 11px;
            transition: all .2s;
            display: flex;
            width: 38px;
            height: 38px;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            flex-shrink: 0;
        }

        .close-btn:hover,
        .close-modal:hover {
            background: #e2e8f0;
            color: var(--text-main);
        }

        .modal-body {
            padding: 24px 28px;
            flex: 1;
            overflow-y: auto;
            min-height: 0;
        }

        .modal-footer {
            padding: 14px 28px;
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            background: #fcfcfd;
            flex-shrink: 0;
        }

        .modal-panel.modal-fullscreen {
            width: 100vw;
            max-width: 100vw;
            height: 100vh;
            max-height: 100vh;
            border-radius: 0;
            border: none;
            margin: 0;
        }

        /* ============ FORMS ============ */
        .form-group {
            margin-bottom: 1.25rem;
        }

        .form-group label {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 6px;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .5px;
            color: var(--text-secondary);
        }

        .form-group label i {
            color: var(--text-muted);
            font-size: 11px;
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            width: 100%;
        }

        .form-group textarea {
            min-height: 90px;
            resize: vertical;
        }

        .form-row {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 14px;
            align-items: flex-end;
        }

        .form-row .form-group {
            margin-bottom: 0;
        }

        .dynamic-row {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 14px;
            margin-bottom: 1.25rem;
            align-items: flex-end;
            background: #f8fafc;
            padding: 1.25rem;
            border-radius: var(--radius-sm);
            border: 1px solid var(--border-color);
        }

        .dynamic-row .form-group {
            margin-bottom: 0;
        }

        .section-title {
            font-size: 11px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 1.2px;
            color: var(--primary-color);
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 14px;
            padding-left: 11px;
            border-left: 3px solid var(--primary-color);
        }

        hr {
            border: 0;
            border-top: 1px solid var(--border-color);
            margin: 1.5rem 0;
        }

        /* ============ CHECKBOX GRID ============ */
        .checkbox-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 11px;
            margin-top: 6px;
        }

        .checkbox-item {
            display: flex;
            align-items: center;
            gap: 11px;
            padding: 11px 14px;
            background: #fbfcfd;
            border-radius: 11px;
            border: 1.5px solid var(--border-color);
            cursor: pointer;
            font-size: 13px;
            font-weight: 500;
            transition: all .16s;
        }

        .checkbox-item:hover {
            border-color: var(--primary-color);
            background: #fafaff;
        }

        .checkbox-item:has(input:checked) {
            border-color: var(--primary-color);
            background: #eef2ff;
            color: var(--primary-color);
            font-weight: 600;
        }

        .checkbox-item input[type="checkbox"] {
            width: 17px;
            height: 17px;
            accent-color: var(--primary-color);
            cursor: pointer;
        }

        /* ============ AUTOCOMPLETE ============ */
        .autocomplete-results {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: #fff;
            border: 1.5px solid var(--border-color);
            z-index: 30;
            max-height: 200px;
            overflow-y: auto;
            box-shadow: var(--shadow-md);
            border-radius: 11px;
            margin-top: 4px;
        }

        .autocomplete-item {
            padding: 11px 14px;
            cursor: pointer;
            border-bottom: 1px solid var(--border-light);
            font-size: 13px;
            transition: background .12s;
        }

        .autocomplete-item:last-child {
            border-bottom: none;
        }

        .autocomplete-item:hover {
            background: #f5f3ff;
        }

        .autocomplete-item strong {
            font-weight: 600;
        }

        .autocomplete-item span {
            font-size: 11.5px;
            color: var(--text-muted);
            display: block;
            margin-top: 2px;
        }

        /* ============ SELECTED CARDS ============ */
        .selected-user-card {
            display: flex;
            align-items: center;
            gap: 12px;
            background: var(--bg-surface);
            padding: 12px 16px;
            border-radius: 11px;
            border: 1.5px solid var(--primary-color);
            margin-top: 10px;
            box-shadow: var(--shadow-sm);
        }

        .selected-user-card .avatar {
            width: 44px;
            height: 44px;
            border-radius: 10px;
            background: var(--primary-grad);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 13px;
            flex-shrink: 0;
        }

        .selected-user-card .info {
            flex: 1;
            min-width: 0;
        }

        .selected-user-card .info .name {
            font-weight: 700;
            font-size: 13.5px;
            color: var(--text-main);
        }

        .selected-user-card .info .detail {
            font-size: 11.5px;
            color: var(--text-muted);
            font-weight: 500;
        }

        /* ============ TOASTS ============ */
        .toast-container {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 9999;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .toast {
            background: #fff;
            padding: 13px 18px;
            border-radius: 12px;
            box-shadow: var(--shadow-float);
            display: flex;
            align-items: center;
            gap: 11px;
            font-weight: 600;
            font-size: 13px;
            border: 1px solid var(--border-color);
            border-left: 4px solid var(--primary-color);
            animation: slideIn .35s cubic-bezier(.2, .8, .25, 1), fadeOut .4s 2.8s forwards;
            min-width: 260px;
            color: var(--text-main);
        }

        .toast.success {
            border-left-color: var(--success-color);
        }

        .toast.error {
            border-left-color: var(--danger-color);
        }

        .toast i {
            font-size: 16px;
        }

        .toast.success i {
            color: var(--success-color);
        }

        .toast.error i {
            color: var(--danger-color);
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateX(120%);
            }

            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @keyframes fadeOut {
            to {
                opacity: 0;
                transform: translateY(-12px);
            }
        }

        @keyframes cardIn {
            from {
                opacity: 0;
                transform: translateY(16px) scale(.98);
            }

            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        /* ============ UTILITIES ============ */
        .hidden {
            display: none !important;
        }

        .text-right {
            text-align: right;
        }

        .fa-spin {
            animation: fa-spin 1s linear infinite;
        }

        @keyframes fa-spin {
            from {
                transform: rotate(0deg);
            }

            to {
                transform: rotate(360deg);
            }
        }

        .error-msg {
            color: var(--danger-color);
            background: var(--danger-light);
            padding: 10px 14px;
            border-radius: var(--radius-xs);
            font-size: 13px;
            font-weight: 600;
            display: none;
        }

        /* ============ SKELETON / SPINNER ============ */
        .skeleton,
        .sk-row {
            border-radius: 4px;
            background: linear-gradient(90deg, #f0f1f3 25%, #e6e8ec 37%, #f0f1f3 63%);
            background-size: 400% 100%;
            animation: shimmer 1.4s ease infinite;
        }

        @keyframes shimmer {
            0% {
                background-position: 100% 0;
            }

            100% {
                background-position: -100% 0;
            }
        }

        .spinner {
            width: 34px;
            height: 34px;
            border: 3px solid var(--primary-light);
            border-top-color: var(--primary-color);
            border-radius: 50%;
            animation: fa-spin .8s linear infinite;
        }

        /* ============ MOBILE ============ */
        .mobile-menu-btn {
            display: none;
            background: #fff;
            border: 1px solid var(--border-color);
            border-radius: 10px;
            padding: 8px;
            cursor: pointer;
            color: var(--text-main);
            align-items: center;
            justify-content: center;
            transition: all .2s;
            font-size: 16px;
            flex-shrink: 0;
        }

        .mobile-menu-btn:hover {
            background: var(--primary-light);
            color: var(--primary-color);
        }

        .sidebar-close-btn {
            display: none;
            background: transparent;
            border: none;
            cursor: pointer;
            color: var(--text-muted);
            padding: 6px;
            border-radius: 8px;
            margin-left: auto;
            align-items: center;
            justify-content: center;
            transition: all .2s;
            font-size: 16px;
        }

        .sidebar-close-btn:hover {
            color: var(--danger-color);
            background: var(--danger-light);
        }

        .sidebar-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, .5);
            backdrop-filter: blur(2px);
            z-index: 999;
            display: none;
            opacity: 0;
            transition: opacity .3s ease;
        }

        .sidebar-backdrop.active {
            display: block;
            opacity: 1;
        }

        /* ============ FORM CONTROL ALIGNMENT ============ */
        select,
        input[type="text"],
        input[type="email"],
        input[type="password"],
        input[type="date"],
        input[type="number"],
        textarea {
            height: 40px;
            line-height: normal;
        }

        textarea {
            height: auto;
            min-height: 90px;
        }

        input[type="checkbox"],
        input[type="radio"] {
            width: 16px;
            height: 16px;
        }

        .filter-group select,
        .filter-group input,
        .form-group select,
        .form-group input,
        .form-row select,
        .form-row input {
            width: 100%;
            min-width: 0;
        }

        .form-group {
            min-width: 0;
        }

        label {
            white-space: normal;
        }

        .form-row label,
        .dynamic-row label {
            max-height: 34px;
            overflow: visible;
            margin-bottom: 4px;
        }

        .form-row,
        .dynamic-row {
            align-items: end;
        }

        .filter-group {
            min-width: 0;
        }

        .filters-area .btn,
        .action-bar .btn {
            height: 40px;
            align-items: center;
        }

        .modal-panel select,
        .modal-panel input,
        .modal-panel textarea {
            height: 40px;
            line-height: normal;
        }

        .modal-panel textarea {
            height: auto;
        }

        @media (max-width: 1024px) {
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .dash-row {
                grid-template-columns: 1fr;
            }

            .mobile-menu-btn {
                display: inline-flex !important;
            }

            .sidebar-close-btn {
                display: inline-flex !important;
            }

            .sidebar {
                position: fixed !important;
                top: 0;
                bottom: 0;
                left: 0;
                transform: translateX(-100%);
                transition: transform .3s ease;
                z-index: 10000;
            }

            .sidebar.mobile-open {
                transform: translateX(0);
            }

            .header {
                padding: 0 16px;
                height: 60px;
                min-height: 60px;
            }

            .header-title {
                font-size: 16px;
            }

            .filters-area {
                padding: 14px 16px;
                flex-direction: column;
                align-items: stretch;
            }

            .filter-group select,
            .filter-group input {
                min-width: 100%;
                width: 100%;
            }

            .content-inner {
                padding: 16px;
            }

            .table-scroll {
                overflow-x: auto;
            }

            table {
                min-width: 640px;
            }

            .modal-panel {
                width: 100vw;
                height: 100vh;
                max-height: 100vh;
                border-radius: 0;
                border: none;
            }

            .form-row,
            .dynamic-row {
            transition: all .2s;
            font-size: 16px;
            flex-shrink: 0;
        }

        .mobile-menu-btn:hover {
            background: var(--primary-light);
            color: var(--primary-color);
        }

        .sidebar-close-btn {
            display: none;
            background: transparent;
            border: none;
            cursor: pointer;
            color: var(--text-muted);
            padding: 6px;
            border-radius: 8px;
            margin-left: auto;
            align-items: center;
            justify-content: center;
            transition: all .2s;
            font-size: 16px;
        }

        .sidebar-close-btn:hover {
            color: var(--danger-color);
            background: var(--danger-light);
        }

        .sidebar-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, .5);
            backdrop-filter: blur(2px);
            z-index: 999;
            display: none;
            opacity: 0;
            transition: opacity .3s ease;
        }

        .sidebar-backdrop.active {
            display: block;
            opacity: 1;
        }

        /* ============ FORM CONTROL ALIGNMENT ============ */
        select,
        input[type="text"],
        input[type="email"],
        input[type="password"],
        input[type="date"],
        input[type="number"],
        textarea {
            height: 40px;
            line-height: normal;
        }

        textarea {
            height: auto;
            min-height: 90px;
        }

        input[type="checkbox"],
        input[type="radio"] {
            width: 16px;
            height: 16px;
        }

        .filter-group select,
        .filter-group input,
        .form-group select,
        .form-group input,
        .form-row select,
        .form-row input {
            width: 100%;
            min-width: 0;
        }

        .form-group {
            min-width: 0;
        }

        label {
            white-space: normal;
        }

        .form-row label,
        .dynamic-row label {
            max-height: 34px;
            overflow: visible;
            margin-bottom: 4px;
        }

        .form-row,
        .dynamic-row {
            align-items: end;
        }

        .filter-group {
            min-width: 0;
        }

        .filters-area .btn,
        .action-bar .btn {
            height: 40px;
            align-items: center;
        }

        .modal-panel select,
        .modal-panel input,
        .modal-panel textarea {
            height: 40px;
            line-height: normal;
        }

        .modal-panel textarea {
            height: auto;
        }

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

            .dash-row {
                grid-template-columns: 1fr;
            }

            .mobile-menu-btn {
                display: inline-flex !important;
            }

            .sidebar-close-btn {
                display: inline-flex !important;
            }

            .sidebar {
                position: fixed !important;
                top: 0;
                bottom: 0;
                left: 0;
                transform: translateX(-100%);
                transition: transform .3s ease;
                z-index: 10000;
            }

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

            .header {
                padding: 0 16px;
                height: 60px;
                min-height: 60px;
            }

            .header-title {
                font-size: 16px;
            }

            .filters-area {
                padding: 14px 16px;
                flex-direction: column;
                align-items: stretch;
            }

            .filter-group select,
            .filter-group input {
                min-width: 100%;
                width: 100%;
            }

            .content-inner {
                padding: 16px;
            }

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

            table {
                min-width: 640px;
            }

            .modal-panel {
                width: 100vw;
                height: 100vh;
                max-height: 100vh;
                border-radius: 0;
                border: none;
            }

            .form-row,
            .dynamic-row {
                grid-template-columns: 1fr;
                gap: 12px;
            }
        }

        @media (max-width: 560px) {
            .stats-grid {
                grid-template-columns: 1fr;
                gap: 12px;
            }

            .header-avatar {
                width: 34px;
                height: 34px;
            }

            .pagination {
                flex-direction: column;
                align-items: stretch;
            }

            .pagination-info {
                margin-right: 0;
                text-align: center;
            }

            .pagination-controls {
                justify-content: center;
            }

            .login-card {
                padding: 2rem 1.5rem;
            }

            .modal-footer {
                flex-direction: column !important;
                justify-content: center !important;
                align-items: stretch !important;
                gap: 10px !important;
                padding: 1rem !important;
            }

            .modal-footer button {
                width: 100% !important;
                margin: 0 !important;
            }

            div[style*="justify-content: flex-end"] {
                flex-direction: column !important;
                align-items: stretch !important;
            }

            div[style*="justify-content: flex-end"] button {
                width: 100% !important;
                margin: 0 !important;
                margin-top: 10px !important;
            }

            div[style*="justify-content: flex-end"] button:first-child {
                margin-top: 0 !important;
            }
        }
    
            }
            .sk-row { animation: pulse-shimmer 2s infinite linear; background: linear-gradient(to right, #f6f7f8 4%, #edeef1 25%, #f6f7f8 36%); background-size: 1000px 100%; border-radius: 4px; height: 18px; margin: 4px 0; }

/* Exam portal additions */
.status-active { background: #d1fae5; color: #059669; }
.status-draft { background: #e2e8f0; color: #475569; }
.form-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
.view-title { margin: 0; font-size: 1.35rem; font-weight: 700; color: var(--text-main); letter-spacing: -.3px; }
.view-subtitle { margin: 4px 0 0; font-size: .8125rem; color: var(--text-muted); font-weight: 500; }
.table-scroll table { border-collapse: collapse; width: 100%; min-width: 720px; }
.card .table-scroll { margin: 0; }
.mark-input, .remark-input { width: 100%; padding: 7px 10px; background: #fbfcfd; border: 1.5px solid var(--border-color); border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text-main); transition: border-color .15s, box-shadow .15s; outline: none; }
.mark-input:focus, .remark-input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
#marks-table-body input[type="number"].mark-input { max-width: 110px; }
.btn-block { width: 100%; margin-top: 12px; }
.nav-link { display: flex; align-items: center; gap: 12px; width: 100%; color: inherit; text-decoration: none; }
.sidebar-user-box { display: flex; align-items: center; gap: 12px; padding: 20px 18px; }
.sidebar-logout-box { border-top: 1px solid rgba(255, 255, 255, .05); padding: 12px 18px 20px; }
.sidebar-logout-box .nav-item { color: #cbd5e1; padding: 10px 0; margin: 0; font-weight: 600; width: 100%; }
.section-title { margin: 0 0 14px; font-size: .9375rem; font-weight: 700; color: var(--text-main); }
.form-group-btn { margin-bottom: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.form-group-btn .btn { width: 100%; }
.exam-info-card { padding: 16px 18px; margin-bottom: 16px; box-shadow: none; }
.exam-info-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.exam-info-label { font-size: .8125rem; font-weight: 600; color: var(--text-secondary); }
.exam-info-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.exam-info-name { font-size: 1.0625rem; font-weight: 700; color: var(--primary-color); }
.add-subject-card { padding: 18px; margin-bottom: 20px; box-shadow: none; }
.modal-footer-split { justify-content: space-between; }
.publish-btn { border: 1.5px solid #10b981; color: #10b981; background: transparent; }
.modal-panel-sm { max-width: 540px; }
          