/* Direct Hire — Onboarding Prototype
   Clean SaaS aesthetic (Linear/Vercel-ish)
   Platform brand: cool slate + electric indigo accent
   Client brand (Acumen Africa): #1F4E79 — used in portal contexts only
*/

:root {
  /* Neutrals (slate scale) */
  --n-0:   #ffffff;
  --n-25:  #fafbfc;
  --n-50:  #f5f6f8;
  --n-100: #eef0f3;
  --n-150: #e4e7ec;
  --n-200: #d6dae1;
  --n-300: #b6bcc7;
  --n-400: #8a93a3;
  --n-500: #61697a;
  --n-600: #444c5c;
  --n-700: #2e3441;
  --n-800: #1c2029;
  --n-900: #0f1218;
  --n-950: #07090d;

  /* Platform accent */
  --pri-50:  #eef1ff;
  --pri-100: #dde3ff;
  --pri-200: #b9c4ff;
  --pri-400: #6f7df0;
  --pri-500: #4c5ce0;
  --pri-600: #3b46c2;
  --pri-700: #2f389e;

  /* Status */
  --green-50:  #ebfaf1;
  --green-100: #d4f3df;
  --green-500: #1e9e57;
  --green-600: #178647;
  --green-700: #0f6635;

  --amber-50:  #fef6e7;
  --amber-100: #fde9c2;
  --amber-500: #d68a16;
  --amber-600: #b46e08;
  --amber-700: #8a5306;

  --red-50:   #fdecec;
  --red-100:  #fbd5d5;
  --red-500:  #d93b3b;
  --red-600:  #b62a2a;
  --red-700:  #8c1f1f;

  --blue-50:  #ebf3fb;
  --blue-500: #2a73c2;
  --blue-600: #1f5a99;

  --violet-50: #f1ecfb;
  --violet-500: #7a4cc2;

  /* Acumen Africa client brand */
  --acumen:        #1F4E79;
  --acumen-dark:   #163a5c;
  --acumen-light:  #e8eef5;
  --acumen-tint:   #f3f7fb;

  /* Type */
  --font-sans: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --font-serif: "Source Serif 4", Georgia, serif;

  /* Radii */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 20px;

  /* Shadows */
  --sh-xs: 0 1px 1px rgba(15, 18, 24, 0.04);
  --sh-sm: 0 1px 2px rgba(15, 18, 24, 0.06), 0 1px 1px rgba(15, 18, 24, 0.04);
  --sh-md: 0 4px 12px -2px rgba(15, 18, 24, 0.08), 0 2px 4px -1px rgba(15, 18, 24, 0.04);
  --sh-lg: 0 12px 28px -8px rgba(15, 18, 24, 0.14), 0 4px 8px -2px rgba(15, 18, 24, 0.06);
  --sh-xl: 0 24px 56px -12px rgba(15, 18, 24, 0.22), 0 8px 16px -4px rgba(15, 18, 24, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--n-800);
  background: var(--n-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
}
button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
button { cursor: pointer; border: none; background: none; padding: 0; }
a { color: var(--pri-600); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---- Persona switcher (prototype chrome) ---- */
.persona-switcher {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1000;
  background: var(--n-900);
  color: var(--n-0);
  border-radius: 999px;
  padding: 4px;
  display: flex;
  align-items: center;
  gap: 2px;
  box-shadow: var(--sh-lg);
  font-size: 12px;
  font-weight: 500;
}
.persona-switcher::before {
  content: "PROTOTYPE";
  font-size: 9px;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--n-400);
  padding: 0 10px 0 12px;
  border-right: 1px solid var(--n-700);
  margin-right: 4px;
}
.persona-btn {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--n-300);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
  white-space: nowrap;
}
.persona-btn:hover { color: var(--n-0); }
.persona-btn.active {
  background: var(--pri-500);
  color: white;
}
.persona-btn .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

/* ---- HR Admin top nav ---- */
.topnav {
  height: 56px;
  background: var(--n-0);
  border-bottom: 1px solid var(--n-150);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
  flex-shrink: 0;
}
.topnav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--n-900);
}
.topnav-logo-mark {
  width: 24px; height: 24px;
  background: var(--n-900);
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--n-0);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.02em;
}
.topnav-nav {
  display: flex;
  gap: 2px;
  flex: 1;
  margin-left: 12px;
}
.topnav-nav a {
  padding: 7px 12px;
  border-radius: var(--r-sm);
  color: var(--n-600);
  font-weight: 500;
  font-size: 13px;
}
.topnav-nav a:hover { background: var(--n-100); color: var(--n-900); text-decoration: none; }
.topnav-nav a.active { background: var(--n-100); color: var(--n-900); }
.topnav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.topnav-bell {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--n-500);
  position: relative;
}
.topnav-bell:hover { background: var(--n-100); color: var(--n-800); }
.topnav-bell .badge {
  position: absolute;
  top: 4px; right: 4px;
  width: 14px; height: 14px;
  background: var(--red-500);
  color: white;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 600;
  display: grid; place-items: center;
  border: 2px solid var(--n-0);
}
.topnav-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet-500), var(--pri-500));
  color: white;
  display: grid; place-items: center;
  font-size: 11px;
  font-weight: 600;
}

