/* ============================================================
   ExamPro — Main Stylesheet
   ระบบข้อสอบออนไลน์ | Fully Responsive (Mobile / Tablet / Desktop)
   Font: Sarabun (Google Fonts)
   Breakpoints: mobile <576px | tablet 576–991px | desktop ≥992px
   ============================================================ */

/* ── Google Font ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ============================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
  /* Brand Colors */
  --navy-900: #0f1b35;
  --navy-800: #1a2744;
  --navy-700: #243660;
  --navy-600: #2d4275;
  --blue-700: #1e4fa8;
  --blue-600: #2563eb;
  --blue-500: #3b6fd4;
  --blue-400: #60a0f0;
  --blue-100: #dbe5f5;
  --blue-50:  #eef4fc;

  /* Steel / Gray */
  --steel-700: #2c3659;
  --steel-600: #3d4d6e;
  --steel-500: #4a5a7c;
  --steel-400: #647494;
  --gray-300:  #8a96b0;
  --gray-200:  #c0c8da;
  --gray-100:  #dfe3ec;
  --gray-50:   #f2f4f8;
  --white:     #ffffff;

  /* Semantic */
  --success:      #10b981;
  --success-bg:   #d1fae5;
  --success-text: #065f46;
  --warning:      #f59e0b;
  --warning-bg:   #fef3c7;
  --warning-text: #92400e;
  --danger:       #ef4444;
  --danger-bg:    #fee2e2;
  --danger-text:  #991b1b;
  --info:         #3b82f6;
  --info-bg:      #dbeafe;
  --info-text:    #1e40af;

  /* Text */
  --text-primary:   #1a2744;
  --text-secondary: #4a5a7c;
  --text-muted:     #7a88a8;
  --text-placeholder: #a0aec0;
  --text-inverse:   #ffffff;

  /* Border */
  --border-light:  #eef0f5;
  --border:        #dbe3f0;
  --border-medium: #bfc8de;
  --border-focus:  #2563eb;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(15,27,53,0.06);
  --shadow-sm: 0 1px 6px rgba(15,27,53,0.08);
  --shadow-md: 0 4px 16px rgba(15,27,53,0.10);
  --shadow-lg: 0 8px 32px rgba(15,27,53,0.13);
  --shadow-xl: 0 16px 48px rgba(15,27,53,0.16);

  /* Border Radius */
  --r-xs:  4px;
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  14px;
  --r-xl:  20px;
  --r-2xl: 28px;
  --r-full: 9999px;

  /* Typography */
  --font: 'Sarabun', 'Helvetica Neue', Arial, sans-serif;
  --font-size-xs:   12px;
  --font-size-sm:   13px;
  --font-size-base: 15px;
  --font-size-md:   16px;
  --font-size-lg:   18px;
  --font-size-xl:   20px;
  --font-size-2xl:  24px;
  --font-size-3xl:  30px;
  --font-size-4xl:  36px;
  --line-height:    1.65;

  /* Spacing */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Layout */
  --container-sm:  540px;
  --container-md:  768px;
  --container-lg:  960px;
  --container-xl: 1200px;
  --sidebar-w:     230px;
  --navbar-h:       58px;
  --bottom-nav-h:   60px;

  /* Transition */
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:  cubic-bezier(0, 0, 0.2, 1);
  --ease-in:   cubic-bezier(0.4, 0, 1, 1);
  --duration:  0.18s;
  --duration-md: 0.28s;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--text-primary);
  background-color: var(--gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--blue-600);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}
a:hover { color: var(--blue-700); }

button, input, select, textarea {
  font-family: var(--font);
  font-size: inherit;
}

ul, ol { list-style: none; }

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  line-height: 1.3;
  font-weight: 700;
}
h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: var(--font-size-md); }
h6 { font-size: var(--font-size-base); }

