/* ============================================
   ICFHR Professional Portal Design
   Modern, Clean & Professional
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Institution Portal Colors - Deep Blue Theme */
    --inst-primary: #1e40af;
    --inst-primary-dark: #1e3a8a;
    --inst-primary-light: #3b82f6;
    --inst-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);

    /* Student Portal Colors - Teal Theme */
    --student-primary: #0f766e;
    --student-primary-dark: #115e59;
    --student-primary-light: #14b8a6;
    --student-gradient: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);

    /* Accent Colors */
    --accent-orange: #f59e0b;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;

    /* Status Colors */
    --success: #10b981;
    --success-bg: #d1fae5;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --info: #3b82f6;
    --info-bg: #dbeafe;

    /* Neutrals */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --header-height: 70px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);
}

/* ============================================
   BASE RESET
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-page.institution-login {
    background: var(--inst-gradient);
}

.login-page.student-login {
    background: var(--student-gradient);
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

.login-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    width: 100%;
    max-width: 440px;
    padding: 48px;
    position: relative;
    z-index: 1;
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--white);
}

.institution-login .login-icon {
    background: var(--inst-gradient);
}

.student-login .login-icon {
    background: var(--student-gradient);
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--gray-500);
    font-size: 0.95rem;
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.login-form .input-wrapper {
    position: relative;
}

.login-form .input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 1rem;
}

.login-form input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--gray-50);
}

.login-form input:focus {
    outline: none;
    border-color: var(--inst-primary-light);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.student-login .login-form input:focus {
    border-color: var(--student-primary-light);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1);
}

.login-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.institution-login .login-btn {
    background: var(--inst-gradient);
}

.student-login .login-btn {
    background: var(--student-gradient);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.login-footer a {
    color: var(--inst-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   PORTAL LAYOUT
   ============================================ */
.portal-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.3s ease;
}

.portal-container:not(.student-portal) .sidebar {
    background: var(--inst-gradient);
}

.student-portal .sidebar {
    background: var(--student-gradient);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.2) 100%);
    pointer-events: none;
}

.sidebar-header {
    padding: 32px 24px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.institution-logo, .student-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    border: 3px solid rgba(255,255,255,0.3);
    overflow: hidden;
}

