/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --font: "Inter", system-ui, -apple-system, sans-serif;
  /* Palette */
  --bg:       #F4F5F7;
  --surface:  #FFFFFF;
  --border:   #E4E7EC;
  --ink:      #101828;
  --ink-2:    #344054;
  --muted:    #667085;
  --faint:    #98A2B3;
  /* Brand */
  --primary:        #4F46E5;
  --primary-light:  #EEF2FF;
  --primary-soft:   #C7D2FE;
  /* Status */
  --green:    #027A48; --green-bg:  #ECFDF3; --green-mid: #6CE9A6;
  --amber:    #B45309; --amber-bg:  #FFFBEB; --amber-mid: #FCD34D;
  --red:      #B42318; --red-bg:    #FEF3F2; --red-mid:   #FDA29B;
  --blue:     #175CD3; --blue-bg:   #EFF8FF;
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05);
  --shadow:    0 1px 3px rgba(16,24,40,.10), 0 1px 2px rgba(16,24,40,.06);
  --shadow-md: 0 4px 8px -2px rgba(16,24,40,.10), 0 2px 4px -2px rgba(16,24,40,.06);
}

html { font-size: 14px; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }

/* ── App shell ─────────────────────────────────────────────────────────────── */
#app { display: flex; height: 100vh; overflow: hidden; }

