/**
 * ========================================================
 * GK ASSAM CMS - Minimal Black & White Responsive CSS
 * ========================================================
 * Ultra-fast, zero-dependency, pure Black & White styling.
 * Designed for lightning fast load on mobile and desktop.
 */

:root {
  --bg: #ffffff;
  --text: #1e1e1e;
  --text-muted: #555555;
  --border: #1e1e1e;
  --border-light: #dddddd;
  --card-bg: #ffffff;
  --card-hover: #f7f7f7;
  --dark-bg: #1e1e1e;
  --light-bg: #f5f5f5;
  --primary: #1e1e1e;
  --primary-hover: #333333;
  --font: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

h1 { font-size: 1.85rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.15s ease, color 0.15s ease;
}

a:hover,
a:focus,
a:active {
  color: var(--primary-hover);
  text-decoration: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.container-exam {
  max-width: 1240px;
}

/* Top Bar Announcement / News Ticker */
.top-notice-bar {
  background: var(--dark-bg);
  color: #ffffff;
  padding: 0.45rem 1.25rem;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
}

.top-notice-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.notice-left {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.notice-pill {
  background: #ffffff;
  color: #1e1e1e;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.8px;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.notice-text {
  font-weight: 500;
  color: #eeeeee;
  letter-spacing: 0.2px;
}

.notice-right {
  flex-shrink: 0;
}

.notice-link {
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.8rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.notice-link:hover {
  background: #ffffff;
  color: #1e1e1e;
  border-color: #ffffff;
  text-decoration: none;
  opacity: 1;
}

/* Header */
.site-header {
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.brand:hover {
  opacity: 1;
}
.brand-title {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text);
  text-transform: uppercase;
}
.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.main-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.35rem 0.6rem;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--dark-bg);
  color: #ffffff;
  border-color: var(--dark-bg);
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: 0.4rem 0.7rem;
  font-size: 1.1rem;
  cursor: pointer;
  font-weight: bold;
}

/* Hero Section */
.hero-section {
  padding: 2.2rem 0 1.5rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--light-bg);
  text-align: center;
}
.hero-title {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}
.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 1.2rem;
}

/* Search Bar */
.search-form {
  display: flex;
  max-width: 580px;
  margin: 0 auto;
  border: 2px solid var(--border);
  background: #ffffff;
}
.search-input {
  flex: 1;
  border: none;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
}
.search-btn {
  background: var(--dark-bg);
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.4rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}
.search-btn:hover {
  background: #333333;
}

/* Homepage Two Column Section: Assam GK | Indian GK */
.two-column-section {
  margin: 2.2rem 0;
}

.two-column-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.column-box {
  border: 2px solid var(--border);
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.column-header {
  background: var(--dark-bg);
  color: #ffffff;
  padding: 0.85rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border);
}

.column-header h2 {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 900;
  text-transform: uppercase;
  margin: 0;
  letter-spacing: 0.5px;
}

.column-count-badge {
  background: #ffffff;
  color: #1e1e1e;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid #ffffff;
  text-transform: uppercase;
}

.column-body {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  background: #fdfdfd;
}

.category-list-item {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  background: #ffffff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-list-item:hover {
  background: #fcfcfc;
  transform: translateY(-2px);
  box-shadow: 3px 3px 0px var(--dark-bg);
}

.category-list-item .item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.35rem;
}

.category-list-item .item-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.category-list-item .item-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.45;
}

.category-list-item .item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed var(--border-light);
  padding-top: 0.6rem;
  font-size: 0.82rem;
  font-weight: 700;
}

/* Tab Design: Assam GK | Indian GK */
.tab-container {
  margin: 2rem 0;
}
.tab-nav {
  display: flex;
  border-bottom: 3px solid var(--border);
  gap: 0.5rem;
}
.tab-btn {
  flex: 1;
  background: var(--light-bg);
  color: var(--text);
  border: 2px solid var(--border);
  border-bottom: none;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  padding: 0.9rem 1.2rem;
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  transition: all 0.15s ease;
}
.tab-btn:hover {
  background: #e8e8e8;
}
.tab-btn.active {
  background: var(--dark-bg);
  color: #ffffff;
  border-color: var(--dark-bg);
}

.stat-counter {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.tab-pane {
  display: none;
  padding: 1.5rem 0;
}
.tab-pane.active {
  display: block;
}

/* Category Grid - Two Column View inside Tabs */
.tab-two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}

.card {
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  background: var(--card-bg);
  margin-bottom: 1.5rem;
}

/* Category Page Header Banner (Matches Reference Image) */
.category-header-card {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.8rem;
  background: #ffffff;
}

.cat-page-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: #1e1e1e;
  margin-bottom: 0.5rem;
  letter-spacing: -0.3px;
}

.cat-page-desc {
  font-size: 0.95rem;
  color: #444444;
  line-height: 1.5;
  margin-bottom: 1.2rem;
  max-width: 820px;
}

.cat-stats-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.cat-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #333333;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  line-height: 1;
}

