:root {
  --ink: #18212f;
  --muted: #667085;
  --line: #d9e0ea;
  --surface: #ffffff;
  --surface-2: #f5f7fb;
  --brand: #126a73;
  --brand-strong: #0b4d55;
  --blue: #315a9f;
  --amber: #a85f00;
  --danger: #b42318;
  --success: #177245;
  --shadow: 0 18px 50px rgba(24, 33, 47, 0.09);
}

html {
  min-height: 100%;
  font-size: 16px;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0, #eef3f7 520px, #f8fafc 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--brand);
}

.kyc-container {
  width: min(1160px, calc(100% - 32px));
  margin-inline: auto;
}

.kyc-shell-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 250, 252, 0.92);
  border-bottom: 1px solid rgba(217, 224, 234, 0.85);
  backdrop-filter: blur(14px);
}

.kyc-navbar {
  min-height: 76px;
}

.kyc-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.kyc-brand strong,
.kyc-brand small {
  display: block;
  line-height: 1.1;
}

.kyc-brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
}

.kyc-nav {
  gap: 4px;
}

.kyc-nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 650;
}

.kyc-nav .nav-link.active,
.kyc-nav .nav-link:hover {
  color: var(--brand-strong);
  background: #e7f2f2;
}

.kyc-page {
  padding: 42px 0 64px;
}

.kyc-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
}

.kyc-footer .kyc-container {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.kyc-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 32px;
  align-items: stretch;
  min-height: 430px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-bottom: 12px;
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

.hero-copy p,
.page-heading p,
.section-heading p,
.form-section-heading p,
.alert-panel p,
.result-panel p,
.kyc-split p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.hero-copy p {
  max-width: 650px;
  font-size: 1.13rem;
}

.hero-illustration {
  width: min(100%, 210px);
  margin-top: 0;
  opacity: 0.96;
}

.hero-illustration.compact {
  width: min(100%, 170px);
  margin-top: 0;
}

.section-art {
  width: min(100%, 180px);
  margin-top: 16px;
  opacity: 0.95;
}

.hero-illustration-float {
  float: left;
  margin: 0 18px 10px 0;
}

.hero-copy::after,
.page-heading::after,
.section-heading::after {
  content: "";
  display: block;
  clear: both;
}

.kyc-hero h1 {
  font-size: clamp(1.85rem, 3.4vw, 3.15rem);
  line-height: 1.08;
}

.hero-actions,
.result-actions,
.sticky-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-actions {
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  font-weight: 750;
}

.btn-primary {
  border-color: var(--brand);
  background: var(--brand);
}

.btn-primary:hover,
.btn-primary:focus {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
}

.hero-panel,
.section-band,
.status-summary,
.form-section,
.alert-panel,
.result-panel,
.correction-item {
  border: 1px solid rgba(217, 224, 234, 0.9);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
}

.verification-meter {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.7fr;
  gap: 8px;
}

.verification-meter span {
  height: 10px;
  border-radius: 999px;
  background: var(--brand);
}

.verification-meter span:nth-child(2) {
  background: var(--blue);
}

.verification-meter span:nth-child(3) {
  background: var(--amber);
}

.level-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.level-list div {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.level-list strong,
.step-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
}

.level-list strong img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: none;
}

.level-list strong {
  background: #f3f7fc;
  border: 1px solid #d8e3f0;
}

.level-list div:nth-child(1) strong {
  background: #e7f2fb;
}

.level-list div:nth-child(2) strong {
  background: #e5f7ef;
}

.level-list div:nth-child(3) strong {
  background: #fff0dd;
}

.level-list div:nth-child(4) strong {
  background: #fdeef8;
}

.level-list em,
.step-card em,
.timeline-row em,
.document-list em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.9rem;
}

.section-band {
  margin-top: 32px;
  padding: 28px;
}

.section-band.compact {
  max-width: 820px;
}

.section-heading {
  margin-bottom: 20px;
}

.developer-guide {
  display: grid;
  gap: 18px;
  border-color: rgba(107, 148, 197, 0.38);
  background:
    radial-gradient(900px 220px at 0% 0%, rgba(47, 127, 189, 0.09), transparent 68%),
    radial-gradient(900px 220px at 100% 0%, rgba(31, 141, 98, 0.08), transparent 72%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.developer-guide pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  border-radius: 8px;
  color: #e5eef9;
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  border: 1px solid rgba(88, 113, 149, 0.42);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.26);
  font-size: 0.92rem;
  line-height: 1.6;
}

.developer-guide code {
  color: inherit;
}

.developer-guide pre code.hljs {
  display: block;
  padding: 0;
  background: transparent;
  color: #e5eef9;
}

.developer-guide pre code.hljs .hljs-keyword,
.developer-guide pre code.hljs .hljs-built_in,
.developer-guide pre code.hljs .hljs-type {
  color: #93c5fd;
}