/* ---- Page layout ---- */
.page {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.page-header {
  padding: 28px 32px 20px;
  background: var(--n-0);
  border-bottom: 1px solid var(--n-150);
}
.page-header.flush { border-bottom: none; padding-bottom: 0; }
.page-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.page-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--n-900);
  margin: 0;
}
.page-subtitle {
  margin: 4px 0 0;
  color: var(--n-500);
  font-size: 13px;
}
.page-body {
  padding: 24px 32px;
  flex: 1;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--r-sm);
  font-weight: 500;
  font-size: 13px;
  border: 1px solid transparent;
  transition: all 0.12s;
  white-space: nowrap;
  height: 32px;
}
.btn-primary {
  background: var(--n-900);
  color: var(--n-0);
}
.btn-primary:hover { background: var(--n-800); }
.btn-secondary {
  background: var(--n-0);
  border-color: var(--n-200);
  color: var(--n-800);
}
.btn-secondary:hover { background: var(--n-50); border-color: var(--n-300); }
.btn-ghost { color: var(--n-700); }
.btn-ghost:hover { background: var(--n-100); }
.btn-danger {
  background: var(--red-500);
  color: white;
}
.btn-danger:hover { background: var(--red-600); }
.btn-danger-ghost { color: var(--red-600); }
.btn-danger-ghost:hover { background: var(--red-50); }
.btn-lg { height: 38px; padding: 9px 16px; font-size: 14px; }
.btn-sm { height: 28px; padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Cards ---- */
.card {
  background: var(--n-0);
  border: 1px solid var(--n-150);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--n-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--n-900);
  letter-spacing: -0.01em;
}
.card-body { padding: 18px; }
.card-body.flush { padding: 0; }

/* ---- KPI Tiles ---- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.kpi-tile {
  background: var(--n-0);
  border: 1px solid var(--n-150);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  position: relative;
}
.kpi-label {
  font-size: 12px;
  color: var(--n-500);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.kpi-value {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--n-900);
  margin-top: 8px;
  line-height: 1;
  font-feature-settings: "tnum";
}
.kpi-meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--n-400);
}
.kpi-tile.tone-amber .kpi-value { color: var(--amber-700); }
.kpi-tile.tone-red .kpi-value { color: var(--red-600); }
.kpi-tile.tone-green .kpi-value { color: var(--green-600); }

/* ---- Filter row ---- */
.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--n-200);
  border-radius: var(--r-sm);
  background: var(--n-0);
  color: var(--n-700);
  font-size: 12px;
  font-weight: 500;
  height: 30px;
}
.filter-pill:hover { background: var(--n-50); }
.filter-pill .caret { color: var(--n-400); }
.filter-pill.active { border-color: var(--n-800); background: var(--n-800); color: white; }
.search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  height: 30px;
  border: 1px solid var(--n-200);
  border-radius: var(--r-sm);
  background: var(--n-0);
  color: var(--n-700);
  font-size: 12px;
  width: 240px;
}
.search-input input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
}
.search-input svg { color: var(--n-400); }

