@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-glow: rgba(37, 99, 235, 0.4);
    
    --primary: #2563eb;
    --primary-glow: rgba(37, 99, 235, 0.15);
    --secondary: #ef4444;
    --secondary-glow: rgba(239, 68, 68, 0.15);
    --accent: #14b8a6;
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-inverse: #0b0f19;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --sidebar-width: 280px;
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-blur: 12px;
}

body.light-theme {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --border-color: #cbd5e1;
    --border-color-glow: rgba(30, 58, 138, 0.35);
    
    --primary: #1e3a8a;
    --primary-glow: rgba(30, 58, 138, 0.06);
    --secondary: #b91c1c;
    --secondary-glow: rgba(185, 28, 28, 0.06);
    --accent: #0f766e;
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-inverse: #ffffff;
    
    --card-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.04), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
}

body.light-theme .ambient-glow-1 {
    background: radial-gradient(circle, rgba(37, 99, 235, 0.04) 0%, rgba(0,0,0,0) 70%);
}
body.light-theme .ambient-glow-2 {
    background: radial-gradient(circle, rgba(239, 68, 68, 0.03) 0%, rgba(0,0,0,0) 70%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Background Ambient Glows */
.ambient-glow-1 {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

.ambient-glow-2 {
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.1) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Auth / Login Container */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background-image: linear-gradient(rgba(15, 23, 42, 0.45), rgba(15, 23, 42, 0.45)), url('login-bg.png?v=1.3.0');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.auth-card {
    background: #ffffff !important;
    border: 2px solid #000000 !important;
    box-shadow: 6px 6px 0px 0px #000000 !important;
    border-radius: 24px !important;
    width: 100%;
    max-width: 440px;
    padding: 40px !important;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.6s ease-out;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text-main);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(90deg, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

/* Premium Auth Card UI Enhancements */
.auth-card {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), 0 20px 48px rgba(0, 0, 0, 0.05) !important;
    border-radius: 24px !important;
}

.auth-card .form-control {
    background: rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #1f2937 !important;
    font-weight: 500 !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.auth-card .form-control::placeholder {
    color: #9ca3af !important;
}

.auth-card .form-control:focus {
    background: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15) !important;
}

.auth-card .form-group label {
    color: #374151 !important;
    font-weight: 600 !important;
    font-size: 12.5px !important;
}

.auth-card .input-icon {
    color: #6b7280 !important;
}

.auth-card .auth-subtitle {
    color: #4b5563 !important;
    font-weight: 500 !important;
    margin-top: 4px;
}

.auth-card .auth-footer span {
    color: #4b5563 !important;
    font-size: 12px !important;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.input-container {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
}

.form-control {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.2);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-muted);
}

.btn-danger {
    background: var(--danger);
    color: var(--text-main);
}
.btn-danger:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
}

.auth-demo-credentials {
    margin-top: 20px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: left;
}

.auth-demo-credentials strong {
    color: var(--text-main);
}

/* Dashboard Core Layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar styling */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.brand-name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-profile {
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-glow), var(--secondary-glow));
    border: 2px solid var(--primary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.profile-info {
    overflow: hidden;
}

.profile-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.profile-role {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: capitalize;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.sidebar-menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sidebar-menu-item a i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.sidebar-menu-item.active a,
.sidebar-menu-item a:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-menu-item.active a {
    background: var(--primary-glow);
    border: 1px solid rgba(37, 99, 235, 0.15);
    color: var(--primary);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 24px;
    transition: margin-left 0.3s ease;
}

/* Header Navbar */
.top-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

.nav-title-group h1 {
    font-size: 24px;
    font-weight: 700;
}

.nav-title-group p {
    font-size: 13px;
    color: var(--text-muted);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-date {
    font-size: 13px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 8px;
}

/* Dynamic Panels & Cards */
.content-body {
    flex-grow: 1;
    animation: fadeIn 0.4s ease-out;
}

/* Grid System */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

/* Card Styles */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

/* Metric / Stat Card */
.stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-info h3 {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.icon-blue {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.icon-purple {
    background: rgba(239, 68, 68, 0.1);
    color: var(--secondary);
}

.icon-teal {
    background: rgba(20, 184, 166, 0.1);
    color: var(--accent);
}

.icon-green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

/* Card Header */
.card-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
}

/* Section Separator */
.section-header {
    margin-bottom: 16px;
}
.section-header h2 {
    font-size: 20px;
    font-weight: 600;
}

/* Circulars & Announcements List */
.announcement-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.announcement-item {
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.announcement-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.announcement-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.announce-info::before {
    background: var(--primary);
}

.announce-academic::before {
    background: var(--secondary);
}

.announce-exam::before {
    background: var(--accent);
}

.announce-event::before {
    background: var(--warning);
}

.announce-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.announce-type {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 4px;
}

.type-info {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.type-academic {
    background: rgba(239, 68, 68, 0.1);
    color: var(--secondary);
}

.type-exam {
    background: rgba(20, 184, 166, 0.1);
    color: var(--accent);
}

.type-event {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.announce-date {
    font-size: 12px;
    color: var(--text-muted);
}

.announce-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.announce-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.announce-author {
    font-size: 12px;
    color: var(--primary);
    margin-top: 8px;
    font-weight: 500;
}

/* Timetable styling */
.timetable-container {
    overflow-x: auto;
}

.timetable-grid {
    display: grid;
    grid-template-columns: 80px repeat(5, 1fr);
    min-width: 600px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.timetable-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 14px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.timetable-header:last-child {
    border-right: none;
}

.timetable-row-label {
    grid-column: 1;
    background: rgba(255, 255, 255, 0.02);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    padding: 10px;
}

.timetable-slot {
    padding: 14px;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    font-size: 13px;
    min-height: 80px;
    transition: background 0.2s;
}

.timetable-slot:last-child {
    border-right: none;
}

.timetable-slot:hover {
    background: rgba(255, 255, 255, 0.02);
}

.timetable-class {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.timetable-subject {
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 2px;
}

.timetable-teacher,
.timetable-room {
    font-size: 11px;
    color: var(--text-muted);
}

.timetable-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.15);
    font-size: 11px;
}

/* Tables styling */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.custom-table th {
    padding: 14px 16px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.custom-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.custom-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-info {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

/* Circular Progress / Attendance Arc */
.attendance-overview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.progress-circle {
    position: relative;
    width: 150px;
    height: 150px;
}

.progress-circle svg {
    width: 150px;
    height: 150px;
    transform: rotate(-90deg);
}

.progress-circle circle {
    fill: none;
    stroke-width: 12;
}

.progress-circle-bg {
    stroke: rgba(255, 255, 255, 0.03);
}

.progress-circle-bar {
    stroke: url(#gradient-progress);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s ease;
}

.progress-circle-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-circle-value h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 2px;
}

.progress-circle-value p {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* User Form Grid & Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    padding: 32px;
    box-shadow: var(--card-shadow);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-main);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* Profiles View */
.profile-view-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
}

.profile-card-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-large-avatar {
    width: 120px;
    height: 120px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.2);
}

.profile-full-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-meta-role {
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.profile-details-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.profile-detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-muted);
}

.detail-value {
    font-weight: 500;
}

/* Tab controls */
.tab-navigation {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.tab-btn.active,
.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive CSS */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .profile-view-wrapper {
        grid-template-columns: 1fr;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Quick Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex-space { display: flex; justify-content: space-between; align-items: center; }
.gap-12 { gap: 12px; }
.gap-8 { gap: 8px; }
.mb-16 { margin-bottom: 16px; }
.mt-16 { margin-top: 16px; }

/* Interactive Attendance Grid */
.attendance-grid-container {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.student-attendance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.01);
}

.student-attendance-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.attendance-options {
    display: flex;
    gap: 8px;
}

.radio-label {
    cursor: pointer;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    font-weight: 500;
}

.radio-label input {
    display: none;
}

.radio-present:hover,
.radio-present input:checked + span {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-color: var(--success);
}

.radio-absent:hover,
.radio-absent input:checked + span {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: var(--danger);
}

.radio-late:hover,
.radio-late input:checked + span {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border-color: var(--warning);
}

/* User Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-grid-full {
    grid-column: span 2;
}

@media (max-width: 576px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-grid-full {
        grid-column: span 1;
    }
}

/* Custom Attendance Portal Styles */
.attendance-code-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.02);
    border: 1.5px dashed var(--accent);
    border-radius: 16px;
    margin: 20px 0;
    text-align: center;
}

.attendance-code-number {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: 6px;
    color: var(--accent);
    font-family: monospace;
    margin: 15px 0;
    text-shadow: 0 0 15px rgba(20, 184, 166, 0.4);
    animation: codePulse 2s infinite ease-in-out;
}

@keyframes codePulse {
    0% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.9; }
}

.attendance-status-pill {
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-width: 1.5px;
    border-style: solid;
}

/* PRESENT: High contrast vibrant Emerald Green background, dark green text */
.status-active {
    background: #d1fae5 !important;
    color: #065f46 !important;
    border-color: #34d399 !important;
}

/* ABSENT: High contrast vibrant Crimson Red background, dark red text */
.status-absent {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border-color: #f87171 !important;
}

/* WARNING: High contrast vibrant Amber Yellow background, dark amber text */
.status-warning {
    background: #fef3c7 !important;
    color: #92400e !important;
    border-color: #fbbf24 !important;
}

/* CLOSED / FLAGGED: Distinct orange warning look */
.status-closed {
    background: #ffedd5 !important;
    color: #c2410c !important;
    border-color: #f97316 !important;
}

.attendance-input-large {
    font-size: 24px;
    letter-spacing: 4px;
    text-align: center;
    font-weight: 700;
    max-width: 240px;
    margin: 0 auto;
}

/* Stats Grid & Mobile Responsiveness Utilities */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .main-content {
        padding: 16px 12px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .top-navbar {
        margin-bottom: 16px;
        padding-bottom: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .nav-right {
        align-self: flex-end;
    }
    .glass-card {
        padding: 16px;
        border-radius: 12px;
    }
    .auth-card {
        padding: 0 !important;
    }
}

/* Split-screen Responsive Behavior */
@media (max-width: 992px) {
    .auth-image-panel {
        display: none !important;
    }
    .auth-form-panel {
        flex: 1 !important;
        padding: 24px !important;
    }
    .auth-card {
        padding: 0 !important;
    }
}

/* Academic Credibility Design Overrides (Light Theme) */
body.light-theme {
    background-color: var(--bg-primary) !important;
    color: var(--text-main) !important;
}

body.light-theme .auth-card {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15) !important;
    border-radius: 20px !important;
}

body.light-theme .auth-card .form-control {
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #0f172a !important;
    border-radius: 10px !important;
    font-weight: 500 !important;
}

body.light-theme .auth-card .form-control:focus {
    background: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.15) !important;
}

body.light-theme .auth-card label {
    color: #334155 !important;
    font-weight: 600 !important;
}

body.light-theme .auth-subtitle {
    color: #475569 !important;
}

body.light-theme .glass-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.03), 0 2px 4px -2px rgba(15, 23, 42, 0.03) !important;
    border-radius: 16px !important;
    color: var(--text-main) !important;
    padding: 24px;
}

body.light-theme .form-control {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #0f172a !important;
}

body.light-theme .form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15) !important;
}

