@font-face {
  font-family: "Tajawal";
  src: url("/fonts/Tajawal-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Tajawal";
  src: url("/fonts/Tajawal-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Tajawal";
  src: url("/fonts/Tajawal-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Tajawal";
  src: url("/fonts/Tajawal-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Tajawal";
  src: url("/fonts/Tajawal-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JannaLT";
  src: url("/fonts/emarat/JannaLT-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JannaLT";
  src: url("/fonts/emarat/JannaLT-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --white: #fff;
  --blue: #6A89A7;
  --navy: #384959;
  --gold: #C59B4A;
  --font-sans: "Tajawal", "JannaLT", Arial, sans-serif;
  --page: color-mix(in srgb, var(--blue) 11%, var(--white));
  --surface-soft: color-mix(in srgb, var(--blue) 7%, var(--white));
  --line: color-mix(in srgb, var(--blue) 32%, var(--white));
  --line-strong: color-mix(in srgb, var(--navy) 34%, var(--white));
  --muted: color-mix(in srgb, var(--navy) 72%, var(--white));
  --shadow-soft: 0 18px 46px color-mix(in srgb, var(--navy) 10%, var(--white));
  --shadow-card: 0 14px 30px color-mix(in srgb, var(--navy) 8%, var(--white));
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--page);
  color: var(--navy);
  font-family: var(--font-sans);
  line-height: 1.55;
}

html[dir="ltr"] body { direction: ltr; }

button, input, textarea, select { font: inherit; }
button { border: 0; cursor: pointer; }
a { color: var(--blue); text-decoration: none; }

.language-toggle {
  min-width: 96px;
}

.login-language,
.exam-language {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 20;
}

html[dir="ltr"] .login-language,
html[dir="ltr"] .exam-language {
  left: auto;
  right: 18px;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
}

.loader-content {
  width: min(360px, calc(100vw - 48px));
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
  color: var(--white);
}

.loader-content p {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
}

.loader-progress {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--white);
}

.loader-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transform-origin: right center;
  animation: loader-progress .75s linear forwards;
}

.page-loader.hidden { display: none; }

.is-hidden { display: none !important; }

@keyframes logo-pulse {
  0%, 100% { transform: scale(.94); }
  50% { transform: scale(1.08); }
}

@keyframes loader-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.brand-lockup {
  direction: ltr;
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  line-height: 1;
  color: var(--navy);
  letter-spacing: 0;
}

.brand-logo {
  display: block;
  width: 92px;
  height: 92px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 18px 42px rgba(12, 35, 64, .14);
}

.brand-lockup-copy {
  display: grid;
  justify-items: center;
  gap: 0;
  min-width: 0;
}

.brand-lockup strong {
  display: block;
  font-size: clamp(26px, 5vw, 42px);
  font-weight: 900;
  letter-spacing: 0;
}

.brand-lockup span {
  display: block;
  font-size: clamp(12px, 2.2vw, 18px);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-lockup em {
  display: block;
  margin-top: 0;
  font-style: normal;
  font-size: clamp(10px, 1.7vw, 13px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0;
}

.brand-lockup-loader {
  color: var(--white);
  animation: logo-pulse 1.25s ease-in-out infinite;
}

.brand-lockup-loader .brand-logo {
  width: min(172px, 48vw);
  height: min(172px, 48vw);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}

.brand-lockup-login {
  width: min(100%, 300px);
  margin: 0 auto 22px;
  padding: 18px 16px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.brand-lockup-sidebar {
  width: 100%;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  gap: 8px;
  text-align: center;
  color: var(--white);
}

.brand-lockup-sidebar .brand-logo {
  width: 78px;
  height: 78px;
  padding: 2px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .24);
}

.brand-lockup-sidebar .brand-lockup-copy {
  justify-items: center;
}

.brand-lockup-sidebar em {
  max-width: 100%;
  font-size: 10px;
  line-height: 1.35;
  color: color-mix(in srgb, var(--white) 84%, var(--blue));
}

.login-screen,
.exam-body {
  min-height: 100vh;
  background: var(--page);
}

.exam-body {
  background:
    linear-gradient(135deg, rgba(16,32,51,.06), rgba(14,124,120,.08)),
    radial-gradient(circle at 18% 16%, rgba(14,124,120,.16), transparent 26%),
    radial-gradient(circle at 88% 8%, rgba(242,184,75,.16), transparent 24%),
    var(--page);
}

.login-screen {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card,
.exam-card,
.section,
.topbar,
.focus-panel,
.metric-card,
.workflow-step,
.accreditation-card,
.status-card,
.verification-panel,
.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.login-card {
  width: min(460px, 100%);
  padding: 32px;
  box-shadow: var(--shadow-soft);
}

.login-card h1 { margin: 0 0 8px; font-size: 30px; }
.login-card p { margin: 0 0 24px; color: var(--muted); }

.app-shell {
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  display: grid;
  grid-template-columns: 292px 1fr;
  align-items: stretch;
  overflow-x: hidden;
}

.sidebar {
  color: var(--white);
  padding: 18px;
  position: relative;
  align-self: stretch;
  height: auto;
  min-height: 100vh;
  background: var(--navy);
  overflow: visible;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(255,255,255,.06);
  border-radius: 999px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--white) 28%, var(--blue));
  border-radius: 999px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--white) 42%, var(--blue));
}

.mobile-nav-backdrop,
.mobile-menu-btn {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px 18px;
  border-bottom: 1px solid var(--blue);
  margin-bottom: 16px;
}

.brand > strong { display: block; color: var(--white); font-size: 18px; }
.brand > span { display: block; color: var(--white); font-size: 12px; margin-top: 3px; }

.nav {
  display: grid;
  gap: 13px;
  padding-bottom: 72px;
}

.nav-group {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background: rgba(255,255,255,.045);
}

.nav-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 3px 2px;
  color: color-mix(in srgb, var(--white) 82%, var(--blue));
}

.nav-group-title span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(197,155,74,.13);
}

.nav-group-title strong {
  font-size: 11px;
  font-weight: 900;
}

.nav button {
  width: 100%;
  min-height: 48px;
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  overflow: hidden;
  border-radius: 12px;
  color: color-mix(in srgb, var(--white) 91%, var(--blue));
  background: transparent;
  border: 1px solid transparent;
  text-align: right;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

html[dir="ltr"] .nav button {
  text-align: left;
}

.nav button::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
}

.nav button[data-tone="blue"] { --nav-accent: var(--blue); }
.nav button[data-tone="gold"] { --nav-accent: var(--gold); }
.nav button[data-tone="teal"] { --nav-accent: #4f9b92; }

.nav-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--white);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--nav-accent) 72%, var(--white)), var(--nav-accent));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 10px 18px rgba(0,0,0,.12);
}

.nav-icon svg {
  width: 21px;
  height: 21px;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
  font-size: 14px;
}

.nav-arrow {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: color-mix(in srgb, var(--white) 62%, var(--blue));
  font-size: 22px;
  line-height: 1;
}

.nav button.active,
.nav button:hover {
  transform: translateX(-1px);
  background: rgba(255,255,255,.96);
  color: var(--navy);
  border-color: rgba(255,255,255,.88);
}

