/* ============================================================
   ICUBE Info Solution - Unified Modern Dark Theme
   Matching Candidate Assessment Platform Landing Page
   ============================================================ */

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

/* ============== Design System Tokens ============== */
:root {
  /* Landing Theme Green Accents */
  --green: #22c55e;
  --green-dark: #16a34a;
  --green-dim: rgba(34, 197, 94, 0.15);
  --green-glow: rgba(34, 197, 94, 0.28);

  /* Primary Palette Aliases */
  --primary: #22c55e;
  --primary-light: #4ade80;
  --primary-dark: #16a34a;
  --primary-glow: rgba(34, 197, 94, 0.28);

  /* Complementary Accents */
  --accent: #22c55e;
  --accent-light: #86efac;
  --accent-dark: #15803d;

  /* Status Colors */
  --success: #22c55e;
  --success-light: rgba(34, 197, 94, 0.14);
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.14);
  --danger: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.14);
  --info: #38bdf8;
  --info-light: rgba(56, 189, 248, 0.14);

  /* Neutral Dark Surfaces */
  --bg: #0a0a0a;
  --bg-dark: #0a0a0a;
  --bg2: #0f0f0f;
  --bg-card: #141414;
  --bg-card-hover: #181818;
  --bg-input: rgba(255, 255, 255, 0.04);
  --bg-sidebar: #0f0f0f;

  /* Typography Colors */
  --text: #f1f5f9;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #8a9ab5;

  /* Borders & Dividers */
  --border: rgba(255, 255, 255, 0.07);
  --border-active: rgba(34, 197, 94, 0.4);
  --border-subtle: rgba(255, 255, 255, 0.04);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(34, 197, 94, 0.2);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 999px;

  /* Transitions */
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============== Reset & Base ============== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Background ambient glows matching landing page */
body::before {
  content: '';
  position: fixed;
  top: -260px;
  left: 25%;
  width: 850px;
  height: 650px;
  background: radial-gradient(ellipse, rgba(34, 197, 94, 0.08) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -220px;
  right: -5%;
  width: 550px;
  height: 550px;
  background: radial-gradient(ellipse, rgba(34, 197, 94, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--green);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-light);
}

/* ============== Common Brand Header ============== */
.brand {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-dot {
  width: 10px;
  height: 10px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--green);
  flex-shrink: 0;
}

.brand span {
  color: var(--green);
}

/* ============== Login & Auth Pages ============== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 30px 20px;
  z-index: 1;
}

.login-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 30% 25%, rgba(34, 197, 94, 0.09) 0%, transparent 55%),
    radial-gradient(circle at 75% 80%, rgba(34, 197, 94, 0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
}

.login-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 44px 36px;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  animation: slideUp 0.4s ease-out;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
}

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

.login-brand {
  text-align: center;
  margin-bottom: 28px;
}

.login-brand .logo-icon {
  width: 52px;
  height: 52px;
  background: var(--green-dim);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 24px;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

.login-brand h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.login-brand .company-name {
  font-size: 0.78rem;
  color: var(--green);
  margin-top: 4px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.login-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 26px;
  border: 1px solid var(--border);
}

.login-tab {
  flex: 1;
  padding: 9px 14px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-family: inherit;
  text-align: center;
}

.login-tab.active {
  background: var(--green);
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.3);
}

.login-tab:hover:not(.active) {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

/* ============== Form Elements ============== */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 7px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.92rem;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.form-input::placeholder {
  color: rgba(148, 163, 184, 0.4);
}

.form-select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.92rem;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a9ab5' d='M6 8.825L.35 3.175l.7-.7L6 7.425l4.95-4.95.7.7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.form-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.form-select option {
  background: #181818;
  color: var(--text);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  cursor: pointer;
}

.form-check label {
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.input-group {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

.input-group .form-input {
  padding-left: 42px;
}

/* ============== Buttons ============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.btn-primary,
.btn-green {
  background: var(--green);
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.25);
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.btn-primary:hover,
.btn-green:hover {
  background: var(--green-dark);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(34, 197, 94, 0.45);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
}

.btn-outline:hover {
  border-color: rgba(34, 197, 94, 0.4);
  background: var(--green-dim);
  color: #fff;
  transform: translateY(-2px);
}

.btn-success {
  background: var(--green);
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.25);
}

.btn-success:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.4);
}

.btn-danger {
  background: var(--danger-light);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-weight: 600;
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.btn-warning {
  background: var(--warning-light);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  font-weight: 600;
}

.btn-warning:hover {
  background: var(--warning);
  color: #000;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.78rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 14px 30px;
  font-size: 0.98rem;
}

.btn-full {
  width: 100%;
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

/* ============== Alerts ============== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown 0.25s ease-out;
  border: 1px solid transparent;
}

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

.alert-success {
  background: var(--green-dim);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.3);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.25);
}

.alert-warning {
  background: var(--warning-light);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.25);
}

.alert-info {
  background: var(--info-light);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.25);
}

/* ============== Dashboard Layout ============== */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Profile header bar */
.profile-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 90;
}

.profile-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.profile-link:hover {
  background: var(--green-dim);
  border-color: rgba(34, 197, 94, 0.3);
  color: #fff;
}

.profile-icon {
  width: 28px;
  height: 28px;
  background: var(--green);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.8rem;
}

/* ============== Sidebar Component ============== */
.sidebar {
  width: 270px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  overflow-y: auto;
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-brand .brand {
  font-size: 1.15rem;
}

.portal-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-dim);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.sidebar-brand-text h2 {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.sidebar-brand-text span {
  font-size: 0.72rem;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.sidebar-brand .logo-sm {
  width: 36px;
  height: 36px;
  background: var(--green-dim);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
}

.nav-section {
  margin-bottom: 22px;
}

.nav-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0 12px;
  margin-bottom: 8px;
  opacity: 0.7;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 3px;
  border-left: 3px solid transparent;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.nav-link.active {
  background: var(--green-dim);
  color: var(--green);
  font-weight: 700;
  border-left-color: var(--green);
}

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

.sidebar-footer {
  padding: 16px 14px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
  color: #000;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.user-details .user-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.user-details .user-role {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Main Content Wrapper */
.main-content {
  margin-left: 270px;
  flex: 1;
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.page-header {
  padding: 24px 36px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.page-header h1 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.page-header p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.page-header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.page-body {
  padding: 30px 36px;
}

/* ============== Stat Cards ============== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 197, 94, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 14px;
}

.stat-card .stat-icon.green,
.stat-card .stat-icon.purple {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.stat-card .stat-icon.blue {
  background: var(--info-light);
  color: var(--info);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.stat-card .stat-icon.orange {
  background: var(--warning-light);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============== Cards & Tables ============== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.card-body {
  padding: 22px;
}

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

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

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(34, 197, 94, 0.02);
}

/* ============== Badges ============== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge-success,
.badge-active {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-danger {
  background: var(--danger-light);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-warning {
  background: var(--warning-light);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-info {
  background: var(--info-light);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-primary {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

/* ============== Test Card ============== */
.test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.test-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.test-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-color: rgba(34, 197, 94, 0.35);
}

.test-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.test-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

.test-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.test-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.03);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.test-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: auto;
}

/* ============== Question Card ============== */
.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 16px;
  transition: var(--transition);
}

.question-card:hover {
  border-color: rgba(34, 197, 94, 0.25);
}

.question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--green);
  color: #000;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 800;
  margin-right: 10px;
  flex-shrink: 0;
}

.question-text {
  font-size: 0.96rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 14px;
  line-height: 1.5;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.option-item {
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.option-item:hover {
  border-color: rgba(34, 197, 94, 0.35);
  background: var(--green-dim);
  color: #fff;
}

.option-item.correct {
  border-color: var(--green);
  background: var(--green-dim);
  color: var(--green);
}

.option-item.selected {
  border-color: var(--green);
  background: var(--green-dim);
  color: #fff;
}

.option-item.wrong {
  border-color: var(--danger);
  background: var(--danger-light);
  color: #fca5a5;
}

.option-label {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.74rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.option-item:hover .option-label,
.option-item.selected .option-label {
  border-color: var(--green);
  background: var(--green);
  color: #000;
}

.option-item.correct .option-label {
  border-color: var(--green);
  background: var(--green);
  color: #000;
}

.option-item.wrong .option-label {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

/* MCQ Options (Radio) */
.mcq-option {
  display: none;
}

.mcq-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.mcq-label:hover {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.06);
}

.mcq-option:checked + .mcq-label {
  border-color: var(--green);
  background: var(--green-dim);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.mcq-marker {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--green);
  flex-shrink: 0;
  transition: var(--transition);
}

.mcq-option:checked + .mcq-label .mcq-marker {
  border-color: var(--green);
  background: var(--green);
  color: #000;
}

/* ============== Test Taking Bar ============== */
.test-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(16px);
}

.test-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  border: 1px solid var(--border);
}

.test-timer.warning {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.1);
  animation: pulse 1s infinite;
}

.test-timer.danger {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
  animation: pulse 0.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.test-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.progress-bar {
  width: 140px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), #16a34a);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* ============== Result Styles ============== */
.result-summary {
  text-align: center;
  padding: 40px 24px;
}

.result-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 3px solid var(--border);
}

.result-circle.passed {
  border-color: var(--green);
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.2);
}