.developer-guide pre code.hljs .hljs-title,
.developer-guide pre code.hljs .hljs-title.function_,
.developer-guide pre code.hljs .hljs-title.class_ {
  color: #c4b5fd;
}

.developer-guide pre code.hljs .hljs-string,
.developer-guide pre code.hljs .hljs-regexp {
  color: #86efac;
}

.developer-guide pre code.hljs .hljs-comment {
  color: #94a3b8;
}

.developer-guide pre code.hljs .hljs-number,
.developer-guide pre code.hljs .hljs-literal {
  color: #fda4af;
}

.developer-guide pre code.hljs .hljs-attr,
.developer-guide pre code.hljs .hljs-attribute,
.developer-guide pre code.hljs .hljs-variable {
  color: #f9e2af;
}

.flow-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-list li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(145, 167, 195, 0.45);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 30px rgba(24, 33, 47, 0.04);
}

.flow-list span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
}

.flow-list div {
  display: grid;
  gap: 4px;
}

.flow-list strong,
.flow-list em {
  display: block;
}

.flow-list strong {
  color: var(--ink);
}

.flow-list em {
  color: var(--muted);
  font-style: normal;
}

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

.claim-grid span {
  padding: 12px;
  border: 1px solid rgba(145, 167, 195, 0.45);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 30px rgba(24, 33, 47, 0.04);
}

.claim-grid code {
  color: var(--brand-strong);
  font-weight: 750;
}

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

.current-case-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.current-case-card {
  grid-template-rows: auto auto auto auto minmax(84px, 1fr);
  align-content: start;
  min-height: 250px;
}

.step-card-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.94rem;
}

.step-card-meta {
  min-height: 34px;
  display: flex;
  align-items: center;
}

.step-evidence {
  min-height: 84px;
  display: flex;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.step-evidence.empty {
  color: var(--muted);
}

.step-card {
  display: grid;
  min-height: 150px;
  align-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-2);
  text-decoration: none;
}

.step-card:hover {
  border-color: #8bb9bd;
}

.case-thumb-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.case-thumb-strip img,
.case-thumb-more {
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
}

.case-thumb-strip img {
  object-fit: cover;
}

.case-thumb-more {
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  background: var(--surface);
  font-weight: 800;
}

.document-builder {
  display: grid;
  gap: 18px;
}

.document-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.document-panel-list {
  display: grid;
  gap: 14px;
}

.empty-document-builder {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px dashed #b7c3d1;
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-2);
  font-weight: 700;
}

.document-upload-panel {
  position: relative;
  margin: 0;
  border-color: #cfd8e3;
  background: #fbfdff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.document-upload-panel.attention {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(35, 111, 116, 0.14);
  transform: translateY(-1px);
}

.document-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--danger);
  background: #fff;
}

.document-remove:hover {
  border-color: #f0b4aa;
  color: #fff;
  background: var(--danger);
}

.document-processing {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 20px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid #acd3d3;
  border-radius: 14px;
  background: radial-gradient(520px 160px at 100% 0%, rgba(47, 127, 189, 0.13), transparent 70%), linear-gradient(145deg, #f7ffff, #f7faff);
  box-shadow: 0 16px 40px rgba(22, 54, 72, 0.08);
}

.document-processing[hidden] { display: none; }

.document-processing-orbit {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border: 1px solid #a7cecf;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), #3389a6);
  box-shadow: 0 0 0 9px rgba(35, 111, 116, 0.08);
  font-size: 1.75rem;
  animation: document-pulse 1.8s ease-in-out infinite;
}

.document-processing-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.document-processing-heading h2 { margin: 4px 0 0; font-size: clamp(1.15rem, 3vw, 1.5rem); }
.document-processing-heading > strong { color: var(--brand-strong); font-size: 1.35rem; font-variant-numeric: tabular-nums; }

.document-progress-track {
  height: 10px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe8ee;
}

.document-progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #2f7fbd, #1f8d62);
  transition: width 0.35s ease;
}