.text-xs    { font-size: var(--font-size-xs); }
.text-sm    { font-size: var(--font-size-sm); }
.text-base  { font-size: var(--font-size-base); }
.text-md    { font-size: var(--font-size-md); }
.text-lg    { font-size: var(--font-size-lg); }
.text-xl    { font-size: var(--font-size-xl); }
.text-2xl   { font-size: var(--font-size-2xl); }
.text-3xl   { font-size: var(--font-size-3xl); }

.font-light    { font-weight: 300; }
.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-extrabold{ font-weight: 800; }

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-inverse   { color: var(--text-inverse); }
.text-blue      { color: var(--blue-600); }
.text-success   { color: var(--success); }
.text-warning   { color: var(--warning); }
.text-danger    { color: var(--danger); }

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

.leading-tight  { line-height: 1.25; }
.leading-normal { line-height: 1.65; }
.leading-loose  { line-height: 1.9; }

.truncate {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Section label (ALL CAPS subtitle) */
.label-section {
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

/* ============================================================
   4. LAYOUT — CONTAINER & GRID
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}
.container-sm  { max-width: var(--container-sm); }
.container-md  { max-width: var(--container-md); }
.container-lg  { max-width: var(--container-lg); }

/* App shell */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* Main layout with sidebar */
.layout-main {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  flex: 1;
  min-height: 0;
}

.layout-content {
  padding: var(--sp-6);
  overflow-y: auto;
  background: var(--gray-50);
}

/* Grid helpers */
.grid { display: grid; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-4); }

/* Flex helpers */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.items-start  { align-items: flex-start; }
.items-center { align-items: center; }
.items-end    { align-items: flex-end; }
.justify-start  { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end    { justify-content: flex-end; }
.justify-between{ justify-content: space-between; }
.gap-1  { gap: var(--sp-1); }
.gap-2  { gap: var(--sp-2); }
.gap-3  { gap: var(--sp-3); }
.gap-4  { gap: var(--sp-4); }
.gap-5  { gap: var(--sp-5); }
.gap-6  { gap: var(--sp-6); }
.flex-1 { flex: 1 1 0%; }

/* ============================================================
   5. SPACING UTILITIES
   ============================================================ */
.m-0 { margin: 0; }
.mt-1 { margin-top: var(--sp-1); } .mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); } .mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); } .mt-6 { margin-top: var(--sp-6); }
.mb-1 { margin-bottom: var(--sp-1); } .mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); } .mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); } .mb-6 { margin-bottom: var(--sp-6); }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-inline: auto; }

.p-0 { padding: 0; }
.p-2 { padding: var(--sp-2); }
.p-3 { padding: var(--sp-3); }
.p-4 { padding: var(--sp-4); }
.p-5 { padding: var(--sp-5); }
.p-6 { padding: var(--sp-6); }
.px-3 { padding-inline: var(--sp-3); }
.px-4 { padding-inline: var(--sp-4); }
.px-6 { padding-inline: var(--sp-6); }
.py-2 { padding-block: var(--sp-2); }
.py-3 { padding-block: var(--sp-3); }
.py-4 { padding-block: var(--sp-4); }

/* ============================================================
   6. NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--navbar-h);
  background: var(--navy-800);
  display: flex;
  align-items: center;
  padding-inline: var(--sp-6);
  gap: var(--sp-4);
  box-shadow: 0 2px 12px rgba(15,27,53,0.25);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
  text-decoration: none;
}

.navbar-logo {
  width: 36px;
  height: 36px;
  background: var(--blue-500);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
}

.navbar-brand-name {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.2px;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  padding: 6px 14px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--duration) var(--ease);
}
.nav-link:hover { color: var(--white); background: rgba(255,255,255,0.09); }
.nav-link.active { color: var(--white); background: var(--blue-500); }

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

/* Hamburger (mobile) */
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-2);
  border-radius: var(--r-sm);
  color: rgba(255,255,255,0.8);
  font-size: 20px;
  line-height: 1;
  transition: background var(--duration) var(--ease);
}
.navbar-toggle:hover { background: rgba(255,255,255,0.1); }