html[dir="ltr"] .nav button.active,
html[dir="ltr"] .nav button:hover {
  transform: translateX(1px);
}

.nav button.active::after,
.nav button:hover::after {
  background: var(--nav-accent);
}

.nav button.active .nav-arrow,
.nav button:hover .nav-arrow {
  color: var(--navy);
}

.main {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  padding: 34px;
  background: var(--page);
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, .85fr) minmax(0, .9fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  margin-bottom: 18px;
  padding: 14px;
  min-height: 92px;
}

.mobile-menu-btn {
  width: 54px;
  height: 54px;
  position: relative;
  place-items: center;
  padding: 0;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 18px;
  color: var(--navy);
  background:
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(245,248,250,.9)),
    var(--white);
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--white));
  box-shadow: 0 16px 36px color-mix(in srgb, var(--navy) 12%, transparent);
  transition: transform .18s ease, color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.mobile-menu-btn::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(106,137,167,.16), rgba(197,155,74,.10));
  opacity: .75;
}

.mobile-menu-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 44px color-mix(in srgb, var(--navy) 16%, transparent);
}

.mobile-menu-btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 30%, var(--white));
  outline-offset: 3px;
}

.mobile-menu-btn .menu-mark {
  position: relative;
  z-index: 1;
  width: 25px;
  height: 18px;
  display: grid;
  align-content: space-between;
}

.mobile-menu-btn .menu-mark span {
  display: block;
  width: 25px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 1px 0 rgba(255,255,255,.55);
  transition: transform .18s ease, opacity .18s ease, width .18s ease;
}

.mobile-menu-btn .menu-mark span:nth-child(2) {
  width: 17px;
  justify-self: end;
}

html[dir="ltr"] .mobile-menu-btn .menu-mark span:nth-child(2) {
  justify-self: start;
}

.mobile-menu-btn[aria-expanded="true"] {
  color: var(--white);
  background: linear-gradient(145deg, var(--navy), color-mix(in srgb, var(--navy) 78%, var(--blue)));
  border-color: color-mix(in srgb, var(--navy) 80%, var(--white));
}

.mobile-menu-btn[aria-expanded="true"]::before {
  opacity: .18;
}

.mobile-menu-btn[aria-expanded="true"] .menu-mark span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-menu-btn[aria-expanded="true"] .menu-mark span:nth-child(2) {
  opacity: 0;
  width: 0;
}

.mobile-menu-btn[aria-expanded="true"] .menu-mark span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.topbar-title {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.topbar-title > span,
.workspace-card > span,
.operator-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.topbar h1 {
  margin: 0;
  color: var(--navy);
  font-size: 28px;
  line-height: 1.08;
}

.workspace-card,
.operator-card {
  min-height: 64px;
  min-width: 0;
  display: grid;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.workspace-card {
  gap: 1px;
  padding: 10px 13px;
}

.workspace-card strong,
.operator-card strong {
  color: var(--navy);
  font-size: 15px;
  line-height: 1.25;
}

.workspace-card strong,
.workspace-card small,
.operator-card strong,
.operator-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-card small,
.operator-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.operator-card {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 12px;
}

.operator-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--navy);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

.topbar-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

#view {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.section {
  max-width: 100%;
  overflow: hidden;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-soft);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.section h2 { margin: 0; font-size: 22px; color: var(--navy); }
.section h3,
.subsection h3 { margin: 0 0 12px; color: var(--navy); }
.section .hint,
.hint { color: var(--muted); font-size: 13px; margin-top: 4px; }
.section-head.compact { margin-bottom: 12px; }
.subsection {
  padding: 16px;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .72fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 16px;
}

.hero-panel {
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 22px;
  color: var(--navy);
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), color-mix(in srgb, var(--surface-soft) 72%, var(--white))),
    var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-card);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset-inline-start: 22px;
  bottom: 18px;
  width: 54px;
  height: 3px;
  background: var(--gold);
  border-radius: 999px;
  opacity: .78;
}

.hero-panel h2 {
  margin: 0;
  font-size: clamp(25px, 2.4vw, 34px);
  line-height: 1.12;
}

.hero-panel p {
  max-width: 680px;
  color: var(--muted);
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--white);
  font-size: 12px;
  font-weight: 800;
}

.hero-actions,
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.section-actions,
.section-action {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body.modal-open {
  overflow: hidden;
}

body.mobile-nav-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--navy) 72%, var(--white));
}

.modal-panel {
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px color-mix(in srgb, var(--navy) 28%, var(--white));
  overflow: hidden;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px;
  background: var(--navy);
  color: var(--white);
}

.modal-head h2 {
  margin: 0;
  color: var(--white);
  font-size: 24px;
}

.modal-head p {
  margin: 6px 0 0;
  color: var(--white);
  font-size: 13px;
}

.modal-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--white);
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.modal-body {
  padding: 24px;
  overflow: auto;
  background: var(--white);
}

.modal-body .exam-studio {
  grid-template-columns: minmax(0, 1fr) minmax(210px, 280px);
}

.focus-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  padding: 14px;
}
.focus-panel h3 { display: none; }

.focus-row {
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}
.focus-row:last-child { border-bottom: 1px solid var(--line); }
.focus-row span { color: var(--muted); font-size: 12px; font-weight: 800; }
.focus-row strong { order: -1; color: var(--navy); font-size: 24px; line-height: 1; }

.stat-card,
.metric-card {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 16px;
}
.stat-card strong,
.metric-card strong { display: block; font-size: 26px; color: var(--navy); line-height: 1; }
.stat-card span,
.metric-card span { color: var(--muted); font-size: 12px; font-weight: 800; }

.workflow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.workflow-step {
  padding: 16px;
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.workflow-step b,
.rail-step b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--white);
  background: var(--blue);
}

.workflow-step strong { display: block; margin: 0; color: var(--navy); }
.workflow-step span { color: var(--muted); font-size: 13px; }

.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-weight: 800; font-size: 13px; color: var(--navy); }
.field.upload-wide:has(.upload-dropzone) {
  grid-column: 1 / -1;
}

.candidate-upload-pair {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.candidate-upload-pair .field {
  margin-bottom: 0;
}

.candidate-upload-pair .upload-dropzone {
  min-height: 96px;
  padding: 34px 8px 10px;
  gap: 4px;
}

.candidate-upload-pair .upload-chip {
  top: 8px;
  inset-inline-end: 8px;
  min-height: 22px;
  padding: 3px 9px;
  font-size: 10px;
}

.candidate-upload-pair .upload-title {
  font-size: 12px;
  line-height: 1.25;
}

.candidate-upload-pair .upload-hint {
  display: none;
}

.candidate-upload-pair .upload-picker {
  gap: 6px;
  margin-top: 0;
}

.candidate-upload-pair .upload-picker strong {
  display: none;
  max-width: 100%;
  font-size: 10px;
}

.candidate-upload-pair .upload-picker span {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 11px;
}

.candidate-upload-pair .upload-dropzone.has-files .upload-picker strong {
  display: block;
}

.filter-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), color-mix(in srgb, var(--surface-soft) 78%, var(--white))),
    var(--white);
  box-shadow: var(--shadow-card);
}