.cat-stat-pill svg {
  stroke-width: 2.2;
}

.category-card {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1.15rem;
  background: #ffffff;
  text-decoration: none !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.category-card:hover,
.category-card:focus,
.category-card:active {
  opacity: 1;
  box-shadow: 4px 4px 0px var(--dark-bg);
  text-decoration: none !important;
}
.category-card *,
.category-card:hover * {
  text-decoration: none !important;
}
.cat-badge {
  display: inline-block;
  background: var(--light-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  width: fit-content;
}
.category-title {
  font-size: 1.12rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: var(--text);
  line-height: 1.25;
}
.category-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.35;
}
.category-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed var(--border-light);
  padding-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Mock Test List - Sleek Row Card View (Two Columns on Desktop) */
.test-row-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.test-row-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  padding: 0.9rem 1.2rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.test-row-card:hover {
  border-color: var(--border);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  opacity: 1;
}

.test-row-num {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: #333333;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  font-weight: 800;
  flex-shrink: 0;
  line-height: 1;
  font-family: var(--font);
}

.test-row-info {
  flex: 1;
  min-width: 0;
}

.test-row-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e1e1e;
  margin-bottom: 0.2rem;
  line-height: 1.35;
}

.test-row-meta {
  font-size: 0.82rem;
  color: #666666;
  font-weight: 500;
}

.test-row-arrow {
  color: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.test-row-card:hover .test-row-arrow {
  transform: translateX(3px);
}

/* Mock Test List / Grid (Fallback) */
.test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.test-card {
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 1.3rem;
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease;
}
.test-card:hover {
  box-shadow: 4px 4px 0px var(--dark-bg);
}
.test-meta {
  display: flex;
  gap: 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.badge-tag {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
  background: #ffffff;
}
.badge-dark {
  background: var(--dark-bg);
  color: #ffffff;
  border: 1px solid var(--dark-bg);
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
}
.test-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.test-title a {
  text-decoration: none;
  color: var(--text);
}
.test-title a:hover {
  text-decoration: none;
  color: var(--primary);
}
.test-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex: 1;
}
.test-info-row {
  display: flex;
  justify-content: space-between;
  background: var(--light-bg);
  border: 1px solid var(--border-light);
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}
.test-info-row span {
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid var(--border);
  border-radius: 6px;
  transition: all 0.15s ease;
  font-family: inherit;
}
.btn-primary {
  background: var(--dark-bg);
  color: #ffffff;
}
.btn-primary:hover {
  background: #ffffff;
  color: var(--dark-bg);
  opacity: 1;
}
.btn-outline {
  background: #ffffff;
  color: var(--text);
}
.btn-outline:hover {
  background: var(--dark-bg);
  color: #ffffff;
  opacity: 1;
}
.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
}
.btn-block {
  display: block;
  width: 100%;
}

/* ========================================================
   Clean Online CBT Exam Portal (Matching User Mock Design)
   ======================================================== */
.nta-exam-container {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  margin: 1.2rem 0 2.5rem;
  font-family: inherit;
}