.document-processing-copy > p { margin: 11px 0 0; color: var(--muted); }
.document-processing-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.document-processing-steps span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  color: #748390;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.84rem;
  font-weight: 750;
  transition: color 0.2s ease, background 0.2s ease;
}
.document-processing-steps span.active { color: var(--brand-strong); background: #e0f1f0; }
.document-processing-error { margin-top: 16px; padding: 14px 16px; border: 1px solid #efb4aa; border-radius: 9px; color: #7d251c; background: #fff4f2; }
.document-processing-error ul { margin: 8px 0 0; padding-left: 20px; }
.document-processing.has-error { border-color: #efb4aa; background: #fffafa; }
.document-processing.has-error .document-processing-orbit { background: var(--danger); animation: none; }

@keyframes document-pulse {
  50% { transform: scale(1.04); box-shadow: 0 0 0 14px rgba(35, 111, 116, 0.05); }
}

.automation-review-card {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #a9d4c2;
  border-radius: 11px;
  background: #f5fcf8;
}
.automation-review-card.failed { border-color: #efb4aa; background: #fff8f7; }
.automation-review-heading { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.automation-review-heading > span { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 10px; color: #fff; background: #1f8d62; font-size: 1.2rem; }
.automation-review-card.failed .automation-review-heading > span { background: var(--danger); }
.automation-review-heading small { color: var(--muted); font-weight: 750; }
.automation-review-heading h3 { margin: 2px 0 0; font-size: 1.05rem; }
.automation-review-heading > strong { color: #176e4c; font-size: 1.3rem; }
.automation-json { display: block; max-width: 100%; overflow-wrap: anywhere; white-space: normal; color: #314354; }
.ocr-transcript { margin: -7px 0 18px; border: 1px solid var(--line); border-radius: 9px; background: #fbfdff; }
.ocr-transcript summary { padding: 12px 14px; cursor: pointer; color: var(--brand-strong); font-weight: 800; }
.ocr-transcript p { margin: 0; padding: 0 14px 10px; color: var(--muted); }
.ocr-transcript pre { max-height: 280px; margin: 0; overflow: auto; padding: 14px; border-top: 1px solid var(--line); color: #263746; background: #f3f7fa; white-space: pre-wrap; }

.kyc-split,
.status-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: 24px;
  align-items: start;
}

.assurance-list,
.checklist-band,
.badge-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.assurance-list span,
.checklist-band span,
.status-pill,
.kyc-badge,
.status-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--brand-strong);
  background: #e7f2f2;
  font-weight: 750;
}

.kyc-assurance .assurance-list {
  align-content: start;
}

.kyc-assurance {
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.6fr);
  background:
    radial-gradient(760px 220px at 0% 0%, rgba(47, 127, 189, 0.12), transparent 70%),
    radial-gradient(700px 200px at 100% 100%, rgba(178, 58, 138, 0.1), transparent 70%),
    #fff;
}

.kyc-assurance .assurance-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.kyc-explainer {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 240px at 100% -10%, rgba(31, 141, 98, 0.12), transparent 68%),
    radial-gradient(900px 240px at -5% 100%, rgba(47, 127, 189, 0.11), transparent 70%),
    linear-gradient(165deg, #ffffff 0%, #f7fbfe 100%);
}

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

.kyc-why-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.kyc-why-grid h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1.03rem;
}

.kyc-why-grid p {
  margin: 10px 0 0;
  color: var(--muted);
}

.kyc-bottom-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  border-color: #c9deea;
  background: linear-gradient(135deg, #ebf8fc 0%, #f8fbff 100%);
}

.kyc-bottom-hero .hero-actions {
  margin-top: 0;
}

.badge-strip {
  margin-top: 16px;
}

.kyc-badge:nth-child(2n),
.status-chip {
  color: #244a86;
  background: #e8eefb;
}

.kyc-badge.tone-identity {
  color: #1f5f91;
  background: #e7f2fb;
}

.kyc-badge.tone-document {
  color: #176a49;
  background: #e5f7ef;
}

.kyc-badge.tone-address {
  color: #8f2f70;
  background: #fdeef8;
}

.page-heading {
  margin-bottom: 28px;
}

.user-hero {
  padding: 24px;
  border: 1px solid rgba(150, 175, 210, 0.45);
  border-radius: 10px;
  background:
    radial-gradient(1150px 220px at 8% -18%, rgba(47, 127, 189, 0.16), transparent 65%),
    radial-gradient(850px 180px at 95% 0%, rgba(178, 58, 138, 0.1), transparent 72%),
    #fff;
}

.user-hero-case {
  margin-bottom: 30px;
}

.user-hero-index {
  padding: 30px;
  border: 1px solid rgba(150, 175, 210, 0.4);
  border-radius: 10px;
}

.user-hero-index .hero-panel {
  border-color: rgba(47, 127, 189, 0.25);
  background: linear-gradient(165deg, #ffffff 0%, #f6fbff 100%);
}

@media (min-width: 901px) {
  .hero-illustration-index {
    width: 108px;
    margin: 2px 16px 8px 0;
  }
}

.page-heading h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.status-layout {
  align-items: stretch;
}

.status-summary,
.form-section,
.alert-panel {
  padding: 24px;
}

.status-summary dl,
.review-list {
  display: grid;
  grid-template-columns: minmax(120px, auto) 1fr;
  gap: 10px 18px;
  margin: 22px 0 0;
}

.status-summary dt,
.review-list dt {
  color: var(--muted);
}

.status-summary dd,
.review-list dd {
  margin: 0;
  font-weight: 700;
}

.step-timeline {
  display: grid;
  gap: 12px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.timeline-row:hover,
.timeline-row:focus-visible {
  border-color: #8bb9bd;
  background: #fbfefe;
  box-shadow: 0 18px 40px rgba(24, 33, 47, 0.1);
  transform: translateY(-2px);
}

.timeline-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.timeline-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: var(--ink);
  background: #e7f2f2;
  border: 1px solid #cfe3e5;
  box-shadow: 0 0 0 5px #f2f8f8;
}

.timeline-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: none;
}

.timeline-icon.blue {
  background: #e8eefb;
  border-color: #ccd9f3;
  box-shadow: 0 0 0 5px #f2f5fc;
}

.timeline-icon.amber {
  background: #fff1d6;
  border-color: #f1d8aa;
  box-shadow: 0 0 0 5px #fff7ea;
}

.timeline-icon.purple {
  background: #f1ebff;
  border-color: #d8c9ff;
  box-shadow: 0 0 0 5px #f7f3ff;
}

.form-shell,
.upload-shell {
  display: grid;
  gap: 20px;
}

.gated-panel[disabled] {
  opacity: 0.62;
  filter: saturate(0.72);
  pointer-events: none;
}

.gated-panel[disabled] .form-control,
.gated-panel[disabled] .form-select {
  background: #f2f5f9;
}

.form-section-heading {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

.form-section-heading > span,
.upload-icon,
.result-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  font-weight: 800;
}

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

.form-grid .wide {
  grid-column: span 2;
}

.form-label {
  color: #344054;
  font-weight: 750;
}

.form-control,
.form-select {
  min-height: 48px;
  border-color: #cfd8e3;
  border-radius: 8px;
}

.country-picker {
  position: relative;
}

.country-trigger {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  font-weight: 650;
  text-align: left;
}

.country-trigger:hover {
  border-color: #b7c5d6;
}

.country-trigger:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 0.2rem rgba(18, 106, 115, 0.14);
}

.country-trigger-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-trigger-flag,
.country-option-flag {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1.1rem;
  line-height: 1;
}

.country-trigger-flag {
  flex-shrink: 0;
}

.country-menu {
  position: absolute;
  z-index: 25;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  max-height: 320px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(24, 33, 47, 0.14);
}

.country-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.country-option:hover {
  background: #eef7f8;
}

.country-option-flag {
  display: inline-block;
  min-width: 1.5rem;
  text-align: center;
}

.country-option-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 0.2rem rgba(18, 106, 115, 0.14);
}

.validation-panel.validation-summary-valid {
  display: none;
}

.validation-panel {
  padding: 16px 18px;
  border: 1px solid #f0b8b2;
  border-radius: 8px;
  color: var(--danger);
  background: #fff3f1;
}

.validation-panel ul {
  margin-bottom: 0;
}

.sticky-actions {
  position: sticky;
  bottom: 16px;
  justify-content: flex-end;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

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

.upload-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.upload-zone {
  display: grid;
  min-height: 250px;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  border: 2px dashed #a8b6c8;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  text-align: center;
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--brand);
  background: #f3fbfb;
}

.upload-zone input {
  width: min(100%, 360px);
}

.upload-icon {
  width: 56px;
  background: var(--brand);
}

.upload-icon.muted {
  background: var(--amber);
}

.upload-zone em,
.file-preview {
  color: var(--muted);
  font-style: normal;
}

.file-preview {
  font-weight: 750;
}

.upload-preview-list {
  display: grid;
  width: 100%;
  gap: 12px;
}

.upload-preview-list span,
.uploaded-preview-grid figure {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.upload-preview-list img,
.upload-preview-list video,
.uploaded-preview-grid img,
.uploaded-preview-grid video,
.document-figure video {
  display: block;
  width: 100%;
  max-height: 230px;
  object-fit: contain;
  border-radius: 6px;
  background: #111827;
}

.document-figure video {
  max-height: 560px;
}

.upload-preview-list em,
.uploaded-preview-grid figcaption {
  color: var(--muted);
  font-size: 0.88rem;
  font-style: normal;
  font-weight: 700;
}

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

.liveness-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 22px;
  align-items: start;
}

.liveness-recording-shell {
  display: grid;
  gap: 18px;
}

.liveness-stage {
  display: grid;
  gap: 14px;
}

.liveness-stage[hidden] {
  display: none;
}

.liveness-camera-shell {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #09101d 0%, #121c2f 100%);
  box-shadow: var(--shadow);
}

.liveness-camera-shell video,
.liveness-review-grid video {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
  background: #0b1220;
}

#livenessPreview {
  width: 100%;
  max-width: none;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center center;
}

.liveness-face-mask {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.liveness-face-guide {
  width: clamp(140px, 38%, 300px);
  aspect-ratio: 3 / 4;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 48% 48% 44% 44% / 38% 38% 62% 62%;
  box-shadow: 0 0 0 999px rgba(4, 10, 20, 0.34), 0 0 28px rgba(56, 189, 248, 0.42);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.liveness-command-overlay {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 50%;
  display: grid;
  min-width: min(88%, 480px);
  gap: 2px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #fff;
  text-align: center;
  background: rgba(4, 10, 20, 0.76);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
  pointer-events: none;
}

.liveness-command-overlay strong {
  font-size: clamp(0.86rem, 2vw, 1.05rem);
}

.liveness-command-overlay span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.74rem;
  font-weight: 750;
}

.liveness-overlay {
  position: absolute;
  inset: auto 12px 12px 12px;
  display: grid;
  gap: 6px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(180deg, rgba(7, 11, 20, 0.36), rgba(7, 11, 20, 0.72));
  backdrop-filter: blur(12px);
  z-index: 3;
}

.liveness-label {
  display: inline-flex;
  width: max-content;
  gap: 6px;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.liveness-label[hidden],
.liveness-recording-telemetry[hidden] {
  display: none;
}

.liveness-label i {
  color: #fb7185;
}

.liveness-recording-telemetry {
  display: grid;
  gap: 6px;
}

.liveness-clock {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 900;
  color: #fde68a;
}

.liveness-clock.danger {
  color: #fda4af;
}

.liveness-clock.success {
  color: #86efac;
}

.liveness-progress {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
}

.liveness-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f59e0b 0%, #22c55e 100%);
  transition: width 120ms linear, background 120ms linear;
}

.liveness-progress-bar.danger {
  background: linear-gradient(90deg, #fb7185 0%, #ef4444 100%);
}

.liveness-progress-bar.success {
  background: linear-gradient(90deg, #34d399 0%, #22c55e 100%);
}

.liveness-status {
  margin: 0;
  font-size: 0.93rem;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.93);
}

.liveness-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
  gap: 16px;
  align-items: start;
}

#recordedPlayback {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.liveness-review-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow);
}

.liveness-review-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.liveness-command-timeline {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.35rem;
}

.liveness-command-timeline li {
  padding-left: 4px;
  color: var(--muted);
}

.liveness-command-timeline li strong,
.liveness-command-timeline li span {
  display: block;
}

.liveness-command-timeline li strong {
  color: var(--ink);
  font-size: 0.88rem;
}

.liveness-command-timeline li span {
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.liveness-command-timeline li.active {
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--brand);
  background: rgba(37, 99, 235, 0.09);
}

.liveness-admin-video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #0b1220;
}

.liveness-admin-video-shell video {
  width: 100%;
}

.liveness-review-command-overlay {
  position: absolute;
  top: 12px;
  left: 50%;
  display: grid;
  width: min(90%, 520px);
  gap: 2px;
  padding: 10px 14px;
  border-radius: 12px;
  color: #fff;
  text-align: center;
  background: rgba(4, 10, 20, 0.82);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
  pointer-events: none;
}

.liveness-review-command-overlay[hidden] {
  display: none;
}

.liveness-review-command-overlay span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.liveness-review-timeline-panel {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.liveness-review-timeline-panel h2,
.liveness-review-timeline-panel p {
  margin: 0;
}

.liveness-review-timeline-panel h2 {
  font-size: 1rem;
}

.liveness-review-timeline-panel p {
  color: var(--muted);
  font-size: 0.86rem;
}

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

.review-checklist {
  display: grid;
  gap: 10px;
}

.review-checklist span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-strong);
  font-weight: 700;
}