.filter-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.filter-panel-head strong {
  display: block;
  color: var(--navy);
  font-size: 17px;
  line-height: 1.2;
}

.filter-panel-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
}

.filter-counter {
  min-width: 86px;
  display: grid;
  justify-items: center;
  gap: 0;
  padding: 8px 12px;
  border-radius: 14px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.filter-counter strong {
  font-size: 22px;
  line-height: 1;
}

.filter-counter span {
  margin: 0;
  font-size: 11px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  gap: 10px;
}

.filter-field {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 13px;
  background: var(--white);
  border: 1px solid color-mix(in srgb, var(--line) 86%, var(--white));
}

.filter-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.filter-field input,
.filter-field select {
  min-height: 40px;
  margin: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-soft) 74%, var(--white));
}

.filter-field.compact {
  min-width: 140px;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--muted);
}
.inline-check input {
  width: auto;
}

.choice-grid,
.material-list {
  display: grid;
  gap: 10px;
}

.choice-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.choice-grid label,
.material-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.choice-grid label {
  font-weight: 800;
  color: var(--navy);
}

.choice-grid input {
  width: auto;
  margin: 0;
}

.native-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-dropzone {
  min-height: 118px;
  width: 100%;
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 42px 14px 14px;
  border: 2px dashed color-mix(in srgb, var(--blue) 42%, var(--white));
  border-radius: calc(var(--radius) + 2px);
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), color-mix(in srgb, var(--surface-soft) 62%, var(--white))),
    var(--white);
  color: var(--navy);
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.upload-dropzone:hover,
.upload-dropzone.is-dragging {
  border-color: color-mix(in srgb, var(--navy) 56%, var(--blue));
  background:
    linear-gradient(180deg, var(--white), color-mix(in srgb, var(--blue) 8%, var(--white))),
    var(--white);
  box-shadow: 0 16px 34px color-mix(in srgb, var(--navy) 10%, var(--white));
}

.upload-dropzone.is-dragging {
  transform: translateY(-1px);
}

.upload-chip {
  position: absolute;
  top: 10px;
  inset-inline-end: 12px;
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
  direction: ltr;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--navy) 6%, var(--white));
}

.upload-title {
  margin-top: 0;
  color: #111827;
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 900;
  line-height: 1.25;
}

.upload-hint {
  max-width: 680px;
  color: color-mix(in srgb, var(--navy) 70%, var(--blue));
  font-size: 12px;
  font-weight: 500;
}

.upload-picker {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  direction: ltr;
}

.upload-picker strong {
  max-width: min(240px, 48vw);
  overflow: hidden;
  color: color-mix(in srgb, var(--navy) 84%, var(--blue));
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: ltr;
}

.upload-picker span {
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 7px 16px;
  border-radius: 999px;
  color: var(--white);
  background: #111827;
  box-shadow: 0 12px 24px color-mix(in srgb, #111827 16%, var(--white));
  font-weight: 900;
}

.upload-dropzone.has-files {
  border-style: solid;
  border-color: color-mix(in srgb, var(--gold) 42%, var(--line));
}

.upload-dropzone.has-files .upload-picker span {
  background: var(--navy);
}

@media (max-width: 700px) {
  .upload-dropzone {
    min-height: 118px;
    padding: 40px 12px 13px;
    gap: 5px;
  }

  .upload-chip {
    top: 12px;
    inset-inline-end: 12px;
    min-height: 30px;
    padding: 4px 13px;
    font-size: 12px;
  }

  .upload-title {
    margin-top: 4px;
    font-size: 17px;
  }

  .upload-hint {
    font-size: 12px;
  }

  .upload-picker {
    width: 100%;
    gap: 8px;
  }

  .upload-picker strong {
    max-width: 100%;
    font-size: 12px;
  }

  .upload-picker span {
    min-height: 36px;
    padding: 7px 14px;
  }
}

.material-builder {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.material-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.material-row {
  align-items: stretch;
}

.material-row textarea,
.material-row .upload-dropzone {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.material-row textarea {
  min-height: 98px;
}

.material-row .btn {
  align-self: center;
  min-height: 44px;
}

.representative-row {
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
}
.representative-row .btn {
  min-height: 44px;
}

.license-preview,
.payment-evidence-preview,
.candidate-file-preview {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, var(--white));
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, var(--white), color-mix(in srgb, var(--surface-soft) 74%, var(--white)));
  box-shadow: var(--shadow-card);
}

.license-preview img,
.payment-evidence-preview img,
.candidate-file-preview img {
  width: 132px;
  height: 92px;
  display: block;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--white);
}

.license-preview span,
.payment-evidence-preview span,
.candidate-file-preview span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  word-break: break-word;
}

.candidate-file-preview:not(:has(img)) {
  grid-template-columns: minmax(0, 1fr);
}

.candidate-thumb {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  box-shadow: var(--shadow-card);
}

.candidate-thumb-btn {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  background: transparent;
}

.file-view-btn {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 12px;
}

.document-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.document-card {
  min-width: 0;
  display: grid;
  grid-template-rows: 170px minmax(0, auto);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.document-card-preview {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  color: var(--navy);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--blue) 12%, var(--white)), color-mix(in srgb, var(--gold) 9%, var(--white)));
}

.document-card-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .22s ease;
}

.document-card:hover .document-card-preview img {
  transform: scale(1.035);
}

.document-file-mark,
.document-viewer-file {
  display: grid;
  place-items: center;
  gap: 8px;
  color: var(--navy);
}

.document-file-mark svg,
.document-viewer-file svg {
  width: 54px;
  height: 54px;
  color: var(--blue);
}

.document-file-mark strong {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 11px;
}

.document-card-body {
  display: grid;
  gap: 7px;
  padding: 13px;
}

.document-type {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--navy);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 900;
}

.document-card-body strong {
  color: var(--navy);
  font-size: 16px;
  line-height: 1.25;
}

.document-card-body small {
  min-height: 18px;
  color: var(--muted);
  font-weight: 700;
}

.document-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.document-viewer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 16px;
}

.document-viewer-stage {
  min-height: 540px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.document-viewer-image {
  max-width: 100%;
  max-height: 74vh;
  object-fit: contain;
  display: block;
}

.document-viewer-frame {
  width: 100%;
  height: 74vh;
  min-height: 520px;
  border: 0;
  background: var(--white);
}

.document-viewer-side {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.document-viewer-side span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.document-viewer-side strong {
  color: var(--navy);
  font-size: 18px;
  line-height: 1.25;
}

.document-viewer-side small {
  color: var(--muted);
  font-weight: 700;
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-soft);
  font-weight: 800;
}

.compact-lines {
  display: inline-block;
  min-width: 180px;
  color: var(--muted);
  line-height: 1.9;
}

.email-connect-card {
  max-width: 860px;
  margin: 0 auto;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.email-connect-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.email-connect-head h3 {
  margin: 0 0 4px;
  font-size: 22px;
}

.email-connect-head p {
  margin: 0;
  color: var(--muted);
}

.email-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.email-tabs span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
  background: var(--white);
}

.email-tabs .active {
  color: var(--white);
  background: var(--navy);
  border-color: var(--navy);
}

.email-steps {
  display: grid;
  gap: 12px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.email-steps div {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 12px;
}

.email-steps b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid var(--line);
}

.email-advanced-title {
  margin: 18px 0 10px;
  font-weight: 900;
}

.copy-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  direction: ltr;
  font-weight: 800;
}

