/* CQC Onboarding Portal — shared styles
   Brand: deep teal #1B343B, mint #8CCDCB, light mint #F4FAFA, amber #FFC857.
   Matches the three approved mockups (mockup-01/02/03.png). */

:root {
  --teal-900: #0B3B3C;
  --teal-800: #1B343B;
  --teal-600: #2E5A60;
  --teal-500: #3F7378;
  --mint-500: #8CCDCB;
  --mint-400: #A8D9D6;
  --mint-200: #D9EDE8;
  --mint-100: #E8F4F2;
  --mint-50:  #F4FAFA;
  --cream:    #FAFAF7;
  --amber:    #FFC857;
  --amber-bg: #FBF4E3;
  --amber-border: #E8A53D;
  --text:     #14333A;
  --text-mid: #5A7378;
  --text-dim: #8A9DA1;
  --border:   #DCE8E7;
  --white:    #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(11, 59, 60, 0.06);
  --shadow-md: 0 4px 16px rgba(11, 59, 60, 0.08);
  --shadow-lg: 0 12px 40px rgba(11, 59, 60, 0.12);
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--teal-800); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Top header bar ---------- */
.app-header {
  background: var(--teal-900);
  color: var(--white);
  padding: 22px 36px 18px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 24px;
}
.app-header .brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--white);
}
.app-header .brand .for-clinics {
  font-weight: 400;
  font-size: 17px;
  opacity: 0.78;
}

.app-header .stepper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.app-header .stepper-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.app-header .stepper .dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  transition: background 0.15s ease;
}
.app-header .stepper .dot.done {
  background: var(--mint-500);
  border-color: var(--mint-500);
  color: var(--teal-900);
}
.app-header .stepper .dot.current {
  background: var(--mint-400);
  border-color: var(--mint-400);
  color: var(--teal-900);
}
.app-header .stepper .bar {
  width: 18px;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.25);
}
.app-header .stepper-label {
  font-size: 13px;
  letter-spacing: 0.4px;
  opacity: 0.85;
}

.app-header .user-chip {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
}
.app-header .user-chip .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mint-400);
  color: var(--teal-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
.app-header .user-chip .who {
  font-size: 13px;
  white-space: nowrap;
}
.app-header .user-chip .who .name { font-weight: 600; }
.app-header .user-chip .who .clinic { opacity: 0.78; margin-left: 6px; }
.app-header .user-chip .chev { opacity: 0.55; font-size: 11px; margin-left: 4px; }

/* ---------- App shell (sidebar + main) ---------- */
.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 100px);
}

.sidebar {
  background: var(--mint-100);
  padding: 32px 22px 60px;
  border-right: 1px solid var(--border);
}
.sidebar .sidebar-title {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mid);
  margin: 0 12px 18px;
}
.sidebar .step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px;
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--text);
  margin-bottom: 6px;
  cursor: default;
}
.sidebar .step .num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  border: 1.5px solid var(--teal-800);
  color: var(--teal-800);
  background: transparent;
  flex-shrink: 0;
}
.sidebar .step.done .num {
  background: var(--mint-500);
  border-color: var(--mint-500);
  color: var(--teal-900);
}
.sidebar .step.done .check {
  margin-left: auto;
  color: var(--teal-800);
  font-weight: 700;
}
.sidebar .step.current {
  background: var(--teal-800);
  color: var(--white);
}
.sidebar .step.current .num {
  background: var(--mint-400);
  border-color: var(--mint-400);
  color: var(--teal-900);
}
.sidebar .step.upcoming { color: var(--text-mid); }
.sidebar .step.upcoming .num { border-color: var(--text-dim); color: var(--text-dim); }

/* ---------- Main content ---------- */
.main {
  padding: 48px 56px 80px;
  max-width: 980px;
  width: 100%;
}
.main h1.page-title {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.6px;
  margin: 0 0 12px;
  color: var(--teal-900);
}
.main p.page-sub {
  font-size: 17px;
  color: var(--text-mid);
  margin: 0 0 28px;
  max-width: 680px;
}