.result-circle.failed {
  border-color: var(--danger);
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.2);
}

.result-percentage {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
}

.result-circle.passed .result-percentage {
  color: var(--green);
}

.result-circle.failed .result-percentage {
  color: var(--danger);
}

.result-status {
  font-size: 1.15rem;
  font-weight: 800;
  margin-top: 14px;
}

.result-stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 24px;
  flex-wrap: wrap;
}

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

.result-stat .value {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
}

.result-stat .label {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============== Upload Section ============== */
.upload-zone {
  border: 2px dashed rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-lg);
  padding: 42px 24px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  background: rgba(34, 197, 94, 0.02);
}

.upload-zone:hover {
  border-color: var(--green);
  background: var(--green-dim);
}

.upload-zone .upload-icon {
  font-size: 2.6rem;
  margin-bottom: 12px;
  display: block;
}

.upload-zone h4 {
  font-size: 0.98rem;
  color: #fff;
  margin-bottom: 6px;
}

.upload-zone p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.upload-zone input[type="file"] {
  display: none;
}

/* ============== Empty State ============== */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 14px;
  display: block;
  opacity: 0.7;
}

.empty-state h3 {
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.86rem;
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ============== Modal ============== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.96);
  transition: var(--transition);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

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

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--danger);
}

.modal-body {
  padding: 22px 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ============== Form Row & Layout Helpers ============== */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 20px;
}