.money {
  display: inline-flex;
  align-items: center;
  gap: .24em;
  white-space: nowrap;
  direction: ltr;
  unicode-bidi: isolate;
  line-height: 1;
}

.money .aed-logo {
  width: 1.15em;
  height: 1em;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  transform: translateY(.03em);
}

.money .aed-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.money-code {
  color: var(--muted);
  font-size: .92em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.field input,
.field textarea,
.field select,
#center-selector,
.candidate-picker input,
.question textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--navy);
  padding: 12px 13px;
  outline: none;
}
.field .inline-check input {
  width: auto;
  padding: 0;
}

.field input:hover,
.field textarea:hover,
.field select:hover,
#center-selector:hover,
.candidate-picker input:hover,
.question textarea:hover {
  border-color: var(--blue);
}

.field textarea,
.question textarea { min-height: 120px; resize: vertical; }

.field input:focus,
.field textarea:focus,
.field select:focus,
#center-selector:focus,
.candidate-picker input:focus,
.question textarea:focus {
  border-color: var(--blue);
  outline: 2px solid var(--surface-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  background: var(--blue);
  color: var(--white);
  border: 1px solid var(--blue);
  font-weight: 800;
  box-shadow: var(--shadow-card);
}

.btn:hover,
.btn.dark,
.btn.gold {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.btn.secondary {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--line);
}

.btn.compact-btn {
  min-height: 38px;
  padding: 7px 12px;
  font-size: 13px;
  box-shadow: none;
}

.btn.red {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--line-strong);
}

.btn:disabled { cursor: not-allowed; }

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

table { width: 100%; border-collapse: collapse; min-width: 780px; }

th, td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: top;
  font-size: 13px;
}

html[dir="ltr"] th,
html[dir="ltr"] td {
  text-align: left;
}

th {
  background: var(--navy);
  color: var(--white);
  font-weight: 800;
}

tbody tr { background: var(--white); }
tbody tr:nth-child(even) { background: var(--surface-soft); }
tr:last-child td { border-bottom: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  background: var(--surface-soft);
  color: var(--navy);
  border: 1px solid var(--line);
  min-height: 26px;
}

.badge.green,
.badge.red,
.badge.gold,
.badge.purple {
  background: var(--surface-soft);
  color: var(--navy);
  border-color: var(--line);
}

.alert {
  border-radius: var(--radius);
  padding: 13px 15px;
  margin-bottom: 16px;
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--line);
  border-right: 6px solid var(--blue);
  box-shadow: var(--shadow-card);
}

.alert.error,
.alert.success {
  background: var(--white);
  color: var(--navy);
  border-color: var(--line);
}

.accreditation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  padding-bottom: 4px;
}

.accreditation-card {
  padding: 16px;
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow: hidden;
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.accreditation-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--blue);
}

.accreditation-card.featured {
  border-color: var(--blue);
  box-shadow: var(--shadow-soft);
}

.accreditation-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.accreditation-logo-mark {
  width: 104px;
  height: 76px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: var(--radius-sm);
  color: var(--white);
  background: var(--navy);
  border: 1px solid var(--navy);
  flex: 0 0 auto;
  box-shadow: var(--shadow-card);
  position: relative;
}

.accreditation-logo-mark.has-image {
  background: var(--white);
  border-color: var(--line);
  padding: 9px;
}

.accreditation-logo-mark::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--blue);
  border-radius: calc(var(--radius-sm) - 2px);
}

.accreditation-logo-mark.has-image::before {
  display: none;
}

.accreditation-logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.accreditation-logo-mark span {
  position: relative;
  z-index: 1;
  font-size: 23px;
  line-height: 1;
  font-weight: 900;
}

.accreditation-logo-mark small {
  position: relative;
  z-index: 1;
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
}

.accreditation-code {
  text-align: left;
  direction: ltr;
}

html[dir="ltr"] .accreditation-code {
  text-align: right;
}

.accreditation-code span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.accreditation-code strong {
  display: block;
  color: var(--navy);
  font-size: 18px;
}

.accreditation-copy {
  display: grid;
  gap: 6px;
}

.accreditation-sector {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--navy);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 900;
}

.accreditation-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  color: var(--navy);
}

.accreditation-card .accreditation-copy > strong {
  color: var(--blue);
  font-size: 14px;
}

.accreditation-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.accreditation-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.accreditation-details div {
  padding: 11px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.accreditation-details span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.accreditation-details strong {
  display: block;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.35;
}

.accreditation-site {
  color: var(--blue);
  text-decoration: none;
}

.accreditation-site:hover {
  text-decoration: underline;
}

.accreditation-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.accreditation-tags span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 800;
}

.accreditation-summary,
.status-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.status-card {
  padding: 15px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}

.accreditation-summary { margin-bottom: 14px; }

.status-card strong { display: block; color: var(--navy); }
.status-card span { color: var(--muted); font-size: 12px; }

.accreditation-showcase-root {
  min-height: 420px;
}

.accreditation-showcase {
  display: grid;
  gap: 16px;
}

.accreditation-showcase-hero {
  min-height: 170px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), color-mix(in srgb, var(--surface-soft) 76%, var(--white))),
    var(--white);
  color: var(--navy);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.accreditation-three-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .08;
  pointer-events: none;
}

.accreditation-three-scene canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.showcase-hero-content,
.showcase-selected-panel {
  position: relative;
  z-index: 1;
}

.showcase-hero-content {
  max-width: 680px;
  display: grid;
  gap: 12px;
}

.showcase-hero-content > span,
.showcase-selected-panel > span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.showcase-hero-content h3 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.12;
}

.showcase-hero-content p,
.showcase-selected-panel p {
  margin: 0;
  color: var(--muted);
  max-width: 580px;
}

.accreditation-showcase-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 0;
}

.accreditation-showcase-stat {
  min-height: 64px;
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 4px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.accreditation-showcase-stat strong {
  color: var(--navy);
  font-size: 21px;
  line-height: 1;
}

.accreditation-showcase-stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.showcase-selected-panel {
  min-height: 132px;
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.showcase-selected-panel strong {
  color: var(--navy);
  font-size: 18px;
  line-height: 1.25;
}

.selected-price {
  justify-self: start;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--navy);
  font-weight: 900;
}

.accreditation-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.accreditation-controls input,
.smart-sort select {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  color: var(--navy);
  background: var(--white);
}

.segmented-control {
  min-height: 44px;
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.segmented-control button {
  min-width: 72px;
  padding: 7px 10px;
  border-radius: calc(var(--radius-sm) - 3px);
  color: var(--navy);
  background: transparent;
  font-weight: 800;
}

.segmented-control button.active {
  color: var(--white);
  background: var(--navy);
}

.smart-sort {
  min-width: 170px;
  display: grid;
  grid-template-columns: auto minmax(100px, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.smart-accreditation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.smart-accreditation-card {
  min-height: 0;
  padding: 15px;
  display: grid;
  grid-template-rows: auto auto auto auto auto auto auto 1fr auto;
  gap: 10px;
  position: relative;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--navy) 6%, var(--white));
  cursor: pointer;
}

.smart-accreditation-card.selected {
  border-color: var(--accent);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent-dark) 10%, var(--white));
}