/* ---------- AI helper chip (mockup 1) ---------- */
.ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--mint-200);
  color: var(--teal-900);
  border: 1px solid var(--mint-400);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
.ai-chip:hover { background: var(--mint-400); }
.ai-chip:active { transform: translateY(1px); }
.ai-chip .spark { font-size: 16px; }

/* ---------- Field block ---------- */
.field-block { margin-bottom: 48px; }
.field-block .field-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
}
.field-block .field-head h2 {
  font-size: 30px;
  font-weight: 700;
  color: var(--teal-900);
  margin: 0;
  letter-spacing: -0.4px;
}
.field-block .field-desc {
  font-size: 16px;
  color: var(--text-mid);
  margin: 0 0 18px;
  max-width: 640px;
}

.field-textarea {
  width: 100%;
  min-height: 220px;
  padding: 18px 20px;
  font: inherit;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  resize: vertical;
  line-height: 1.55;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field-textarea:focus {
  outline: none;
  border-color: var(--mint-500);
  box-shadow: 0 0 0 3px rgba(140, 205, 203, 0.25);
}
.field-textarea.ai-draft {
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-left: 7px solid var(--amber-border);
  border-radius: var(--radius);
  padding-left: 22px;
}
.field-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-dim);
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--amber-bg);
  color: var(--teal-900);
  border: 1px solid var(--amber-border);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
}
.ai-approved {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-mid);
  margin-top: 6px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--teal-800);
  color: var(--white);
  border-color: var(--teal-800);
}
.btn-primary:hover { background: var(--teal-600); }
.btn-secondary {
  background: var(--white);
  color: var(--teal-800);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--mint-50); }
.btn-link {
  background: transparent;
  border: none;
  color: var(--teal-800);
  text-decoration: underline;
  padding: 12px 8px;
  font-weight: 500;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* ---------- AI helper panel (mockup 2) ---------- */
.ai-panel {
  position: fixed;
  top: 100px;
  right: 0;
  bottom: 0;
  width: 420px;
  background: var(--white);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 28px 24px;
  overflow-y: auto;
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.ai-panel.open { transform: translateX(0); }
.ai-panel .panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.ai-panel .panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--teal-900);
}
.ai-panel .panel-close {
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-mid);
  padding: 4px 8px;
}
.ai-panel .mode-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--mint-200);
  border-radius: var(--radius);
  margin-bottom: 12px;
  cursor: pointer;
  background: var(--white);
  align-items: flex-start;
}
.ai-panel .mode-card:hover {
  border-color: var(--mint-500);
  background: var(--mint-50);
}
.ai-panel .mode-card .mc-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--mint-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.ai-panel .mode-card .mc-body { flex: 1; }
.ai-panel .mode-card .mc-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--teal-900);
  margin-bottom: 4px;
}
.ai-panel .mode-card .mc-desc {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.4;
}
.ai-panel .mode-card .mc-chev {
  color: var(--text-dim);
  font-size: 18px;
  align-self: center;
}
.ai-panel .panel-divider {
  height: 1px;
  background: var(--border);
  margin: 18px 0;
}
.ai-panel .followup-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--teal-900);
  margin-bottom: 8px;
}
.ai-panel .followup-row {
  display: flex;
  gap: 8px;
}
.ai-panel .followup-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
}
.ai-panel .followup-row button {
  background: var(--mint-200);
  border: 1px solid var(--mint-400);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  cursor: pointer;
  color: var(--teal-900);
}
.ai-panel .panel-microcopy {
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.5;
}
.ai-panel .panel-microcopy strong { color: var(--teal-800); }

/* ---------- Anna floating card ---------- */
.anna-card {
  position: fixed;
  right: 28px;
  bottom: 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  max-width: 280px;
  z-index: 40;
}
.anna-card:hover { box-shadow: var(--shadow-lg); }
.anna-card .anna-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--mint-400);
  color: var(--teal-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  position: relative;
  flex-shrink: 0;
}
.anna-card .anna-avatar::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2BC07A;
  border: 2px solid var(--white);
}
.anna-card .anna-body { font-size: 13px; line-height: 1.35; }
.anna-card .anna-body strong { color: var(--teal-900); font-size: 14px; display: block; }
.anna-card .anna-body span { color: var(--text-mid); }