/* Mobile nav drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
}
.mobile-drawer.open { display: block; }
.drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
}
.drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 80%;
  max-width: 300px;
  background: var(--navy-800);
  padding: var(--sp-6) var(--sp-4);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform var(--duration-md) var(--ease-out);
}
.mobile-drawer.open .drawer-panel {
  transform: translateX(0);
}
.drawer-nav-link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-3);
  border-radius: var(--r-md);
  font-size: var(--font-size-md);
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  margin-bottom: 2px;
  transition: all var(--duration) var(--ease);
}
.drawer-nav-link:hover,
.drawer-nav-link.active {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}
.drawer-nav-link.active { background: var(--blue-500); color: var(--white); }

/* Bottom navigation bar (mobile only) */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  background: var(--white);
  border-top: 1px solid var(--border);
  z-index: 100;
  box-shadow: 0 -2px 12px rgba(15,27,53,0.08);
}
.bottom-nav-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 100%;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: color var(--duration) var(--ease);
  position: relative;
}
.bottom-nav-item .nav-icon { font-size: 20px; line-height: 1; }
.bottom-nav-item.active { color: var(--blue-600); }
.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  background: var(--blue-600);
  border-radius: 0 0 var(--r-xs) var(--r-xs);
}

/* ============================================================
   7. SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--border);
  position: sticky;
  top: var(--navbar-h);
  height: calc(100dvh - var(--navbar-h));
  overflow-y: auto;
  padding: var(--sp-4) var(--sp-3);
  scrollbar-width: thin;
  scrollbar-color: var(--gray-100) transparent;
  flex-shrink: 0;
}

.sidebar-section { margin-bottom: var(--sp-5); }
.sidebar-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-muted);
  padding: 0 var(--sp-2);
  margin-bottom: var(--sp-2);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 8px var(--sp-2);
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  margin-bottom: 1px;
}
.sidebar-item:hover { background: var(--gray-50); color: var(--navy-800); }
.sidebar-item.active {
  background: var(--blue-50);
  color: var(--blue-600);
  font-weight: 600;
}
.sidebar-item-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-item-count {
  margin-left: auto;
  background: var(--blue-100);
  color: var(--blue-600);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--r-full);
}
.sidebar-item.active .sidebar-item-count {
  background: var(--blue-600);
  color: var(--white);
}
.sidebar-divider {
  height: 1px;
  background: var(--border-light);
  margin: var(--sp-3) 0;
}

/* ============================================================
   8. CARD COMPONENTS
   ============================================================ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
}
.card-sm { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); }
.card-lg { padding: var(--sp-8); border-radius: var(--r-xl); }

.card-navy {
  background: var(--navy-800);
  border: none;
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-md);
  color: var(--white);
}
.card-blue {
  background: var(--blue-700);
  border: none;
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-md);
  color: var(--white);
}
.card-gradient {
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-700) 50%, var(--blue-700) 100%);
  border: none;
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  color: var(--white);
  box-shadow: var(--shadow-lg);
}

/* Stat card */
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-5);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: var(--r-md) 0 0 var(--r-md);
}
.stat-card.blue::before   { background: var(--blue-600); }
.stat-card.green::before  { background: var(--success); }
.stat-card.amber::before  { background: var(--warning); }
.stat-card.red::before    { background: var(--danger); }
.stat-card.navy::before   { background: var(--navy-700); }