.smart-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.smart-logo-box {
  width: 112px;
  height: 60px;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.smart-logo-box img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.smart-accreditation-card[data-accreditation-code="SFJ"] .smart-logo-box {
  width: 82px;
  height: 72px;
  padding: 4px;
  overflow: hidden;
}

.smart-accreditation-card[data-accreditation-code="SFJ"] .smart-logo-box img {
  object-fit: cover;
  object-position: center;
}

.smart-logo-box strong {
  color: var(--navy);
  font-size: 24px;
}

.smart-code {
  direction: ltr;
  text-align: left;
}

html[dir="ltr"] .smart-code {
  text-align: right;
}

.smart-code span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.smart-code strong {
  display: block;
  color: var(--accent-dark);
  font-size: 20px;
}

.smart-card-copy {
  display: grid;
  gap: 6px;
}

.smart-sector {
  width: fit-content;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--accent-dark);
  background: color-mix(in srgb, var(--accent) 14%, var(--white));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--white));
  font-size: 11px;
  font-weight: 900;
}

.smart-card-copy h3 {
  margin: 0;
  color: var(--navy);
  font-size: 19px;
  line-height: 1.25;
}

.smart-card-copy > strong {
  color: var(--accent-dark);
  font-size: 13px;
}

.smart-card-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.smart-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.smart-card-metrics div {
  min-height: 58px;
  padding: 9px;
  display: grid;
  align-content: center;
  gap: 4px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.smart-card-metrics span,
.smart-detail-line span {
  color: var(--muted);
  font-size: 11px;
}

.smart-card-metrics strong,
.smart-detail-line strong {
  color: var(--navy);
  font-size: 13px;
  line-height: 1.35;
}

.smart-readiness {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.smart-readiness span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.template-strip {
  display: grid;
  grid-template-columns: minmax(0, .76fr) minmax(0, 1fr);
  gap: 8px;
  align-items: end;
  padding: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.template-preview-link {
  position: relative;
  display: grid;
  justify-items: center;
  color: inherit;
  text-decoration: none;
}

.template-preview-link.large {
  width: 100%;
}

.template-preview-link:hover .template-preview,
.template-preview-link:focus-visible .template-preview {
  border-color: color-mix(in srgb, var(--cert-accent) 72%, var(--line));
  box-shadow:
    inset 0 0 0 4px rgba(255,255,255,.56),
    0 14px 28px rgba(16,32,51,.16);
}

.template-preview-link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 28%, var(--white));
  outline-offset: 4px;
  border-radius: 8px;
}

.template-pdf-badge {
  position: absolute;
  z-index: 4;
  left: 7px;
  bottom: 7px;
  min-width: 34px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--white);
  background: color-mix(in srgb, var(--navy) 90%, var(--blue));
  border: 1px solid rgba(255,255,255,.42);
  box-shadow: 0 8px 18px rgba(16,32,51,.18);
  font-size: 9px;
  font-weight: 900;
  direction: ltr;
}

.template-preview {
  --cert-primary: var(--navy);
  --cert-accent: var(--blue);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid color-mix(in srgb, var(--cert-accent) 34%, var(--line));
  border-radius: 5px;
  background:
    radial-gradient(circle at 18% 18%, color-mix(in srgb, var(--cert-accent) 18%, transparent), transparent 24%),
    linear-gradient(135deg, #fffdf9, #f8fbfd);
  background-size: 100% 100%;
  background-position: center;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.56);
}

.template-preview::before {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px solid color-mix(in srgb, var(--cert-accent) 42%, transparent);
  border-radius: 4px;
  z-index: -1;
}

.template-preview.portrait.mini {
  width: 62px;
  aspect-ratio: 210 / 297;
  justify-self: center;
}

.template-preview.landscape.mini {
  width: 92px;
  aspect-ratio: 297 / 210;
}

.template-orientation {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 2;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: var(--cert-primary);
  border: 1px solid rgba(255,255,255,.6);
  font-size: 8px;
  font-weight: 900;
}

.template-logo-anchor {
  position: absolute;
  top: auto;
  left: auto;
  right: 9%;
  bottom: 17%;
  z-index: 2;
  width: 15%;
  height: 11%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  place-items: center;
  gap: 2px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.template-preview.portrait .template-logo-anchor {
  width: 25%;
  height: 11%;
  right: 9%;
  bottom: 13%;
}

.template-logo-anchor img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(90,65,46,.16));
}

.template-logo-anchor::before {
  content: "A C C R E D I T E D  B Y";
  color: #9a6d22;
  font-size: 4px;
  font-weight: 900;
  line-height: 1;
  word-spacing: 1px;
  direction: ltr;
  white-space: nowrap;
}

.template-logo-anchor strong {
  color: var(--cert-primary);
  font-size: 10px;
  line-height: 1;
}

.template-content-mark {
  position: absolute;
  inset-inline: 18%;
  top: 34%;
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
  color: var(--cert-primary);
}

.template-content-mark b {
  max-width: 100%;
  font-size: 8px;
  line-height: 1.15;
}

.template-content-mark strong {
  width: min(88%, 220px);
  display: block;
  color: color-mix(in srgb, var(--cert-primary) 74%, var(--cert-accent));
  font-size: 9px;
  line-height: 1.15;
  border-bottom: 1px solid color-mix(in srgb, var(--cert-accent) 44%, transparent);
  padding-bottom: 2px;
}

.template-content-mark span {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.3;
}

.template-qr-mark {
  position: absolute;
  left: 9%;
  right: auto;
  bottom: 15%;
  width: 9%;
  z-index: 2;
  aspect-ratio: 1;
  background:
    linear-gradient(90deg, var(--cert-primary) 25%, transparent 25% 50%, var(--cert-primary) 50% 75%, transparent 75%),
    linear-gradient(var(--cert-primary) 25%, transparent 25% 50%, var(--cert-primary) 50% 75%, transparent 75%);
  background-size: 7px 7px;
  border: 3px solid rgba(255,255,255,.9);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--cert-primary) 24%, var(--line));
}

.template-preview.portrait .template-qr-mark {
  left: 10%;
  right: auto;
  bottom: 14%;
  width: 12%;
}

.template-date-cover {
  display: none;
}

.template-preview.portrait .template-date-cover {
  display: none;
}

.template-preview em {
  position: absolute;
  bottom: 9%;
  left: 9%;
  direction: ltr;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.template-preview.large {
  width: 100%;
  margin: 0 auto;
}

.template-preview.portrait.large {
  max-width: min(330px, 70vw);
  aspect-ratio: 210 / 297;
}

.template-preview.landscape.large {
  max-width: min(520px, 78vw);
  aspect-ratio: 297 / 210;
}

.template-preview.large .template-orientation {
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  font-size: 12px;
}

.template-preview.large .template-content-mark {
  gap: 10px;
}

.template-preview.large .template-content-mark b {
  font-size: clamp(15px, 2.2vw, 26px);
}

.template-preview.large .template-content-mark strong {
  font-size: clamp(16px, 2.2vw, 28px);
  padding-bottom: 6px;
}

.template-preview.large .template-content-mark span {
  font-size: clamp(11px, 1.4vw, 16px);
}

.template-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16,32,51,.56);
  backdrop-filter: blur(8px);
}