/* ---------- Welcome page ---------- */
.welcome-wrap { padding: 56px 56px 80px; max-width: 1100px; margin: 0 auto; }
.welcome-hero {
  background: var(--mint-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  margin-bottom: 32px;
}
.welcome-hero h1 {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--teal-900);
  margin: 0 0 12px;
}
.welcome-hero p { font-size: 17px; color: var(--text-mid); max-width: 720px; margin: 0; }
.welcome-section h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--teal-900);
  margin: 28px 0 16px;
}
.value-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.value-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.value-card .vc-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--mint-100);
  color: var(--teal-800);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.value-card h3 { font-size: 16px; margin: 0 0 8px; color: var(--teal-900); }
.value-card p { font-size: 14px; color: var(--text-mid); margin: 0; line-height: 1.5; }

.timeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 12px 0;
  border-left: 2px dashed var(--mint-400);
  padding-left: 26px;
}
.timeline-item {
  position: relative;
  padding: 14px 0 18px 6px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--mint-400);
  border: 3px solid var(--mint-100);
}
.timeline-item .ti-date {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
}
.timeline-item .ti-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--teal-900);
  margin: 2px 0 2px;
}
.timeline-item .ti-desc { font-size: 14px; color: var(--text-mid); }

/* ---------- Dashboard ---------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  margin-top: 24px;
}
@media (max-width: 980px) { .dashboard-grid { grid-template-columns: 1fr; } }

.stat-tile {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 16px;
}
.stat-tile .stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-dim); font-weight: 600; }
.stat-tile .stat-value { font-size: 56px; font-weight: 700; color: var(--teal-900); line-height: 1; margin: 8px 0 6px; }
.stat-tile .stat-sub { color: var(--text-mid); font-size: 14px; }

.progress-stages {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 16px;
}
.progress-stages h3 { font-size: 16px; margin: 0 0 16px; color: var(--teal-900); }
.stages-row {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
}
.stage {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 12px;
  color: var(--text-mid);
  min-width: 95px;
}
.stage .stage-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--text-dim);
  margin-bottom: 8px;
  position: relative;
}
.stage.done .stage-dot { background: var(--mint-500); border-color: var(--mint-500); }
.stage.current .stage-dot { background: var(--teal-800); border-color: var(--teal-800); }
.stage.current { color: var(--teal-900); font-weight: 600; }
.stage .stage-link {
  position: absolute;
  height: 2px;
  background: var(--border);
  top: 10px;
  left: 50%;
  right: -50%;
  z-index: -1;
}

.next-actions {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.next-actions h3 { font-size: 16px; margin: 0 0 14px; color: var(--teal-900); }
.next-actions .na-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.next-actions .na-item:last-child { border-bottom: none; }
.next-actions .na-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--mint-100);
  color: var(--teal-800);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.next-actions .na-body { flex: 1; font-size: 14px; }
.next-actions .na-title { font-weight: 600; color: var(--teal-900); }
.next-actions .na-meta { font-size: 12px; color: var(--text-mid); margin-top: 2px; }

/* Loading state */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--mint-400);
  border-top-color: var(--teal-800);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-mid);
  padding: 6px 12px;
}

/* CQC fee calculator */
.fee-calc {
  background: var(--mint-50);
  border: 1px solid var(--mint-200);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-top: 28px;
}
.fee-calc h3 { font-size: 15px; margin: 0 0 8px; color: var(--teal-900); }
.fee-calc p { font-size: 13px; color: var(--text-mid); margin: 4px 0; }
.fee-calc .fee-value { font-weight: 700; color: var(--teal-900); }

.coming-soon {
  background: var(--mint-50);
  border: 1px dashed var(--mint-400);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-mid);
  margin-top: 28px;
}
.coming-soon strong { color: var(--teal-800); display: block; margin-bottom: 6px; }

/* ============================================================
   Phase 2 — login, document vault, e-sign, modal, etc.
   ============================================================ */