.liveness-history {
  display: grid;
  gap: 10px;
}

.liveness-history-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(24, 33, 47, 0.05);
}

.liveness-history-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.liveness-history-item summary::-webkit-details-marker {
  display: none;
}

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

.liveness-history-title strong,
.liveness-history-title small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.liveness-history-title small {
  color: var(--muted);
}

.liveness-history-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--brand-strong);
  font-weight: 700;
}

.liveness-history-item[open] .liveness-history-meta i {
  transform: rotate(180deg);
}

.liveness-history-meta i {
  transition: transform 140ms ease;
}

.liveness-history-meta em {
  font-style: normal;
}

.liveness-history-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 14px;
  padding: 0 16px 16px;
}

.liveness-history-preview {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0b1220;
}

.liveness-history-preview video,
.liveness-history-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: cover;
}

.liveness-history-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  margin: 0;
  align-content: start;
}

.liveness-history-details dt {
  color: var(--muted);
  font-weight: 700;
}

.liveness-history-details dd {
  margin: 0;
  font-weight: 700;
}

.qr-handoff-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.qr-card {
  display: grid;
  place-items: center;
  padding: 14px;
  border-radius: 8px;
  background: #fff;
}

.qr-card svg {
  width: min(100%, 220px);
  height: auto;
}