.template-modal {
  width: min(1120px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(16,32,51,.22);
}

.template-modal header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.template-modal header span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.template-modal header h3 {
  margin: 2px 0;
  color: var(--navy);
  font-size: 24px;
}

.template-modal header strong {
  color: var(--blue);
  font-size: 14px;
}

.template-modal-grid {
  display: grid;
  grid-template-columns: .72fr 1fr;
  gap: 16px;
  align-items: center;
}

.template-modal-grid > div {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.smart-detail-line {
  min-height: 42px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.smart-detail-line strong {
  text-align: left;
}

html[dir="ltr"] .smart-detail-line strong {
  text-align: right;
}

.smart-tags {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 6px;
}

.smart-tags span {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 800;
}

.smart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.smart-actions .btn {
  flex: 1 1 120px;
  justify-content: center;
}

.accreditation-money .aed-logo {
  width: 1.15em;
  height: 1em;
}

.question-insights {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.question-insight-card {
  min-height: 138px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.question-insight-card.main {
  color: var(--white);
  background: var(--navy);
  border-color: var(--navy);
}

.question-insight-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.question-insight-card.main span,
.question-insight-card.main p,
.question-insight-card.main strong { color: var(--white); }

.question-insight-card strong {
  color: var(--navy);
  font-size: 30px;
  line-height: 1;
}

.question-insight-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.question-metrics { margin-bottom: 12px; }

.certificate-preview-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0 22px 24px;
  align-items: end;
}

.mini-cert {
  height: 56px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.mini-cert::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.mini-cert.landscape { height: 64px; }

.mini-cert.portrait {
  height: 92px;
  width: 70px;
  justify-self: center;
}

.exam-studio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 320px);
  gap: 18px;
  align-items: start;
}

.studio-rail { display: grid; gap: 10px; }

.rail-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.rail-step b {
  width: 28px;
  height: 28px;
}

.candidate-picker,
.checkbox-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.candidate-picker {
  display: grid;
  gap: 10px;
}

.candidate-picker .btn-row { align-items: stretch; margin-bottom: 0; }
.candidate-picker input { flex: 1; min-width: 0; }

.search-results {
  display: none;
  max-height: 240px;
  overflow-y: auto;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.86);
}

.search-results.is-active {
  display: grid;
}

.search-results::-webkit-scrollbar {
  width: 8px;
}

.search-results::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--blue) 46%, var(--white));
  border-radius: 999px;
}

.selected-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.selected-list {
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), color-mix(in srgb, var(--surface-soft) 55%, var(--white)));
}

.picker-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  margin: 4px 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.picker-hint::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--blue);
  flex: 0 0 auto;
}

.search-result,
.selected-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-align: right;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  padding: 11px 13px;
  color: var(--navy);
  box-shadow: var(--shadow-card);
}

.search-result:hover { border-color: var(--blue); }

.search-result span,
.selected-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.search-result:disabled { cursor: not-allowed; }

.selection-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.selection-summary div {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.selection-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.selection-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--navy);
  font-size: 18px;
}

.public-exam-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.public-exam-link span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.public-exam-link strong {
  overflow-wrap: anywhere;
}

.proctoring-review {
  display: grid;
  gap: 14px;
}

.proctoring-reference,
.proctoring-event {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.proctoring-reference img,
.proctoring-event img {
  width: 150px;
  height: 110px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--white);
}

.proctoring-events {
  display: grid;
  gap: 10px;
}

.proctoring-event span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.checkbox-list {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  max-height: 240px;
  overflow: auto;
}

.checkbox-list label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 9px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}

.mono {
  direction: ltr;
  text-align: left;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.exam-shell {
  max-width: 1180px;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  margin: 0 auto;
  padding: 24px 18px;
}

.exam-card {
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

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

.exam-hero-card,
.exam-auth-card,
.exam-candidate-dashboard,
.exam-complete-card {
  position: relative;
  overflow: hidden;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid color-mix(in srgb, var(--line) 72%, var(--blue));
  border-radius: var(--radius);
  background: rgba(255,255,255,.92);
  box-shadow: 0 22px 70px rgba(16,32,51,.12);
}

.exam-hero-card {
  display: grid;
}

.exam-hero-card::before,
.exam-auth-card::before,
.exam-candidate-dashboard::before,
.exam-complete-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--gold), var(--navy));
}

.exam-hero-top,
.candidate-dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.candidate-dashboard-actions {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 10px;
}

html[dir="ltr"] .candidate-dashboard-actions {
  justify-items: start;
}

.candidate-logout {
  min-width: 148px;
  box-shadow: none;
}

.brand-lockup-exam {
  width: fit-content;
  min-width: 120px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.brand-lockup-exam .brand-logo {
  width: 66px;
  height: auto;
}

.brand-lockup-exam em {
  color: var(--navy);
  font-size: 8px;
}

.exam-pill,
.exam-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  font-weight: 900;
}

.exam-pill {
  min-height: 30px;
  padding: 6px 11px;
  color: var(--navy);
  background: color-mix(in srgb, var(--gold) 18%, var(--white));
  border: 1px solid color-mix(in srgb, var(--gold) 42%, var(--line));
  font-size: 12px;
}

.exam-kicker {
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 12px;
}

.exam-hero-grid {
  display: grid;
  grid-template-columns: minmax(300px, .38fr) minmax(0, 1fr);
  gap: clamp(18px, 2.4vw, 30px);
  align-items: stretch;
  min-height: 100%;
}

.exam-intro-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto;
  gap: 14px;
  padding: clamp(14px, 1.8vw, 22px);
  border: 1px solid color-mix(in srgb, var(--line) 72%, var(--white));
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), color-mix(in srgb, var(--surface-soft) 46%, var(--white))),
    var(--white);
}

.exam-copy-block {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 8px;
  text-align: right;
}

html[dir="ltr"] .exam-copy-block {
  justify-items: start;
  text-align: left;
}

.exam-hero-card h1,
.exam-auth-card h1,
.exam-candidate-dashboard h1,
.exam-complete-card h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.12;
  max-width: 760px;
}

.exam-hero-card p,
.exam-auth-card p,
.exam-candidate-dashboard p,
.exam-complete-card p {
  max-width: 760px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  margin: 4px 0 8px;
}

.exam-start-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: stretch;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(16,32,51,.05), rgba(106,137,167,.08)),
    var(--surface-soft);
  box-shadow: var(--shadow-card);
}

.exam-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
}

.exam-start-panel span,
.exam-info-grid span,
.room-meta span,
.timer-count span,
.exam-timer > div > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.exam-start-panel strong {
  color: var(--navy);
  font-size: 20px;
  line-height: 1.25;
}

.exam-duration {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--blue);
}

.exam-duration b {
  font-size: 40px;
  line-height: 1;
}

.exam-duration small {
  color: var(--muted);
  font-weight: 900;
}