/* Login page */
.login-body {
  background: linear-gradient(135deg, #F4FAFA 0%, #E2EEEE 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 24px;
}
.login-wrap { max-width: 460px; width: 100%; }
.login-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 36px rgba(27,52,59,0.10);
  padding: 40px 36px 28px;
  border-top: 4px solid var(--teal-800);
}
.login-brand {
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 16px;
  font-weight: 600;
}
.login-brand .for-clinics { color: var(--mint-500); }
.login-card h1 { font-size: 26px; margin: 0 0 12px; color: var(--teal-900); line-height: 1.25; }
.login-sub { font-size: 14px; color: var(--text-mid); margin: 0 0 22px; line-height: 1.5; }
.login-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal-800);
  margin-bottom: 6px;
}
.login-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #D0DEDE;
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 16px;
  font-family: inherit;
}
.login-form input:focus {
  outline: none;
  border-color: var(--mint-500);
  box-shadow: 0 0 0 3px rgba(140,205,203,0.25);
}
.btn-full { width: 100%; }
.login-foot {
  font-size: 12px;
  color: var(--text-mid);
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #E2EEEE;
}
.login-foot a { color: var(--teal-800); }
.login-error, .login-sent, .login-dev {
  border-radius: 8px; padding: 12px 14px; margin-bottom: 16px;
  font-size: 13px;
}
.login-error { background: #FDECEA; color: #8C2A1B; border: 1px solid #F3C4BC; }
.login-sent  { background: #E5F4ED; color: #1B5C3C; border: 1px solid #B7DCC8; }
.login-dev   { background: #FFF3D6; color: #8A5A0C; border: 1px solid #F0D58A; }
.login-dev a { color: #8A5A0C; font-weight: 700; }

/* Field input (single-line) used in wizard */
.field-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #D0DEDE;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
}
.field-input:focus {
  outline: none;
  border-color: var(--mint-500);
  box-shadow: 0 0 0 3px rgba(140,205,203,0.25);
}

/* Checkbox group */
.checkbox-group { margin: 8px 0 6px; }
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 4px;
  font-size: 14px;
  color: var(--text-mid);
  cursor: pointer;
  line-height: 1.5;
}
.checkbox-row input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--mint-500);
  width: 16px; height: 16px;
}

/* Wizard nav row */
.wizard-nav { margin-top: 24px; justify-content: space-between; }
.btn-large { padding: 14px 28px; font-size: 16px; }

/* Review pane (Submit step) */
.review-pane {
  margin-top: 20px;
  display: grid;
  gap: 18px;
}
.review-step {
  background: #fff;
  border: 1px solid #E2EEEE;
  border-radius: 12px;
  padding: 20px 22px;
}
.review-step h3 {
  font-size: 15px;
  margin: 0 0 12px;
  color: var(--teal-900);
  border-bottom: 1px solid #E2EEEE;
  padding-bottom: 8px;
}
.review-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px dashed #EAF2F2;
}
.review-row:last-child { border-bottom: none; }
.review-row.missing .rr-value { color: #B0432A; font-style: italic; }
.rr-label { font-weight: 600; color: var(--text-mid); }
.rr-value { color: var(--text-mid); white-space: pre-wrap; word-wrap: break-word; }
.rr-aitag {
  font-size: 11px;
  background: #FFF3D6;
  color: #8A5A0C;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  margin-left: 4px;
}

/* Submit modal */
.submit-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(27,52,59,0.45);
}
.modal-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 32px 30px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.modal-card h2 { margin: 0 0 12px; color: var(--teal-900); }
.modal-card ol { margin: 16px 0; padding-left: 22px; color: var(--text-mid); font-size: 14px; line-height: 1.6; }
.modal-card ol li { margin-bottom: 8px; }

/* Vault stat */
.vault-stat {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--mint-50);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 18px 0 22px;
}
.vault-stat-body h3 { margin: 0 0 4px; color: var(--teal-900); }
.vault-stat-body p { margin: 0; font-size: 13px; color: var(--text-mid); }