/* ---- Table ---- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--n-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--n-25);
  border-bottom: 1px solid var(--n-150);
}
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--n-100);
  color: var(--n-700);
  vertical-align: middle;
}
.table tr:hover td { background: var(--n-25); }
.table tr:last-child td { border-bottom: none; }
.table-link {
  color: var(--n-900);
  font-weight: 500;
}
.table-link:hover { text-decoration: underline; }

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge .b-icon {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge.solid .b-icon { background: currentColor; }
.badge-neutral { background: var(--n-100); color: var(--n-700); border-color: var(--n-150); }
.badge-green   { background: var(--green-50); color: var(--green-700); border-color: #c7ecd5; }
.badge-amber   { background: var(--amber-50); color: var(--amber-700); border-color: #f4dfa3; }
.badge-red     { background: var(--red-50);   color: var(--red-700);   border-color: #f5c6c6; }
.badge-blue    { background: var(--blue-50);  color: var(--blue-600);  border-color: #c8dcf0; }
.badge-violet  { background: var(--violet-50); color: var(--violet-500); border-color: #dccbf2; }

/* ---- Avatar ---- */
.avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--n-150);
  color: var(--n-700);
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
}
.avatar-32 { width: 32px; height: 32px; font-size: 12px; }
.avatar-40 { width: 40px; height: 40px; font-size: 13px; }
.avatar-28 { width: 28px; height: 28px; font-size: 11px; }
.avatar-56 { width: 56px; height: 56px; font-size: 18px; }
.avatar-bg-1 { background: #ffe1d6; color: #b04d2a; }
.avatar-bg-2 { background: #d6e9ff; color: #2a5fb0; }
.avatar-bg-3 { background: #e1d6ff; color: #5a2ab0; }
.avatar-bg-4 { background: #d6ffe5; color: #1f7a45; }
.avatar-bg-5 { background: #ffe7d6; color: #aa5b1c; }
.avatar-bg-6 { background: #d6e1ff; color: #2a3eb0; }
.avatar-bg-7 { background: #ffe6f1; color: #aa2a6b; }

/* ---- Sidebar tabs ---- */
.tabs-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--n-150);
  background: var(--n-0);
  padding: 0 32px;
  overflow-x: auto;
}
.tab {
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--n-500);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.tab:hover { color: var(--n-800); }
.tab.active {
  color: var(--n-900);
  border-bottom-color: var(--n-900);
}
.tab .count {
  background: var(--n-100);
  color: var(--n-600);
  border-radius: 999px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 600;
  height: 16px;
  display: grid;
  place-items: center;
  min-width: 16px;
}
.tab.active .count { background: var(--n-900); color: white; }

/* ---- Forms ---- */
.field { margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--n-700);
  margin-bottom: 5px;
}
.label .req { color: var(--red-500); margin-left: 2px; }
.label .lock {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  font-size: 10px;
  color: var(--amber-700);
  background: var(--amber-50);
  padding: 0 6px;
  border-radius: 999px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.input, .select, .textarea {
  width: 100%;
  height: 34px;
  border: 1px solid var(--n-200);
  border-radius: var(--r-sm);
  padding: 0 10px;
  background: var(--n-0);
  outline: none;
  transition: all 0.12s;
  color: var(--n-900);
  font-size: 13px;
}
.textarea { height: auto; padding: 8px 10px; resize: vertical; min-height: 80px; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--n-900);
  box-shadow: 0 0 0 3px rgba(76, 92, 224, 0.15);
}
.input:disabled, .input[readonly] { background: var(--n-50); color: var(--n-500); }
.input-error {
  border-color: var(--red-500);
}
.input-error:focus {
  box-shadow: 0 0 0 3px rgba(217, 59, 59, 0.15);
}
.helper { font-size: 11px; color: var(--n-500); margin-top: 4px; }
.error-msg {
  font-size: 11px;
  color: var(--red-600);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---- Toggle switch ---- */
.switch {
  width: 32px; height: 18px;
  background: var(--n-200);
  border-radius: 999px;
  position: relative;
  transition: background 0.15s;
  flex-shrink: 0;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: white;
  border-radius: 50%;
  transition: transform 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.switch.on { background: var(--n-900); }
.switch.on::after { transform: translateX(14px); }

/* ---- Toast ---- */
.toast-stack {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--n-900);
  color: var(--n-0);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--sh-xl);
  animation: toastIn 0.2s ease-out;
}
.toast .toast-icon {
  width: 16px; height: 16px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.toast.success .toast-icon { background: var(--green-500); color: white; }
.toast.warning .toast-icon { background: var(--amber-500); color: white; }
.toast.error .toast-icon   { background: var(--red-500); color: white; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 24, 0.5);
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fadeIn 0.15s;
}
.modal {
  background: var(--n-0);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--sh-xl);
  animation: modalIn 0.2s ease-out;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}
.modal-lg { max-width: 640px; }
.modal-xl { max-width: 880px; }
.modal-header {
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--n-100);
}
.modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--n-900);
}
.modal-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--n-500);
}
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--n-100);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.modal-close {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--n-500);
}
.modal-close:hover { background: var(--n-100); color: var(--n-800); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ---- Sidebar (case detail header) ---- */
.case-header {
  background: var(--n-0);
  border-bottom: 1px solid var(--n-150);
  padding: 20px 32px 0;
}
.crumbs {
  font-size: 12px;
  color: var(--n-500);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.crumbs a { color: var(--n-500); }
.crumbs a:hover { color: var(--n-800); text-decoration: none; }
.crumbs .sep { color: var(--n-300); }
.case-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}
.case-title-block .case-name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--n-900);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.case-title-block .case-meta {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--n-500);
}
.case-title-block .case-meta strong {
  color: var(--n-700);
  font-weight: 500;
}
.case-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.case-readiness {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--n-25);
  border: 1px solid var(--n-150);
  border-radius: var(--r-md);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.empty-illust {
  width: 56px; height: 56px;
  border-radius: var(--r-lg);
  background: var(--n-100);
  display: grid; place-items: center;
  color: var(--n-400);
}
.empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--n-900);
  margin: 0;
}
.empty-desc {
  font-size: 13px;
  color: var(--n-500);
  margin: 0;
  max-width: 320px;
  line-height: 1.5;
}

/* ---- Skeleton ---- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skel {
  background: linear-gradient(90deg, var(--n-100) 25%, var(--n-150) 50%, var(--n-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--r-sm);
}

/* ---- Annotation overlay ---- */
.annot-pin {
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #ff6a3d;
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: grid; place-items: center;
  box-shadow: 0 0 0 4px rgba(255, 106, 61, 0.2);
  cursor: help;
  z-index: 50;
}
.annot-pin:hover .annot-pop { display: block; }
.annot-pop {
  display: none;
  position: absolute;
  top: 28px; left: 0;
  width: 240px;
  background: var(--n-900);
  color: var(--n-0);
  padding: 10px 12px;
  border-radius: var(--r-md);
  font-size: 11px;
  line-height: 1.45;
  font-weight: 400;
  box-shadow: var(--sh-lg);
  text-align: left;
}
.annot-pop b { color: #ff9a6f; font-weight: 600; }

/* ---- Resolve pill (open design questions) ---- */
.resolve-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  background: #fff4e6;
  color: #b35400;
  border: 1px dashed #ffb273;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.resolve-pill::before {
  content: "";
  width: 5px; height: 5px;
  background: #ff8c42;
  border-radius: 50%;
}