.institution-logo img, .student-avatar img {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.institution-logo i, .student-avatar i {
    font-size: 2rem;
    color: var(--white);
}

.institution-name, .student-name {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.institution-code, .student-id {
    color: rgba(255,255,255,0.8);
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(255,255,255,0.15);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

.institution-badge {
    display: block;
    color: rgba(255,255,255,0.7);
    font-size: 0.75rem;
    margin-top: 8px;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    position: relative;
    z-index: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin-bottom: 6px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.nav-link i {
    width: 22px;
    font-size: 1.1rem;
    text-align: center;
}

.nav-link:hover {
    background: rgba(255,255,255,0.15);
    color: var(--white);
    transform: translateX(4px);
}

.nav-sub-link {
    padding: 10px 18px 10px 54px;
    font-size: 0.85rem;
    margin-top: -4px;
    opacity: 0.75;
}

.nav-sub-link:hover {
    opacity: 1;
}

.nav-link.active {
    background: rgba(255,255,255,0.25);
    color: var(--white);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sidebar-footer {
    padding: 16px;
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.logout-link {
    color: rgba(255,255,255,0.7) !important;
}

.logout-link:hover {
    background: rgba(239, 68, 68, 0.3) !important;
    color: var(--white) !important;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: calc(100% - var(--sidebar-width));
}

.content-header {
    background: var(--white);
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.content-body {
    padding: 32px;
    flex: 1;
    overflow-x: auto;
}

/* ============================================
   DASHBOARD - WELCOME BANNER
   ============================================ */
.welcome-banner {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.portal-container:not(.student-portal) .welcome-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--inst-gradient);
}

.student-portal .welcome-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--student-gradient);
}

.welcome-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.welcome-content p {
    color: var(--gray-500);
    font-size: 1rem;
}

.welcome-date {
    text-align: right;
}

.welcome-date .date {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
}

.welcome-date .month-year {
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* ============================================
   DASHBOARD - STATS GRID
   ============================================ */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    opacity: 0.1;
    transform: translate(30%, -30%);
}

.stat-card.courses::after { background: var(--info); }
.stat-card.students::after { background: var(--success); }
.stat-card.exams::after { background: var(--accent-purple); }
.stat-card.active::after { background: var(--accent-orange); }

.stat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.courses {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: var(--info);
}

.stat-icon.students {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: var(--success);
}

.stat-icon.exams {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: var(--accent-purple);
}

.stat-icon.active {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: var(--accent-orange);
}

.stat-trend {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.stat-trend.up {
    background: var(--success-bg);
    color: var(--success);
}

.stat-trend.neutral {
    background: var(--gray-100);
    color: var(--gray-500);
}

.stat-content h3 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-content p {
    color: var(--gray-500);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ============================================
   DASHBOARD - CARDS GRID
   ============================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.dashboard-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.dashboard-card.full-width {
    grid-column: span 2;
}

.card-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-100);
    background: var(--gray-50);
}

.card-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 10px;
}

.portal-container:not(.student-portal) .card-header h2 i {
    color: var(--inst-primary);
}

.student-portal .card-header h2 i {
    color: var(--student-primary);
}

.view-all {
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.portal-container:not(.student-portal) .view-all {
    color: var(--inst-primary);
    background: rgba(30, 64, 175, 0.1);
}

.student-portal .view-all {
    color: var(--student-primary);
    background: rgba(15, 118, 110, 0.1);
}

.view-all:hover {
    transform: translateX(4px);
}

.card-body {
    padding: 24px;
}

/* ============================================
   ITEM LISTS
   ============================================ */
.item-list {
    list-style: none;
}

.item-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.item-list li:hover {
    background: var(--gray-50);
    border-color: var(--gray-200);
}

.item-list li:last-child {
    margin-bottom: 0;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-info strong {
    color: var(--gray-800);
    font-weight: 600;
    font-size: 0.95rem;
}

.item-meta {
    color: var(--gray-500);
    font-size: 0.8rem;
    font-weight: 500;
}

/* ============================================
   COURSE LIST (Student Portal)
   ============================================ */
.course-list {
    list-style: none;
}

.course-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.course-item:hover {
    border-color: var(--student-primary-light);
    box-shadow: var(--shadow);
    transform: translateX(4px);
}

.course-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius);
    background: var(--student-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.course-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.course-code {
    font-size: 0.8rem;
    color: var(--student-primary);
    font-weight: 600;
    background: rgba(15, 118, 110, 0.1);
    padding: 2px 10px;
    border-radius: 12px;
    display: inline-block;
}

.course-duration {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-left: 8px;
}

.course-duration i {
    margin-right: 4px;
}

/* ============================================
   EXAM LIST (Student Portal)
   ============================================ */
.exam-list {
    list-style: none;
}

.exam-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
    border: 1px solid #99f6e4;
    transition: all 0.3s ease;
}

.exam-item:hover {
    box-shadow: var(--shadow-md);
    transform: scale(1.01);
}

.exam-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 6px;
}

.exam-course {
    font-size: 0.85rem;
    color: var(--student-primary);
    font-weight: 500;
}

.exam-dates {
    display: flex;
    gap: 16px;
    margin-top: 10px;
}

.exam-dates span {
    font-size: 0.8rem;
    color: var(--gray-600);
}

.exam-dates i {
    color: var(--student-primary);
    margin-right: 6px;
}

/* ============================================
   DATA TABLES
   ============================================ */
.table-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.data-table th {
    background: var(--gray-50);
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9rem;
    color: var(--gray-700);
    white-space: nowrap;
}

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

.data-table tbody tr:hover {
    background: var(--gray-50);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: var(--success-bg);
    color: #047857;
}

.badge-secondary {
    background: var(--gray-200);
    color: var(--gray-600);
}

.badge-info {
    background: var(--info-bg);
    color: #1d4ed8;
}

.badge-warning {
    background: var(--warning-bg);
    color: #b45309;
}

.badge-danger {
    background: var(--danger-bg);
    color: #b91c1c;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn-primary {
    color: var(--white);
}

.portal-container:not(.student-portal) .btn-primary {
    background: var(--inst-gradient);
}

.student-portal .btn-primary {
    background: var(--student-gradient);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #dc2626;
}

/* ============================================
   FORMS
   ============================================ */
.form-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 32px;
    max-width: 800px;
}

.portal-form .form-group {
    margin-bottom: 24px;
}

.portal-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.portal-form .required {
    color: var(--danger);
}

.portal-form input,
.portal-form select,
.portal-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--white);
}