.qr-handoff-panel h2 {
  margin: 0;
  font-size: 1.15rem;
}

.qr-handoff-panel p {
  margin: 0;
  color: var(--muted);
}

.qr-handoff-panel span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--brand);
  font-weight: 750;
}

.liveness-challenge-box {
  border: 1px solid rgba(59, 130, 246, .25);
  background: linear-gradient(180deg, rgba(59, 130, 246, .10), rgba(56, 189, 248, .05));
  border-radius: 12px;
  padding: .9rem 1rem;
}

.liveness-challenge-box p {
  margin: .35rem 0 0;
  font-weight: 700;
}

.liveness-recorder {
  display: grid;
  gap: .75rem;
}

#recordedPlayback {
  width: min(100%, 520px);
  border-radius: 12px;
/*  border: 1px solid var(--line);*/
  background: #0b1220;
}

#recordedPlayback {
  display: block;
}

.recorder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: center;
}

.recorder-actions [hidden] {
  display: none !important;
}

.checklist-band {
  padding: 0 4px;
}

.alert-panel {
/*  max-width: 760px;*/
}

.alert-panel.danger {
  border-color: #f0b8b2;
/*  background: #fff7f6;*/
}

.kyc-unavailable-banner {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.95fr);
  gap: 20px;
  align-items: start;
  margin-top: 24px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 38%),
    linear-gradient(135deg, #7d1a17 0%, #b42318 42%, #6e1210 100%);
  box-shadow: 0 24px 64px rgba(180, 35, 24, 0.24);
}