/* 1. Top Header Bar */
.nta-top-bar {
  background: #1e1e1e;
  color: #ffffff;
  padding: 0.75rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nta-portal-name {
  font-size: 1.05rem;
  font-weight: 400;
  color: #ffffff;
}

.nta-portal-name strong {
  font-weight: 400;
}

.nta-timer-box {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.2rem 0.65rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
}

.timer-val {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  font-family: inherit;
  letter-spacing: 0.5px;
}

/* 2. Main Two-Column Workspace */
.nta-workspace {
  display: grid;
  grid-template-columns: 1fr 390px;
  min-height: 520px;
  background: #ffffff;
}

/* Question Pane (Left) */
.nta-question-pane {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid #e2e8f0;
  background: #ffffff;
}

.nta-q-scroll-area {
  padding: 2rem 2rem 1.5rem;
  flex: 1;
}

.nta-question-statement {
  font-size: 1.1rem;
  font-weight: 400;
  color: #1e293b;
  line-height: 1.35;
  margin-bottom: 1.4rem;
}

/* Smooth Text & Question Entrance Animation on Next/Navigate */
.nta-question-slide.active .nta-question-statement {
  animation: ntaTextReveal 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity, filter;
}

.nta-question-slide.active .nta-options-container {
  animation: ntaOptionsReveal 0.42s cubic-bezier(0.16, 1, 0.3, 1) 0.06s both;
  will-change: transform, opacity;
}

@keyframes ntaTextReveal {
  0% {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(2.5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes ntaOptionsReveal {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.q-num-prefix {
  font-size: 1.12rem;
  font-weight: 600;
  color: #0f172a;
  margin-right: 0.35rem;
}

/* Options Grid: 2-Column on Desktop (like Screenshot 2) */
.nta-options-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.nta-option-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.15rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.15s ease;
  user-select: none;
}

.nta-option-row:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.nta-option-row input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
}

.nta-option-row.selected {
  background: #eff6ff;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb;
}

.nta-opt-prefix {
  font-weight: 800;
  color: #1e293b;
  font-size: 1rem;
  min-width: 22px;
}

.nta-opt-text {
  font-size: 1rem;
  color: #1e293b;
  line-height: 1.4;
}

.nta-option-row.selected .nta-opt-text {
  font-weight: 600;
  color: #1d4ed8;
}

/* Action Toolbar at bottom of Question Pane */
.nta-action-bar {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 1rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.nta-counter-col {
  font-size: 0.95rem;
  font-weight: 700;
  color: #64748b;
}

.nta-btn-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nta-btn {
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.nta-btn-clear {
  background: #ffffff;
  color: #ef4444;
  border: 1.5px solid #fca5a5;
}
.nta-btn-clear:hover {
  background: #fee2e2;
}

.nta-btn-mark {
  background: #fbf5ff;
  color: #9333ea;
  border: 1.5px solid #d8b4fe;
}
.nta-btn-mark:hover {
  background: #f3e8ff;
}

.nta-btn-prev {
  background: #ffffff;
  color: #334155;
  border: 1.5px solid #cbd5e1;
}
.nta-btn-prev:hover {
  background: #f1f5f9;
}

.nta-btn-save {
  background: #f0fdf4;
  color: #16a34a;
  border: 1.5px solid #86efac;
}
.nta-btn-save:hover {
  background: #dcfce7;
}

.nta-btn-palette-mob {
  display: none;
  background: #ffffff;
  color: #334155;
  border: 1.5px solid #cbd5e1;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
}
.nta-btn-palette-mob:hover {
  background: #f1f5f9;
}

/* 3. Right Sidebar (Question Palette - Permanent on Desktop) */
.nta-sidebar {
  background: #ffffff;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.25rem;
  border-left: 1px solid #e2e8f0;
}

/* Status Legend at the Top (Matching User Design) */
.nta-legend-top {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-bottom: 1.1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.nta-legend-top .legend-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.85rem;
}

.nta-legend-top .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.nta-legend-top .legend-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: #334155;
  white-space: nowrap;
}

.legend-box {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}

.legend-box.answered {
  background: #22c55e;
}
.legend-box.not-answered {
  background: #ef4444;
}
.legend-box.marked {
  background: #a855f7;
}
.legend-box.not-visited {
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
}
.legend-box.answered-marked {
  background: #3b82f6;
}

/* Heading Row */
.nta-sidebar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.1rem;
}

.nta-palette-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nta-palette-close {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
}

/* Question Palette Numbers Grid (Flexible, spacious rounded squares) */
.nta-palette-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.75rem;
  max-height: 320px;
  overflow-y: auto;
  padding: 3px;
}

.nta-palette-btn {
  width: 36px;
  height: 36px;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #334155;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  flex-shrink: 0;
}

.nta-palette-btn:hover {
  border-color: #1d60a5;
}

/* Default Active / Focus ring matching screenshot */
.nta-palette-btn.current {
  border: 2px solid #22c55e;
  box-shadow: 0 0 0 2px #93c5fd;
  background: #ecfdf5;
  color: #15803d;
  font-weight: 700;
}

.nta-palette-btn.answered {
  border-color: #22c55e;
  background: #ecfdf5;
  color: #15803d;
}
.nta-palette-btn.answered.current {
  border: 2px solid #22c55e;
  box-shadow: 0 0 0 2px #93c5fd;
}

.nta-palette-btn.not-answered {
  border-color: #ef4444;
  background: #fee2e2;
  color: #b91c1c;
}
.nta-palette-btn.not-answered.current {
  border: 2px solid #ef4444;
  box-shadow: 0 0 0 2px #93c5fd;
}

.nta-palette-btn.marked {
  border-color: #a855f7;
  background: #f3e8ff;
  color: #7e22ce;
}
.nta-palette-btn.marked.current {
  border: 2px solid #a855f7;
  box-shadow: 0 0 0 2px #93c5fd;
}

.nta-palette-btn.answered-marked {
  border-color: #3b82f6;
  background: #dbeafe;
  color: #1d4ed8;
}
.nta-palette-btn.answered-marked.current {
  border: 2px solid #3b82f6;
  box-shadow: 0 0 0 2px #93c5fd;
}

/* Submit Quiz Button */
.nta-submit-area {
  margin-top: auto;
}

.nta-btn-submit {
  width: 100%;
  padding: 0.8rem 1rem;
  background: #1d60a5;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.nta-btn-submit:hover {
  background: #154c84;
}

/* Minimal Result Screen */
.result-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 2.25rem 2rem 2rem;
  background: #ffffff;
  margin: 1.5rem auto;
  max-width: 860px;
  text-align: center;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
}
.result-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 1.1rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-radius: 9999px;
  margin-bottom: 1.2rem;
}
.result-status-pass {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.result-status-fail {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.result-card h1 {
  font-size: 1.65rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}
.result-meta-text {
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 400;
  margin-bottom: 1.8rem;
}
.score-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.65rem;
  margin: 1.75rem 0;
  text-align: center;
}
.score-stat-box {
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  padding: 1.05rem 0.5rem 0.9rem;
  background: #f8fafc;
  transition: all 0.15s ease;
}
.score-stat-box:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
}
.score-stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  display: block;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  margin-bottom: 0.35rem;
}
.score-stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #64748b;
}
.score-stat-box.stat-correct .score-stat-number {
  color: #16a34a;
}
.score-stat-box.stat-wrong .score-stat-number {
  color: #dc2626;
}
.score-stat-box.stat-skipped .score-stat-number {
  color: #64748b;
}

