/* ── Variables ──────────────────────────────────────────────────────── */
:root {
  --primary:        #7CB342;
  --primary-hover:  #689F38;
  --primary-light:  #F1F8E9;
  --brand-navy:     #1B3A5C;
  --sidebar-bg:     #111827;
  --sidebar-border: rgba(255,255,255,0.07);
  --sidebar-text:   #9ca3af;
  --sidebar-hover:  rgba(255,255,255,0.06);
  --sidebar-active: rgba(124,179,66,0.18);
  --bg:             #f3f4f6;
  --card-bg:        #ffffff;
  --text:           #111827;
  --text-muted:     #6b7280;
  --text-sm:        #9ca3af;
  --border:         #e5e7eb;
  --radius:         10px;
  --shadow-card:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);

  /* Status colours */
  --s-await-bg:   #f3f4f6; --s-await-text:   #6b7280;
  --s-ready-bg:   #eff6ff; --s-ready-text:   #2563eb;
  --s-proc-bg:    #fffbeb; --s-proc-text:    #d97706;
  --s-appr-bg:    #ecfdf5; --s-appr-text:    #059669;
  --s-subm-bg:    #d1fae5; --s-subm-text:    #065f46;
}

/* ── Reset ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ── Layout ─────────────────────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────────────── */
.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-header {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 36px; height: 36px;
  border-radius: 9px;
  overflow: hidden;
  flex-shrink: 0;
}
.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.logo-sub {
  font-size: 10px;
  color: var(--sidebar-text);
  line-height: 1.4;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #4b5563;
  text-transform: uppercase;
  padding: 12px 8px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 2px;
}

.nav-item i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
}

.nav-item:hover:not(.nav-disabled) {
  background: var(--sidebar-hover);
  color: #fff;
}

.nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
}
.nav-item.active i { color: var(--primary); }

.nav-item.nav-disabled {
  opacity: 0.45;
  cursor: default;
}

.nav-soon {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  background: rgba(255,255,255,0.1);
  color: var(--sidebar-text);
  padding: 2px 7px;
  border-radius: 20px;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--sidebar-border);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
}