.kyc-unavailable-banner .kyc-unavailable-copy,
.kyc-unavailable-banner .kyc-unavailable-details {
  color: #fff;
}

.kyc-unavailable-banner .eyebrow,
.kyc-unavailable-banner p,
.kyc-unavailable-banner summary,
.kyc-unavailable-banner small,
.kyc-unavailable-banner .small {
  color: #fff;
}

.kyc-unavailable-banner h2 {
  color: #fff;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
}

.kyc-unavailable-copy {
  display: grid;
  gap: 10px;
}

.kyc-unavailable-copy .small {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
}

.kyc-unavailable-details {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(11, 18, 32, 0.34);
  backdrop-filter: blur(12px);
}

.kyc-unavailable-details *,
.kyc-unavailable-banner .kyc-unavailable-details summary,
.kyc-unavailable-banner .kyc-unavailable-details p,
.kyc-unavailable-banner .kyc-unavailable-details pre {
  color: #fff;
}

.kyc-unavailable-details summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.kyc-unavailable-details summary::-webkit-details-marker {
  display: none;
}

.kyc-unavailable-details pre {
  margin: 12px 0 0;
  padding: 14px;
  border-radius: 10px;
  white-space: pre-wrap;
  background: rgba(3, 7, 18, 0.45);
  overflow: auto;
}

.result-panel {
  display: grid;
  justify-items: start;
  gap: 16px;
  max-width: 840px;
  padding: 34px;
}

.result-panel h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.result-panel.success .result-mark {
  background: var(--success);
}