/* Action Buttons Row */
.result-actions-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}
.btn-minimal {
  padding: 0.65rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: inherit;
}
.btn-minimal-primary {
  background: #1e1e1e;
  color: #ffffff;
  border: 1.5px solid #1e1e1e;
}
.btn-minimal-primary:hover {
  background: #333333;
  border-color: #333333;
  color: #ffffff;
}
.btn-minimal-outline {
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #cbd5e1;
}
.btn-minimal-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}
.btn-minimal-ghost {
  background: transparent;
  color: #64748b;
  border: 1.5px solid transparent;
}
.btn-minimal-ghost:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Review Answers */
.review-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.4rem;
  margin-bottom: 1.25rem;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.review-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 6px;
}
.tag-correct {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.tag-wrong {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.tag-unattempted {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.explanation-box {
  background: #f8fafc;
  border-left: 3px solid #1e1e1e;
  border-radius: 0 8px 8px 0;
  padding: 0.85rem 1rem;
  margin-top: 1rem;
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.5;
}

/* Important Links Box */
.links-section {
  border: 2px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  margin: 2rem 0;
  overflow: hidden;
}
.links-header {
  background: var(--dark-bg);
  color: #ffffff;
  padding: 0.85rem 1.25rem;
  border-bottom: 2px solid var(--border);
}
.links-header h3,
.links-header h2 {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: 0.3px;
}
.links-body {
  padding: 1.25rem;
}
.links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.links-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--border-light);
  padding-bottom: 0.5rem;
  font-size: 0.95rem;
}
.links-list li a {
  font-weight: 700;
  text-decoration: none;
}
.links-list li a:hover {
  text-decoration: none;
  color: var(--primary);
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.85rem;
  margin: 1.2rem 0;
  color: var(--text-muted);
}
.breadcrumbs a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.breadcrumbs a:hover {
  text-decoration: none;
  color: var(--primary);
}
.breadcrumbs span.sep {
  font-weight: bold;
}

/* Forms */
.form-group {
  margin-bottom: 1.2rem;
}
.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}
.form-control {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font-size: 16px; /* Prevents auto-zoom on iOS Safari */
  border: 2px solid var(--border);
  background: #ffffff;
  color: var(--text);
  font-family: inherit;
  outline: none;
}
.form-control:focus {
  background: #fcfcfc;
  box-shadow: 0 0 0 2px var(--dark-bg);
}
textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* Alerts */
.alert {
  padding: 0.85rem 1.2rem;
  border: 2px solid var(--border);
  margin: 1rem 0;
  font-size: 0.92rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
}
.alert-success {
  background: #f0f0f0;
  border-left: 6px solid #1e1e1e;
}
.alert-error {
  background: #ffffff;
  border: 2px solid #1e1e1e;
  border-left: 6px solid #1e1e1e;
  font-weight: 600;
}
.alert-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
}

/* Pagination */
.pagination-wrapper {
  margin: 2rem 0;
  display: flex;
  justify-content: center;
}
.pagination {
  display: flex;
  list-style: none;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.page-item .page-link {
  display: block;
  padding: 0.45rem 0.85rem;
  border: 1.5px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 0.88rem;
  background: #ffffff;
}
.page-item.active .page-link {
  background: var(--dark-bg);
  color: #ffffff;
  border-color: var(--dark-bg);
}
.page-item.disabled .page-link {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--dark-bg);
  color: #ffffff;
  border-top: 3px solid var(--border);
  padding: 2.5rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h3 {
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #444;
  padding-bottom: 0.4rem;
}
.footer-col p {
  font-size: 0.85rem;
  color: #bbb;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.footer-links a {
  color: #ddd;
  text-decoration: none;
  font-size: 0.88rem;
}
.footer-links a:hover {
  color: #fff;
  text-decoration: none;
}
.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 1.2rem;
  text-align: center;
  font-size: 0.8rem;
  color: #888;
}

/* ========================================================
   Comprehensive Mobile Responsiveness & Touch UX
   ======================================================== */