/* ---- Banner ---- */
.banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  border: 1px solid;
  line-height: 1.5;
}
.banner-info  { background: var(--blue-50); color: var(--blue-600); border-color: #c8dcf0; }
.banner-warn  { background: var(--amber-50); color: var(--amber-700); border-color: #f4dfa3; }
.banner-error { background: var(--red-50); color: var(--red-700); border-color: #f5c6c6; }
.banner-ok    { background: var(--green-50); color: var(--green-700); border-color: #c7ecd5; }

/* ---- Portal-specific (Acumen Africa) ---- */
.portal-shell {
  background: var(--acumen-tint);
  min-height: 100vh;
  display: flex;
  justify-content: center;
}
.portal-frame-wrap {
  padding: 32px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 32px;
  width: 100%;
}
.phone-frame {
  width: 375px;
  flex-shrink: 0;
  background: black;
  border-radius: 44px;
  padding: 11px;
  box-shadow: var(--sh-xl);
  position: relative;
}
.phone-frame::before {
  content: "";
  position: absolute;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 28px;
  background: black;
  border-radius: 999px;
  z-index: 5;
}
.phone-screen {
  background: white;
  border-radius: 34px;
  overflow: hidden;
  height: 760px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.phone-statusbar {
  height: 44px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 28px 6px;
  font-size: 13px;
  font-weight: 600;
  color: black;
  flex-shrink: 0;
}
.phone-statusbar-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}
.portal-header {
  background: var(--acumen);
  color: white;
  padding: 10px 18px 12px;
  flex-shrink: 0;
}
.portal-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.portal-header-logo {
  width: 26px; height: 26px;
  background: white;
  border-radius: 6px;
  display: grid; place-items: center;
  color: var(--acumen);
  font-weight: 700;
  font-size: 11px;
}
.portal-header-name {
  font-size: 13px;
  font-weight: 600;
  flex: 1;
}
.portal-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  overflow: hidden;
}
.portal-progress-fill {
  height: 100%;
  background: white;
  border-radius: 999px;
  transition: width 0.4s;
}
.portal-progress-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
}
.portal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px 80px;
  background: var(--acumen-tint);
}
.portal-bottom-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: white;
  padding: 12px 18px 24px;
  border-top: 1px solid var(--n-150);
}
.portal-card {
  background: white;
  border-radius: var(--r-lg);
  padding: 16px;
  border: 1px solid var(--n-150);
  margin-bottom: 12px;
}
.portal-cta {
  width: 100%;
  height: 44px;
  background: var(--acumen);
  color: white;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 14px;
}
.portal-cta:hover { background: var(--acumen-dark); }
.portal-cta-secondary {
  background: white;
  color: var(--acumen);
  border: 1px solid var(--acumen);
}

/* ---- Generic helpers ---- */
.row { display: flex; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.muted { color: var(--n-500); }
.mono { font-family: var(--font-mono); font-size: 12px; }
.divider { height: 1px; background: var(--n-150); margin: 16px 0; border: 0; }
.scroll-y { overflow-y: auto; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fs-11 { font-size: 11px; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; }
.fs-16 { font-size: 16px; }
.fs-18 { font-size: 18px; }
.fs-20 { font-size: 20px; }
.text-muted { color: var(--n-500); }
.text-strong { color: var(--n-900); font-weight: 600; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.flex-1 { flex: 1; }

/* ---- Section header (within page body) ---- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--n-900);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}

/* ---- State picker (per-screen) ---- */
.state-picker {
  background: var(--n-0);
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  padding: 4px;
  display: inline-flex;
  gap: 2px;
  font-size: 12px;
}
.state-picker-btn {
  padding: 5px 10px;
  border-radius: var(--r-xs);
  color: var(--n-600);
  font-weight: 500;
}
.state-picker-btn:hover { background: var(--n-100); color: var(--n-900); }
.state-picker-btn.active { background: var(--n-900); color: white; }

/* ---- Side rail (case detail nav) ---- */
.case-content {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
  flex: 1;
  min-height: 0;
}
.case-main {
  padding: 20px 32px;
  overflow-y: auto;
}
.case-side {
  border-left: 1px solid var(--n-150);
  background: var(--n-25);
  padding: 20px;
  overflow-y: auto;
}

/* ---- Stepper (wizard) ---- */
.stepper {
  display: flex;
  align-items: center;
  gap: 0;
}
.step {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.step-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--n-100);
  color: var(--n-500);
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
  transition: all 0.15s;
}
.step.done .step-dot { background: var(--n-900); color: white; }
.step.active .step-dot { background: var(--pri-500); color: white; box-shadow: 0 0 0 4px rgba(76, 92, 224, 0.18); }
.step-label { font-size: 12px; color: var(--n-500); font-weight: 500; }
.step.active .step-label { color: var(--n-900); font-weight: 600; }
.step.done .step-label { color: var(--n-700); }
.step-line {
  flex: 1;
  height: 1px;
  background: var(--n-200);
  margin: 0 12px;
}
.step.done + .step .step-line, .step.active .step-line { background: var(--n-900); }

/* ---- Email mockup ---- */
.email-mock {
  background: var(--n-0);
  border-radius: var(--r-lg);
  border: 1px solid var(--n-200);
  overflow: hidden;
  width: 560px;
  box-shadow: var(--sh-md);
}
.email-mock-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--n-100);
  background: var(--n-25);
}
.email-mock-meta {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 4px 12px;
  font-size: 12px;
}
.email-mock-meta dt { color: var(--n-500); }
.email-mock-meta dd { margin: 0; color: var(--n-800); }
.email-mock-subject {
  font-size: 15px;
  font-weight: 600;
  color: var(--n-900);
  margin: 6px 0 0;
}
.email-mock-body { padding: 0; }
.email-mock-hero {
  background: var(--acumen);
  color: white;
  padding: 24px;
  text-align: left;
}
.email-mock-hero-logo {
  width: 36px; height: 36px;
  background: white;
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--acumen);
  font-weight: 700;
  margin-bottom: 16px;
}
.email-mock-content {
  padding: 24px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--n-700);
}
.email-mock-cta {
  display: inline-block;
  background: var(--acumen);
  color: white;
  padding: 12px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  margin: 12px 0;
}
.email-mock-footer {
  padding: 18px 24px;
  background: var(--n-25);
  border-top: 1px solid var(--n-100);
  font-size: 11px;
  color: var(--n-500);
  line-height: 1.5;
}