/* ── Sidebar ───────────────────────────────────────────────────────────────── */
.sidebar {
  width: 232px; min-width: 232px; height: 100vh; background: #1A1D23;
  display: flex; flex-direction: column; flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,.06);
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px; padding: 20px 18px 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.brand-icon { font-size: 22px; color: #818CF8; line-height: 1; }
.brand-name { font-size: 15px; font-weight: 700; color: #F9FAFB; letter-spacing: -.01em; }
.brand-sub  { font-size: 11px; color: #6B7280; margin-top: 1px; }

.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav-section-label {
  font-size: 10px; font-weight: 600; letter-spacing: .08em; color: #4B5563;
  padding: 14px 8px 5px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border-radius: 7px; font-size: 13px; font-weight: 500; color: #9CA3AF;
  cursor: pointer; transition: background .12s, color .12s; margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #E5E7EB; }
.nav-item.active { background: rgba(79,70,229,.25); color: #A5B4FC; }
.nav-item svg { flex-shrink: 0; opacity: .85; }

.sidebar-footer { padding: 12px 12px 16px; border-top: 1px solid rgba(255,255,255,.07); }
.ai-status {
  font-size: 11px; font-weight: 500; padding: 4px 9px; border-radius: 5px;
  background: rgba(255,255,255,.07); color: #6B7280; margin-bottom: 10px;
}
.ai-status.live { background: rgba(6,214,160,.12); color: #34D399; }
.ai-status.degraded { background: rgba(245,158,11,.14); color: #FBBF24; cursor: help; }
.user-pill {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.05); border-radius: 8px; padding: 8px 10px;
}
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: #4F46E5;
  color: #fff; font-size: 12px; font-weight: 600;
  display: grid; place-items: center; flex-shrink: 0;
}
.user-info-wrap { flex: 1; min-width: 0; }
.user-info { font-size: 12px; font-weight: 500; color: #D1D5DB; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.user-role { font-size: 10px; color: #6B7280; margin-top: 1px; }
.sign-out-btn {
  background: none; border: none; color: #6B7280; cursor: pointer; font-size: 14px;
  padding: 0 2px; transition: color .12s;
}
.sign-out-btn:hover { color: #EF4444; }

/* ── Content area ──────────────────────────────────────────────────────────── */
.content {
  flex: 1; overflow-y: auto; padding: 28px 32px;
  background: var(--bg);
}
@media (max-width: 900px) {
  .sidebar { width: 60px; min-width: 60px; }
  .brand-text, .nav-section-label, .nav-item span,
  .user-info-wrap, .sign-out-btn, .ai-status { display: none; }
  .nav-item { justify-content: center; padding: 10px; }
  .content { padding: 20px 16px; }
}

/* ── Page header ───────────────────────────────────────────────────────────── */
.page-header { margin-bottom: 24px; }
.page-title { font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.page-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px 22px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.stat-label { font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -.03em; line-height: 1; }
.stat-sub { font-size: 11px; color: var(--faint); margin-top: 4px; }

/* ── Badges / pills ────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 5px;
  white-space: nowrap; text-transform: capitalize;
}
.b-open, .b-under_review { background: var(--primary-light); color: var(--primary); }
.b-pending_docs           { background: var(--amber-bg); color: var(--amber); }
.b-adjudication           { background: var(--blue-bg); color: var(--blue); }
.b-settled, .b-closed     { background: var(--green-bg); color: var(--green); }
.b-denied                 { background: var(--red-bg); color: var(--red); }
.b-low  { background: var(--green-bg); color: var(--green); }
.b-medium { background: var(--amber-bg); color: var(--amber); }
.b-high { background: var(--red-bg); color: var(--red); }
.verdict-covered          { background: var(--green-bg); color: var(--green); }
.verdict-possibly_excluded { background: var(--amber-bg); color: var(--amber); }
.verdict-not_covered      { background: var(--red-bg); color: var(--red); }

/* ── Claims table ──────────────────────────────────────────────────────────── */
.table-toolbar {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px;
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.search-input {
  flex: 1; min-width: 200px; max-width: 320px;
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 12px;
  font-size: 13px; font-family: var(--font); background: var(--bg);
  color: var(--ink); outline: none;
}
.search-input:focus { border-color: var(--primary-soft); }
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-pill {
  font-size: 11px; font-weight: 500; padding: 4px 10px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); cursor: pointer; transition: all .1s;
}
.filter-pill.active { background: var(--primary-light); border-color: var(--primary-soft); color: var(--primary); }
.claims-table { width: 100%; border-collapse: collapse; }
.claims-table th {
  text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); padding: 10px 18px; background: var(--bg);
  border-bottom: 1px solid var(--border); position: sticky; top: 0;
}
.claims-table td { padding: 13px 18px; border-bottom: .5px solid var(--border); font-size: 13px; vertical-align: middle; }
.claims-table tr { cursor: pointer; transition: background .1s; }
.claims-table tr:hover td { background: #FAFBFF; }
.claims-table tr:last-child td { border-bottom: none; }
.progress-bar { height: 4px; background: var(--border); border-radius: 3px; width: 80px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width .3s; }
.claim-num { font-weight: 600; color: var(--ink); }
.claim-claimant { font-weight: 500; }
.claim-pol { font-size: 12px; color: var(--muted); margin-top: 1px; }

/* ── Detail view ───────────────────────────────────────────────────────────── */
.detail-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.detail-header h1 { font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
.detail-header .meta { font-size: 13px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.detail-layout { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .detail-layout { grid-template-columns: 1fr; } }
.panel-col { display: flex; flex-direction: column; gap: 16px; }

/* ── Step rail ─────────────────────────────────────────────────────────────── */
.rail { position: sticky; top: 12px; }
.rail-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.rail-phase {
  font-size: 10px; font-weight: 700; letter-spacing: .07em; color: var(--faint);
  text-transform: uppercase; padding: 10px 14px 5px;
}
.rail-phase:first-child { padding-top: 14px; }
.step-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--muted);
  transition: background .1s; border-left: 3px solid transparent;
}
.step-item:hover { background: var(--bg); color: var(--ink-2); }
.step-item.active { background: var(--primary-light); color: var(--primary); border-left-color: var(--primary); }
.step-item.done { color: var(--ink-2); }
.step-dot {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 10px; font-weight: 700;
  background: var(--border); color: var(--faint);
}
.step-item.done .step-dot  { background: var(--green); color: #fff; }
.step-item.active .step-dot { background: var(--primary); color: #fff; }
.step-item.current .step-dot { background: var(--amber-mid); color: var(--amber); }
.step-name { flex: 1; line-height: 1.3; }

/* ── Panel ─────────────────────────────────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; min-height: 360px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.panel-head h3 { font-size: 16px; font-weight: 700; color: var(--ink); }
.phase-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-bottom: 4px; }

/* ── KV rows ───────────────────────────────────────────────────────────────── */
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 4px 16px; padding: 9px 0; border-bottom: .5px solid var(--border); font-size: 13px; align-items: start; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); font-weight: 500; font-size: 12px; padding-top: 1px; }
.kv .v { color: var(--ink); word-break: break-word; }

.kv-sm { display: flex; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: .5px solid var(--border); font-size: 13px; align-items: start; }
.kv-sm:last-child { border-bottom: none; }
.kv-sm .k { color: var(--muted); font-weight: 500; font-size: 12px; padding-top: 1px; }
.kv-sm .v { color: var(--ink); text-align: right; word-break: break-word; }

/* ── Lists ─────────────────────────────────────────────────────────────────── */
ul.clean { list-style: none; }
ul.clean li { font-size: 13px; padding: 6px 0 6px 18px; position: relative; border-bottom: .5px solid var(--border); color: var(--ink-2); }
ul.clean li:last-child { border-bottom: none; }
ul.clean li::before { content: "›"; position: absolute; left: 4px; color: var(--primary-soft); font-weight: 700; }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font-size: 11px; padding: 3px 9px; border-radius: 5px; background: var(--bg); border: 1px solid var(--border); color: var(--ink-2); }
.pill.warn { background: var(--amber-bg); border-color: var(--amber-mid); color: var(--amber); }
.pill.ok   { background: var(--green-bg); border-color: var(--green-mid); color: var(--green); }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary); color: #fff; border: none;
  border-radius: 8px; padding: 9px 16px; font-size: 13px;
  font-family: var(--font); font-weight: 500; cursor: pointer;
  transition: filter .12s, box-shadow .12s;
  box-shadow: 0 1px 2px rgba(79,70,229,.3);
}
.btn:hover  { filter: brightness(1.08); }
.btn:active { filter: brightness(.95); }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn.ghost {
  background: var(--surface); color: var(--primary);
  border: 1px solid var(--primary-soft); box-shadow: none;
}
.btn.ghost:hover { background: var(--primary-light); }
.btn.danger { background: var(--red); box-shadow: 0 1px 2px rgba(180,35,24,.3); }
.btn.dark   { background: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.3); }
.btn.sm     { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.btn.xs     { padding: 3px 8px; font-size: 11px; border-radius: 5px; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; max-width: 600px; box-shadow: var(--shadow-sm); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 14px 0 5px; }
label:first-child { margin-top: 0; }
input, select, textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 12px; font-size: 13px; font-family: var(--font);
  background: var(--surface); color: var(--ink); outline: none; transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary-soft); box-shadow: 0 0 0 3px rgba(79,70,229,.08); }
textarea { resize: vertical; min-height: 88px; }

/* ── Info boxes ────────────────────────────────────────────────────────────── */
.info-box { background: var(--primary-light); border-radius: 8px; padding: 12px 14px; font-size: 12.5px; color: var(--primary); margin-bottom: 14px; }
.warn-box  { background: var(--amber-bg); border-radius: 8px; padding: 12px 14px; font-size: 12.5px; color: var(--amber); }
.success-box { background: var(--green-bg); border-radius: 8px; padding: 12px 14px; font-size: 12.5px; color: var(--green); }
.error-box { background: var(--red-bg); border-radius: 8px; padding: 12px 14px; font-size: 12.5px; color: var(--red); }

/* ── Escalation banner ─────────────────────────────────────────────────────── */
.flag-banner {
  background: #FFFBEB; border: 1px solid var(--amber-mid);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; font-size: 13px; color: var(--amber);
}
.flag-banner ul { list-style: none; margin-top: 6px; }
.flag-banner li { padding: 4px 0 4px 16px; position: relative; font-size: 12.5px; }
.flag-banner li::before { content: "⚑"; position: absolute; left: 0; }

/* ── Decision gate ─────────────────────────────────────────────────────────── */
.gate { margin-top: 20px; border-top: 1.5px dashed var(--border); padding-top: 18px; }
.gate-title { font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 3px; }
.gate-note  { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.gate-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gate-controls select, .gate-controls input[type=number], .gate-controls input[type=text] {
  width: auto; min-width: 140px; max-width: 220px;
}
.gate-or { font-size: 12px; color: var(--faint); }
.gate-decided { background: var(--green-bg); color: var(--green); border-radius: 8px; padding: 10px 14px; font-size: 12.5px; margin-bottom: 12px; }
.gate-decided .by-line { font-size: 11px; color: var(--green); opacity: .8; margin-top: 3px; }

/* ── Subblock headings ─────────────────────────────────────────────────────── */
.sub { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin: 16px 0 8px; }
.sub:first-child { margin-top: 0; }

/* ── Progress gauge ────────────────────────────────────────────────────────── */
.gauge { display: flex; align-items: center; gap: 8px; }
.gauge-bar { height: 8px; background: var(--border); border-radius: 5px; overflow: hidden; width: 90px; flex-shrink: 0; }
.gauge-bar i { display: block; height: 100%; border-radius: 5px; }
.gauge b { font-size: 12px; font-weight: 600; color: var(--ink); }

/* ── Monospace / letter ────────────────────────────────────────────────────── */
.letter {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 16px 18px; font-size: 12.5px; white-space: pre-wrap; line-height: 1.7;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink-2);
}

/* ── Feature table ─────────────────────────────────────────────────────────── */
.feat-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.feat-table th { color: var(--muted); font-weight: 600; font-size: 11px; text-align: left; padding: 5px 0; border-bottom: 1px solid var(--border); }
.feat-table td { padding: 7px 0; border-bottom: .5px solid var(--border); vertical-align: top; }
.feat-table tr:last-child td { border-bottom: none; }
.feat-name  { font-weight: 500; color: var(--ink); }
.feat-why   { font-size: 11px; color: var(--muted); }
.feat-contr { font-weight: 700; text-align: right; }

/* ── Retrieval row ─────────────────────────────────────────────────────────── */
.ret-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: .5px solid var(--border); font-size: 12.5px; }
.ret-row:last-child { border-bottom: none; }
.ret-bar { height: 6px; background: var(--border); border-radius: 3px; width: 100px; overflow: hidden; flex-shrink: 0; }
.ret-bar i { display: block; height: 100%; }
.ret-score { font-size: 11px; color: var(--muted); width: 36px; text-align: right; flex-shrink: 0; }

/* ── Step 4: per-doc request rows ───────────────────────────────────────────── */
.doc-request-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 12px; border-radius: 8px; margin-bottom: 6px;
  border: 1px solid var(--border); background: var(--bg);
}
.doc-request-row:hover { background: var(--primary-light); }
.doc-request-info { flex: 1; font-size: 13px; line-height: 1.5; }

/* ── Step 9: uploaded adjuster evidence rows ────────────────────────────────── */
.doc-uploaded-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px; margin-bottom: 6px;
  border: 1px solid var(--border); background: var(--bg);
}
.doc-uploaded-icon { font-size: 20px; }