/* Tablet & Mobile Screens (<= 768px) */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  body {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
  }

  .container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  /* Notice Bar */
  .top-notice-bar {
    padding: 0.5rem 0.85rem;
    font-size: 0.78rem;
  }
  .top-notice-inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 0.4rem;
  }
  .notice-left {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .notice-right {
    margin-top: 0.1rem;
  }
  .notice-link {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
  }

  /* Header & Navigation */
  .site-header {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .header-inner {
    padding: 0.75rem 0;
    flex-wrap: wrap;
  }
  .brand-title {
    font-size: 1.25rem;
  }
  .mobile-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 0.35rem;
    background: #ffffff;
    color: #1e1e1e;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    line-height: 1;
  }
  .mobile-toggle:active {
    background: #1e1e1e;
    color: #ffffff;
  }

  /* Mobile Drawer Menu */
  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    margin-top: 0.8rem;
    padding: 0.6rem 0;
    border-top: 2px solid var(--border);
    background: #ffffff;
    gap: 0.35rem;
  }
  .main-nav.active {
    display: flex;
  }
  .main-nav a {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    text-align: left;
    display: block;
  }
  .main-nav a:hover,
  .main-nav a:active {
    background: #1e1e1e;
    color: #ffffff;
  }

  /* Mobile User Menu Dropdown */
  .user-menu-dropdown {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .user-menu-btn {
    width: 100%;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    text-align: left;
    display: flex;
    background: #ffffff;
    color: #1e1e1e;
  }
  .user-menu-btn:hover,
  .user-menu-btn:active,
  .user-menu-dropdown.active .user-menu-btn {
    background: #1e1e1e;
    color: #ffffff;
  }
  .user-dropdown-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    border: 1px solid var(--border-light);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    background: #f8fafc;
    margin-top: -2px;
    padding: 0;
  }
  .user-menu-dropdown.active .user-dropdown-menu {
    display: block !important;
  }
  .user-menu-dropdown:not(.active) .user-dropdown-menu {
    display: none !important;
  }
  .user-dropdown-menu a.user-dropdown-item {
    padding: 0.75rem 1.25rem !important;
    border-bottom: 1px solid var(--border-light) !important;
  }
  .user-dropdown-menu a.user-dropdown-item:last-child {
    border-bottom: none !important;
  }

  /* Hero Section */
  .hero-section {
    padding: 1.6rem 0 1.2rem;
  }
  .hero-title {
    font-size: 1.45rem;
    line-height: 1.3;
  }
  .hero-subtitle {
    font-size: 0.92rem;
    margin-bottom: 0.8rem;
  }

  /* Two Tabs */
  .tab-container {
    margin: 1.4rem 0;
  }
  .tab-nav {
    gap: 0.35rem;
  }
  .tab-btn {
    font-size: 0.88rem;
    padding: 0.8rem 0.4rem;
    min-height: 48px;
    letter-spacing: 0.3px;
  }

  /* Grid Layouts Stack Cleanly */
  .category-grid,
  .test-grid,
  .test-row-list,
  .two-column-grid,
  .tab-two-col-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Category Cards Touch Enhancements */
  .category-card {
    padding: 0.65rem 0.95rem;
  }
  .category-title {
    font-size: 1.1rem;
  }
  .category-footer {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .category-footer .btn {
    width: 100%;
    padding: 0.65rem;
  }

  /* Mock Test Cards */
  .test-card {
    padding: 1.1rem;
  }
  .test-title {
    font-size: 1.1rem;
  }
  .test-info-row {
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.78rem;
    padding: 0.6rem;
  }

  /* Exam Mobile Layout (under 768px) */
  .nta-workspace {
    grid-template-columns: 1fr;
  }
  .nta-question-pane {
    border-right: none;
  }
  .nta-q-scroll-area {
    padding: 1.25rem 1rem;
  }
  .nta-question-statement {
    font-size: 0.95rem;
    line-height: 1.35;
    margin-bottom: 1.1rem;
  }
  .nta-options-container {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .nta-option-row {
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
  }
  .nta-action-bar {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  .nta-counter-col {
    font-size: 0.85rem;
  }
  .nta-btn-group {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
  }
  .nta-btn {
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
  }
  .nta-btn-palette-mob {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Question Palette as Slide-up Modal Drawer on Mobile */
  .nta-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: #ffffff;
    overflow-y: auto;
    padding: 1.25rem;
  }
  .nta-sidebar.open {
    display: flex;
    animation: ntaSlideUp 0.25s ease;
  }
  .nta-palette-close {
    display: block;
  }
  .nta-palette-grid {
    max-height: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

@keyframes ntaSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

  /* Result Screen Mobile Layout */
  .result-card {
    padding: 1.6rem 1.15rem 1.4rem;
    margin: 1rem 0;
    border-radius: 12px;
  }
  .result-card h1 {
    font-size: 1.35rem;
  }
  .result-status-badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.9rem;
  }

  /* 3-Column Balanced Score Grid on Tablet */
  .score-stat-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
    margin: 1.3rem 0;
  }
  .score-stat-box {
    padding: 0.85rem 0.4rem;
    border-radius: 8px;
  }
  .score-stat-number {
    font-size: 1.35rem;
  }
  .score-stat-label {
    font-size: 0.65rem;
  }

  .result-actions-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  .result-actions-row .btn-minimal {
    width: 100%;
  }

  /* Tables on Mobile */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    font-size: 0.85rem;
  }
  .table th,
  .table td {
    padding: 0.65rem 0.75rem;
    white-space: nowrap;
  }

  /* Forms */
  .form-control {
    padding: 0.75rem 0.85rem;
    min-height: 46px;
  }

  /* Footer */
  .site-footer {
    padding: 2rem 0 1.2rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .footer-links a {
    display: inline-block;
    padding: 0.25rem 0;
    font-size: 0.92rem;
  }
}

/* Small Smartphone Screen Specific Adjustments (<= 480px) */
@media (max-width: 480px) {
  .brand-title {
    font-size: 1.15rem;
  }
  .tab-btn {
    font-size: 0.82rem;
    padding: 0.75rem 0.25rem;
  }
  .score-stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  .score-stat-number {
    font-size: 1.35rem;
  }
  .btn {
    font-size: 0.88rem;
  }
}

/* ========================================================
 * Sticky Bottom App-Style Navigation Bar (Mobile Only)
 * ======================================================== */
.sticky-bottom-nav {
  display: none; /* Hidden by default on Desktop */
}

@media (max-width: 768px) {
  body {
    padding-bottom: 70px; /* Space for bottom bar on mobile only */
  }

  .sticky-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #ffffff;
    border-top: 2px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    padding: 0 0.5rem;
  }
}