/* ---- Doc viewer ---- */
.doc-viewer {
  background: var(--n-100);
  border-radius: var(--r-md);
  padding: 32px;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.doc-page {
  background: white;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 0.77;
  border-radius: 4px;
  box-shadow: var(--sh-md);
  padding: 28px;
  font-size: 9px;
  line-height: 1.5;
  color: var(--n-700);
}
.doc-page h4 { font-size: 11px; margin: 0 0 8px; color: var(--n-900); }
.doc-page .doc-line {
  height: 4px;
  background: var(--n-100);
  border-radius: 2px;
  margin-bottom: 5px;
}
.doc-page .doc-line.short { width: 60%; }
.doc-page .doc-sig {
  margin-top: 16px;
  border-top: 1px dashed var(--n-300);
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
}

/* ---- Misc icons ---- */
.icon-circle {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--n-100);
  color: var(--n-700);
  flex-shrink: 0;
}
.icon-circle-blue { background: var(--blue-50); color: var(--blue-600); }
.icon-circle-green { background: var(--green-50); color: var(--green-600); }
.icon-circle-amber { background: var(--amber-50); color: var(--amber-600); }
.icon-circle-red { background: var(--red-50); color: var(--red-600); }
.icon-circle-violet { background: var(--violet-50); color: var(--violet-500); }

/* Make scrollbars subtle */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--n-200); border-radius: 999px; border: 2px solid var(--n-50); }
::-webkit-scrollbar-thumb:hover { background: var(--n-300); }

/* ===== Additional v2 styles for admin + emails ===== */

/* Tabs (used in template builder) */
.tabs-row { display: flex; gap: 2px; border-bottom: 1px solid var(--n-150); padding: 0 4px; margin-bottom: 16px; }
.tabbar { display: flex; gap: 2px; border-bottom: 1px solid var(--n-150); padding: 0 4px; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; font-size: 13px; color: var(--n-500); border: none; background: none; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--n-800); }
.tab.active { color: var(--n-900); border-bottom-color: var(--n-900); font-weight: 500; }
.tab-count { background: var(--n-100); color: var(--n-600); font-size: 11px; padding: 1px 6px; border-radius: 10px; font-weight: 500; }

/* Tag chips */
.tag { display: inline-flex; align-items: center; padding: 2px 8px; font-size: 11px; font-weight: 500; border-radius: 4px; background: var(--n-100); color: var(--n-700); border: 1px solid var(--n-150); }
.tag-blue { background: var(--blue-50); color: var(--blue-600); border-color: var(--blue-100); }
.tag-green { background: var(--green-50); color: var(--green-600); border-color: var(--green-100); }

/* KPI row & cards (admin) */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi-card { background: var(--n-0); border: 1px solid var(--n-150); border-radius: var(--r-md); padding: 16px; }
.kpi-card .kpi-label { font-size: 12px; color: var(--n-500); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 500; }
.kpi-card .kpi-value { font-size: 28px; font-weight: 600; color: var(--n-900); margin-top: 6px; font-feature-settings: "tnum"; }
.kpi-trend { font-size: 11px; color: var(--n-400); margin-top: 6px; }

/* Activity feed */
.activity-item { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--n-100); align-items: flex-start; }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--n-300); margin-top: 7px; flex-shrink: 0; }