.stat-num {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: var(--navy-800);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.stat-sub { font-size: var(--font-size-sm); color: var(--text-secondary); margin-top: 2px; }
.stat-icon {
  position: absolute;
  right: var(--sp-4);
  top: var(--sp-3);
  font-size: 26px;
  opacity: 0.12;
}

/* ============================================================
   9. BADGE & PILL
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: var(--r-full);
  font-size: var(--font-size-xs);
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}
.badge-blue    { background: var(--blue-100);    color: var(--blue-700); }
.badge-navy    { background: var(--navy-800);    color: var(--white); }
.badge-green   { background: var(--success-bg);  color: var(--success-text); }
.badge-amber   { background: var(--warning-bg);  color: var(--warning-text); }
.badge-red     { background: var(--danger-bg);   color: var(--danger-text); }
.badge-gray    { background: var(--gray-100);    color: var(--text-muted); }
.badge-outline {
  background: transparent;
  border: 1.5px solid var(--blue-600);
  color: var(--blue-600);
}

/* ============================================================
   10. BUTTON
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 9px 20px;
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all var(--duration) var(--ease);
  text-decoration: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 3px solid var(--blue-400); outline-offset: 2px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.btn-primary { background: var(--blue-600); color: var(--white); }
.btn-primary:hover { background: var(--blue-700); color: var(--white); }

.btn-navy { background: var(--navy-800); color: var(--white); }
.btn-navy:hover { background: var(--navy-700); color: var(--white); }

.btn-success { background: var(--success); color: var(--white); }
.btn-success:hover { background: #0ea472; color: var(--white); }

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

.btn-outline {
  background: transparent;
  color: var(--blue-600);
  border: 1.5px solid var(--blue-600);
}
.btn-outline:hover { background: var(--blue-50); color: var(--blue-700); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: var(--gray-50); color: var(--navy-800); }

.btn-white {
  background: var(--white);
  color: var(--navy-800);
  border: 1px solid var(--border);
}
.btn-white:hover { background: var(--gray-50); }

/* Sizes */
.btn-xs  { padding: 4px 10px;  font-size: var(--font-size-xs); border-radius: var(--r-sm); }
.btn-sm  { padding: 6px 14px;  font-size: var(--font-size-sm); }
.btn-lg  { padding: 12px 28px; font-size: var(--font-size-md); }
.btn-xl  { padding: 14px 36px; font-size: var(--font-size-lg); }
.btn-full{ width: 100%; }

/* Floating action button */
.btn-fab {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--blue-600);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: var(--shadow-lg);
  transition: all var(--duration) var(--ease);
}
.btn-fab:hover { background: var(--blue-700); transform: scale(1.06); }

/* ============================================================
   11. FORM ELEMENTS
   ============================================================ */
.form-group { margin-bottom: var(--sp-4); }
.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--sp-2);
}
.form-label.required::after {
  content: ' *';
  color: var(--danger);
}

