/* Modern, Clean & Minimalist Responsive Design System */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-subtle: #eff6ff;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-text: #065f46;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --warning-text: #92400e;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --danger-text: #991b1b;
  --purple: #8b5cf6;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 40;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.brand-badge {
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: white;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background-color: var(--primary-subtle);
}

.nav-link.active {
  font-weight: 600;
}

.nav-toggle {
  display: none;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  width: 38px;
  height: 38px;
  cursor: pointer;
  color: var(--text-main);
  font-size: 1.25rem;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  user-select: none;
}

.nav-toggle:hover {
  background: var(--primary-subtle);
  color: var(--primary);
  border-color: #93c5fd;
}

/* Main Layout */
.main-wrapper {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem 1.5rem;
}

/* Page Header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.page-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  line-height: 1.25;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  background-color: var(--bg-subtle);
  border-color: var(--text-subtle);
}

.btn-ai {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  border: none;
}
.btn-ai:hover {
  filter: brightness(1.08);
}

.btn-success {
  background-color: var(--success);
  color: #ffffff;
}
.btn-success:hover {
  background-color: #059669;
}

.btn-danger {
  background-color: var(--danger);
  color: #ffffff;
}
.btn-danger:hover {
  background-color: #dc2626;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 0.75rem 1.4rem;
  font-size: 1rem;
  font-weight: 600;
}

/* Flash Alerts */
.alert {
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.alert-success {
  background-color: var(--success-bg);
  color: var(--success-text);
  border: 1px solid #a7f3d0;
}
.alert-error {
  background-color: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid #fecaca;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

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

.stat-icon.blue { background-color: #eff6ff; color: #2563eb; }
.stat-icon.green { background-color: #ecfdf5; color: #10b981; }
.stat-icon.purple { background-color: #f5f3ff; color: #8b5cf6; }
.stat-icon.orange { background-color: #fffbeb; color: #f59e0b; }

.stat-num {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-main);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Cards & Containers */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #fafbfc;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
}

.card-body {
  padding: 1.25rem;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.table th {
  padding: 0.75rem 1rem;
  background-color: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-color);
}

.table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

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

.table tr:hover td {
  background-color: #fbfcfe;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  line-height: 1;
}

.badge-success { background-color: var(--success-bg); color: var(--success-text); }
.badge-warning { background-color: var(--warning-bg); color: var(--warning-text); }
.badge-danger { background-color: var(--danger-bg); color: var(--danger-text); }
.badge-primary { background-color: var(--primary-subtle); color: var(--primary); }
.badge-purple { background-color: #f5f3ff; color: #7c3aed; }
.badge-neutral { background-color: var(--bg-subtle); color: var(--text-muted); }

/* Form Elements */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text-main);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

.form-help {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* Option inputs dynamic builder */
.options-builder {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.option-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.option-letter {
  width: 34px;
  height: 34px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.option-correct-radio {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-dialog {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-dialog form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

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

.modal-header {
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background-color: #fafbfc;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Upload dropzone */
.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  text-align: center;
  background-color: #fafbfc;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background-color: var(--primary-subtle);
}

.dropzone-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

/* Test Taking Interface */
.test-hero {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.test-hero-compact {
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}

.test-hero-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.test-hero-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.test-hero-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.timer-box {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.timer-box-compact {
  padding: 0.35rem 0.75rem;
  font-size: 0.95rem;
}

/* Test Intro Chips Grid (Sleek, Compact, No Giant Stacked Boxes) */
.test-intro-badges-grid {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.test-intro-chip {
  flex: 1 1 calc(33.333% - 0.75rem);
  min-width: 130px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.intro-chip-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.intro-chip-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.intro-chip-lbl {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.timer-box.urgent {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: #fecaca;
  animation: pulse 1s infinite;
}

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

.question-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

/* Question Slides for Step-by-Step Test Taking */
.question-slide {
  display: none;
}

.question-slide.active {
  display: block;
  animation: fadeInQuestion 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Split layout: Left Media (Square), Right Stem, Bottom Choices */
.question-split-grid, .result-split-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.25rem;
}

.question-media-col, .result-media-col {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.question-square-img, .result-square-img {
  width: 100%;
  max-width: 280px;
  max-height: 280px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.question-square-img:hover, .result-square-img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.question-stem-col, .result-stem-col {
  flex: 1;
  min-width: 0;
}

.question-num {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}

.question-stem {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.question-stem strong, .question-stem b {
  font-weight: 700;
  color: #0f172a;
}

.question-image {
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
  background-color: #ffffff;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

/* Question Action & Navigation Bar */
.question-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

/* Mobile Sticky Bottom Bar */
.mobile-sticky-bar {
  display: none;
}

.option-choice {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.15rem;
  background-color: #fafbfc;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.option-choice:hover {
  background-color: var(--primary-subtle);
  border-color: #93c5fd;
}

.option-choice input[type="radio"] {
  display: none;
}

.option-choice.selected {
  background-color: #eff6ff;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.option-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.option-choice.selected .option-badge {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.option-text {
  font-size: 0.98rem;
  color: var(--text-main);
  line-height: 1.4;
}

/* Result breakdown */
.option-choice.correct-answer {
  background-color: var(--success-bg) !important;
  border-color: var(--success) !important;
}

.option-choice.correct-answer .option-badge {
  background-color: var(--success) !important;
  color: white !important;
  border-color: var(--success) !important;
}

.option-choice.wrong-answer {
  background-color: var(--danger-bg) !important;
  border-color: var(--danger) !important;
}

.option-choice.wrong-answer .option-badge {
  background-color: var(--danger) !important;
  color: white !important;
  border-color: var(--danger) !important;
}

/* Question Palette Navigation */
.palette-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.palette-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
}

.palette-btn.answered {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Footer */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

.spinner-dark {
  border-color: rgba(0,0,0,0.15);
  border-top-color: var(--primary);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  /* Prevent any horizontal screen overflow */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  .nav-container {
    padding: 0.65rem 1rem !important;
    position: relative !important;
  }

  /* Show toggle button on mobile */
  .nav-toggle {
    display: flex !important;
  }

  /* Collapse nav links into vertical dropdown */
  .nav-links {
    display: none !important;
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.25rem !important;
    padding: 0.75rem 0 0.25rem 0 !important;
    margin-top: 0.5rem !important;
    border-top: 1px solid var(--border-color) !important;
    background: var(--bg-surface) !important;
  }

  .nav-links.open {
    display: flex !important;
    animation: fadeInDropdown 0.2s ease !important;
  }

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

  .nav-link {
    display: flex !important;
    align-items: center !important;
    padding: 0.6rem 0.85rem !important;
    border-radius: var(--radius-sm) !important;
    font-size: 0.92rem !important;
  }

  .main-wrapper {
    padding: 0.75rem 0.65rem !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  .page-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }

  .header-actions {
    width: 100% !important;
  }

  .header-actions .btn {
    flex: 1 !important;
  }

  /* Hide bulky test-hero on mobile to save vertical space */
  .test-hero {
    display: none !important;
  }

  /* Compact student name card on mobile */
  .student-name-card {
    margin-bottom: 0.65rem !important;
    border-radius: var(--radius-sm) !important;
  }

  .student-name-card-body {
    padding: 0.5rem 0.75rem !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }

  .student-name-card-body label {
    font-size: 0.82rem !important;
    margin-bottom: 0 !important;
    white-space: nowrap !important;
  }

  .student-name-subtext {
    display: none !important;
  }

  .student-name-card-body input {
    padding: 0.35rem 0.6rem !important;
    font-size: 0.85rem !important;
    height: 32px !important;
  }

  /* Split layout on mobile: stack image on top, stem below */
  .question-split-grid, .result-split-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
    margin-bottom: 0.65rem !important;
  }

  .question-card {
    padding: 0.85rem !important;
    margin-bottom: 0.75rem !important;
  }

  .question-num {
    margin-bottom: 0.45rem !important;
    padding-bottom: 0.35rem !important;
    font-size: 0.8rem !important;
  }

  .question-square-img, .result-square-img {
    max-width: 140px !important;
    max-height: 140px !important;
    margin: 0 auto;
    display: block;
  }

  .question-stem {
    font-size: 0.94rem !important;
    line-height: 1.45 !important;
    margin-bottom: 0.5rem !important;
  }

  .options-list {
    gap: 0.45rem !important;
    margin-top: 0.35rem !important;
  }

  .option-choice {
    padding: 0.55rem 0.75rem !important;
    gap: 0.65rem !important;
  }

  .option-text {
    font-size: 0.88rem !important;
    line-height: 1.35 !important;
  }

  .option-badge {
    width: 26px !important;
    height: 26px !important;
    font-size: 0.78rem !important;
  }

  /* Hide desktop-only elements on mobile */
  .desktop-question-nav {
    display: none !important;
  }

  .desktop-nav-buttons {
    display: none !important;
  }

  .question-nav-bar {
    display: none !important;
  }

  /* Layout grid becomes single column */
  .test-taker-layout-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  /* Sticky Bottom Bar for Mobile: ALWAYS Visible */
  body.has-test-taker {
    padding-bottom: 85px !important;
  }

  .mobile-sticky-bar {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    z-index: 1000 !important;
    background: #ffffff !important;
    border-top: 1.5px solid var(--border-color) !important;
    padding: 0.55rem 0.85rem !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12) !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
  }

  .mobile-sticky-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #92400e;
    background: #fef3c7;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px solid #fde68a;
    line-height: 1.1;
  }

  .mobile-sticky-timer .mobile-q-info {
    font-size: 0.72rem;
    color: #b45309;
    font-weight: 600;
    margin-top: 0.15rem;
  }
}

/* ==========================================================================
   ÖĞRENCİ PORTALI SEKME (TAB), KART VE DASHBOARD STİLLERİ
   ========================================================================== */

.student-dashboard-header {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem 1.25rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.04);
}

.student-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.student-welcome-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.student-header-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.student-header-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.5;
  max-width: 650px;
}

.dot-sep {
  margin: 0 0.5rem;
  opacity: 0.4;
}

/* Mini Stats Chips */
.student-stats-chips {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  border-radius: 14px;
  min-width: 90px;
  border: 1px solid transparent;
  transition: transform 0.2s;
}

.stat-chip:hover {
  transform: translateY(-2px);
}

.chip-num {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.chip-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.25rem;
}

.chip-active {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.chip-upcoming {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.chip-completed {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}

.chip-score {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

/* Tab Navigation */
.student-tabs-nav {
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid #f1f5f9;
  padding-top: 1.25rem;
  flex-wrap: wrap;
}

.student-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.student-tab-btn:hover {
  background: #ffffff;
  color: var(--text-main);
  border-color: #cbd5e1;
}

.student-tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.tab-badge {
  background: rgba(0, 0, 0, 0.08);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
}

.student-tab-btn.active .tab-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.tab-badge.badge-muted {
  opacity: 0.8;
}

/* Tab Panes */
.student-tab-pane {
  display: none;
}

.student-tab-pane.active {
  display: block;
  animation: fadeInPane 0.25s ease-out;
}

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

/* Sınav Kartları Grid */
.student-tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.student-card-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  position: relative;
}

.student-card-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px -5px rgba(0, 0, 0, 0.08);
}

.card-live {
  border-top: 4px solid #10b981;
}

.card-live:hover {
  border-color: #10b981;
}

.card-upcoming {
  border-top: 4px solid #f59e0b;
}

.card-completed {
  border-top: 4px solid #8b5cf6;
}

.card-expired {
  border-top: 4px solid #94a3b8;
  opacity: 0.88;
}

.card-item-top {
  padding: 1.25rem 1.5rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.live-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  animation: pulseGreen 1.5s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.upcoming-status-badge {
  background: #fffbeb;
  color: #b45309;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

.completed-badge {
  background: #f5f3ff;
  color: #6d28d9;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

.expired-status-badge {
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

.card-duration-tag {
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  background: #f8fafc;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  border: 1px solid #f1f5f9;
}

.submitted-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.card-item-body {
  padding: 0.75rem 1.5rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-item-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.45rem;
  line-height: 1.35;
}

.text-muted-title {
  color: #64748b;
}

.card-item-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1.15rem;
  flex: 1;
}

.text-placeholder {
  font-style: italic;
  opacity: 0.6;
}

/* Hap Bilgi Kutusu */
.card-info-box {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-label {
  color: var(--text-muted);
}

.info-val {
  color: var(--text-main);
}

/* Puan Kartı (Tamamlananlar) */
.score-summary-card {
  border-radius: 14px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.score-high {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.score-mid {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.score-low {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fed7aa;
  color: #9a3412;
}

.score-main {
  display: flex;
  flex-direction: column;
}

.score-number {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
}

.score-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  opacity: 0.85;
  margin-top: 0.2rem;
}

.score-details {
  font-size: 0.82rem;
  text-align: right;
  line-height: 1.4;
}

/* Butonlar */
.card-item-footer {
  padding: 1rem 1.5rem 1.35rem;
  border-top: 1px solid #f8fafc;
}

.btn-start-action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  padding: 0.85rem;
  border-radius: 12px;
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.2s ease;
}

.btn-start-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.btn-result-action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
  padding: 0.8rem;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-result-action:hover {
  background: #ede9fe;
  color: #6d28d9;
  transform: translateY(-1px);
}

.btn-disabled-action {
  width: 100%;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: not-allowed;
}

.action-arrow {
  font-size: 1.1rem;
  transition: transform 0.2s;
}

.btn-start-action:hover .action-arrow,
.btn-result-action:hover .action-arrow {
  transform: translateX(4px);
}

/* Empty State */
.student-empty-card {
  padding: 4rem 2rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.empty-icon-box {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.empty-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

.empty-desc {
  max-width: 500px;
  margin: 0 auto;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}


/* ==========================================================================
   MODERN ADMIN LAYOUT, SIDEBAR & DASHBOARD TOOLS GRID STYLES
   ========================================================================== */

/* Admin Body & Base Layout */
.admin-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: #f8fafc;
  color: #0f172a;
  font-family: var(--font-sans);
  overflow-x: hidden;
}

.admin-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

/* Admin Sidebar */
.admin-sidebar {
  width: 270px;
  background-color: #0f172a;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid #1e293b;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.25s ease-in-out;
}

.admin-sidebar-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1e293b;
  background: rgba(15, 23, 42, 0.95);
}

.admin-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-badge-admin {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  color: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.brand-name {
  color: #f8fafc;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-tag {
  color: #60a5fa;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sidebar-close-btn {
  display: none;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
}

.admin-sidebar-content {
  flex: 1;
  padding: 1.25rem 0.85rem;
  overflow-y: auto;
}

.sidebar-section-label {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.9rem 0.75rem 0.4rem;
}

.admin-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  color: #94a3b8;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

.admin-nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(2px);
}

.admin-nav-item.active {
  color: #ffffff;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.nav-icon {
  font-size: 1.15rem;
  line-height: 1;
  display: inline-flex;
}

.admin-sidebar-footer {
  padding: 1.15rem 1rem;
  border-top: 1px solid #1e293b;
  background: rgba(15, 23, 42, 0.85);
}

.admin-user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.admin-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1e293b;
  border: 1.5px solid #3b82f6;
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
}

.admin-user-info {
  line-height: 1.25;
}

.admin-user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f8fafc;
}

.admin-user-role {
  font-size: 0.75rem;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.status-dot-online {
  width: 7px;
  height: 7px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
}

.sidebar-quick-links {
  display: flex;
  gap: 0.5rem;
}

.sidebar-btn-view, .sidebar-btn-logout {
  flex: 1;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: all 0.15s;
}

.sidebar-btn-view {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.sidebar-btn-view:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.sidebar-btn-logout {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.sidebar-btn-logout:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ffffff;
}

/* Main Content Area */
.admin-main-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: #f8fafc;
}

.admin-topbar {
  height: 64px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sidebar-toggle-btn {
  display: none;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 1.15rem;
  cursor: pointer;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.topbar-breadcrumb {
  color: var(--text-muted);
  font-weight: 500;
}

.topbar-sep {
  color: var(--border-color);
}

.topbar-current {
  color: var(--text-main);
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-badge-time {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.admin-content {
  flex: 1;
  padding: 2rem 2.25rem 3.5rem;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.admin-flash-alert {
  margin-bottom: 1.5rem;
}

/* Dashboard: Welcome Section */
.admin-welcome-section {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.admin-welcome-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary), var(--purple));
}

.admin-welcome-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.admin-welcome-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.admin-welcome-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  max-width: 650px;
  line-height: 1.5;
}

.admin-welcome-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-shadow {
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* KPI Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.25rem;
}

.kpi-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.kpi-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.kpi-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.kpi-icon-wrap.blue { background: #eff6ff; color: #2563eb; }
.kpi-icon-wrap.purple { background: #f5f3ff; color: #7c3aed; }
.kpi-icon-wrap.emerald { background: #ecfdf5; color: #059669; }
.kpi-icon-wrap.amber { background: #fffbeb; color: #d97706; }
.kpi-icon-wrap.rose { background: #fff1f2; color: #e11d48; }

.kpi-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.65rem;
}

.kpi-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid #f1f5f9;
  padding-top: 0.65rem;
  margin-top: auto;
}

.kpi-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.kpi-link:hover {
  text-decoration: underline;
}

.kpi-live-dot {
  color: #10b981;
  font-weight: 700;
  font-size: 0.78rem;
}

/* Dashboard Section Title */
.section-title-wrap {
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Dashboard Tools Grid */
.admin-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.tool-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: #3b82f6;
  box-shadow: 0 12px 28px -5px rgba(37, 99, 235, 0.12), 0 0 0 1px #3b82f6;
}

.tool-card-ai {
  border: 1px solid #e9d5ff;
  background: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%);
}

.tool-card-ai:hover {
  border-color: #8b5cf6;
  box-shadow: 0 12px 28px -5px rgba(139, 92, 246, 0.18), 0 0 0 1px #8b5cf6;
}

.tool-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
}

.tool-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.bg-blue { background: #eff6ff; color: #2563eb; }
.bg-purple { background: #f5f3ff; color: #7c3aed; }
.bg-emerald { background: #ecfdf5; color: #059669; }
.bg-amber { background: #fffbeb; color: #d97706; }
.bg-indigo { background: #e0e7ff; color: #4338ca; }
.bg-cyan { background: #ecfeff; color: #0891b2; }
.bg-violet { background: #ede9fe; color: #6d28d9; }
.bg-teal { background: #f0fdf4; color: #0d9488; }
.bg-slate { background: #f1f5f9; color: #475569; }

.tool-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.badge-blue { background: #eff6ff; color: #1d4ed8; }
.badge-ai { background: linear-gradient(135deg, #7c3aed, #ec4899); color: #ffffff; }
.badge-emerald { background: #ecfdf5; color: #047857; }
.badge-amber { background: #fffbeb; color: #b45309; }
.badge-indigo { background: #e0e7ff; color: #3730a3; }
.badge-cyan { background: #ecfeff; color: #0e7490; }
.badge-violet { background: #ede9fe; color: #5b21b6; }
.badge-teal { background: #f0fdf4; color: #0f766e; }
.badge-slate { background: #f1f5f9; color: #334155; }

.tool-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.45rem;
  line-height: 1.3;
}

.tool-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1.25rem;
  flex: 1;
}

.tool-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  border-top: 1px solid var(--border-color);
  padding-top: 0.85rem;
  transition: all 0.2s;
}

.tool-card:hover .tool-card-action {
  color: #1d4ed8;
}

.tool-card:hover .tool-arrow {
  transform: translateX(4px);
}

.tool-arrow {
  transition: transform 0.2s ease;
  font-size: 1rem;
}

.ai-action {
  color: #7c3aed;
}

/* Dashboard Table Card */
.dashboard-table-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.dashboard-table-header {
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
}

.dashboard-table-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.dashboard-table-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.modern-table th {
  background-color: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1.25rem;
}

.modern-table td {
  padding: 1rem 1.25rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}

.empty-state-box {
  padding: 3.5rem 2rem;
  text-align: center;
  color: var(--text-muted);
}

.empty-state-box h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

/* ==========================================================================
   ÖĞRENCİ PORTALI & TEMİZ NAVBAR STİLLERİ
   ========================================================================== */

.student-portal-body {
  background-color: #f8fafc;
}

/* Navbar: Menü linkleri yok, tamamen temiz */
.navbar-clean {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.nav-user-area {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.student-user-badge {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  color: #1d4ed8;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.student-class {
  opacity: 0.85;
  font-size: 0.78rem;
  font-weight: 500;
}

.btn-student-logout {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-student-logout:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

/* Öğrenci Giriş Sayfası Wrapper */
.student-login-wrapper {
  max-width: 480px;
  margin: 3.5rem auto 4rem;
  padding: 0 1rem;
}

.student-login-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
  padding: 2.75rem 2.25rem;
  border-top: 4px solid var(--primary);
}

.student-login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.student-login-badge {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: var(--primary);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.15rem;
  box-shadow: 0 8px 16px -4px rgba(37, 99, 235, 0.2);
}

.student-login-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
}

.student-login-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.input-icon-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  opacity: 0.6;
}

.student-submit-btn {
  width: 100%;
  padding: 0.85rem;
  font-size: 1.02rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.demo-students-box {
  margin-top: 1.85rem;
  padding-top: 1.35rem;
  border-top: 1px dashed var(--border-color);
}

.demo-students-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  text-align: center;
}

.demo-students-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.demo-student-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
  text-align: left;
}

.demo-student-item:hover {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
  transform: translateY(-1px);
}

.demo-student-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.demo-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-main);
}

.demo-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.demo-pass-badge {
  font-family: monospace;
  font-size: 0.78rem;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  color: var(--primary);
}

.admin-entry-link-wrapper {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-entry-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.admin-entry-link:hover {
  text-decoration: underline;
}

/* Öğrenci Sınavlar Karşılama Banner'ı */
.student-welcome-banner {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  border-left: 4px solid var(--primary);
}

.welcome-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.welcome-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.45;
}

/* Sınavlar Modern Grid & Kartlar */
.tests-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.35rem;
}

.test-card-modern {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.test-card-modern:hover {
  transform: translateY(-4px);
  border-color: #93c5fd;
  box-shadow: 0 12px 24px -5px rgba(37, 99, 235, 0.1);
}

.test-card-header {
  padding: 1.25rem 1.5rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.test-duration-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
}

.test-card-body {
  padding: 0.75rem 1.5rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.test-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.45rem;
  line-height: 1.3;
}

.test-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1.25rem;
  flex: 1;
}

.test-meta-box {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.test-meta-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.test-meta-row strong {
  color: var(--text-main);
}

.test-card-footer {
  padding: 1rem 1.5rem 1.35rem;
  border-top: 1px solid #f8fafc;
}

.test-start-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  padding: 0.75rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-block {
  width: 100%;
}

.empty-tests-card {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.empty-tests-body {
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-muted);
}

.empty-tests-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.empty-tests-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

.empty-tests-desc {
  max-width: 500px;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Responsive Düzenlemeler */
@media (max-width: 992px) {
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.3);
  }

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

  .sidebar-close-btn {
    display: block;
  }

  .sidebar-toggle-btn {
    display: inline-flex;
  }

  .admin-topbar {
    padding: 0 1rem;
  }

  .admin-content {
    padding: 1.25rem 1rem 2.5rem;
  }

  .admin-welcome-section {
    padding: 1.5rem;
  }

  .admin-tools-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile specific improvements for student test taker & intro screens */
@media (max-width: 640px) {
  .test-hero-compact {
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.75rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .test-hero-title {
    font-size: 1.05rem;
  }

  .test-hero-meta {
    font-size: 0.78rem;
  }

  .timer-box-compact {
    padding: 0.3rem 0.65rem;
    font-size: 0.9rem;
  }

  .test-intro-badges-grid {
    gap: 0.5rem;
  }

  .test-intro-chip {
    flex: 1 1 100%;
    padding: 0.6rem 0.85rem;
  }

  .question-card {
    padding: 1rem;
    margin-bottom: 0.75rem;
  }

  .question-stem {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .choice-item {
    padding: 0.65rem 0.85rem;
  }

  .choice-letter {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }

  .choice-text {
    font-size: 0.92rem;
  }
}

/* ==========================================================================
   STUDENT MOBILE DRAWER & RESPONSIVE VISIBILITY STYLES
   ========================================================================== */

.mobile-only {
  display: none !important;
}

.desktop-only {
  display: inline-flex !important;
}

@media (max-width: 640px) {
  .mobile-only {
    display: inline-flex !important;
  }
  .desktop-only {
    display: none !important;
  }
}

/* Student Drawer Toggle Button in Navbar */
.student-drawer-toggle-btn {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.student-drawer-toggle-btn:hover,
.student-drawer-toggle-btn:active {
  background: #e2e8f0;
  color: var(--primary);
  transform: scale(0.96);
}

/* Backdrop Overlay */
.student-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999998 !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.student-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Side Drawer Container */
.student-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 86vw;
  background: #ffffff;
  z-index: 999999 !important;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.22);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.student-drawer.active {
  transform: translateX(0);
}

/* Drawer Header */
.student-drawer-header {
  padding: 1.25rem 1.15rem;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.drawer-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.drawer-user-details {
  min-width: 0;
}

.drawer-user-name {
  font-size: 1rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-user-meta {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-top: 0.2rem;
  line-height: 1.2;
}

.drawer-user-meta strong {
  color: #cbd5e1;
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #cbd5e1;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.drawer-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Drawer Body */
.student-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1rem;
  -webkit-overflow-scrolling: touch;
}

.drawer-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e293b;
}

.drawer-q-stats {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* Drawer Question Palette Grid */
.drawer-palette-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.drawer-q-btn {
  height: 42px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.drawer-q-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: translateY(-1px);
}

/* Boş (Yapılmayan) soru durumu */
.drawer-q-btn.unmade {
  background: #f8fafc;
  color: #64748b;
  border-color: #cbd5e1;
}

/* Yapılan (Cevaplanan) soru durumu */
.drawer-q-btn.answered {
  background: #ecfdf5 !important;
  color: #065f46 !important;
  border-color: #10b981 !important;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.15);
}

.drawer-q-btn.answered::after {
  content: "✓";
  position: absolute;
  top: 1px;
  right: 3px;
  font-size: 0.62rem;
  font-weight: 900;
  color: #059669;
}

/* Aktif (O anda ekrandaki) soru */
.drawer-q-btn.active {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25) !important;
}

/* Soru Durum Renk Lejantı */
.drawer-legend {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.85rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  font-size: 0.78rem;
  color: #475569;
}

.drawer-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
}

.drawer-legend .legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
  flex-shrink: 0;
}

.drawer-legend .legend-dot.answered {
  background: #10b981;
  border: 1px solid #059669;
}

.drawer-legend .legend-dot.unmade {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
}

.drawer-legend .legend-dot.active {
  background: #ffffff;
  border: 2px solid #2563eb;
}

/* Default links (sınavda değilken) */
.drawer-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.2s;
}

.drawer-nav-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--primary);
}

/* Drawer Footer & Action Buttons */
.student-drawer-footer {
  padding: 1rem 1.15rem max(1.25rem, env(safe-area-inset-bottom, 1.25rem));
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.btn-drawer-finish-test {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 1px solid #059669;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-drawer-finish-test:hover,
.btn-drawer-finish-test:active {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

.btn-drawer-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #fee2e2;
  color: #991b1b;
  border: 1.5px solid #fca5a5;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.12);
}

.btn-drawer-logout:hover,
.btn-drawer-logout:active {
  background: #fecaca;
  color: #7f1d1d;
  border-color: #f87171;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}

/* ==========================================================================
   QUESTION TABLES & RICH HTML FORMATTING STYLES
   ========================================================================== */

.q-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 0.85rem 0 1rem;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.q-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-main);
  background: #ffffff;
}

.q-table th {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
  padding: 0.65rem 0.9rem;
  border-bottom: 2px solid #cbd5e1;
  border-right: 1px solid #e2e8f0;
  text-align: inherit;
}

.q-table th:last-child {
  border-right: none;
}

.q-table td {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #f1f5f9;
  vertical-align: middle;
}

.q-table td:last-child {
  border-right: none;
}

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

.q-table tr:nth-child(even) td {
  background: #f8fafc;
}

.q-table tr:hover td {
  background: #f1f5f9;
}

/* Option images & rich media in choices */
.q-option-img,
.choice-item img,
.option-row img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  display: block;
  margin: 0.35rem 0;
}

/* Question Visuals & Real Graphics */
.question-image-box {
  margin: 0.75rem 0 1.25rem;
  text-align: center;
  border-radius: 12px;
  background: #f8fafc;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
}

.question-image-box img {
  max-width: 100%;
  max-height: 420px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  object-fit: contain;
}

/* Rich HTML Toolbar for Question Editor */
.q-html-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-bottom: none;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  padding: 0.45rem 0.65rem;
}

.q-toolbar-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.28rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s;
  user-select: none;
}

.q-toolbar-btn:active {
  transform: translateY(1px);
}

.q-toolbar-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
}

.q-toolbar-sep {
  width: 1px;
  height: 20px;
  background: #cbd5e1;
  margin: 0 0.2rem;
}

/* ==========================================================================
   Responsive Visibility Rules & Student Drawer
   ========================================================================== */

/* By default on desktop, strictly hide mobile-only elements */
.mobile-only {
  display: none !important;
}

.student-drawer,
.student-drawer-overlay {
  display: none !important;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block !important;
  }
  button.mobile-only, a.mobile-only {
    display: inline-flex !important;
  }
  .desktop-only {
    display: none !important;
  }

  /* Overlay */
  .student-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999998;
    display: none !important;
    transition: opacity 0.3s ease;
  }

  .student-drawer-overlay.active {
    display: block !important;
  }

  /* Drawer panel */
  .student-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: #ffffff;
    z-index: 999999;
    box-shadow: -6px 0 25px rgba(0, 0, 0, 0.25);
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex !important;
    flex-direction: column;
  }

  .student-drawer.active {
    right: 0 !important;
  }

  .student-drawer-header {
    padding: 1.25rem 1rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .drawer-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .drawer-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.35);
  }

  .drawer-user-name {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.25;
  }

  .drawer-user-meta {
    font-size: 0.78rem;
    opacity: 0.9;
    margin-top: 0.15rem;
  }

  .drawer-close-btn {
    background: rgba(255, 255, 255, 0.18);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
  }

  .drawer-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
  }

  .student-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
  }

  .drawer-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.75rem;
  }

  .drawer-q-stats {
    font-size: 0.75rem;
    color: #2563eb;
    background: #eff6ff;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
  }

  .drawer-palette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .drawer-palette-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s;
  }

  .drawer-palette-item.answered {
    background: #2563eb;
    color: #ffffff;
    border-color: #1d4ed8;
  }

  .drawer-palette-item.active {
    outline: 2px solid #f59e0b;
    outline-offset: 1px;
    font-weight: 800;
  }

  .drawer-legend {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 0.78rem;
    color: #64748b;
  }

  .legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
  }

  .legend-dot.answered { background: #2563eb; }
  .legend-dot.unmade { background: #ffffff; border: 1px solid #cbd5e1; }
  .legend-dot.active { background: #f59e0b; }

  .student-drawer-footer {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #f8fafc;
  }

  .drawer-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .drawer-nav-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: #334155;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
  }

  .drawer-nav-item:hover {
    background: #f1f5f9;
    color: #0f172a;
  }
}

/* ==========================================================================
   Modern Exam Tables & Schedule Cards (LGS & MEB Design)
   ========================================================================== */

.q-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 1.15rem 0;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.q-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border-radius: 10px;
  border: 1.5px solid #94a3b8;
  font-size: 0.94rem;
  line-height: 1.5;
  text-align: left;
}

.q-table thead th {
  padding: 0.75rem 1rem;
  font-weight: 800;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #dbeafe;
  color: #0f172a;
  border-bottom: 2px solid #94a3b8;
  border-right: 1px solid #cbd5e1;
  text-align: center;
}

.q-table thead th:last-child {
  border-right: none;
}

.q-table thead tr:first-child th {
  background: #bfdbfe;
  color: #0f172a;
  font-size: 0.95rem;
}

.q-table thead th:first-child {
  border-top-left-radius: 8px;
}

.q-table thead th:last-child {
  border-top-right-radius: 8px;
}

.q-table tbody tr {
  border-bottom: 1px solid #cbd5e1;
  transition: background-color 0.15s;
}

.q-table tbody tr:nth-child(even) {
  background-color: #fefce8; /* Soft warm pastel yellow for high-readability exam look */
}

.q-table tbody tr:nth-child(odd) {
  background-color: #ffffff;
}

.q-table tbody tr:hover {
  background-color: #eff6ff;
}

.q-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 8px;
}

.q-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 8px;
}

.q-table tbody td {
  padding: 0.65rem 1rem;
  color: #0f172a;
  font-weight: 600;
  border-bottom: 1px solid #cbd5e1;
  border-right: 1px solid #cbd5e1;
  vertical-align: middle;
  text-align: center;
}

.q-table tbody td:first-child {
  background: #ede9fe; /* Row header (names like Ash, Brock, etc.) */
  color: #1e1b4b;
  font-weight: 800;
  text-align: left;
}

.q-table tbody td:last-child {
  border-right: none;
}

.q-table tbody td strong {
  color: #0f172a;
  font-weight: 800;
}

/* Beautiful Exam Schedule Card (e.g. Colin's Weekly Plan) */
.q-schedule-card {
  margin: 1.15rem 0;
  border-radius: 12px;
  border: 2px solid #60a5fa;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
  overflow: hidden;
}

.q-schedule-card .q-schedule-header {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #ffffff;
  padding: 0.65rem 1.15rem;
  font-weight: 800;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.02em;
}

.q-schedule-card .q-table {
  border: none;
  border-radius: 0;
  margin: 0;
}

.q-schedule-card .q-table thead th {
  background: #cffafe;
  color: #0f172a;
  padding: 0.65rem 1rem;
  font-weight: 800;
  font-size: 0.88rem;
  border-bottom: 2px solid #94a3b8;
}

.q-schedule-card .q-table tbody td {
  text-align: left;
}

.q-schedule-card .q-table tbody td:first-child {
  font-weight: 800;
  color: #1e3a8a;
  background: #f1f5f9;
  width: 32%;
  border-right: 1.5px solid #cbd5e1;
}

/* Exam Dialogue Box */
.q-dialogue-box {
  margin: 1rem 0;
  padding: 0.9rem 1.15rem;
  border-radius: 10px;
  background: #f8fafc;
  border-left: 4px solid #3b82f6;
  font-size: 0.95rem;
  line-height: 1.65;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.q-dialogue-speaker {
  font-weight: 800;
  color: #1e3a8a;
  margin-right: 0.35rem;
}

/* Option images inside choices (Question 20 style) */
.q-option-choice-img,
.q-option-img {
  max-width: 100%;
  max-height: 125px;
  width: auto;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  margin-top: 0.4rem;
  background: #ffffff;
  padding: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-block;
}

.option-choice:hover .q-option-choice-img,
.option-choice:hover .q-option-img {
  transform: scale(1.03);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}

/* Soru Kökleri Bolding Standardı */
.q-stem-bold,
.question-stem strong,
.question-stem b {
  font-weight: 800 !important;
  color: #0f172a !important;
  display: inline;
}

/* Sticky Note (Not Kağıdı - Örn: 18. Soru Alice'in Ders Programı) */
.q-sticky-note {
  position: relative;
  background: #fef08a;
  background: linear-gradient(180deg, #fef9c3 0%, #fef08a 100%);
  border: 1.5px solid #fde047;
  border-radius: 10px;
  padding: 1.35rem 1.65rem;
  margin: 1.25rem 0;
  box-shadow: 0 6px 16px rgba(161, 98, 7, 0.12), 0 2px 4px rgba(0, 0, 0, 0.04);
  color: #422006;
  font-size: 0.95rem;
  line-height: 1.6;
}

.q-sticky-note::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 95px;
  height: 20px;
  background: rgba(254, 240, 138, 0.85);
  border: 1px dashed rgba(202, 138, 4, 0.45);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.q-sticky-note strong {
  color: #713f12;
  font-weight: 800;
}

/* Diyalog Konuşma Balonları (Speech Bubbles - Örn: 19. Soru) */
.q-dialogue-bubbles {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 1.15rem 0;
}

.q-bubble-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.q-bubble-speaker {
  font-weight: 800;
  font-size: 0.92rem;
  color: #1e3a8a;
  min-width: 80px;
}

.q-bubble-box {
  flex: 1;
  background: #ffffff;
  border: 2px solid #38bdf8;
  border-radius: 18px;
  padding: 0.75rem 1.15rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.08);
}