/* Doc table */
.doc-table {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid #E2EEEE;
  border-radius: 10px;
  text-decoration: none;
  color: var(--teal-900);
  font-weight: 500;
  transition: border-color .15s ease, transform .1s ease;
}
.doc-row:hover { border-color: var(--mint-500); transform: translateX(2px); }
.dr-title { font-size: 14.5px; }
.dr-status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.dr-status.ok      { background: #E5F4ED; color: #1B5C3C; }
.dr-status.amber   { background: #FFF3D6; color: #8A5A0C; }
.dr-status.queued  { background: #EAF2F2; color: #587278; }

/* Document editor */
.doc-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 20px;
}
@media (max-width: 980px) { .doc-editor { grid-template-columns: 1fr; } }
.doc-baseline, .doc-editable {
  background: #fff;
  border: 1px solid #E2EEEE;
  border-radius: 12px;
  padding: 18px 20px;
}
.doc-pane-head {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mid);
  font-weight: 700;
  margin-bottom: 12px;
}
.doc-baseline-body {
  font-size: 13.5px; line-height: 1.6; color: var(--text-mid);
  max-height: 520px; overflow-y: auto;
}
.doc-baseline-body h1 { font-size: 18px; color: var(--teal-900); margin: 0 0 12px; }
.doc-baseline-body h2 { font-size: 15px; color: var(--teal-900); margin: 16px 0 6px; }
.doc-baseline-body h3 { font-size: 13px; color: var(--teal-800); margin: 10px 0 4px; }
.doc-baseline-body p { margin: 6px 0; }
.doc-table-md {
  width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 12.5px;
}
.doc-table-md th, .doc-table-md td {
  border: 1px solid #D0DEDE; padding: 6px 10px; text-align: left;
}
.doc-table-md th { background: var(--mint-50); color: var(--teal-900); }
.doc-textarea {
  width: 100%;
  min-height: 480px;
  padding: 12px 14px;
  border: 1px solid #D0DEDE;
  border-radius: 8px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  background: #FCFEFE;
  resize: vertical;
}

/* E-sign card */
.sign-card {
  background: #FFFDF5;
  border: 1px solid #F0D58A;
  border-radius: 12px;
  padding: 20px 22px;
  margin-top: 22px;
}
.sign-card.signed {
  background: #E5F4ED;
  border-color: #B7DCC8;
}
.sign-card h3 { margin: 0 0 8px; color: var(--teal-900); }
.sign-card p { margin: 6px 0; font-size: 13px; color: var(--text-mid); }

/* Submitted page */
.submitted-card {
  background: linear-gradient(135deg, #1B343B 0%, #2D5760 100%);
  color: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  margin-top: 18px;
}
.submitted-card h1 { color: #fff; margin: 0 0 14px; }
.submitted-card p { color: #D0E5E5; }

/* ---------------------------------------------------------------------------
   Anna avatar videos (portal tour) — rendered by _anna_video_block()
   --------------------------------------------------------------------------- */
.anna-video {
  background: #F3F8F8;
  border: 1px solid #D7E7E7;
  border-radius: 14px;
  padding: 14px 14px 12px;
  margin: 18px 0 22px;
  max-width: 640px;
}
.anna-video .anna-vid-head {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--teal-900, #1B343B);
  margin: 0 0 8px;
  text-transform: uppercase;
}
.anna-video .anna-vid-lead {
  font-size: 14px;
  color: var(--text-mid, #4A6068);
  margin: 0 0 10px;
}
.anna-video video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  background: #000;
  box-shadow: 0 2px 8px rgba(27,52,59,0.10);
}
.anna-video .anna-vid-transcript {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-mid, #4A6068);
}
.anna-video .anna-vid-transcript summary {
  cursor: pointer;
  color: var(--teal-700, #2D5760);
  font-weight: 500;
}
.anna-video .anna-vid-transcript p {
  margin: 8px 0 0;
  white-space: pre-wrap;
  line-height: 1.55;
}

/* On the dashboard welcome hero, slightly tighter spacing */
.welcome-hero .anna-video { margin-top: 22px; margin-bottom: 4px; }
