:root {
  --bg: #f5f7f5;
  --surface: #ffffff;
  --surface-soft: #f8faf8;
  --ink: #17201c;
  --muted: #65716b;
  --line: #dce4de;
  --brand: #126b62;
  --brand-strong: #0a4d47;
  --accent: #315f9f;
  --amber: #a15c12;
  --danger: #b42318;
  --ok: #027a48;
  --tenant-primary: #123c69;
  --tenant-secondary: #126b62;
  --tenant-accent: #d7a72f;
  --tenant-ink: #17201c;
  --tenant-surface: #f4f6f3;
  --radius: 8px;
  --shadow: 0 14px 42px rgba(18, 32, 28, .08);
  --shadow-soft: 0 1px 2px rgba(18, 32, 28, .07), 0 10px 28px rgba(18, 32, 28, .05);
  --focus-ring: 0 0 0 3px rgba(18, 107, 98, .18);
}

* { box-sizing: border-box; }
html { min-width: 320px; text-rendering: optimizeLegibility; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 14px/1.55 Aptos, "Segoe UI Variable", "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, .export-card {
  min-height: 40px;
  border: 1px solid transparent;
  background: var(--brand);
  color: white;
  padding: 9px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 650;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}
button:hover, .export-card:hover { background: var(--brand-strong); transform: translateY(-1px); }
button:active { transform: translateY(0); }
button.secondary { background: #31434c; }
button.secondary:hover { background: #25353d; }
button.ghost {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}
button.ghost:hover {
  background: #f8fbf9;
  border-color: #c8d5ce;
  color: var(--brand-strong);
}
button.link-button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-strong);
  text-align: left;
  font-weight: 650;
  transform: none;
}
button.small-button { min-height: 32px; padding: 5px 10px; }
button.danger-button { color: #8f1d1d; border-color: #e5b8b8; background: #fff8f8; }
button.danger-button:hover { background: #ffecec; border-color: #d28a8a; }
button.wide { width: 100%; }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
button:disabled:hover { transform: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}
input, textarea, select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
  background: white;
  color: var(--ink);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input[type="color"] {
  min-height: 44px;
  padding: 4px;
  cursor: pointer;
}
input:hover, textarea:hover, select:hover { border-color: #c8d5ce; }
input:focus, textarea:focus, select:focus {
  border-color: var(--brand);
  outline: 0;
  box-shadow: var(--focus-ring);
}
textarea { min-height: 120px; resize: vertical; }
label { display: grid; gap: 6px; font-weight: 620; color: #31413b; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(24px, 3vw, 34px); line-height: 1.12; font-weight: 720; }
h2 { margin-bottom: 4px; font-size: 18px; line-height: 1.25; font-weight: 690; }
code { white-space: pre-wrap; word-break: break-word; color: #31413b; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.status { min-height: 22px; color: var(--muted); }
.status.error { color: var(--danger); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 680;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  font-weight: 720;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(340px, 520px);
  background: #edf2ee;
}
.login-visual {
  display: grid;
  align-items: end;
  padding: min(8vw, 72px);
  background:
    linear-gradient(120deg, rgba(18,107,98,.92), rgba(49,95,159,.78)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='800' viewBox='0 0 800 800'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.18)' stroke-width='2'%3E%3Cpath d='M80 120h640M80 240h640M80 360h640M80 480h640M80 600h640M160 80v640M320 80v640M480 80v640M640 80v640'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  color: white;
}
.signal-card {
  max-width: 520px;
  padding: 28px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: var(--radius);
  background: rgba(0,0,0,.20);
}
.signal-card strong { display: block; margin: 10px 0; font-size: 32px; line-height: 1.1; font-weight: 720; }
.signal-card p { margin-bottom: 0; color: rgba(255,255,255,.86); }
.brand-preview {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}
.brand-preview-logo {
  display: grid;
  place-items: center;
  min-height: 92px;
  border: 1px dashed #c8d5ce;
  border-radius: var(--radius);
  background: rgba(255,255,255,.72);
  overflow: hidden;
}
.brand-preview-logo img {
  max-width: 120px;
  max-height: 82px;
  object-fit: contain;
}
.brand-preview-logo img[src=""], .brand-preview-logo img:not([src]) { display: none; }
.brand-preview-logo span { font-weight: 700; color: var(--muted); }
.brand-preview p { margin-bottom: 12px; }
.login-panel {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: min(8vw, 72px);
  background: white;
}
.product-mark, .brand-block, .candidate-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.product-mark span, .brand-block span, .candidate-brand span { display: block; color: var(--muted); font-size: 12px; }

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px 18px;
  background: linear-gradient(180deg, #10211c, #132620);
  color: white;
  overflow-y: auto;
}
.brand-block strong { display: block; font-size: 16px; font-weight: 700; }
.brand-block span { color: #a9b7b1; }
.nav { display: grid; gap: 6px; }
.nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  color: #d7e0dc;
  border-color: transparent;
  text-align: left;
  font-weight: 620;
  box-shadow: none;
  transform: none;
}
.nav button.active, .nav button:hover { background: rgba(255,255,255,.08); color: white; }
.nav button.active { box-shadow: inset 3px 0 0 #3ec0ad; }
.nav-ico {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 26px;
  border-radius: 6px;
  background: rgba(255,255,255,.10);
  font-size: 11px;
  font-weight: 700;
}
.sidebar-note {
  margin-top: auto;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  color: #d7e0dc;
}
.sidebar-note strong { font-weight: 680; }
.sidebar-note span { color: #a9b7b1; font-size: 12px; }
.main {
  min-width: 0;
  padding: 24px;
  display: grid;
  gap: 18px;
}
.topbar-select {
  min-width: 220px;
  text-align: left;
  font-size: 12px;
  color: var(--muted);
}
.topbar-select select {
  min-height: 38px;
  padding: 7px 10px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.row-actions, .filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: max-content;
  justify-self: start;
  min-height: 34px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.84);
}
.language-switcher button {
  min-height: 28px;
  padding: 4px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 620;
  transform: none;
}
.language-switcher button:hover { transform: none; background: #f2f6f4; }
.language-switcher button.active {
  background: var(--brand);
  color: white;
}
.topbar .language-switcher, .tenant-actions .language-switcher { justify-self: auto; }
.surface {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 14px;
}
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric {
  min-height: 112px;
  display: grid;
  align-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}
.metric strong { display: block; font-size: 30px; line-height: 1; font-weight: 720; }
.metric span { color: var(--muted); font-weight: 620; }
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.kpi-card {
  min-height: 118px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}
.kpi-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 660;
  text-transform: uppercase;
}
.kpi-card strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  font-weight: 720;
}
.kpi-card small { color: var(--muted); }
.kpi-card.good { border-color: #b7ebcb; background: #f0fff6; }
.kpi-card.warn { border-color: #ffd7a3; background: #fff8ed; }
.kpi-card.risk { border-color: #f5b5ae; background: #fff5f3; }
.trend-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(26px, 1fr));
  gap: 8px;
  min-height: 190px;
  align-items: end;
  padding: 12px 6px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}
.trend-day {
  min-width: 0;
  display: grid;
  align-items: end;
  gap: 5px;
  justify-items: center;
}
.trend-stack {
  width: 100%;
  min-height: 4px;
  display: grid;
  align-items: end;
  gap: 2px;
}
.trend-bar {
  width: 100%;
  min-height: 3px;
  border-radius: 5px 5px 2px 2px;
  background: var(--brand);
}
.trend-bar.submissions { background: var(--accent); }
.trend-bar.events { background: #d7a72f; }
.trend-bar.alerts { background: var(--danger); }
.trend-label {
  color: var(--muted);
  font-size: 10px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.bar-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}
.bar-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
}
.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1ee;
}
.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}
.compact-table table { font-size: 13px; }
.search-input { width: min(320px, 100%); }
.survey-page {
  min-height: 100vh;
  padding: clamp(18px, 4vw, 48px);
  background: linear-gradient(180deg, #eef5f2, #f8faf8);
}
.survey-shell {
  width: min(920px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}
.survey-header {
  padding: 24px 0 6px;
}
.survey-header h1 {
  max-width: 820px;
}
.survey-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.survey-form {
  display: grid;
  gap: 14px;
}
.survey-question {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}
.survey-question legend {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 680;
}
.survey-question legend span {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--brand);
  color: white;
  font-size: 12px;
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  gap: 8px;
}
.choice-grid label, .stacked-options label, .inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  font-weight: 520;
}
.choice-grid input, .stacked-options input, .inline-check input {
  width: auto;
  min-height: auto;
}
.stacked-options {
  display: grid;
  gap: 8px;
}
.survey-footer-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  background: linear-gradient(180deg, rgba(248,250,248,0), #f8faf8 35%);
}
.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce4de;
}
.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width .2s ease;
}
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf1ee;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
tbody tr { transition: background .14s ease; }
tbody tr:hover { background: #fbfdfb; }
tbody tr:last-child td { border-bottom: 0; }
th {
  background: #f7faf8;
  font-size: 12px;
  color: #50645b;
  font-weight: 660;
  text-transform: uppercase;
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 650;
  background: #edf4ff;
  color: var(--accent);
}
.pill.high { background: #fef3f2; color: var(--danger); }
.pill.medium { background: #fff7e8; color: var(--amber); }
.pill.ok { background: #ecfdf3; color: var(--ok); }
.empty-state {
  display: grid;
  gap: 4px;
  padding: 26px;
  color: var(--muted);
  text-align: center;
}
.empty-state strong { color: var(--ink); }
.result-box {
  min-height: 82px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7faf8;
  overflow: auto;
}
.color-swatch {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,.12);
  margin-right: 4px;
  vertical-align: middle;
}
.export-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.export-card {
  display: grid;
  gap: 6px;
  min-height: 110px;
  align-content: center;
  background: white;
  color: var(--ink);
  border-color: var(--line);
}
.export-card:hover { background: #f7faf8; color: var(--ink); }
.export-card strong { font-weight: 680; }
.export-card span { color: var(--muted); font-weight: 500; }

.candidate-body { background: #f0f5f2; }
.exam-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}
.exam-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 12px clamp(16px, 4vw, 40px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.timer-box {
  min-width: 132px;
  display: grid;
  justify-items: end;
  gap: 0;
}
.timer-box span { color: var(--muted); font-size: 12px; font-weight: 620; }
.timer {
  font-variant-numeric: tabular-nums;
  font-size: 26px;
  line-height: 1;
  font-weight: 740;
  color: var(--brand);
}
.exam-main {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 42px);
}
.candidate-welcome {
  min-height: calc(100vh - 122px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .65fr);
  align-items: center;
  gap: clamp(18px, 5vw, 56px);
}
.welcome-copy {
  display: grid;
  gap: 18px;
}
.welcome-copy h1 {
  max-width: 780px;
  font-size: clamp(34px, 5.8vw, 60px);
  font-weight: 700;
  letter-spacing: 0;
}
.welcome-copy p {
  max-width: 720px;
  color: #405049;
  font-size: 18px;
}
.prep-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  grid-column: 1;
}
.prep-grid article {
  min-height: 96px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.72);
}
.prep-grid strong { font-size: 20px; font-weight: 700; }
.prep-grid span { color: var(--muted); }
.start-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-soft);
}
.check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: #405049;
}
.notice {
  margin: 0;
  padding: 12px;
  border-radius: var(--radius);
  background: #f7faf8;
  color: var(--muted);
}
.translation-notice {
  max-width: 760px;
  padding: 11px 12px;
  border: 1px solid #f2b56b;
  border-radius: var(--radius);
  background: #fff8ed;
  color: #7a3e06;
  font-size: 13px;
  font-weight: 620;
}
.consent-line {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 10px;
  font-weight: 620;
}
.consent-line input { width: auto; min-height: auto; margin-top: 4px; }
.exam-workspace { display: grid; gap: 16px; }
.exam-progress, .submit-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-soft);
}
.progress-meter {
  min-width: 130px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ecfdf3;
  color: var(--ok);
  font-weight: 680;
}
.question-list { display: grid; gap: 12px; }
.question {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 1px 2px rgba(18, 32, 28, .04);
}
.question-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.question-title span {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #edf4ff;
  color: var(--accent);
  font-weight: 680;
}
.choices { display: grid; gap: 8px; margin-top: 12px; }
.choice {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.choice:hover { border-color: var(--brand); background: #f3faf7; box-shadow: 0 0 0 3px rgba(18,107,98,.08); }
.choice input { width: auto; min-height: auto; }
.done-panel {
  width: min(620px, 100%);
  margin: 10vh auto 0;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.tenant-body {
  min-height: 100vh;
  background: var(--tenant-surface);
  color: var(--tenant-ink);
}
.tenant-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px clamp(18px, 5vw, 64px);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(18,60,105,.12);
}
.tenant-logo, .tenant-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.tenant-logo small { display: block; color: var(--muted); }
.tenant-actions a {
  color: var(--tenant-ink);
  text-decoration: none;
  font-weight: 620;
}
.tenant-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--tenant-primary);
  color: white !important;
  text-decoration: none;
  font-weight: 650;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.tenant-button:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.tenant-button.secondary { background: var(--tenant-secondary); }
.tenant-button.ghost {
  background: white;
  color: var(--tenant-primary) !important;
  border: 1px solid rgba(18,60,105,.22);
}
.tenant-hero {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .65fr);
  align-items: center;
  gap: clamp(24px, 6vw, 72px);
  padding: clamp(30px, 6vw, 70px) clamp(18px, 5vw, 64px) clamp(28px, 5vw, 58px);
}
.tenant-hero-copy h1 {
  max-width: 900px;
  font-size: clamp(34px, 4.4vw, 52px);
  font-weight: 680;
  color: var(--tenant-primary);
  text-wrap: balance;
}
.tenant-hero-copy p {
  max-width: 760px;
  color: #43524b;
  font-size: 19px;
}
.tenant-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.tenant-hero-card {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(18,60,105,.14);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-soft);
}
.tenant-hero-card strong { font-size: 28px; font-weight: 720; color: var(--tenant-primary); }
.tenant-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.tenant-stat-grid span {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: var(--radius);
  background: #f7faf8;
}
.tenant-stat-grid b { font-size: 26px; font-weight: 720; color: var(--tenant-secondary); }
.tenant-section {
  padding: clamp(28px, 6vw, 72px) clamp(18px, 5vw, 64px);
}
.tenant-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.tenant-card {
  min-height: 210px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(18,60,105,.14);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-soft);
}
.tenant-card > span {
  color: var(--tenant-secondary);
  font-weight: 680;
  letter-spacing: .08em;
}
.tenant-card h3 { margin: 0; color: var(--tenant-primary); font-weight: 700; }
.process-section {
  display: grid;
  grid-template-columns: minmax(280px, .6fr) minmax(0, 1fr);
  gap: 24px;
}
.process-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.process-steps article {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius);
  background: white;
  border: 1px solid rgba(18,60,105,.14);
}
.process-steps span {
  color: var(--tenant-accent);
  font-weight: 680;
}
.tenant-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(18px, 5vw, 64px);
  border-top: 1px solid rgba(18,60,105,.14);
  color: var(--muted);
}
.tenant-error {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.summary-tile {
  min-height: 96px;
  display: grid;
  align-content: space-between;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}
.summary-tile strong { font-size: 26px; font-weight: 720; }
.library-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.library-strip article {
  min-height: 86px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.library-strip strong {
  font-size: 14px;
  font-weight: 680;
  line-height: 1.3;
}
.library-strip span,
.checkline {
  color: var(--muted);
  font-size: 13px;
}
.checkline {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}
.checkline input { width: 18px; height: 18px; }
.ai-result-head,
.ai-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ai-result-head { margin-bottom: 10px; }
.ai-history {
  display: grid;
  gap: 10px;
}
.ai-history-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}
.ai-history-item div:first-child {
  display: grid;
  gap: 4px;
}
.ai-history-item strong { font-weight: 680; }
.ai-history-item span {
  color: var(--muted);
  font-size: 13px;
}
.analysis-panel pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 980px) {
  .login-page, .app, .candidate-welcome { grid-template-columns: 1fr; }
  .login-visual { min-height: 320px; }
  .sidebar { position: static; height: auto; }
  .metrics, .kpi-grid, .grid.cols-2, .grid.cols-3, .grid.cols-4, .export-grid, .prep-grid, .tenant-hero, .tenant-card-grid, .process-section, .process-steps, .summary-grid, .library-strip { grid-template-columns: 1fr; }
  .section-head, .topbar, .exam-progress, .submit-bar { align-items: stretch; flex-direction: column; }
  .tenant-header, .tenant-footer { align-items: flex-start; flex-direction: column; }
  .tenant-actions { flex-wrap: wrap; }
  .search-input { width: 100%; }
  th, td { white-space: normal; }
}

@media (max-width: 560px) {
  .main, .exam-main { padding: 14px; }
  .exam-header { align-items: flex-start; }
  .timer-box { min-width: 104px; }
  .timer { font-size: 22px; }
  .welcome-copy h1 { font-size: 38px; }
  .signal-card strong { font-size: 28px; }
}