.sticky-bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text);
  flex: 1;
  height: 100%;
  padding: 0.35rem 0.2rem;
  transition: all 0.15s ease;
  position: relative;
}

.sticky-bottom-nav .nav-icon {
  font-size: 1.25rem;
  line-height: 1.2;
  margin-bottom: 2px;
}

.sticky-bottom-nav .nav-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Hover and Active State with Pill Indicator */
.sticky-bottom-nav .nav-item:hover {
  background: #f7f7f7;
  opacity: 1;
}

.sticky-bottom-nav .nav-item.active {
  color: #1e1e1e;
  font-weight: 900;
}

.sticky-bottom-nav .nav-item.active .nav-label {
  font-weight: 900;
}

.sticky-bottom-nav .nav-item.active::before {
  content: "";
  position: absolute;
  top: 4px;
  width: 50%;
  max-width: 52px;
  height: 32px;
  background: #eaeaea;
  border-radius: 16px;
  z-index: -1;
}

.sticky-bottom-nav .nav-item.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: #1e1e1e;
  border-radius: 2px 2px 0 0;
}

/* Ensure nice fit on small mobile screens */
@media (max-width: 380px) {
  .sticky-bottom-nav {
    height: 58px;
  }
  .sticky-bottom-nav .nav-icon {
    font-size: 1.1rem;
  }
  .sticky-bottom-nav .nav-label {
    font-size: 0.65rem;
  }
}

/* ========================================================
   Minimal Test Submission Modal
   ======================================================== */
.cbt-minimal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.cbt-minimal-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cbt-minimal-modal {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 45px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.04);
  padding: 1.75rem 1.6rem 1.5rem;
  position: relative;
  transform: scale(0.96) translateY(6px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.cbt-minimal-modal-overlay.open .cbt-minimal-modal {
  transform: scale(1) translateY(0);
}

.cbt-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.cbt-modal-close:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.cbt-modal-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.cbt-modal-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #1e1e1e;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cbt-modal-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.25;
}

.cbt-modal-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.3;
}

/* Stats 4-card grid */
.cbt-modal-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.cbt-stat-card {
  padding: 0.65rem 0.4rem;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.cbt-stat-card.stat-answered {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.cbt-stat-card.stat-answered .cbt-stat-val {
  color: #166534;
}

.cbt-stat-card.stat-not-answered {
  border-color: #fecaca;
  background: #fef2f2;
}
.cbt-stat-card.stat-not-answered .cbt-stat-val {
  color: #991b1b;
}

.cbt-stat-card.stat-marked {
  border-color: #e9d5ff;
  background: #faf5ff;
}
.cbt-stat-card.stat-marked .cbt-stat-val {
  color: #6b21a8;
}

.cbt-stat-card.stat-not-visited {
  border-color: #e2e8f0;
  background: #f8fafc;
}
.cbt-stat-card.stat-not-visited .cbt-stat-val {
  color: #475569;
}

.cbt-stat-val {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}

.cbt-stat-lbl {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #64748b;
  font-weight: 500;
}

.cbt-modal-desc {
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.45;
  margin: 0 0 1.4rem;
}

/* Actions Footer */
.cbt-modal-footer {
  display: flex;
  gap: 0.75rem;
}

.cbt-modal-btn {
  flex: 1;
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  font-family: inherit;
}

.cbt-modal-btn-cancel {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #334155;
}

.cbt-modal-btn-cancel:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.cbt-modal-btn-confirm {
  background: #1e1e1e;
  border: 1.5px solid #1e1e1e;
  color: #ffffff;
}

.cbt-modal-btn-confirm:hover {
  background: #333333;
  border-color: #333333;
}

.cbt-modal-btn-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .cbt-minimal-modal {
    padding: 1.35rem 1.15rem 1.25rem;
  }
  .cbt-modal-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.45rem;
  }
  .cbt-modal-footer {
    flex-direction: column;
  }
}