.camera-check {
  display: grid;
  grid-template-rows: minmax(180px, 1fr) auto;
  gap: 10px;
  width: 100%;
  margin: 4px 0;
}

.camera-check video {
  width: 100%;
  height: 100%;
  min-height: 190px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--navy);
}

.camera-status {
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.5;
}

.exam-start-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.exam-start-actions .btn {
  min-height: 48px;
  justify-content: center;
}

.camera-status.green {
  background: #e8f8ef;
  color: #126b3a;
}

.camera-status.orange {
  background: #fff6df;
  color: #916300;
}

.camera-status.red {
  background: #ffe8e8;
  color: #a32929;
}

.exam-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
}

.exam-info-grid div,
.room-meta div {
  min-height: 68px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.exam-info-grid strong,
.room-meta strong {
  color: var(--navy);
  font-size: 14px;
  line-height: 1.35;
}

.exam-auth-card {
  width: min(720px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.exam-auth-card .brand-lockup-login {
  margin-bottom: 2px;
}

.candidate-room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.candidate-room-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.candidate-room-card h2 {
  margin: 0;
  color: var(--navy);
  font-size: 22px;
  line-height: 1.2;
}

.candidate-room-card p {
  margin: 8px 0 0;
}

.room-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.exam-session {
  max-width: 1040px;
}

.question {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,249,251,.78)),
    var(--white);
  box-shadow: var(--shadow-card);
}

.question-head {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}

.question-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--white);
  background: var(--navy);
  font-weight: 900;
  direction: ltr;
}

.question h3 { margin: 8px 0 0; font-size: 18px; line-height: 1.55; }
.question .hint { margin: 0 0 10px; color: var(--muted); font-size: 13px; }

.option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px;
  margin-bottom: 8px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-card);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.option:hover {
  border-color: var(--blue);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.ordering-list { display: grid; gap: 9px; }

.ordering-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.ordering-item.dragging { outline: 2px solid var(--blue); }

.drag-handle {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--white);
  background: var(--navy);
  cursor: grab;
  font-weight: 900;
}

.order-controls { display: inline-flex; gap: 6px; }

.order-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--white);
  background: var(--blue);
  border: 1px solid var(--blue);
  font-weight: 900;
}

.timer {
  position: sticky;
  top: 0;
  z-index: 10;
  margin-bottom: 14px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--navy);
  box-shadow: var(--shadow-card);
}

.exam-timer {
  top: 10px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--navy) 94%, var(--blue)), var(--navy));
}

.exam-timer strong {
  display: block;
  color: var(--white);
  font-size: 16px;
}

.timer-count {
  min-width: 138px;
  display: grid;
  justify-items: end;
  gap: 2px;
}

.timer-count b {
  color: var(--gold);
  font-size: 26px;
  direction: ltr;
}

.exam-complete-card {
  width: min(720px, 100%);
  margin: 0 auto;
  text-align: center;
}

@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .workspace-card,
  .operator-card {
    grid-column: span 1;
  }

  .operator-card {
    grid-column: 2 / 3;
  }

  .topbar-actions {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
  }

  .dashboard-hero,
  .accreditation-showcase-hero,
  .exam-studio { grid-template-columns: 1fr; }
  .workflow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .smart-accreditation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .app-shell { display: block; }

  .login-language,
  .exam-language {
    position: static;
    width: fit-content;
    padding: 12px 12px 0;
  }

  .mobile-menu-btn {
    display: inline-grid;
  }

  .mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 7998;
    background: color-mix(in srgb, var(--navy) 42%, transparent);
    opacity: 0;
    pointer-events: none;
  }

  .sidebar {
    position: fixed;
    top: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 7999;
    width: min(330px, calc(100vw - 24px));
    height: auto;
    min-height: 0;
    border-radius: var(--radius);
    box-shadow: 0 26px 70px color-mix(in srgb, var(--navy) 34%, var(--white));
    transform: translateX(calc(100% + 24px));
    transition: transform .22s ease;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  html[dir="ltr"] .sidebar {
    right: auto;
    left: 12px;
    transform: translateX(calc(-100% - 24px));
  }

  .app-shell.nav-open .sidebar {
    transform: translateX(0);
  }

  .app-shell.nav-open .mobile-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .brand {
    padding-top: 6px;
  }

  .nav button {
    min-height: 48px;
  }

  .grid.two, .grid.three, .grid.four,
  .workflow,
  .question-insights,
  .filter-grid,
  .document-gallery,
  .document-viewer,
  .accreditation-summary,
  .accreditation-controls,
  .accreditation-showcase-stats,
  .smart-accreditation-grid,
  .status-board,
  .accreditation-meta { grid-template-columns: 1fr; }
  .accreditation-details { grid-template-columns: 1fr; }
  .accreditation-showcase-hero { min-height: 0; align-items: stretch; padding: 14px; }
  .accreditation-three-scene { min-height: 180px; }
  .segmented-control { grid-auto-flow: row; }
  .smart-sort { grid-template-columns: 1fr; }
  .smart-card-metrics { grid-template-columns: 1fr; }
  .template-strip { grid-template-columns: 1fr 1fr; }
  .template-modal-backdrop { padding: 12px; align-items: start; }
  .template-modal { max-height: calc(100vh - 24px); padding: 16px; }
  .template-modal-grid { grid-template-columns: 1fr; }
  .template-modal-grid > div { min-height: 0; }
  .smart-accreditation-card { min-height: 0; }
  .filter-panel-head {
    display: grid;
    justify-items: start;
  }
  .document-card {
    grid-template-rows: 190px minmax(0, auto);
  }
  .document-viewer-stage,
  .document-viewer-frame {
    min-height: 360px;
    height: 58vh;
  }
  .question-head { grid-template-columns: 1fr; }
  .exam-hero-card h1,
  .exam-auth-card h1,
  .exam-candidate-dashboard h1,
  .exam-complete-card h1 {
    font-size: clamp(28px, 9vw, 38px);
  }
  .exam-hero-top,
  .candidate-dashboard-head,
  .exam-timer {
    display: grid;
    justify-items: start;
  }

  .exam-hero-top {
    margin-bottom: 10px;
  }

  .brand-lockup-exam {
    justify-self: center;
  }

  .candidate-dashboard-actions {
    justify-items: start;
    width: 100%;
  }

  .candidate-logout {
    width: 100%;
    min-height: 44px;
  }

  .exam-hero-grid,
  .exam-info-grid,
  .room-meta {
    grid-template-columns: 1fr;
  }

  .exam-shell {
    min-height: 100vh;
    align-items: start;
    padding: 12px;
  }

  .exam-hero-card {
    min-height: 0;
  }

  .exam-intro-main {
    padding: 4px 0;
    align-content: start;
  }

  .exam-start-panel {
    grid-row: auto;
  }

  .camera-check video {
    min-height: 180px;
    aspect-ratio: 16 / 9;
  }

  .exam-panel-head {
    display: grid;
  }

  .timer-count {
    justify-items: start;
  }
  .topbar {
    align-items: center;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
  }

  .mobile-menu-btn {
    order: 1;
    grid-row: 1;
    grid-column: 1;
  }

  .topbar-title {
    order: 2;
    grid-row: 1;
    grid-column: 2;
  }

  .topbar > * {
    min-width: 0;
  }

  .workspace-card,
  .operator-card,
  .topbar-actions {
    grid-column: 1 / -1;
  }

  .workspace-card {
    order: 3;
    grid-row: 2;
  }

  .operator-card {
    order: 4;
    grid-row: 3;
  }

  .topbar-actions {
    order: 5;
    grid-row: 4;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }

  .topbar-actions .btn {
    width: auto;
    min-height: 46px;
    box-shadow: none;
  }

  .topbar h1 {
    font-size: clamp(24px, 7vw, 36px);
    line-height: 1.08;
  }

  .main { padding: 16px; }
  .modal-backdrop { padding: 12px; align-items: start; }
  .modal-panel { max-height: calc(100vh - 24px); }
  .modal-head { padding: 18px; }
  .modal-body { padding: 18px; }
  .modal-body .exam-studio { grid-template-columns: 1fr; }
  .section-action .btn { width: 100%; }
}