/* Search wrap */
.search-wrap { display: flex; align-items: center; gap: 6px; padding: 0 10px; height: 32px; background: var(--n-0); border: 1px solid var(--n-150); border-radius: 6px; }
.search-wrap .search-input { border: none; outline: none; font-size: 13px; width: 200px; background: none; }

/* Hoverable table rows */
.data-table.hoverable tbody tr:hover { background: var(--n-25); cursor: default; }

/* Wizard card */
.wizard-card { background: var(--n-0); border: 1px solid var(--n-150); border-radius: var(--r-lg); padding: 28px; max-width: 920px; margin: 0 auto; }

/* Form grid */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }

/* Provider mark */
.provider-mark { width: 28px; height: 28px; border-radius: 6px; background: var(--n-100); color: var(--n-700); display: grid; place-items: center; font-weight: 600; font-size: 12px; }
.client-mark { width: 28px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, #6f7df0, #2a73c2); color: white; display: grid; place-items: center; font-weight: 600; font-size: 11px; }

/* Upload tile */
.upload-tile { padding: 20px; border: 1px dashed var(--n-200); border-radius: 8px; text-align: center; background: var(--n-25); }

/* Color chip */
.color-chip { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--n-200); flex-shrink: 0; }

/* Chip row */
.chip-row { flex-wrap: wrap; }
.chip { display: inline-block; padding: 3px 10px; background: var(--n-100); color: var(--n-700); font-size: 11px; border-radius: 12px; }

/* Btn icon */
.btn-icon { width: 28px; height: 28px; border-radius: 6px; border: none; background: transparent; color: var(--n-500); cursor: pointer; display: grid; place-items: center; }
.btn-icon:hover { background: var(--n-100); color: var(--n-800); }

/* Btn block */
.btn-block { width: 100%; justify-content: center; }