/* ========================================================
   Google OAuth 2.0 Button & Authentication Styling
   ======================================================== */
.btn-google-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1.2rem;
  background: #ffffff;
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.25rem;
}

.btn-google-oauth:hover {
  background: #ffffff;
  color: var(--text);
  box-shadow: 4px 4px 0px var(--dark-bg);
  transform: translateY(-1px);
}

.btn-google-oauth:active {
  transform: translateY(0);
  box-shadow: 1px 1px 0px var(--dark-bg);
}

.google-icon {
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.2rem 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px dashed var(--border-light);
}

.auth-divider span {
  padding: 0 0.85rem;
}

/* User Avatar & Nav Badges */
.user-nav-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none !important;
}

.user-nav-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border);
  display: inline-block;
  vertical-align: middle;
}

.user-nav-avatar-fallback {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--dark-bg);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

/* User Profile Header Dropdown Menu */
.user-menu-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.user-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  border: 1px solid transparent;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  transition: all 0.15s ease;
}

.user-menu-btn:hover,
.user-menu-dropdown.active .user-menu-btn {
  background: var(--dark-bg);
  color: #ffffff;
  border-color: var(--dark-bg);
}

.user-menu-caret {
  transition: transform 0.2s ease;
  color: #64748b;
  flex-shrink: 0;
}

.user-menu-btn:hover .user-menu-caret,
.user-menu-dropdown.active .user-menu-caret {
  color: #ffffff;
  transform: rotate(180deg);
}

.user-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  min-width: 170px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 0.35rem 0;
  z-index: 1000;
}

.user-menu-dropdown.active .user-dropdown-menu,
.user-menu-dropdown:hover .user-dropdown-menu {
  display: block;
}

.user-dropdown-menu a.user-dropdown-item {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1rem !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  color: #1e1e1e !important;
  text-decoration: none !important;
  border: none !important;
  border-radius: 0 !important;
  text-align: left !important;
  background: transparent !important;
  transition: background 0.12s ease;
}

.user-dropdown-menu a.user-dropdown-item:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.user-dropdown-menu a.user-dropdown-logout {
  border-top: 1px solid var(--border-light) !important;
  color: #dc2626 !important;
}

.user-dropdown-menu a.user-dropdown-logout:hover {
  background: #fef2f2 !important;
  color: #b91c1c !important;
}

/* ========================================================
   CANDIDATE PORTAL - MODERN MINIMAL DESIGN SYSTEM
   ======================================================== */

.candidate-panel-nav-wrapper {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.candidate-panel-nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.candidate-mini-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.candidate-mini-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border);
}

.candidate-mini-avatar-fallback {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--dark-bg);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
}

.candidate-mini-meta {
  display: flex;
  flex-direction: column;
}

.candidate-mini-greeting {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #64748b;
  text-transform: uppercase;
  line-height: 1.2;
}

.candidate-mini-name {
  font-size: 0.95rem;
  color: #0f172a;
  line-height: 1.3;
}

.candidate-tab-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.candidate-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.candidate-tab:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.candidate-tab.active {
  background: #1e1e1e;
  color: #ffffff;
  font-weight: 700;
}

.candidate-tab.active svg {
  stroke: #ffffff;
}

.candidate-unread-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  line-height: 1.2;
}

.candidate-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.candidate-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  color: #1e1e1e;
  text-decoration: none;
  background: #fff;
  transition: all 0.15s ease;
}

.candidate-btn-outline:hover {
  background: #1e1e1e;
  color: #fff;
}

.candidate-btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #dc2626;
  text-decoration: none;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.candidate-btn-logout:hover {
  background: #fef2f2;
}

/* Candidate Hero & Profile Cards */
.candidate-hero-card {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.candidate-hero-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.candidate-hero-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--border);
  flex-shrink: 0;
}

.candidate-hero-avatar-fallback {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #1e1e1e;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  font-weight: 800;
  flex-shrink: 0;
}

.candidate-hero-details {
  flex: 1;
  min-width: 260px;
}

.candidate-hero-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.candidate-hero-name {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0;
  color: #0f172a;
}