.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.user-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.user-info { flex: 1; min-width: 0; }

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  font-weight: 500;
  margin-top: 1px;
}
.role-admin   { color: #f59e0b; }
.role-senior  { color: #60a5fa; }
.role-junior  { color: #a78bfa; }

.logout-btn {
  color: var(--sidebar-text);
  font-size: 14px;
  padding: 6px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.logout-btn:hover { color: #ef4444; background: rgba(239,68,68,0.1); }

/* ── Main content ───────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: 248px;
  min-height: 100vh;
  padding: 32px 32px 48px;
  max-width: 1400px;
}

/* ── Flash messages ─────────────────────────────────────────────────── */
.flash-container { margin-bottom: 20px; }

.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}
.flash i { font-size: 15px; flex-shrink: 0; }
.flash span { flex: 1; }
.flash-close {
  background: none;
  border: none;
  opacity: 0.5;
  font-size: 13px;
  padding: 2px 4px;
}
.flash-close:hover { opacity: 1; }

.flash-error   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.flash-success { background: var(--primary-light); color: var(--primary); border: 1px solid #a7f3d0; }
.flash-info    { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

/* ── Page header ────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.page-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.text-fresh { color: var(--primary); font-weight: 500; }
.text-muted { color: var(--text-muted); }
.text-sm    { font-size: 13px; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  transition: background 0.15s, box-shadow 0.15s;
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-secondary {
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.btn-secondary:hover { background: #f9fafb; }

.btn-action {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.btn-action:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Stats grid ─────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

@media (max-width: 1200px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
}

.stat-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.icon-primary    { background: var(--primary-light);  color: var(--primary); }
.icon-muted      { background: #f3f4f6;               color: #6b7280; }
.icon-blue       { background: #eff6ff;               color: #2563eb; }
.icon-amber      { background: #fffbeb;               color: #d97706; }
.icon-green      { background: #ecfdf5;               color: #059669; }
.icon-dark-green { background: #d1fae5;               color: #065f46; }

.stat-value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 500;
}

/* ── Card ───────────────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
}

.client-count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}

.table-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Search */
.search-wrap {
  position: relative;
  flex: 0 0 220px;
}
.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 7px 10px 7px 30px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.search-input:focus { border-color: var(--primary); }

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.filter-tab {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.filter-tab:hover { background: var(--bg); color: var(--text); }
.filter-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── Table ──────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

.client-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.client-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f9fafb;
  border-bottom: 1px solid var(--border);
}

.client-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.client-table tbody tr:last-child td { border-bottom: none; }

.client-table tbody tr:hover { background: #f9fafb; }

.col-num { width: 48px; text-align: right; }
.col-actions { width: 90px; text-align: right; }

.client-name {
  font-weight: 600;
  color: var(--text);
}

/* ── Status badges ──────────────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.status-badge i { font-size: 11px; }

.status-awaiting  { background: var(--s-await-bg); color: var(--s-await-text); }
.status-ready     { background: var(--s-ready-bg); color: var(--s-ready-text); }
.status-processed { background: var(--s-proc-bg);  color: var(--s-proc-text);  }
.status-approved  { background: var(--s-appr-bg);  color: var(--s-appr-text);  }
.status-submitted { background: var(--s-subm-bg);  color: var(--s-subm-text);  }
.status-partial   { background: #fff7ed; color: #c2410c; }
.status-docs      { background: #f0fdf4; color: #166534; }

/* ── Table footer ───────────────────────────────────────────────────── */
.table-footer {
  padding: 12px 20px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: #f9fafb;
}

/* ── Empty state ────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 32px;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 40px;
  margin-bottom: 16px;
  display: block;
  color: #d1d5db;
}
.empty-state p { margin-bottom: 8px; line-height: 1.6; }

/* ── Login page ─────────────────────────────────────────────────────── */
.login-body {
  background: linear-gradient(135deg, #0f1923 0%, #1a2d3d 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.login-logo-icon {
  width: 46px; height: 46px;
  background: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}

.login-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.login-brand-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.login-flash {
  margin-bottom: 16px;
  border-radius: 8px;
}

.login-heading {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.login-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.5;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px 20px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  margin-bottom: 24px;
}
.google-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.google-icon { width: 20px; height: 20px; flex-shrink: 0; }

.login-footer {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}
.login-footer a { color: var(--primary); font-weight: 500; }

.login-version {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
}

/* ── Tab navigation ─────────────────────────────────────────────────── */
.tab-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}

.tab-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 8px 8px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  position: relative;
  bottom: -2px;
  transition: color 0.15s, background 0.15s;
}

.tab-link:hover { color: var(--text); background: var(--bg); }

.tab-link.active {
  color: var(--primary);
  background: var(--card-bg);
  border-color: var(--border);
  border-bottom-color: var(--card-bg);
}

/* ── Notice bar ─────────────────────────────────────────────────────── */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}

.notice-warn {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.notice-link {
  margin-left: auto;
  font-weight: 600;
  color: var(--primary);
  text-decoration: underline;
}

/* ── Intake button ──────────────────────────────────────────────────── */
.btn-intake {
  background: var(--primary-light);
  border-color: #a7f3d0;
  color: var(--primary);
}
.btn-intake:hover:not(:disabled) { background: #d1fae5; }
.btn-intake:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Gmail connect nav item ─────────────────────────────────────────── */
.nav-gmail { color: #f59e0b !important; }
.nav-gmail:hover { background: rgba(245,158,11,0.1) !important; }

/* ── Preview page layout ────────────────────────────────────────────── */
.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1100px) {
  .preview-grid { grid-template-columns: 1fr; }
}

.preview-left, .preview-right { display: flex; flex-direction: column; }

.mb-16 { margin-bottom: 16px; }

.card-body {
  padding: 20px;
}

/* ── Form controls ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--card-bg);
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
}

.form-textarea { resize: vertical; min-height: 90px; }

.form-static {
  font-size: 13px;
  color: var(--text);
  padding: 7px 0;
  line-height: 1.5;
}

.form-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 12px;
}

/* ── Fee table ──────────────────────────────────────────────────────── */
.fee-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.fee-table td {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.fee-table td:last-child { text-align: right; font-weight: 600; }

.fee-subtotal td {
  padding-top: 10px;
  font-weight: 600;
  border-top: 2px solid var(--border);
}

.fee-total td {
  font-size: 15px;
  padding-top: 6px;
  border-bottom: none;
  border-top: 2px solid var(--primary);
  color: var(--primary);
}

/* ── Transcript box ─────────────────────────────────────────────────── */
.transcript-box {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 12px 14px;
  font-size: 12px;
  font-family: 'Inter', monospace;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 240px;
  overflow-y: auto;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Email preview box ──────────────────────────────────────────────── */
.email-preview-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 14px;
  font-size: 13px;
}

.email-preview-header {
  background: #f9fafb;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
}

.email-preview-body {
  padding: 20px;
  line-height: 1.7;
  color: var(--text);
  max-height: 480px;
  overflow-y: auto;
}

.email-preview-body hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 14px 0;
}

.preview-fee-table {
  border-collapse: collapse;
  margin: 8px 0 14px;
  font-size: 13px;
}
.preview-fee-table td { padding: 3px 20px 3px 0; }
.preview-fee-table tr:last-child { border-top: 1px solid #ddd; }

/* ── Preview actions bar ────────────────────────────────────────────── */
.preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

/* ── Flag checkboxes ────────────────────────────────────────────────── */
.flag-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-bottom: 10px;
}
.flag-checkbox input[type=checkbox] {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}
.flag-label {
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

/* ── Small button variant ────────────────────────────────────────────── */
.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

/* ── Missing detection warning ───────────────────────────────────────── */
.warn-undetected {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 4px;
  padding: 3px 8px;
  margin-top: 5px;
}
.warn-undetected i { color: #d97706; font-size: 10px; }

/* ── Editable email sections (contenteditable) ───────────────────────── */
.email-editable {
  outline: none;
  border-radius: 4px;
  padding: 4px;
  margin: -4px;
  transition: background 0.15s, box-shadow 0.15s;
  cursor: text;
}
.email-editable:hover {
  background: rgba(29,158,117,0.04);
}
.email-editable:focus {
  background: rgba(29,158,117,0.06);
  box-shadow: 0 0 0 2px rgba(29,158,117,0.18);
}
/* Subtle edit-hint stripe on the left when focused */
.email-editable:focus-within {
  border-left: 3px solid rgba(29,158,117,0.4);
  padding-left: 7px;
}

/* ── Inline editable fee amount ──────────────────────────────────────── */
.fee-inline-input {
  border: none;
  border-bottom: 1px dashed #9ca3af;
  background: transparent;
  font-size: inherit;
  font-weight: bold;
  font-family: inherit;
  color: inherit;
  width: 5ch;
  text-align: center;
  padding: 0 1px 1px;
  outline: none;
  -moz-appearance: textfield;
}
.fee-inline-input::-webkit-outer-spin-button,
.fee-inline-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.fee-inline-input:focus {
  border-bottom: 2px solid var(--primary);
  background: rgba(29,158,117,0.06);
  border-radius: 2px;
}

/* ── "Edited" badge ──────────────────────────────────────────────────── */
.badge-edited {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 20px;
  padding: 2px 8px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ── "New today" badge ───────────────────────────────────────────────── */
.badge-new-today {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 20px;
  background: var(--s-appr-bg);
  color: var(--s-appr-text);
  vertical-align: middle;
}

/* ── Intake loading / progress screen ───────────────────────────────────── */
.loading-screen {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 20px;
}

.loading-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 40px 44px 36px;
  width: 100%;
  max-width: 520px;
  text-align: center;
}

.loading-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.loading-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.loading-contact {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.loading-progress-wrap {
  margin-bottom: 28px;
}

.loading-progress-track {
  height: 5px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.loading-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 99px;
  width: 5%;
  transition: width 0.4s ease;
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  margin-bottom: 24px;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.25s, border-color 0.25s;
}

.loading-step-active {
  background: var(--primary-light);
  border-color: rgba(29,158,117,0.2);
}

.loading-step-done {
  background: #f9fafb;
  border-color: var(--border);
}

.loading-step-waiting {
  background: transparent;
  border-color: var(--border);
  opacity: 0.5;
}

.loading-step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(29,158,117,0.12);
  color: var(--primary);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.loading-step-waiting .loading-step-icon {
  background: var(--border);
  color: var(--text-muted);
}

.loading-step-done .loading-step-icon {
  background: #F1F8E9;
  color: var(--primary);
}

.loading-step-body {
  flex: 1;
}

.loading-step-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.loading-step-waiting .loading-step-title {
  color: var(--text-muted);
}

.loading-step-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.loading-step-status {
  font-size: 14px;
  color: var(--primary);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.loading-step-done .loading-step-status {
  color: var(--primary);
}

.loading-msg {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
  min-height: 18px;
}

.loading-cancel {
  font-size: 12px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.loading-cancel:hover {
  color: var(--primary);
}