/* Demo doc download chips — adjuster panel (light bg) */
.demo-doc-chip {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  background: var(--primary-light); color: var(--primary);
  border: 1px solid var(--primary-soft); font-size: 11.5px; font-weight: 500;
  text-decoration: none; white-space: nowrap; margin: 2px 3px 2px 0;
}
.demo-doc-chip:hover { background: var(--primary); color: #fff; }

/* Chat variant — sits on the primary-light upload bar */
.chat-demo-chip {
  background: rgba(255,255,255,.18); color: var(--ink);
  border-color: rgba(255,255,255,.35); font-size: 11px;
}
.chat-demo-chip:hover { background: var(--primary); color: #fff; }
.chat-demo-chip.done  { opacity: .5; pointer-events: none; text-decoration: line-through; }
.doc-uploaded-info { flex: 1; font-size: 12.5px; line-height: 1.45;
  display: flex; flex-direction: column; }

/* ── Document upload zone ──────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border); border-radius: 10px;
  padding: 32px 20px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s; margin-bottom: 14px;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary-soft); background: var(--primary-light);
}
.upload-icon { font-size: 28px; color: var(--faint); margin-bottom: 8px; }
.upload-text { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.upload-sub  { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ── Login page ────────────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; background: var(--bg);
}
.login-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 40px 36px; width: 380px; box-shadow: var(--shadow-md);
}
.login-logo { font-size: 32px; color: var(--primary); text-align: center; margin-bottom: 6px; }
.login-title { font-size: 22px; font-weight: 700; text-align: center; letter-spacing: -.02em; margin-bottom: 4px; }
.login-sub { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 28px; }
.login-error { font-size: 12px; color: var(--red); min-height: 18px; margin-top: 4px; }
.login-creds {
  background: var(--bg); border-radius: 8px; padding: 12px 14px;
  font-size: 12px; color: var(--muted); margin-bottom: 18px; line-height: 1.7;
}
.login-creds code { font-family: monospace; color: var(--ink-2); font-size: 11.5px; }
.login-cred-btns { display: flex; gap: 8px; }
.login-cred-btn {
  flex: 1; font-family: var(--font); font-size: 12.5px; font-weight: 600;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 10px; cursor: pointer; transition: all .15s ease;
}
.login-cred-btn:hover { border-color: var(--primary-soft); color: var(--primary); background: var(--primary-light); }
.login-cred-btn:active { transform: translateY(1px); }

/* ── Spinners / loading ────────────────────────────────────────────────────── */
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid var(--primary-soft); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, #eef0f5 50%, var(--border) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
  border-radius: 6px;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .icon { font-size: 36px; margin-bottom: 12px; opacity: .4; }
.empty-state h3 { font-size: 15px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ── Toast ─────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--ink); color: #fff;
  padding: 11px 18px; border-radius: 10px; font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-md); z-index: 9999;
  opacity: 0; transform: translateY(8px);
  transition: opacity .2s, transform .2s; pointer-events: none; max-width: 340px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--green); }