.form-control {
  display: block;
  width: 100%;
  padding: 9px 13px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  line-height: 1.5;
  outline: none;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.form-control::placeholder { color: var(--text-placeholder); }
.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-control:disabled {
  background: var(--gray-50);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* Textarea */
textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* Select */
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%237a88a8' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 36px;
  cursor: pointer;
}

/* Input group */
.input-group {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.input-group:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.input-group .form-control {
  border: none;
  border-radius: 0;
  box-shadow: none;
  flex: 1;
}
.input-group .form-control:focus { box-shadow: none; }
.input-group-text {
  padding: 0 var(--sp-3);
  background: var(--gray-50);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  display: flex;
  align-items: center;
  border-right: 1.5px solid var(--border);
  white-space: nowrap;
}

/* Form hint */
.form-hint  { font-size: var(--font-size-sm); color: var(--text-muted); margin-top: var(--sp-1); }
.form-error { font-size: var(--font-size-sm); color: var(--danger); margin-top: var(--sp-1); }
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-valid   { border-color: var(--success); }

/* ============================================================
   12. PROGRESS BAR
   ============================================================ */
.progress {
  width: 100%;
  height: 7px;
  background: var(--gray-100);
  border-radius: var(--r-full);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--blue-600);
  border-radius: var(--r-full);
  transition: width 0.5s var(--ease-out);
}
.progress-bar.green  { background: var(--success); }
.progress-bar.amber  { background: var(--warning); }
.progress-bar.red    { background: var(--danger); }
.progress-bar.navy   { background: var(--navy-700); }
.progress-bar.stripe {
  background-image: repeating-linear-gradient(
    45deg, transparent, transparent 6px,
    rgba(255,255,255,0.25) 6px, rgba(255,255,255,0.25) 12px
  );
}

/* ============================================================
   13. EXAM — QUESTION CARD
   ============================================================ */
.exam-header {
  background: var(--navy-800);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: var(--sp-4) var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}
.exam-header-title {
  color: var(--white);
  font-size: var(--font-size-md);
  font-weight: 700;
}
.exam-header-sub {
  color: rgba(255,255,255,0.6);
  font-size: var(--font-size-sm);
}

/* Timer */
.timer-pill {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(255,255,255,0.12);
  border-radius: var(--r-full);
  padding: 6px 14px;
}
.timer-dot {
  width: 8px;
  height: 8px;
  background: #fbbf24;
  border-radius: 50%;
  animation: pulse-dot 1s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .5; transform: scale(0.8); }
}
.timer-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}
.timer-text.urgent { color: #fca5a5; animation: blink 0.8s ease-in-out infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.5} }

/* Question nav dots */
.question-nav {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: none;
  padding: var(--sp-3) var(--sp-6);
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.q-dot {
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  transition: all var(--duration) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.q-dot:hover    { border-color: var(--blue-400); color: var(--blue-600); }
.q-dot.current  { background: var(--blue-600); color: var(--white); border-color: var(--blue-600); }
.q-dot.correct  { background: var(--success); color: var(--white); border-color: var(--success); }
.q-dot.wrong    { background: var(--danger); color: var(--white); border-color: var(--danger); }
.q-dot.flagged  { background: var(--warning-bg); color: var(--warning-text); border-color: var(--warning); }

/* Question body */
.question-body {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  padding: var(--sp-6);
}
.question-number-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.question-text {
  font-size: var(--font-size-md);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.75;
  margin-bottom: var(--sp-5);
}

/* Image placeholder (for image-based questions) */
.question-image-slot {
  border: 2px dashed var(--gray-200);
  border-radius: var(--r-md);
  background: var(--gray-50);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  min-height: 80px;
  cursor: pointer;
  transition: border-color var(--duration) var(--ease);
  margin-bottom: var(--sp-5);
}
.question-image-slot:hover { border-color: var(--blue-400); }
.question-image-slot img {
  max-height: 280px;
  width: auto;
  border-radius: var(--r-sm);
}

/* Choice items */
.choice-list { display: flex; flex-direction: column; gap: var(--sp-3); }

.choice-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  background: var(--white);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.choice-item:hover {
  border-color: var(--blue-400);
  background: var(--blue-50);
}
.choice-item.selected {
  border-color: var(--blue-600);
  background: var(--blue-50);
}
.choice-item.correct {
  border-color: var(--success);
  background: var(--success-bg);
}
.choice-item.wrong {
  border-color: var(--danger);
  background: var(--danger-bg);
}

.choice-letter {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: var(--gray-50);
  color: var(--text-secondary);
  border: 1.5px solid var(--gray-100);
  transition: all var(--duration) var(--ease);
  margin-top: 1px;
}
.choice-item.selected .choice-letter { background: var(--blue-600); color: var(--white); border-color: var(--blue-600); }
.choice-item.correct  .choice-letter { background: var(--success); color: var(--white); border-color: var(--success); }
.choice-item.wrong    .choice-letter { background: var(--danger); color: var(--white); border-color: var(--danger); }

.choice-text {
  font-size: var(--font-size-base);
  color: var(--text-primary);
  line-height: 1.6;
  padding-top: 5px;
  flex: 1;
}

/* Choice image slot */
.choice-image {
  margin-top: var(--sp-2);
  max-height: 160px;
  width: auto;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}

/* Exam footer actions */
.exam-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}

/* ============================================================
   14. TABLE
   ============================================================ */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 500px;
}
thead tr {
  background: var(--gray-50);
  border-bottom: 1.5px solid var(--border);
}
thead th {
  padding: 10px var(--sp-4);
  text-align: left;
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background var(--duration) var(--ease);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--gray-50); }
tbody td {
  padding: 10px var(--sp-4);
  color: var(--text-primary);
  vertical-align: middle;
}