.portal-form input:focus,
.portal-form select:focus,
.portal-form textarea:focus {
    outline: none;
    border-color: var(--inst-primary-light);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.student-portal .portal-form input:focus,
.student-portal .portal-form select:focus,
.student-portal .portal-form textarea:focus {
    border-color: var(--student-primary-light);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.form-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.checkbox-list {
    max-height: 240px;
    overflow-y: auto;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    margin-bottom: 4px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.checkbox-item:hover {
    background: var(--gray-50);
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--inst-primary);
}

.student-portal .checkbox-item input[type="checkbox"] {
    accent-color: var(--student-primary);
}

.checkbox-item label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
}

.info-box {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    background: var(--info-bg);
    border: 1px solid #93c5fd;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.info-box i {
    color: var(--info);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.info-box p {
    margin: 0;
    color: #1e40af;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ============================================
   ALERTS
   ============================================ */
.messages {
    padding: 0 32px;
    margin-top: 16px;
}

.alert {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.9rem;
    position: relative;
}

.alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-success {
    background: var(--success-bg);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: var(--danger-bg);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: var(--warning-bg);
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: var(--info-bg);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.alert-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.5;
    line-height: 1;
}

.alert-close:hover {
    opacity: 1;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state > i {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: 20px;
    display: block;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--gray-500);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.empty-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.empty-message {
    text-align: center;
    color: var(--gray-500);
    padding: 40px 20px;
    font-size: 0.95rem;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */
.action-buttons {
    display: flex;
    gap: 8px;
}

.action-buttons .btn-text {
    display: none;
}

.inline-form {
    display: inline;
    flex: 1;
}

.inline-form .btn {
    width: 100%;
}

/* ============================================
   CODE & CREDENTIALS
   ============================================ */
code {
    background: #e0f2fe;
    color: #0369a1;
    padding: 3px 10px;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
}

.data-table code {
    background: #f0fdfa;
    color: #0d9488;
}

/* ============================================
   QUICK ACTIONS (Dashboard)
   ============================================ */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.quick-action-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    text-decoration: none;
    border: 2px solid var(--gray-200);
    transition: all 0.3s ease;
}

.quick-action-card:hover {
    border-color: var(--inst-primary-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.student-portal .quick-action-card:hover {
    border-color: var(--student-primary-light);
}

.quick-action-card i {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}

.portal-container:not(.student-portal) .quick-action-card i {
    color: var(--inst-primary);
}

.student-portal .quick-action-card i {
    color: var(--student-primary);
}

.quick-action-card span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
}

/* ============================================
   MOBILE MENU TOGGLE
   ============================================ */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1100;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: none;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--gray-700);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: var(--gray-100);
}

.mobile-menu-toggle.active {
    background: var(--student-gradient);
    color: var(--white);
}

.portal-container:not(.student-portal) .mobile-menu-toggle.active {
    background: var(--inst-gradient);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* ============================================
   RESPONSIVE TABLE
   ============================================ */
.table-responsive,
.table-scroll {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .exam-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-card.full-width {
        grid-column: span 1;
    }

    .exam-cards {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .quick-action-card {
        padding: 16px;
    }

    .quick-action-card i {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    .quick-action-card span {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Hide sidebar by default on mobile */
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
        width: 280px;
        z-index: 1000;
    }

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

    /* Main content takes full width */
    .main-content {
        margin-left: 0;
        padding-top: 70px;
        width: 100%;
        overflow-x: hidden;
    }

    .content-header {
        padding: 16px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .header-actions .btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    .content-body {
        padding: 16px;
    }

    /* Welcome Banner */
    .welcome-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 24px 20px;
    }

    .welcome-content h2 {
        font-size: 1.25rem;
    }

    .welcome-date {
        text-align: center;
        display: flex;
        gap: 8px;
        align-items: baseline;
        justify-content: center;
    }

    .welcome-date .date {
        font-size: 1.5rem;
    }

    /* Stats Grid */
    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-bottom: 24px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-header {
        margin-bottom: 12px;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .stat-content h3 {
        font-size: 1.5rem;
    }

    .stat-content p {
        font-size: 0.8rem;
    }

    /* Quick Actions */
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 24px;
    }

    .quick-action-card {
        padding: 16px 12px;
    }

    .quick-action-card i {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    .quick-action-card span {
        font-size: 0.8rem;
    }

    /* Dashboard Cards */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .dashboard-card.full-width {
        grid-column: span 1;
    }

    .card-header {
        padding: 14px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .card-header h2 {
        font-size: 0.9rem;
    }

    .view-all {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .card-body {
        padding: 16px;
    }

    /* Item Lists */
    .item-list li {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .item-info strong {
        font-size: 0.9rem;
    }

    .item-meta {
        font-size: 0.75rem;
    }

    /* Course List */
    .course-item {
        padding: 16px;
        gap: 12px;
    }

    .course-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .course-info h4 {
        font-size: 0.9rem;
    }

    /* Exam List */
    .exam-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 16px;
    }

    .exam-item .btn {
        width: 100%;
    }

    .exam-dates {
        flex-direction: column;
        gap: 8px;
    }

    /* Tables - Mobile Card Layout */
    .content-body {
        padding: 16px;
    }

    .table-container {
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }

    .table-scroll {
        display: block;
        width: 100%;
    }

    .data-table {
        min-width: 0;
        width: 100%;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .data-table tbody tr {
        display: block;
        background: var(--white);
        border-radius: var(--radius);
        padding: 16px;
        box-shadow: var(--shadow);
        border: 1px solid var(--gray-200);
    }

    .data-table tbody tr:hover {
        background: var(--white);
        border-color: var(--inst-primary-light);
    }

    .data-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid var(--gray-100);
        font-size: 0.85rem;
        white-space: normal;
    }

    .data-table td:last-child {
        border-bottom: none;
        padding-top: 12px;
        justify-content: flex-start;
    }

    .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.75rem;
        color: var(--gray-500);
        text-transform: uppercase;
        margin-right: 12px;
        flex-shrink: 0;
    }

    .data-table td:last-child::before {
        display: none;
    }

    .data-table code {
        font-size: 0.75rem;
        padding: 2px 6px;
    }

    .action-buttons {
        display: flex;
        gap: 8px;
        width: 100%;
    }

    .action-buttons .btn {
        flex: 1;
        justify-content: center;
        padding: 10px 16px;
    }

    .action-buttons .btn-text {
        display: inline;
    }

    .inline-form {
        flex: 1;
    }

    /* Exam Tabs */
    .exam-tabs {
        flex-direction: column;
        gap: 4px;
        padding: 6px;
    }

    .tab-btn {
        padding: 12px 16px;
        font-size: 0.85rem;
    }

    .tab-btn i {
        font-size: 0.9rem;
    }

    /* Exam Cards */
    .exam-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .exam-card {
        padding: 20px;
    }

    .exam-card-header h3 {
        font-size: 1.1rem;
    }

    .exam-course-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    .exam-card-dates {
        padding: 12px;
    }

    .date-item {
        font-size: 0.8rem;
    }

    /* Forms */
    .form-container {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    /* Alerts */
    .messages {
        padding: 0 16px;
    }

    .alert {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    /* Empty State */
    .empty-state {
        padding: 40px 20px;
    }

    .empty-state > i {
        font-size: 3rem;
    }

    .empty-state h3 {
        font-size: 1.1rem;
    }

    .empty-state p {
        font-size: 0.85rem;
    }

    .empty-actions {
        flex-direction: column;
    }

    .empty-actions .btn {
        width: 100%;
    }

    /* Login Page */
    .login-container {
        padding: 32px 24px;
        margin: 16px;
        max-width: 100%;
    }

    .login-icon {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    .login-form input {
        padding: 12px 14px 12px 44px;
    }

    .login-btn {
        padding: 14px;
    }
}

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

    .quick-actions {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 16px;
    }

    .stat-header {
        margin-bottom: 0;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
    }

    .stat-content h3 {
        font-size: 1.75rem;
    }

    .welcome-banner > div:last-child {
        flex-direction: row !important;
        width: 100%;
        justify-content: center;
    }

    .welcome-banner > div:last-child > div {
        flex: 1;
        min-width: 0;
    }

    .page-title {
        font-size: 1.1rem;
    }

    .content-header {
        padding: 12px 16px;
    }

    .content-body {
        padding: 12px;
    }
}

/* Landscape phone adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .login-container {
        max-width: 400px;
        padding: 24px;
    }

    .login-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 12px;
    }

    .login-header {
        margin-bottom: 20px;
    }

    .login-form .form-group {
        margin-bottom: 16px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-muted {
    color: var(--gray-500);
}

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

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

/* ============================================
   EXAMINATION TABS & CARDS
   ============================================ */
.exam-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    background: var(--white);
    padding: 8px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.tab-btn {
    flex: 1;
    padding: 16px 24px;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
}

.tab-btn:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.tab-btn.active {
    background: var(--student-gradient);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.tab-btn i {
    font-size: 1rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Exam Cards Grid */
.exam-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.exam-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.exam-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.exam-card.active-exam {
    border-color: var(--success);
}

.exam-card.active-exam::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--success) 0%, #34d399 100%);
}

.exam-card.upcoming-exam {
    border-color: var(--warning);
}

.exam-card.upcoming-exam::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--warning) 0%, #fbbf24 100%);
}

.exam-card.past-exam {
    border-color: var(--gray-300);
    opacity: 0.8;
}

.exam-card.past-exam::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gray-300);
}

/* Exam Status Badge */
.exam-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.exam-status-badge.active {
    background: var(--success-bg);
    color: #047857;
}

.exam-status-badge.active i {
    color: var(--success);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.exam-status-badge.upcoming {
    background: var(--warning-bg);
    color: #b45309;
}

.exam-status-badge.past {
    background: var(--gray-200);
    color: var(--gray-600);
}

/* Exam Card Header */
.exam-card-header {
    margin-bottom: 16px;
}

.exam-card-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 10px;
    line-height: 1.3;
}

.exam-course-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
    color: var(--student-primary);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.exam-description {
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-100);
}

/* Exam Card Dates */
.exam-card-dates {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.date-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.date-item i {
    width: 20px;
    color: var(--student-primary);
}

.active-exam .date-item i:first-child {
    color: var(--success);
}

.active-exam .date-item:last-child i {
    color: var(--danger);
}

/* Button Block */
.btn-block {
    width: 100%;
}

.exam-card .btn-primary {
    padding: 14px 24px;
    font-size: 1rem;
}

.exam-card .btn-secondary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: var(--gray-200);
    color: var(--gray-500);
}

/* Buffer/Starting Soon Exam Cards */
.exam-card.buffer-exam {
    border-left: 4px solid #d97706;
}

.exam-status-badge.buffer {
    background: #fef3c7;
    color: #d97706;
}

/* ==========================================
   EXAM DETAIL PAGE
   ========================================== */

.exam-detail-card {
    background: white;
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.exam-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.exam-detail-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 8px 0;
}

.exam-detail-status {
    flex-shrink: 0;
}

.exam-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.exam-status-indicator.active {
    background: #dcfce7;
    color: #16a34a;
}

.exam-status-indicator.buffer {
    background: #fef3c7;
    color: #d97706;
}

.exam-status-indicator.upcoming {
    background: #dbeafe;
    color: #2563eb;
}

.exam-status-indicator.ended {
    background: #f3f4f6;
    color: #6b7280;
}

/* Countdown Timer */
.exam-countdown-section {
    text-align: center;
    padding: 28px 0;
    margin-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.countdown-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.countdown-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--student-primary, #0f766e);
    background: linear-gradient(135deg, #f0fdfa, #e0f2fe);
    padding: 12px 20px;
    border-radius: 12px;
    min-width: 80px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.countdown-unit-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    margin-top: 6px;
    letter-spacing: 0.5px;
}

.countdown-separator {
    font-size: 2rem;
    font-weight: 900;
    color: var(--gray-400);
    margin-bottom: 20px;
}

/* Exam Detail Times */
.exam-detail-times {
    display: flex;
    gap: 24px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
    flex-wrap: wrap;
}

.time-block {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
    min-width: 200px;
}

.time-block i {
    font-size: 1.2rem;
    color: var(--student-primary, #0f766e);
    margin-top: 2px;
}

.time-block strong {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.time-block span {
    font-size: 0.95rem;
    color: var(--gray-700);
}

/* Exam Detail Section */
.exam-detail-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.exam-detail-section-title i {
    color: var(--student-primary, #0f766e);
}

.exam-detail-text {
    color: var(--gray-600);
    line-height: 1.7;
    font-size: 0.95rem;
}

.instructions-text ul {
    color: var(--gray-600);
}

/* Exam Action Section */
.exam-detail-action {
    text-align: center;
    padding: 32px 0;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
}

.btn-start-exam {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: white;
    border: none;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.btn-start-exam:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 118, 110, 0.4);
}

.exam-action-note {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* ==========================================
   CONFLICT WARNING (Institution Form)
   ========================================== */

.conflict-warning {
    background: #fef2f2;
    border: 2px solid #fca5a5;
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 24px;
}

.conflict-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.conflict-header i {
    font-size: 1.3rem;
    color: #dc2626;
}

.conflict-header h3 {
    margin: 0;
    color: #dc2626;
    font-size: 1.1rem;
}

.conflict-warning > p {
    color: #7f1d1d;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.conflict-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.conflict-item {
    background: white;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 14px 18px;
}

.conflict-exam-name {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--gray-800);
}

.conflict-exam-name i {
    color: #dc2626;
}

.conflict-details {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--gray-600);
    flex-wrap: wrap;
}

.conflict-details i {
    margin-right: 4px;
}

.conflict-student-count {
    font-weight: 600;
    color: #dc2626;
}

.conflict-action-text {
    font-size: 0.85rem;
    color: #b91c1c;
    font-weight: 600;
    margin-bottom: 0;
}

/* Responsive Exam Cards */
@media (max-width: 768px) {
    .exam-tabs {
        flex-direction: column;
    }

    .tab-btn {
        padding: 14px 20px;
    }

    .exam-cards {
        grid-template-columns: 1fr;
    }

    .exam-card {
        padding: 24px;
    }

    .exam-detail-header {
        flex-direction: column;
    }

    .exam-detail-times {
        flex-direction: column;
        gap: 16px;
    }

    .countdown-value {
        font-size: 1.8rem;
        min-width: 60px;
        padding: 10px 14px;
    }

    .countdown-separator {
        font-size: 1.5rem;
    }

    .conflict-details {
        flex-direction: column;
        gap: 6px;
    }
}