.toast.error   { background: var(--red); }
.toast.warn    { background: var(--amber); }

/* ── Misc ──────────────────────────────────────────────────────────────────── */
.divider { height: .5px; background: var(--border); margin: 16px 0; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .9em; background: var(--bg); padding: 1px 5px; border-radius: 4px; color: var(--ink-2); }
.text-muted { color: var(--muted); font-size: 12.5px; }
.text-mono  { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 20px; }
.flex-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grow { flex: 1; }

/* ── Map page ──────────────────────────────────────────────────────────────── */
.map-phase { margin-bottom: 18px; }
.map-phase h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.map-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
@media (max-width: 640px) { .map-grid { grid-template-columns: 1fr; } }
.map-card { background: var(--primary-light); border: 1px solid var(--primary-soft); border-radius: 10px; padding: 12px 14px; }
.map-card.post { background: var(--green-bg); border-color: var(--green-mid); }
.map-num  { font-size: 10px; font-weight: 700; opacity: .6; }
.map-name { font-size: 13px; font-weight: 600; color: var(--ink); margin-top: 2px; }
.map-tag  { font-size: 10px; display: inline-block; margin-top: 6px; background: var(--primary-soft); color: var(--primary); padding: 2px 7px; border-radius: 4px; font-weight: 600; }
.map-card.post .map-tag { background: var(--green-mid); color: var(--green); }

/* ── Chat & File Claim ─────────────────────────────────────────────────────── */

/* Step progress bar */
.chat-steps {
  display: flex; align-items: center; margin-bottom: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 16px; gap: 0; overflow-x: auto;
}
.chat-step {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex: 1; min-width: 60px; opacity: .35; transition: opacity .2s;
}
.chat-step.active  { opacity: 1; }
.chat-step.done    { opacity: .7; }
.chat-step-icon    { font-size: 16px; line-height: 1; }
.chat-step-label   { font-size: 10px; font-weight: 600; color: var(--ink-2); text-align: center; white-space: nowrap; }
.chat-step.active .chat-step-label { color: var(--primary); }
.chat-step.done .chat-step-icon    { color: var(--green); }
.chat-step-sep {
  width: 24px; height: 2px; background: var(--border); flex-shrink: 0; margin: 0 2px 18px;
}