/* Student selection list */
.student-list {
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
}

.student-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}

.student-list-item:last-child {
  border-bottom: none;
}

.student-list-item:hover {
  background: rgba(34, 197, 94, 0.04);
}

.student-list-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
  cursor: pointer;
}

.student-list-item .student-info {
  flex: 1;
}

.student-list-item .student-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: #fff;
}

.student-list-item .student-email {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.student-list-item .student-course {
  font-size: 0.74rem;
  color: var(--green);
  font-weight: 600;
}

/* Mobile Toggle */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green);
  color: #000;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
  transition: var(--transition);
}

.sidebar-toggle:hover {
  transform: scale(1.08);
  background: var(--green-dark);
}

/* ============== Responsive ============== */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.7);
  }

  .main-content {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .page-body {
    padding: 22px 18px;
  }

  .page-header {
    padding: 18px;
  }

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

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

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

  .test-header {
    flex-direction: column;
    gap: 12px;
    padding: 14px 18px;
  }
}

@media (max-width: 640px) {
  .login-card {
    padding: 30px 20px;
  }

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

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

  .result-stats {
    gap: 18px;
  }

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

/* ============== Custom Scrollbar ============== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 197, 94, 0.4);
}

/* ============== Animations ============== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

.scale-in {
  animation: scaleIn 0.3s ease-out;
}