.candidate-hero-subtitle {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Candidate Modern Stats Grid */
.candidate-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.candidate-stat-card {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.candidate-stat-card:hover {
  transform: translateY(-2px);
  border-color: #1e1e1e;
}

.candidate-stat-number {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 0.35rem;
  color: #0f172a;
}

.candidate-stat-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #64748b;
}

/* Minimal Table Styles */
.candidate-table-card {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.candidate-table-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.candidate-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.92rem;
}

.candidate-table th {
  background: #f8fafc;
  padding: 0.85rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #475569;
  border-bottom: 1.5px solid var(--border-light);
  text-align: left;
}

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

.candidate-table tr:hover td {
  background: #fafafa;
}

/* Desktop Scrollable Table Container with Sticky Header */
.candidate-table-scroll-desktop {
  max-height: 480px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.candidate-table-scroll-desktop::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.candidate-table-scroll-desktop::-webkit-scrollbar-track {
  background: #f8fafc;
}

.candidate-table-scroll-desktop::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.candidate-table-scroll-desktop::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.candidate-table-scroll-desktop .candidate-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f8fafc;
  box-shadow: 0 1.5px 0 var(--border-light);
}

/* ========================================================
   CANDIDATE PORTAL - COMPREHENSIVE MOBILE RESPONSIVE ENGINE
   ======================================================== */

.table-scroll-hint {
  display: none;
}

@media (max-width: 768px) {
  /* Prevent iOS Safari 16px auto-zoom */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="search"],
  textarea,
  select {
    font-size: 16px !important;
  }

  /* Candidate Sub-Navigation on Mobile */
  .candidate-panel-nav-wrapper {
    padding: 0.75rem 0.85rem;
    margin-top: 1rem;
    margin-bottom: 1.25rem;
    border-radius: 8px;
  }

  .candidate-panel-nav-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .candidate-mini-profile {
    width: 100%;
    justify-content: flex-start;
  }

  .candidate-mini-avatar,
  .candidate-mini-avatar-fallback {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
  }

  .candidate-tab-links {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.35rem;
    padding: 0.2rem 0;
  }

  .candidate-tab-links::-webkit-scrollbar {
    display: none;
  }

  .candidate-tab {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.82rem;
    padding: 0.5rem 0.8rem;
    min-height: 40px;
    border-radius: 6px;
  }

  .candidate-nav-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-light);
    margin-top: 0.2rem;
  }

  .candidate-btn-outline,
  .candidate-btn-logout {
    min-height: 38px;
    font-size: 0.8rem;
  }

  /* Hero & Profile Card on Mobile */
  .candidate-hero-card {
    padding: 1.25rem 1rem;
    margin-bottom: 1.25rem;
  }

  .candidate-hero-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .candidate-hero-avatar,
  .candidate-hero-avatar-fallback {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .candidate-hero-name {
    font-size: 1.35rem;
    line-height: 1.25;
  }

  .candidate-hero-subtitle {
    font-size: 0.82rem;
    line-height: 1.4;
    word-break: break-word;
  }

  /* 4-Card Stats Grid on Mobile: 2x2 Grid */
  .candidate-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
    margin-bottom: 1.25rem !important;
  }

  .candidate-stat-card {
    padding: 1rem 0.85rem;
  }

  .candidate-stat-number {
    font-size: 1.7rem;
    line-height: 1.1;
  }

  .candidate-stat-label {
    font-size: 0.68rem;
    letter-spacing: 0.3px;
  }

  /* Table Responsive & Scroll Hint */
  .table-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: #64748b;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-light);
  }

  .candidate-table-header {
    padding: 1rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .candidate-table th {
    padding: 0.75rem 0.85rem;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .candidate-table td {
    padding: 0.85rem 0.85rem;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  /* Messages on Mobile */
  .candidate-msg-bubble {
    max-width: 96% !important;
  }

  .candidate-msg-header {
    flex-wrap: wrap !important;
    gap: 0.35rem !important;
  }

  /* Forms & Buttons on Mobile */
  .candidate-form-card {
    padding: 1.25rem 1rem !important;
  }

  .candidate-form-btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 0.85rem !important;
    font-size: 0.95rem !important;
    min-height: 48px !important;
  }

  /* Candidate Attempt Minimal Scrollable List on Mobile */
  .candidate-attempts-desktop {
    display: none !important;
  }
  .candidate-attempts-mobile {
    display: block !important;
  }
  .candidate-attempts-scroll {
    max-height: 420px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0;
  }
  .candidate-attempts-scroll::-webkit-scrollbar {
    width: 4px;
  }
  .candidate-attempts-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
  }
  .candidate-attempt-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-light);
    background: #ffffff;
    transition: background 0.15s ease;
  }
  .candidate-attempt-item:last-child {
    border-bottom: none;
  }
  .candidate-attempt-item:active {
    background: #f8fafc;
  }
  .attempt-item-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }
  .attempt-item-top {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
  }
  .attempt-item-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    text-decoration: none;
  }
  .attempt-item-title:hover {
    text-decoration: underline;
  }
  .attempt-item-meta {
    font-size: 0.76rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
  }
  .attempt-item-meta strong {
    color: #0f172a;
  }
  .attempt-item-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    background: #1e1e1e;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    border: 1px solid #1e1e1e;
    line-height: 1.2;
    transition: all 0.15s ease;
  }
  .attempt-item-btn:active {
    background: #000000;
  }
}

/* Candidate Attempts default desktop view */
.candidate-attempts-desktop {
  display: block;
}
.candidate-attempts-mobile {
  display: none;
}

/* Extra Small Phones (iPhone SE, Galaxy Fold, <= 375px) */
@media (max-width: 375px) {
  .candidate-stat-number {
    font-size: 1.45rem;
  }
  .candidate-stat-card {
    padding: 0.85rem 0.65rem;
  }
  .candidate-hero-name {
    font-size: 1.2rem;
  }
}