body.light-theme label {
    color: #334155 !important;
    font-weight: 600 !important;
}

body.light-theme .sidebar {
    background: #0f172a !important;
    border-right: 1px solid #1e293b !important;
}

body.light-theme .sidebar-brand-text {
    color: #ffffff !important;
}

body.light-theme .sidebar-menu-item a {
    color: #94a3b8 !important;
}

body.light-theme .sidebar-menu-item a:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

body.light-theme .sidebar-menu-item.active a {
    background: var(--primary) !important;
    color: #ffffff !important;
    border: 1px solid var(--primary) !important;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25) !important;
}

body.light-theme .sidebar-menu-item.active a i {
    color: #ffffff !important;
}

body.light-theme .sidebar-profile {
    border-bottom: 1px solid #1e293b !important;
}

body.light-theme .profile-name {
    color: #ffffff !important;
}

body.light-theme .profile-role {
    color: #94a3b8 !important;
}

body.light-theme .btn-primary {
    background: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(30, 58, 138, 0.2) !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    border: none !important;
}

body.light-theme .btn-primary:hover {
    background: #1d4ed8 !important;
    transform: translateY(-1.5px) !important;
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.3) !important;
}

body.light-theme .btn-secondary {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1.5px solid #cbd5e1 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
}

body.light-theme .btn-secondary:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
}