@media (max-width: 360px) {
  .topbar-actions {
    grid-template-columns: 1fr;
  }
}

.otp-gate-body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(214, 184, 104, 0.14), transparent 30rem),
    linear-gradient(135deg, #eef4f7 0%, #f8fbfd 48%, #edf3f6 100%);
  color: #35485a;
  overflow-x: hidden;
}

.otp-gate-shell {
  width: min(1120px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 28px 0;
}

.otp-gate-brand,
.otp-gate-panel {
  border: 1px solid rgba(160, 179, 196, 0.38);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 24px 70px rgba(28, 48, 66, 0.1);
  backdrop-filter: blur(18px);
}

.otp-gate-brand {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 30px;
}

.otp-gate-brand img {
  width: 190px;
  max-width: 70%;
  height: auto;
  object-fit: contain;
}

.otp-gate-brand p {
  margin: 0;
  color: #2f4355;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
}

.otp-gate-panel {
  min-height: 560px;
  padding: 30px;
}

.otp-gate-topline,
.otp-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.otp-gate-topline {
  margin-bottom: 24px;
  color: #728294;
  font-size: 15px;
  font-weight: 800;
}

.otp-topline-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.otp-gate-link,
.otp-primary-link,
.otp-language-toggle {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfdae5;
  border-radius: 16px;
  padding: 0 18px;
  color: #35485a;
  background: #fff;
  font-weight: 900;
  text-decoration: none;
}

.otp-language-toggle {
  cursor: pointer;
  font: inherit;
}

.otp-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.otp-mode-tabs button {
  min-height: 48px;
  border: 1px solid #d7e2ec;
  border-radius: 16px;
  background: #fff;
  color: #526477;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.otp-mode-tabs button.active {
  border-color: #31475a;
  background: #31475a;
  color: #fff;
}

.otp-primary-link,
.otp-form button,
.otp-actions button {
  border-color: #31475a;
  background: #31475a;
  color: #fff;
  box-shadow: 0 16px 30px rgba(49, 71, 90, 0.18);
}

.otp-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 26px;
}

.otp-step {
  min-width: 0;
  border: 1px solid #d8e2ec;
  border-radius: 18px;
  padding: 12px;
  background: #f7fafc;
  color: #7c8b9b;
}

.otp-step.active {
  border-color: rgba(198, 153, 61, 0.55);
  background: #fff9eb;
  color: #31475a;
}

.otp-step span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(49, 71, 90, 0.1);
  font-weight: 900;
}

.otp-step b {
  display: block;
  margin-top: 8px;
  font-size: 13px;
}

.otp-gate-panel h1 {
  margin: 0 0 10px;
  color: #26394b;
  font-size: 40px;
  line-height: 1.15;
}

.otp-subtitle {
  margin: 0 0 24px;
  color: #718194;
  font-size: 17px;
  line-height: 1.8;
  font-weight: 700;
}

.otp-form {
  display: grid;
  gap: 16px;
}

.otp-form label {
  display: grid;
  gap: 8px;
  color: #506274;
  font-weight: 900;
}

.otp-form input {
  width: 100%;
  min-height: 56px;
  box-sizing: border-box;
  border: 1px solid #d3dfeb;
  border-radius: 18px;
  padding: 0 16px;
  background: #fff;
  color: #24384a;
  font: inherit;
  font-weight: 800;
  outline: none;
}

.otp-code-form {
  margin-top: 16px;
}

.otp-code-form input {
  text-align: center;
  direction: ltr;
  font-size: 30px;
  letter-spacing: 0;
}

.otp-form button,
.otp-actions button {
  min-height: 56px;
  border-radius: 18px;
  padding: 0 20px;
  font: inherit;
  font-weight: 1000;
  cursor: pointer;
}

.otp-actions .otp-danger,
.otp-danger {
  border-color: #9a2f2f;
  background: #9a2f2f;
  color: #fff;
}

.otp-form button:disabled,
.otp-actions button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.otp-alert {
  border-radius: 18px;
  margin-bottom: 18px;
  padding: 14px 16px;
  font-weight: 900;
}

.otp-alert.error {
  border: 1px solid #f0c8c8;
  background: #fff4f4;
  color: #9a2f2f;
}

.otp-alert.success {
  border: 1px solid #c9e6d2;
  background: #f0fbf3;
  color: #237348;
}

.otp-identity-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.otp-identity-card div,
.otp-event {
  min-width: 0;
  border: 1px solid #d7e2ec;
  border-radius: 18px;
  background: #f8fbfd;
  padding: 14px;
}

.otp-identity-card span,
.otp-event span {
  display: block;
  color: #7c8c9d;
  font-size: 12px;
  font-weight: 900;
}

.otp-identity-card strong,
.otp-event strong {
  display: block;
  margin-top: 5px;
  color: #2d4052;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.otp-activity {
  margin-top: 24px;
}

.otp-activity h2 {
  margin: 0 0 12px;
  color: #2d4052;
}

.otp-event {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.otp-session-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.otp-session {
  display: grid;
  gap: 7px;
  border: 1px solid #d7e2ec;
  border-radius: 18px;
  background: #f8fbfd;
  padding: 14px;
}

.otp-session.active {
  border-color: rgba(35, 115, 72, 0.35);
  background: #f1fbf4;
}

.otp-session strong {
  color: #2d4052;
}

.otp-session span {
  color: #237348;
  font-weight: 900;
}

.otp-session small {
  color: #718194;
  font-weight: 800;
}

.otp-empty {
  border: 1px dashed #c9d7e5;
  border-radius: 18px;
  padding: 18px;
  color: #718194;
  background: #f8fbfd;
  font-weight: 900;
}

@media (max-width: 860px) {
  .otp-gate-shell {
    grid-template-columns: 1fr;
    width: min(100% - 20px, 620px);
    align-items: start;
  }

  .otp-gate-brand {
    min-height: auto;
    padding: 22px;
  }

  .otp-gate-brand img {
    width: 120px;
  }

  .otp-gate-panel {
    min-height: auto;
    padding: 22px;
  }

  .otp-gate-panel h1 {
    font-size: 30px;
  }

  .otp-steps,
  .otp-identity-card,
  .otp-session-grid {
    grid-template-columns: 1fr;
  }
}