/* ============================================================
   15. TIMELINE
   ============================================================ */
.timeline { position: relative; }
.timeline-item {
  display: flex;
  gap: var(--sp-3);
  padding-bottom: var(--sp-5);
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item:last-child::before { display: none; }

.timeline-dot {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 1;
  flex-shrink: 0;
}
.timeline-dot.blue   { background: var(--blue-100);   color: var(--blue-600); }
.timeline-dot.green  { background: var(--success-bg); color: var(--success); }
.timeline-dot.amber  { background: var(--warning-bg); color: var(--warning); }
.timeline-dot.red    { background: var(--danger-bg);  color: var(--danger); }
.timeline-dot.navy   { background: var(--navy-800);   color: var(--white); }

.timeline-content { flex: 1; min-width: 0; }
.timeline-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  box-shadow: var(--shadow-xs);
}
.timeline-meta {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: var(--sp-2);
  padding-left: var(--sp-1);
}

/* ============================================================
   16. AVATAR
   ============================================================ */
.avatar {
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: var(--blue-100);
  color: var(--blue-700);
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-xs  { width: 26px; height: 26px; font-size: 11px; }
.avatar-sm  { width: 34px; height: 34px; font-size: 13px; }
.avatar-md  { width: 44px; height: 44px; font-size: 16px; }
.avatar-lg  { width: 60px; height: 60px; font-size: 22px; }
.avatar-xl  { width: 80px; height: 80px; font-size: 28px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-navy { background: var(--navy-800); color: var(--white); }

/* Notification badge on avatar */
.avatar-wrap { position: relative; display: inline-flex; }
.avatar-badge {
  position: absolute;
  top: 0; right: 0;
  width: 10px; height: 10px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--navy-800);
}

/* ============================================================
   17. NOTIFICATION BUTTON
   ============================================================ */
.notif-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.1);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.75);
  font-size: 16px;
  transition: background var(--duration) var(--ease);
}
.notif-btn:hover { background: rgba(255,255,255,0.18); }
.notif-badge {
  position: absolute;
  top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid var(--navy-800);
}

/* ============================================================
   18. DROPDOWN MENU
   ============================================================ */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-2);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all var(--duration) var(--ease);
}
.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 8px var(--sp-3);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--duration) var(--ease);
  text-decoration: none;
}
.dropdown-item:hover { background: var(--gray-50); color: var(--navy-800); }
.dropdown-item.danger:hover { background: var(--danger-bg); color: var(--danger-text); }
.dropdown-divider { height: 1px; background: var(--border-light); margin: var(--sp-2) 0; }

/* ============================================================
   19. MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,20,45,0.5);
  backdrop-filter: blur(3px);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-md) var(--ease);
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  width: 100%;
  max-width: 480px;
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95) translateY(8px);
  transition: transform var(--duration-md) var(--ease-out);
}
.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
}
.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gray-50);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  transition: all var(--duration) var(--ease);
  flex-shrink: 0;
}
.modal-close:hover { background: var(--gray-100); color: var(--navy-800); }
.modal-footer {
  display: flex;
  gap: var(--sp-3);
  justify-content: flex-end;
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border-light);
}

/* ============================================================
   20. ALERT / TOAST
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--font-size-sm);
  margin-bottom: var(--sp-4);
}
.alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-blue   { background: var(--info-bg);    color: var(--info-text);    border-left: 4px solid var(--info); }
.alert-green  { background: var(--success-bg); color: var(--success-text); border-left: 4px solid var(--success); }
.alert-amber  { background: var(--warning-bg); color: var(--warning-text); border-left: 4px solid var(--warning); }
.alert-red    { background: var(--danger-bg);  color: var(--danger-text);  border-left: 4px solid var(--danger); }

/* Toast */
.toast-container {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + var(--sp-4));
  right: var(--sp-4);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  pointer-events: none;
}
.toast {
  background: var(--navy-800);
  color: var(--white);
  padding: 10px var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  max-width: 320px;
  animation: slide-in-right 0.25s var(--ease-out);
}
@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   21. IMPORT ZONE
   ============================================================ */