/* Spinner */
.spinner { width: 14px; height: 14px; border: 2px solid var(--n-200); border-top-color: var(--n-700); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Preview frame (in branding wizard) */
.preview-frame { background: var(--n-50); border: 1px solid var(--n-150); border-radius: var(--r-lg); padding: 16px; }
.preview-frame-bar { font-size: 11px; color: var(--n-500); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 500; margin-bottom: 12px; }
.preview-portal { background: white; border-radius: 8px; border-top: 4px solid var(--acumen, #1F4E79); overflow: hidden; max-width: 320px; margin: 0 auto; box-shadow: var(--sh-md); }
.preview-portal-bar { padding: 16px; }
.brand-mark { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; font-weight: 700; font-size: 11px; }
.preview-progress { height: 4px; background: var(--n-100); border-radius: 2px; overflow: hidden; }
.preview-progress-fill { height: 100%; }

/* Email list item */
.email-list-item { display: block; width: 100%; padding: 10px 12px; text-align: left; border: none; background: none; border-radius: 6px; cursor: pointer; border-bottom: 1px solid var(--n-100); }
.email-list-item:last-child { border-bottom: none; }
.email-list-item:hover { background: var(--n-50); }
.email-list-item.active { background: var(--n-100); }

/* Email mock client (replaces older email-mock for v2) */
.email-client { background: var(--n-0); border: 1px solid var(--n-150); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-md); }
.email-client-bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; padding: 10px 14px; background: var(--n-50); border-bottom: 1px solid var(--n-150); }
.email-traffic { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.email-client-title { text-align: center; font-size: 12px; color: var(--n-500); }
.email-meta { padding: 16px 20px; border-bottom: 1px solid var(--n-100); }
.em-canvas { padding: 32px 24px; background: var(--n-50); }
.em-card-shell { max-width: 600px; margin: 0 auto; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
.em-header { padding: 24px; color: white; display: flex; align-items: center; gap: 12px; }
.em-logo { width: 40px; height: 40px; border-radius: 8px; background: white; color: var(--acumen, #1F4E79); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.em-brand { font-weight: 600; font-size: 15px; }
.em-tag { font-size: 11px; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.06em; }
.em-body { padding: 28px 24px; font-size: 14px; line-height: 1.6; color: var(--n-700); }
.em-body p { margin: 0 0 14px; }
.em-h1 { font-size: 22px; font-weight: 600; color: var(--n-900); margin: 0 0 14px; }
.em-h2 { font-size: 14px; font-weight: 600; color: var(--n-900); margin: 18px 0 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.em-btn { display: inline-block; padding: 12px 24px; background: var(--acumen, #1F4E79); color: white; text-decoration: none; border-radius: 6px; font-weight: 500; font-size: 14px; margin: 8px 0; }
.em-fineprint { font-size: 12px; color: var(--n-500); margin-top: 16px; }
.em-otp { font-family: var(--font-mono); font-size: 32px; font-weight: 600; letter-spacing: 0.16em; padding: 18px; background: var(--n-25); border: 1px dashed var(--n-200); border-radius: 8px; text-align: center; margin: 12px 0; color: var(--n-900); }
.em-callout { padding: 12px 14px; background: #fff8ec; border-left: 3px solid #f0a020; border-radius: 4px; margin: 12px 0; font-size: 13px; }
.em-list { margin: 8px 0 14px; padding-left: 20px; }
.em-list li { margin-bottom: 6px; }
.em-card { background: var(--n-25); border: 1px solid var(--n-150); border-radius: 8px; padding: 14px; margin: 12px 0; }
.em-card-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--n-100); }
.em-card-row:last-child { border-bottom: none; }
.em-card-row span { color: var(--n-500); }
.em-footer { padding: 18px 24px; background: var(--n-25); border-top: 1px solid var(--n-100); font-size: 11px; color: var(--n-500); }

/* Stepper override (use existing if present, add helpers) */
.stepper .step-num { transition: background 0.15s, color 0.15s; }
.ic-green { color: var(--green-600); }
.ic-muted { color: var(--n-400); }

/* Page header flush variant (no border) */
.page-header.flush { border-bottom: none; }

/* Banner success/info/warn helpers if not already */
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 8px; font-size: 13px; }
.banner-info { background: var(--blue-50); color: var(--blue-700); border: 1px solid var(--blue-100); }
.banner-success { background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-100); }
.banner-warn { background: var(--amber-50); color: var(--amber-700); border: 1px solid var(--amber-100); }
.banner svg { margin-top: 2px; flex-shrink: 0; }

/* Misc small helpers used inline */
.col { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-2 { margin-top: 2px; } .mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.fs-11 { font-size: 11px; } .fs-12 { font-size: 12px; } .fs-13 { font-size: 13px; } .fs-15 { font-size: 15px; } .fs-18 { font-size: 18px; }
.fw-500 { font-weight: 500; } .fw-600 { font-weight: 600; }
.text-muted { color: var(--n-500); }
.mono { font-family: var(--font-mono, ui-monospace, monospace); }
.h2 { font-size: 18px; font-weight: 600; color: var(--n-900); margin: 0; }
.label { font-size: 12px; font-weight: 500; color: var(--n-700); display: block; margin-bottom: 6px; }
.input, .textarea { width: 100%; padding: 8px 12px; font-size: 13px; border: 1px solid var(--n-200); border-radius: 6px; background: white; font-family: inherit; outline: none; }
.input:focus, .textarea:focus { border-color: var(--n-500); box-shadow: 0 0 0 3px rgba(0,0,0,0.04); }
.textarea { resize: vertical; min-height: 70px; }
.check, .radio { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; }
.link { color: var(--acumen, #1F4E79); text-decoration: none; cursor: pointer; }
.link:hover { text-decoration: underline; }

/* ============================================================
   E-SIGN
   ============================================================ */

/* Sender — Prepare canvas */
.esign-doc {
  background: white;
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  box-shadow: var(--sh-md);
  padding: 56px 64px;
  font-family: 'Times New Roman', Times, serif;
  color: var(--n-800);
  position: relative;
  line-height: 1.65;
  font-size: 12.5px;
}
.esign-doc h2 { font-size: 16px; font-weight: 700; text-align: center; letter-spacing: 0.04em; margin: 0 0 10px; }
.esign-doc h3 { font-size: 13px; font-weight: 700; margin: 18px 0 8px; }
.esign-doc p { margin: 0 0 10px; }
.esign-doc .clause { display: flex; gap: 10px; }
.esign-doc .clause-num { width: 26px; flex-shrink: 0; font-weight: 700; }
.esign-doc .merged { background: #fff8e1; padding: 0 4px; border-radius: 2px; border-bottom: 1px solid #f4dfa3; }

/* Field placement chips on the doc */
.esign-field {
  position: absolute;
  border: 1.5px dashed #f59e0b;
  background: rgba(254, 243, 199, 0.55);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 11px;
  color: #92400e;
  font-family: var(--font-sans);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: grab;
  user-select: none;
}
.esign-field.signature { background: rgba(254, 243, 199, 0.7); }
.esign-field.completed {
  border-style: solid;
  border-color: var(--green-500, #10b981);
  background: rgba(209, 250, 229, 0.6);
  color: var(--green-700, #065f46);
}
.esign-field.completed.signature .sig-render {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--acumen);
  line-height: 1.1;
  font-weight: 500;
}
.esign-field-tag {
  position: absolute;
  top: -10px;
  left: -1px;
  background: #f59e0b;
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.esign-field.completed .esign-field-tag { background: var(--green-600, #059669); }

/* Field palette (left rail) */
.esign-palette-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--n-150);
  border-radius: var(--r-md);
  background: white;
  cursor: grab;
  font-size: 13px;
  color: var(--n-700);
}
.esign-palette-item:hover { background: var(--n-25); border-color: var(--n-300); }

/* Recipients rail */
.esign-recipient {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  border: 1px solid var(--n-150);
  border-radius: var(--r-md);
  background: white;
}
.esign-recipient .rec-step {
  width: 22px; height: 22px; border-radius: 11px;
  background: var(--n-900); color: white;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
  flex-shrink: 0;
}
.esign-recipient.completed .rec-step { background: var(--green-600, #059669); }

/* Signing experience — signer side */
.esign-stage {
  background: var(--n-50);
  min-height: 100vh;
}
.esign-topbar {
  background: white;
  border-bottom: 1px solid var(--n-150);
  padding: 12px 24px;
  display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 10;
}
.esign-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--n-100);
  border-radius: 3px;
  overflow: hidden;
}
.esign-progress-bar .fill {
  height: 100%;
  background: var(--acumen, #1F4E79);
  transition: width 0.4s ease;
}

/* Field guides (signer view) — pulse to attract attention */
.esign-guide {
  position: absolute;
  border: 1.5px solid var(--acumen, #1F4E79);
  background: rgba(31, 78, 121, 0.06);
  border-radius: 4px;
  padding: 10px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--acumen, #1F4E79);
  transition: all 0.2s;
}
.esign-guide:hover { background: rgba(31, 78, 121, 0.12); }
.esign-guide.active {
  box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.2);
  animation: esign-pulse 1.6s infinite;
}
.esign-guide.completed {
  border-style: solid;
  border-color: var(--green-500, #10b981);
  background: rgba(209, 250, 229, 0.4);
  color: var(--green-700, #065f46);
  animation: none;
  cursor: default;
}
.esign-guide .completed-sig {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--acumen);
  line-height: 1.1;
}
@keyframes esign-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.18); }
  50% { box-shadow: 0 0 0 7px rgba(31, 78, 121, 0.05); }
}

/* Signature capture modal */
.esign-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: grid; place-items: center;
  z-index: 100;
  animation: fade-in 0.18s ease;
}
@keyframes fade-in { from { opacity:0; } to { opacity:1; } }
.esign-modal-card {
  background: white;
  border-radius: var(--r-lg);
  width: 100%; max-width: 580px;
  box-shadow: var(--sh-xl);
  overflow: hidden;
}
.esign-tabs { display: flex; border-bottom: 1px solid var(--n-150); }
.esign-tabs .tab-btn {
  flex: 1;
  padding: 14px 12px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--n-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.esign-tabs .tab-btn.active { color: var(--n-900); border-bottom-color: var(--n-900); }
.esign-canvas-wrap {
  background: var(--n-25);
  border: 2px dashed var(--n-200);
  border-radius: var(--r-md);
  height: 200px;
  position: relative;
  overflow: hidden;
}
.esign-canvas-wrap canvas { width: 100%; height: 100%; cursor: crosshair; }
.esign-canvas-wrap .baseline {
  position: absolute; left: 16px; right: 16px; bottom: 30px;
  border-top: 1px dashed var(--n-300);
  pointer-events: none;
}
.esign-canvas-wrap .x-mark {
  position: absolute; left: 18px; bottom: 18px;
  font-family: 'Times New Roman', serif;
  font-size: 18px; color: var(--n-400);
  pointer-events: none;
}
.esign-canvas-wrap .canvas-hint {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--n-400);
  font-size: 13px;
  pointer-events: none;
}
.esign-typed {
  border: 2px dashed var(--n-200);
  border-radius: var(--r-md);
  background: var(--n-25);
  padding: 24px;
  text-align: center;
  font-family: 'Caveat', cursive;
  color: var(--acumen, #1F4E79);
  font-size: 42px;
  min-height: 100px;
  display: grid; place-items: center;
  line-height: 1.05;
}
.esign-style-row { display: flex; gap: 8px; margin-top: 12px; }
.esign-style-chip {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  background: white;
  cursor: pointer;
  text-align: center;
  font-size: 22px;
  color: var(--acumen, #1F4E79);
  line-height: 1;
  min-height: 50px;
  display: grid; place-items: center;
}
.esign-style-chip.active { border: 2px solid var(--n-900); }
.esign-style-chip .chip-label {
  font-family: var(--font-sans);
  font-size: 9px;
  color: var(--n-500);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
}

/* Completion confetti */
@keyframes esign-pop {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.esign-pop { animation: esign-pop 0.45s ease-out; }

/* Sender status pipeline */
.esign-pipeline { display: flex; gap: 0; }
.esign-pipeline-step {
  flex: 1;
  padding: 14px;
  background: white;
  border: 1px solid var(--n-150);
  border-right: none;
  position: relative;
  display: flex; flex-direction: column; gap: 4px;
}
.esign-pipeline-step:first-child { border-radius: var(--r-md) 0 0 var(--r-md); }
.esign-pipeline-step:last-child  { border-radius: 0 var(--r-md) var(--r-md) 0; border-right: 1px solid var(--n-150); }
.esign-pipeline-step.done { background: #ecfdf5; border-color: #a7f3d0; }
.esign-pipeline-step.current { background: #eff6ff; border-color: #93c5fd; }
.esign-pipeline-step.current::after {
  content: ''; position: absolute;
  left: 50%; bottom: -8px;
  border: 6px solid transparent;
  border-top-color: #eff6ff;
  transform: translateX(-50%);
}
.esign-pipeline-step .step-label {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--n-500);
}
.esign-pipeline-step.done .step-label { color: #047857; }
.esign-pipeline-step.current .step-label { color: #1d4ed8; }
.esign-pipeline-step .step-title { font-size: 13px; font-weight: 600; color: var(--n-900); }
.esign-pipeline-step .step-meta { font-size: 11px; color: var(--n-500); }