/* Shell */
.chat-shell {
  display: flex; flex-direction: column;
  height: calc(100vh - 230px); min-height: 380px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm);
}

/* Messages area */
.chat-messages {
  flex: 1; overflow-y: auto; padding: 20px 18px;
  display: flex; flex-direction: column; gap: 14px;
  scroll-behavior: smooth;
}

/* Bubbles */
.chat-bubble {
  max-width: 76%; padding: 11px 15px; border-radius: 14px;
  font-size: 13.5px; line-height: 1.58; word-wrap: break-word;
}
.chat-bubble p      { margin: 0 0 6px; }
.chat-bubble p:last-child { margin-bottom: 0; }
.chat-bubble code   { background: rgba(0,0,0,.07); padding: 1px 5px; border-radius: 4px; font-family: ui-monospace, monospace; font-size: 12px; }
.chat-bubble strong { font-weight: 700; }
.chat-bubble em     { font-style: italic; }

.chat-bubble.bot  { align-self: flex-start; background: var(--bg); border: 1px solid var(--border); border-bottom-left-radius: 4px; color: var(--ink); }
.chat-bubble.user { align-self: flex-end;   background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }

/* Typing indicator */
.chat-bubble.typing { display: flex; align-items: center; gap: 5px; padding: 14px 18px; }
.chat-bubble.typing span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: typingDot 1.2s infinite ease-in-out; }
.chat-bubble.typing span:nth-child(2) { animation-delay: .2s; }
.chat-bubble.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typingDot { 0%,80%,100%{transform:scale(.8);opacity:.4}40%{transform:scale(1.1);opacity:1} }

/* Rich result cards */
.chat-result-card {
  margin-top: 12px; padding: 13px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; font-size: 12.5px;
}
.crc-header { font-size: 11.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.crc-text   { font-size: 12.5px; color: var(--muted); margin: 4px 0 8px; line-height: 1.5; }
.crc-note   { font-size: 12px; color: var(--muted); margin-top: 4px; }
.crc-warn   { font-size: 12px; color: var(--amber); background: var(--amber-bg); padding: 5px 9px; border-radius: 6px; margin-top: 6px; }
.crc-divider{ border: none; border-top: 1px solid var(--border); margin: 10px 0; }
.crc-details{ margin-top: 10px; }
.crc-details summary { font-size: 11.5px; color: var(--muted); cursor: pointer; }
.crc-pre    { font-size: 11px; white-space: pre-wrap; line-height: 1.5; color: var(--ink-2); margin-top: 6px; font-family: inherit; }

/* Document checklist card */
.chat-doc-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.chat-doc-list li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.chat-doc-list li.confirmed { color: var(--green); text-decoration: line-through; opacity: .7; }
.chat-doc-icon { font-size: 14px; font-style: normal; flex-shrink: 0; }

/* Handoff card */
.chat-handoff-card { background: var(--green-bg); border-color: var(--green-mid); }
.chat-handoff-row  { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chat-handoff-badge{ background: var(--green); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.chat-handoff-num  { font-size: 15px; font-weight: 700; color: var(--ink); }

/* Input bar */
.chat-input-bar {
  display: flex; align-items: flex-end; gap: 10px;
  padding: 12px 14px; border-top: 1px solid var(--border);
  background: var(--surface);
}
.chat-input {
  flex: 1; resize: none; border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 13px; font-family: var(--font); font-size: 13.5px;
  color: var(--ink); background: var(--bg); outline: none;
  line-height: 1.5; min-height: 40px; max-height: 130px; transition: border-color .15s;
}
.chat-input:focus    { border-color: var(--primary-soft); background: var(--surface); }
.chat-input:disabled { opacity: .5; cursor: not-allowed; }
.chat-send-btn {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px;
  display: grid; place-items: center; padding: 0;
}
.chat-send-btn:disabled { opacity: .4; cursor: not-allowed; }

/* Quick-reply chips */
.chat-quick {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 4px 16px 12px; background: var(--surface);
}
.chat-chip {
  font-family: var(--font); font-size: 12.5px; font-weight: 600;
  color: var(--primary); background: var(--primary-light);
  border: 1px solid var(--primary-soft); border-radius: 20px;
  padding: 7px 13px; cursor: pointer; transition: all .15s ease;
  white-space: nowrap; line-height: 1;
}
.chat-chip:hover  { background: var(--primary); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.chat-chip:active { transform: translateY(0); }

/* Message entrance + progress animation */
@keyframes bubbleIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.chat-bubble { animation: bubbleIn .22s ease both; }
.chat-step-sep.filled { background: var(--green-mid); transition: background .3s ease; }
.chat-step.active .chat-step-icon { animation: stepPulse 1.7s ease-in-out infinite; }
@keyframes stepPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); } }

@media (prefers-reduced-motion: reduce) {
  .chat-bubble { animation: none; }
  .chat-chip:hover { transform: none; }
  .chat-step.active .chat-step-icon { animation: none; }
}

/* ── Charts ────────────────────────────────────────────────────────────────── */
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
@media (max-width: 700px) { .chart-grid { grid-template-columns: 1fr; } }
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.chart-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 14px; }
.chart-wrap { position: relative; height: 180px; }