.success-panel {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.success-panel-art {
  display: grid;
  place-items: center;
  padding: 18px;
}

.success-panel-art img {
  width: min(100%, 180px);
  height: auto;
}

.success-panel-copy {
  display: grid;
  gap: 12px;
}

.success-panel-copy .muted {
  margin: 0;
  color: var(--muted);
}

.result-panel.pending .result-mark {
  background: var(--amber);
}

.document-list,
.correction-list {
  display: grid;
  gap: 12px;
}

.document-list div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.correction-list {
  max-width: 860px;
}

.correction-item {
  padding: 22px;
}

.correction-item p {
  color: var(--danger);
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-metrics div,
.admin-panel {
  border: 1px solid rgba(217, 224, 234, 0.9);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-metrics .metric-card,
.admin-metrics div {
  display: grid;
  gap: 8px;
  padding: 20px;
}

.admin-metrics .metric-card {
  text-decoration: none;
  color: inherit;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.admin-metrics .metric-card:hover {
  transform: translateY(-2px);
  border-color: #9ec5cb;
  box-shadow: 0 22px 44px rgba(24, 33, 47, 0.14);
}

.admin-metrics span,
.admin-metrics em {
  color: var(--muted);
  font-style: normal;
}

.admin-metrics strong {
  font-size: 2.4rem;
  line-height: 1;
}

.metric-card.tone-identity {
  background: linear-gradient(145deg, #f6fbff, #ffffff);
  border-left: 5px solid #2f7fbd;
}

.metric-card.tone-document {
  background: linear-gradient(145deg, #f4fffb, #ffffff);
  border-left: 5px solid #1f8d62;
}

.metric-card.tone-liveness {
  background: linear-gradient(145deg, #fff7f0, #ffffff);
  border-left: 5px solid #cc6d1a;
}

.metric-card.tone-address {
  background: linear-gradient(145deg, #fff6fb, #ffffff);
  border-left: 5px solid #b23a8a;
}

.metric-card.tone-final {
  background: linear-gradient(145deg, #f4f7ff, #ffffff);
  border-left: 5px solid #4f46e5;
}

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

.admin-hero {
  padding: 26px;
  border: 1px solid rgba(150, 175, 210, 0.45);
  border-radius: 10px;
  background:
    radial-gradient(1200px 220px at 10% -20%, rgba(47, 127, 189, 0.2), transparent 65%),
    radial-gradient(900px 180px at 95% 0%, rgba(178, 58, 138, 0.14), transparent 72%),
    #fff;
}

.admin-grid.wide-left {
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
}

.admin-panel {
  padding: 22px;
}

.panel-title,
.admin-filter,
.decision-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-filter {
  margin-bottom: 20px;
}

.admin-filter .form-control {
  flex: 1 1 auto;
}

.admin-filter .form-select {
  flex: 0 0 210px;
}

.queue-list,
.activity-list {
  display: grid;
  gap: 10px;
}

.queue-list a,
.activity-list span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-2);
  text-decoration: none;
}

.queue-list a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
}

.queue-list a small {
  grid-column: 1 / 2;
  color: var(--muted);
  font-size: 0.85rem;
}

.activity-list span {
  justify-content: flex-start;
}

.activity-list.timeline span {
  border-left: 4px solid var(--brand);
}

.admin-table {
  margin-bottom: 0;
}

.admin-table thead th {
  color: #49617b;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.admin-table tbody tr:hover {
  background: #f9fcff;
}

.admin-table th,
.admin-table td {
  vertical-align: middle;
}

.admin-thumb {
  display: inline-grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  object-fit: cover;
}

.admin-thumb.placeholder {
  color: var(--muted);
}

.dt-container .dt-search input,
.dt-container .dt-length select {
  border-color: #cfd8e3;
  border-radius: 8px;
}

.dt-container .page-link {
  color: var(--brand);
}

.dt-container .active > .page-link,
.dt-container .page-link.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.status-pill.amber {
  color: #7a4300;
  background: #fff1d6;
}

.status-pill.danger {
  color: var(--danger);
  background: #fff3f1;
}

.status-pill.success,
.status-chip.success {
  color: #146c43;
  background: #d1e7dd;
}

.status-pill.warning,
.status-chip.warning {
  color: #7a4300;
  background: #fff1d6;
}

.status-chip.danger {
  color: var(--danger);
  background: #fff3f1;
}

.status-pill.info,
.status-chip.info {
  color: #075985;
  background: #e0f2fe;
}

.status-pill.muted {
  color: var(--muted);
  background: #eef2f7;
}

.status-chip.muted {
  color: var(--muted);
  background: #eef2f7;
}

.review-list.spacious {
  gap: 16px 22px;
}

.decision-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.decision-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

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

.document-review.single {
  grid-template-columns: 1fr;
}

.document-canvas {
  display: grid;
  min-height: 420px;
  place-items: center;
  border: 1px solid #a8b6c8;
  border-radius: 8px;
  color: var(--muted);
  background: repeating-linear-gradient(45deg, #f8fafc, #f8fafc 12px, #eef2f7 12px, #eef2f7 24px);
  font-weight: 750;
}

.document-canvas.muted {
  background: repeating-linear-gradient(45deg, #fff8ed, #fff8ed 12px, #f7ead5 12px, #f7ead5 24px);
}

.document-figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #0f172a;
}

.document-figure img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  background: #111827;
}

.document-figure figcaption {
  padding: 12px 14px;
  color: #fff;
  background: #18212f;
  font-weight: 700;
}

.identity-compare-panel {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(760px 180px at 0% -10%, rgba(47, 127, 189, 0.12), transparent 72%),
    #fff;
}

.identity-compare-header,
.document-review-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.document-review-header {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.identity-compare-list {
  margin-top: 14px;
}

.identity-compare-list dt {
  font-weight: 700;
}

.empty-state.compact {
  min-height: 120px;
}

.empty-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed #a8b6c8;
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-2);
}

@media (max-width: 900px) {
  .kyc-hero,
  .kyc-split,
  .status-layout,
  .upload-grid,
  .uploaded-preview-grid,
  .admin-grid,
  .admin-grid.wide-left,
  .admin-metrics,
  .document-review,
  .liveness-layout {
    grid-template-columns: 1fr;
  }

  .step-grid,
  .claim-grid,
  .kyc-why-grid,
  .document-picker-row,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .kyc-bottom-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .form-grid .wide {
    grid-column: auto;
  }

  .timeline-row,
  .document-list div,
  .admin-filter,
  .liveness-review-grid,
  .queue-list a {
    grid-template-columns: 1fr;
  }

  .admin-filter,
  .queue-list a,
  .panel-title {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-filter .form-select {
    flex-basis: auto;
  }

  .timeline-row {
    align-items: start;
  }

  .case-step-timeline .timeline-row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
  }

  .case-step-timeline .timeline-row em {
    justify-self: end;
  }

  .timeline-icon {
    width: 38px;
    height: 38px;
  }

  .kyc-unavailable-banner {
    grid-template-columns: 1fr;
  }

  .liveness-overlay {
    inset: auto 8px 8px 8px;
    padding: 10px 12px;
    max-width: min(100% - 16px, 320px);
  }
}

@media (max-width: 560px) {
  .document-processing {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 19px;
  }

  .document-processing-orbit { width: 56px; height: 56px; font-size: 1.4rem; }
  .document-processing-heading { align-items: flex-start; }
  .document-processing-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .kyc-container {
    width: min(100% - 20px, 1160px);
  }

  .kyc-page {
    padding-top: 28px;
  }

  .hero-panel,
  .section-band,
  .status-summary,
  .form-section,
  .alert-panel,
  .result-panel {
    padding: 20px;
  }

  .level-list div {
    grid-template-columns: 1fr;
  }

  .status-summary dl,
  .review-list {
    grid-template-columns: 1fr;
  }

  .sticky-actions,
  .hero-actions,
  .result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .sticky-actions .btn,
  .hero-actions .btn,
  .result-actions .btn {
    width: 100%;
  }

  .success-panel {
    grid-template-columns: 1fr;
  }

  .success-panel-art {
    padding: 8px 0 0;
  }

  .success-panel-art img {
    width: min(100%, 140px);
  }

  .hero-illustration,
  .section-art {
    width: min(100%, 140px);
  }

  .hero-illustration-float {
    float: none;
    display: block;
    margin: 0 auto 10px;
   
  }

  .liveness-overlay {
    position: static;
    margin: 10px;
  }

  .liveness-history-body {
    grid-template-columns: 1fr;
  }

  .liveness-review-card,
  .qr-handoff-panel {
    padding: 18px;
  }

  .qr-handoff-panel {
    display: none;
  }

  .kyc-unavailable-banner {
    padding: 20px;
  }
}

.pagination {
    justify-content: center !important;
}

.diagnostic-cause{display:flex;align-items:flex-start;gap:12px;padding:14px 16px;border:1px solid #f0d49b;border-radius:10px;color:#684817;background:#fff9e9}.diagnostic-cause>i{margin-top:2px;color:#a66a00;font-size:1.2rem}.diagnostic-cause strong,.diagnostic-cause p{display:block}.diagnostic-cause p{margin:3px 0 0;font-size:.86rem;line-height:1.55}.diagnostic-table{font-size:.8rem}.diagnostic-table th{color:var(--muted);font-size:.7rem;text-transform:uppercase;letter-spacing:.04em}.diagnostic-table td>small{display:block;color:var(--muted)}.diagnostic-table .status-pill{padding:5px 9px;font-size:.67rem}.ocr-transcript>h3{margin:0;padding:12px 14px;border-bottom:1px solid var(--line);color:var(--brand-strong);font-size:.9rem}.ocr-transcript .review-list{margin:0;padding:13px 14px}.diagnostic-pages{display:grid;gap:7px;padding:11px 14px;border-top:1px solid var(--line);background:#fff}.diagnostic-pages span,.diagnostic-pages strong,.diagnostic-pages small{display:block}.diagnostic-pages span{padding:8px 10px;border-radius:7px;background:#f3f7fa}.diagnostic-pages small{margin-top:2px;color:var(--muted);font-size:.68rem}.token-comparison{display:grid;gap:7px;padding:13px 14px}.token-comparison>span{display:grid;grid-template-columns:minmax(90px,1fr) auto minmax(90px,1fr) auto;align-items:center;gap:8px;padding:8px 10px;border-radius:7px;background:#f3f7fa;font-size:.76rem}.token-comparison i{color:var(--muted)}.token-comparison code{overflow:hidden;color:#38536a;text-overflow:ellipsis}.token-comparison b{min-width:42px;text-align:right}.match-good{color:#146c43}.match-bad{color:var(--danger)}
@media(max-width:650px){.token-comparison>span{grid-template-columns:1fr auto}.token-comparison i{display:none}.token-comparison code{grid-column:1}.diagnostic-table{min-width:720px}}