body.light-theme .btn-danger {
    background: var(--danger) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2) !important;
}

body.light-theme .btn-danger:hover {
    background: #dc2626 !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3) !important;
}

body.light-theme .custom-table {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

body.light-theme .custom-table th {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #cbd5e1 !important;
}

body.light-theme .custom-table td {
    border-bottom: 1px solid #e2e8f0 !important;
    color: #334155 !important;
}

body.light-theme .custom-table tr:nth-child(even) {
    background: #f8fafc !important;
}

body.light-theme .custom-table tr:hover {
    background: #f1f5f9 !important;
}

body.light-theme .top-navbar {
    border-bottom: 1px solid #e2e8f0 !important;
    padding-bottom: 16px !important;
}

body.light-theme .nav-title {
    color: #0f172a !important;
    font-weight: 800 !important;
}

body.light-theme .current-date {
    color: #475569 !important;
}

body.light-theme .card-title {
    color: #0f172a !important;
    font-weight: 700 !important;
}

body.light-theme .stat-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.03), 0 2px 4px -2px rgba(15, 23, 42, 0.03) !important;
    color: #0f172a !important;
}

body.light-theme .stat-card .stat-value {
    color: #0f172a !important;
    font-weight: 800 !important;
}

body.light-theme .stat-card .stat-label {
    color: #475569 !important;
    font-weight: 600 !important;
}

body.light-theme .stat-card .stat-icon {
    color: var(--primary) !important;
    background: rgba(30, 58, 138, 0.08) !important;
}

body.light-theme .badge {
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
    background: #f1f5f9 !important;
}