/* ── Contact Centre AI ──────────────────────────────────────────────────────── */
.cc-wrap { max-width: 860px; margin: 0 auto; padding: 32px 24px 64px; }
.cc-header { margin-bottom: 24px; }
.cc-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.cc-title { font-size: 20px; font-weight: 700; color: var(--ink); }
.cc-sub   { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Stepper */
.cc-stepper-wrap { margin-bottom: 28px; }
.cc-stepper { display: flex; align-items: flex-start; gap: 0; }
.cc-step { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.cc-step:not(:last-child)::after {
  content: ""; position: absolute; top: 15px; left: 56%; width: 88%; height: 2px;
  background: var(--border); z-index: 0;
}
.cc-step.done:not(:last-child)::after { background: var(--primary); }
.cc-step-circle {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border);
  background: var(--surface); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--muted); position: relative; z-index: 1;
  transition: all .2s;
}
.cc-step.active .cc-step-circle { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.cc-step.done  .cc-step-circle { border-color: var(--primary); background: var(--primary); color: #fff; }
.cc-step-label { font-size: 10px; color: var(--muted); margin-top: 6px; text-align: center; line-height: 1.3; }
.cc-step.active .cc-step-label { color: var(--primary); font-weight: 600; }
.cc-step.done   .cc-step-label { color: var(--ink-2); }

/* Panels */
.cc-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; margin-bottom: 14px; }
.cc-panel-title { font-size: 14px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.cc-panel-icon { font-size: 18px; }

/* Intake form */
.cc-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.cc-form-row.full { grid-template-columns: 1fr; }
.cc-form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.cc-form-group input, .cc-form-group select, .cc-form-group textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--border); border-radius: 7px;
  font-size: 13px; color: var(--ink); background: var(--surface); outline: none; font-family: var(--font);
  transition: border-color .15s;
}
.cc-form-group input:focus, .cc-form-group select:focus, .cc-form-group textarea:focus { border-color: var(--primary); }
.cc-form-group textarea { resize: vertical; min-height: 90px; }
.cc-action-row { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.cc-note { font-size: 12px; color: var(--muted); line-height: 1.5; }
.cc-err { color: var(--red); font-size: 12px; margin-top: 8px; padding: 8px 12px; background: var(--red-bg); border-radius: 6px; }

/* Preset scenarios */
.cc-preset-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.cc-preset-label { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.cc-preset-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cc-preset { background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 5px 13px; font-size: 12px; cursor: pointer; transition: all .15s; color: var(--ink-2); }
.cc-preset:hover, .cc-preset.active { background: var(--primary-light); border-color: var(--primary-soft); color: var(--primary); }

/* Loading */
.cc-loading { display: flex; flex-direction: column; align-items: center; padding: 48px 24px; gap: 16px; }
.cc-loading-spinner {
  width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: cc-spin .8s linear infinite;
}
@keyframes cc-spin { to { transform: rotate(360deg); } }
.cc-loading-msg { font-size: 15px; font-weight: 600; color: var(--ink); }
.cc-loading-sub { font-size: 12px; color: var(--muted); }

/* Result grid */
.cc-result-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.cc-result-block { background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.cc-result-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.cc-result-val { font-size: 13px; font-weight: 600; color: var(--ink); }
.cc-sev-low      { color: var(--green); }
.cc-sev-medium   { color: var(--amber); }
.cc-sev-high, .cc-sev-critical { color: var(--red); }

/* Badges */
.cc-badges-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cc-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.cc-badge.red    { background: var(--red-bg);   color: var(--red); }
.cc-badge.amber  { background: var(--amber-bg); color: var(--amber); }
.cc-badge.green  { background: var(--green-bg); color: var(--green); }
.cc-badge.blue   { background: var(--blue-bg);  color: var(--blue); }

/* Facts */
.cc-facts-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.cc-facts { list-style: none; font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 3px; }

/* Flags */
.cc-flag { display: flex; align-items: flex-start; gap: 8px; padding: 10px 14px; border-radius: 8px; font-size: 13px; line-height: 1.5; }
.cc-flag.info { background: var(--blue-bg);  color: var(--blue); }
.cc-flag.warn { background: var(--amber-bg); color: var(--amber); }
.cc-flag.ok   { background: var(--green-bg); color: var(--green); }

/* Coverage */
.cc-coverage-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.cc-verdict { display: inline-flex; align-items: center; gap: 5px; padding: 6px 16px; border-radius: 20px; font-size: 14px; font-weight: 700; }
.cc-verdict.covered           { background: var(--green-bg); color: var(--green); }
.cc-verdict.possibly_excluded { background: var(--amber-bg); color: var(--amber); }
.cc-verdict.not_covered       { background: var(--red-bg);   color: var(--red); }
.cc-conf { font-size: 12px; color: var(--muted); }
.cc-reasoning { font-size: 13px; color: var(--ink-2); margin-top: 10px; line-height: 1.6; padding: 10px 14px; background: var(--bg); border-radius: 7px; }
.cc-row-pair { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 10px; }

/* Doc checklist */
.cc-doc-meta { display: flex; gap: 20px; font-size: 12px; color: var(--muted); margin-bottom: 14px; flex-wrap: wrap; }
.cc-doc-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.cc-doc-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; background: var(--bg); border-radius: 8px; border: 1px solid var(--border); }
.cc-doc-item .doc-icon { width: 30px; height: 30px; border-radius: 6px; background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.cc-doc-item .doc-body { flex: 1; min-width: 0; }
.cc-doc-item .doc-name { font-weight: 600; font-size: 13px; color: var(--ink); }
.cc-doc-item .doc-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cc-doc-item .doc-where { font-size: 11px; color: var(--blue); margin-top: 3px; }
.cc-doc-item .doc-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: var(--red-bg); color: var(--red); flex-shrink: 0; margin-top: 2px; text-transform: uppercase; }
.cc-doc-item .doc-badge.high   { background: var(--amber-bg); color: var(--amber); }
.cc-doc-item .doc-badge.medium { background: var(--blue-bg);  color: var(--blue); }
.cc-opt-title { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 8px; }
.cc-doc-opt-list { list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.cc-doc-opt { padding: 6px 0; }
.cc-imp-notes { margin-top: 14px; font-size: 13px; color: var(--amber); background: var(--amber-bg); border-radius: 8px; padding: 12px 14px; }
.cc-imp-notes ul { margin-top: 6px; padding-left: 18px; }
.cc-imp-notes li { margin-bottom: 4px; }

/* Fraud / verification */
.cc-risk-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cc-risk-label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.cc-risk-level { font-size: 16px; font-weight: 800; }
.cc-risk-bar { height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; margin-bottom: 4px; }
.cc-risk-fill { height: 100%; border-radius: 5px; transition: width .6s cubic-bezier(.4,0,.2,1); }
.cc-risk-score-row { margin-bottom: 12px; }
.cc-fraud-section { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.cc-fraud-ind { padding: 8px 12px; border-radius: 7px; font-size: 12px; background: var(--amber-bg); color: var(--amber); }
.cc-fraud-ind.high { background: var(--red-bg); color: var(--red); }
.cc-fraud-ind.low  { background: var(--blue-bg); color: var(--blue); }
.cc-fraud-pos { padding: 6px 12px; border-radius: 7px; font-size: 12px; background: var(--green-bg); color: var(--green); }

/* Pre-filled form */
.cc-form-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.cc-form-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.cc-form-refno { font-size: 12px; color: var(--muted); margin-top: 3px; }
.cc-form-fill-badge { background: var(--primary-light); color: var(--primary); font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 20px; white-space: nowrap; }
.cc-fill-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 20px; }
.cc-fill-bar div { height: 100%; border-radius: 3px; background: var(--primary); }
.cc-form-section { margin-bottom: 18px; }
.cc-form-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.cc-form-field { display: flex; padding: 7px 0; border-bottom: 1px solid var(--bg); }
.cc-form-key { width: 220px; font-size: 12px; color: var(--muted); flex-shrink: 0; padding-right: 12px; }
.cc-form-val { font-size: 12px; color: var(--ink); font-weight: 500; }
.cc-form-empty { color: var(--faint); font-style: italic; font-weight: 400; }
.cc-pending-fields { margin: 16px 0; padding: 14px 16px; background: var(--amber-bg); border-radius: 8px; }
.cc-pf-title { font-size: 12px; font-weight: 700; color: var(--amber); margin-bottom: 8px; }
.cc-pending-fields ul { padding-left: 18px; font-size: 12px; color: var(--amber); }
.cc-pending-fields li { margin-bottom: 4px; }
.cc-next-steps { margin: 16px 0; padding: 14px 16px; background: var(--green-bg); border-radius: 8px; }
.cc-ns-title { font-size: 12px; font-weight: 700; color: var(--green); margin-bottom: 8px; }
.cc-next-steps ol { padding-left: 18px; font-size: 12px; color: var(--green); }
.cc-next-steps li { margin-bottom: 4px; }
.cc-reg-refs { margin: 14px 0; padding: 12px 16px; background: var(--bg); border-radius: 8px; border: 1px solid var(--border); }
.cc-rr-title { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.cc-rr-row { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.cc-form-actions { display: flex; align-items: center; gap: 16px; margin-top: 18px; flex-wrap: wrap; }

/* Policy delete button */
.btn-icon-del { background: none; border: 1px solid transparent; border-radius: 6px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); cursor: pointer; transition: background .15s, color .15s, border-color .15s; flex-shrink: 0; }
.btn-icon-del:hover { background: #fef2f2; color: var(--red); border-color: var(--red); }

/* Document upload bar */
.chat-upload-bar { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: var(--primary-light); border-top: 1px solid var(--border); }
.chat-upload-btn { display: flex; align-items: center; gap: 7px; padding: 7px 16px; font-size: 13px; font-weight: 600; background: var(--primary); color: #fff; border: none; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.chat-upload-btn:hover { opacity: .88; }
.chat-upload-hint { font-size: 12px; color: var(--muted); }

/* Claim history table inside chat coverage card */
.claim-hist-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 6px; }
.claim-hist-table th { text-align: left; padding: 4px 8px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--border); }
.claim-hist-table td { padding: 5px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.claim-hist-table tr:last-child td { border-bottom: none; }
.claim-hist-bar { flex:1; height:5px; background:var(--border); border-radius:3px; overflow:hidden; min-width:40px; }
.claim-hist-bar div { height:100%; border-radius:3px; transition:width .3s; }

/* ── Policy info bar (persistent, shown after policy is verified) ──────────── */
.chat-policy-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 16px; margin-bottom: 12px;
  font-size: 12.5px;
}
.cpb-icon  { font-size: 22px; flex-shrink: 0; }
.cpb-main  { min-width: 0; flex-shrink: 0; }
.cpb-num   { font-weight: 700; font-size: 13px; color: var(--ink); font-family: ui-monospace, monospace; }
.cpb-name  { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.cpb-stat  { text-align: center; flex: 1; min-width: 80px; }
.cpb-label { font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cpb-val   { font-size: 13px; font-weight: 600; color: var(--ink); margin-top: 2px; }
.cpb-badge { margin-left: auto; flex-shrink: 0; }

/* ── Inline policy card inside coverage bubble ─────────────────────────────── */
.crc-policy-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 10px;
}
.cpc-row    { display: flex; align-items: center; gap: 8px; }
.cpc-header { margin-bottom: 4px; }
.cpc-icon   { font-size: 16px; flex-shrink: 0; }
.cpc-num    { font-weight: 700; font-size: 12.5px; font-family: ui-monospace, monospace; color: var(--ink); }
.cpc-name   { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.cpc-stats  { display: flex; gap: 12px; flex-wrap: wrap; }
.cpc-stat   { min-width: 70px; }
.cpc-stat-label { font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cpc-stat-val   { font-size: 12px; font-weight: 600; color: var(--ink); margin-top: 1px; }

/* Resume banner */
.chat-resume-banner { display:flex; align-items:center; justify-content:space-between; gap:12px; background:var(--primary-light); border:1px solid var(--primary-soft); border-radius:8px; padding:9px 14px; margin-bottom:12px; font-size:13px; color:var(--primary); font-weight:500; }
.chat-resume-discard { background:none; border:1px solid var(--primary-soft); border-radius:6px; padding:3px 10px; font-size:12px; color:var(--primary); cursor:pointer; }
.chat-resume-discard:hover { background:var(--primary-soft); }

/* ── Adjuster action strip ───────────────────────────────────────────────────── */
.action-strip { display:flex; align-items:center; gap:10px; padding:10px 18px; background:var(--bg); border:1px solid var(--border); border-radius:10px; margin-bottom:16px; flex-wrap:wrap; }
.action-strip-label { font-size:11px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; margin-right:4px; }
.action-btn-approve { background:#16a34a !important; color:#fff !important; }
.action-btn-approve:hover { filter:brightness(1.1); }
.action-btn-docs    { background:var(--amber) !important; color:#fff !important; }
.action-btn-docs:hover { filter:brightness(1.1); }
.action-btn-deny    { background:var(--red) !important; color:#fff !important; }
.action-btn-deny:hover { filter:brightness(1.1); }

/* ── Claim action modal ──────────────────────────────────────────────────────── */
.action-modal { margin-bottom:16px; }
.action-modal-card { background:#fff; border:1.5px solid var(--border); border-radius:12px; padding:20px 22px; box-shadow:0 4px 20px rgba(0,0,0,.08); }
.action-modal-title { font-size:15px; font-weight:700; margin-bottom:14px; }
.action-modal-btns { display:flex; justify-content:flex-end; gap:10px; margin-top:14px; }
.form-label { display:block; font-size:12px; font-weight:600; color:var(--ink-2); margin-bottom:5px; }

/* ── Step note box ───────────────────────────────────────────────────────────── */
.step-note-box { margin:20px 0 4px; padding:14px 16px; background:var(--bg); border:1px solid var(--border); border-radius:10px; }
.step-note-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.step-note-meta { font-size:11px; color:var(--muted); }
.step-note-box textarea { width:100%; box-sizing:border-box; min-height:72px; resize:vertical; margin-bottom:8px; }

/* ── Claimant documents section ─────────────────────────────────────────────── */
.docs-section-card { background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:16px 20px; }
.docs-section-header { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.docs-section-title { font-size:13px; font-weight:700; color:var(--ink); }
.docs-section-body { display:flex; flex-direction:column; gap:6px; }
.doc-uploaded-row { display:flex; align-items:flex-start; gap:10px; padding:8px 10px; background:var(--bg); border:1px solid var(--border); border-radius:8px; }
.doc-row-uploaded { background:var(--primary-light,#f0f9ff) !important; border-color:var(--primary-soft,#bae6fd) !important; }