.import-zone {
  border: 2px dashed var(--gray-200);
  border-radius: var(--r-lg);
  background: var(--white);
  padding: var(--sp-8) var(--sp-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  text-align: center;
}
.import-zone:hover {
  border-color: var(--blue-400);
  background: var(--blue-50);
}
.import-zone.drag-over {
  border-color: var(--blue-600);
  background: var(--blue-50);
  transform: scale(1.01);
}
.import-icon { font-size: 36px; opacity: 0.4; }

/* ============================================================
   22. SCORE RING (SVG-based)
   ============================================================ */
.score-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}
.score-ring {
  position: relative;
  width: 90px;
  height: 90px;
}
.score-ring svg {
  width: 90px;
  height: 90px;
  transform: rotate(-90deg);
}
.score-ring-bg { fill: none; stroke: var(--blue-100); stroke-width: 8; }
.score-ring-fill {
  fill: none;
  stroke: var(--blue-600);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s var(--ease-out);
}
.score-ring-fill.green { stroke: var(--success); }
.score-ring-fill.red   { stroke: var(--danger); }
.score-ring-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-ring-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy-800);
  line-height: 1;
}
.score-ring-unit { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   23. PAGE TABS
   ============================================================ */
.page-tabs {
  display: flex;
  border-bottom: 1.5px solid var(--border);
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.page-tabs::-webkit-scrollbar { display: none; }
.page-tab {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  white-space: nowrap;
  transition: all var(--duration) var(--ease);
  margin-bottom: -1.5px;
  text-decoration: none;
  display: inline-block;
  flex-shrink: 0;
}
.page-tab:hover { color: var(--navy-800); }
.page-tab.active { color: var(--blue-600); border-bottom-color: var(--blue-600); font-weight: 600; }

/* ============================================================
   24. BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue-600); }
.breadcrumb-sep { opacity: 0.4; font-size: 11px; }
.breadcrumb-current { color: var(--navy-800); font-weight: 600; }

/* ============================================================
   25. UTILITY CLASSES
   ============================================================ */
.hidden  { display: none !important; }
.visible { visibility: visible; }
.invisible { visibility: hidden; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.w-full   { width: 100%; }
.h-full   { height: 100%; }
.min-w-0  { min-width: 0; }
.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }

.rounded-sm  { border-radius: var(--r-sm); }
.rounded-md  { border-radius: var(--r-md); }
.rounded-lg  { border-radius: var(--r-lg); }
.rounded-xl  { border-radius: var(--r-xl); }
.rounded-full{ border-radius: var(--r-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.divider {
  height: 1px;
  background: var(--border);
  margin-block: var(--sp-5);
}

.sticky-top { position: sticky; top: 0; z-index: 50; }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--r-sm);
}
@keyframes skeleton-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* Fade-in animation */
.fade-in { animation: fade-in 0.3s var(--ease-out) both; }
@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   26. RESPONSIVE — TABLET (576px–991px)
   ============================================================ */
@media (max-width: 991px) {

  :root {
    --navbar-h: 54px;
    --font-size-3xl: 26px;
    --font-size-2xl: 22px;
  }

  .container { padding-inline: var(--sp-4); }

  /* Hide sidebar, show hamburger */
  .sidebar      { display: none; }
  .layout-main  { grid-template-columns: 1fr; }
  .layout-content { padding: var(--sp-4); }

  /* Navbar: hide desktop menu */
  .navbar-menu  { display: none; }
  .navbar-toggle { display: flex; }

  /* Grid collapse */
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }

  /* Exam header stack on tablet */
  .exam-header { flex-wrap: wrap; gap: var(--sp-3); }

  /* Question nav smaller dots */
  .q-dot { width: 28px; height: 28px; font-size: 11px; }

  /* Table allow scroll */
  table { font-size: 13px; }
}

/* ============================================================
   27. RESPONSIVE — MOBILE (< 576px)
   ============================================================ */
@media (max-width: 575px) {

  :root {
    --navbar-h: 52px;
    --font-size-3xl: 22px;
    --font-size-2xl: 19px;
    --font-size-xl:  17px;
    --font-size-lg:  16px;
  }

  .container { padding-inline: var(--sp-3); }
  .layout-content { padding: var(--sp-3); padding-bottom: calc(var(--bottom-nav-h) + var(--sp-3)); }

  /* Grid: full width on mobile */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  /* Stat grid: 2 columns on mobile */
  .stat-grid-4 { grid-template-columns: repeat(2, 1fr) !important; }

  /* Show bottom nav */
  .bottom-nav { display: flex; }

  /* Hide desktop nav actions (keep avatar + notif) */
  .navbar-brand-name { display: none; }
  .navbar { padding-inline: var(--sp-3); }

  /* Card adjustments */
  .card    { padding: var(--sp-4); }
  .card-lg { padding: var(--sp-5); border-radius: var(--r-lg); }

  /* Exam on mobile */
  .exam-header {
    padding: var(--sp-3) var(--sp-4);
    flex-wrap: wrap;
    gap: var(--sp-2);
  }
  .exam-header-title { font-size: 15px; }

  .question-nav { padding: var(--sp-2) var(--sp-4); gap: 4px; }
  .q-dot { width: 26px; height: 26px; font-size: 10px; border-radius: 5px; }

  .question-body { padding: var(--sp-4); }
  .question-text { font-size: 15px; margin-bottom: var(--sp-4); }

  .choice-item { padding: var(--sp-3); gap: var(--sp-2); }
  .choice-letter { width: 30px; height: 30px; min-width: 30px; font-size: 12px; }
  .choice-text { font-size: 14px; padding-top: 4px; }

  .exam-footer { flex-direction: column-reverse; gap: var(--sp-2); }
  .exam-footer .btn { width: 100%; }

  /* Timer pill */
  .timer-pill { padding: 5px 11px; }
  .timer-text { font-size: 14px; }

  /* Modal full-screen on mobile */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    max-width: 100%;
    max-height: 92dvh;
    padding: var(--sp-6) var(--sp-5);
  }

  /* Buttons full width in footer areas */
  .btn-mobile-full { width: 100%; }

  /* Table on mobile: card-style */
  .table-wrap { border-radius: var(--r-md); }
  table { min-width: 0; }

  /* Toast at bottom */
  .toast-container {
    bottom: calc(var(--bottom-nav-h) + var(--sp-3));
    left: var(--sp-3);
    right: var(--sp-3);
  }
  .toast { max-width: 100%; }

  /* Hide breadcrumb on very small */
  .breadcrumb-hide-mobile { display: none; }

  /* Page tabs scrollable with indicator */
  .page-tabs { padding-bottom: 1px; }
  .page-tab  { padding: 8px 14px; font-size: 13px; }

  /* Score ring smaller on mobile */
  .score-ring, .score-ring svg { width: 76px; height: 76px; }
  .score-ring-num { font-size: 18px; }
}

/* ============================================================
   28. PRINT STYLES
   ============================================================ */
@media print {
  .navbar, .sidebar, .bottom-nav, .btn, .page-tabs { display: none !important; }
  .layout-main { grid-template-columns: 1fr; }
  .layout-content { padding: 0; }
  body { background: white; font-size: 12pt; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ============================================================
   END OF STYLESHEET — ExamPro v1.0
   ============================================================ */
