/* Blue Hope Suite - Family Satisfaction Survey
   Staff outreach console. Own stylesheet, no shared dependency. */

:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --slate: #64748b;
  --slate-2: #94a3b8;

  --line: #e2e8f0;
  --line-2: #f1f5f9;

  --canvas: #f6f8fb;
  --surface: #ffffff;

  --blue: #1d4ed8;
  --blue-2: #2563eb;
  --blue-tint: #eff4ff;

  --violet: #6d28d9;
  --violet-tint: #f4efff;

  --amber: #b45309;
  --amber-tint: #fff7ed;

  --green: #047857;
  --green-tint: #ecfdf5;

  --red: #b91c1c;
  --red-tint: #fef2f2;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --panel-w: 440px;
  --suite-sidebar-w: 218px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body { padding-left: var(--suite-sidebar-w); }

button, input, select, textarea { font: inherit; color: inherit; }

.num { font-variant-numeric: tabular-nums; }

:focus-visible {
  outline: 2px solid var(--blue-2);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---------- top bar ---------- */

.suite-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1200;
  display: flex;
  width: var(--suite-sidebar-w);
  flex-direction: column;
  padding: 16px 12px;
  overflow-y: auto;
  background: linear-gradient(180deg, #102a56 0%, #153f7a 58%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 8px 0 28px rgba(15, 23, 42, .14);
}

.suite-brand img {
  display: block;
  width: 100%;
  height: 104px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 12px;
  object-fit: cover;
  object-position: center;
}

.suite-nav-label {
  margin: 24px 10px 8px;
  color: rgba(255, 255, 255, .58);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.suite-nav,
.suite-admin-nav {
  display: grid;
  gap: 7px;
}

.suite-admin-nav {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .15);
}

.suite-nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, .78);
  text-align: left;
  cursor: pointer;
}

.suite-nav-item:hover,
.suite-nav-item.is-active {
  border-color: rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .13);
  color: #fff;
}

.suite-nav-item span:last-child {
  display: grid;
  min-width: 0;
}

.suite-nav-item strong { font-size: 13px; }
.suite-nav-item small {
  overflow: hidden;
  color: rgba(255, 255, 255, .62);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suite-nav-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, .16);
  font-size: 12px;
  font-weight: 800;
}

.suite-user {
  display: grid;
  gap: 2px;
  margin-top: auto;
  padding: 14px 10px 4px;
  border-top: 1px solid rgba(255, 255, 255, .16);
}

.suite-user strong { font-size: 12px; }
.suite-user span {
  color: rgba(255, 255, 255, .62);
  font-size: 10px;
}

.context-tabs {
  position: fixed;
  z-index: 1050;
  top: 150px;
  right: 0;
  display: grid;
  gap: 0;
  width: 48px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px 0 0 12px;
  background: transparent;
  box-shadow: var(--shadow);
}

.context-tabs button {
  position: relative;
  display: grid;
  min-height: 112px;
  place-items: center;
  gap: 3px;
  padding: 9px 5px;
  border: 0;
  border-radius: 0;
  background: #334155;
  color: #fff;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.05;
  text-align: center;
}

.context-tabs button:hover,
.context-tabs button.is-active {
  filter: brightness(1.08);
  color: #fff;
}

.context-tabs button:nth-child(1) { background: #7c3aed; }
.context-tabs button:nth-child(2) { background: #2563eb; }
.context-tabs button:nth-child(3) { background: #16a34a; }
.context-tabs button:nth-child(4) { background: #0f172a; }

.context-tabs button > span:not(.context-tab-icon) {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-transform: uppercase;
}

.context-tab-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.context-tabs b {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 17px;
  padding: 1px 4px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
}

.context-tabs b:empty,
.context-tabs b[data-count="0"] { display: none; }

.context-drawer {
  position: fixed;
  z-index: 1100;
  top: 0;
  right: 0;
  width: min(390px, calc(100vw - var(--suite-sidebar-w)));
  height: 100vh;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -18px 0 50px rgba(15, 23, 42, .18);
}

.context-drawer.is-hidden { display: none; }

.context-drawer > header {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
}

.context-drawer h2 {
  margin: 2px 0 0;
  font-size: 18px;
}

.context-drawer-body { padding: 18px 20px 30px; }

.context-empty {
  padding: 28px 14px;
  color: var(--slate);
  font-size: 12px;
  text-align: center;
}

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

.context-item {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.context-item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}

.context-item p {
  margin: 5px 0 0;
  color: var(--slate);
  font-size: 11px;
  line-height: 1.45;
}

.context-item textarea {
  width: 100%;
  min-height: 72px;
  margin-top: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  resize: vertical;
}

.ai-controls {
  display: grid;
  gap: 10px;
}

.ai-controls textarea {
  width: 100%;
  min-height: 72px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  resize: vertical;
}

.ai-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ai-result {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  background: #eef2ff;
}

.ai-result h3 { margin: 0 0 8px; font-size: 14px; }
.ai-result p, .ai-result li { font-size: 12px; line-height: 1.5; }
.ai-result ul { margin: 6px 0 12px; padding-left: 18px; }
.ai-result-output {
  max-height: 42vh;
  overflow: auto;
  white-space: pre-wrap;
}

.ai-safety {
  margin-bottom: 12px;
  padding: 10px;
  border-left: 3px solid var(--blue);
  background: var(--blue-tint);
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.45;
}

.question-guide {
  margin: 0;
  padding-left: 22px;
}

.question-guide li {
  margin-bottom: 12px;
  padding-left: 4px;
  color: var(--ink-2);
  font-size: 12px;
}

.question-builder-notice {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #a5b4fc;
  border-radius: 9px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
}

.question-builder-meta,
.question-editor-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
}

.question-builder-meta label,
.question-editor-grid label {
  color: var(--slate);
  font-size: 11px;
  font-weight: 600;
}

.question-builder-meta .control,
.question-editor-grid .control { width: 100%; margin-top: 5px; }

.question-builder-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 10px;
}

.question-builder-heading h3 { margin: 0; }

.question-editor-row {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfdff;
}

.question-editor-row > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.question-editor-row > header > div { display: flex; gap: 5px; }
.question-editor-row textarea { width: 100%; min-height: 68px; }

@media (max-width: 760px) {
  .question-builder-meta,
  .question-editor-grid { grid-template-columns: 1fr; }
}

.guide-attestation {
  position: sticky;
  bottom: 0;
  margin: 20px -4px 0;
  padding: 13px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
}

.suite-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .68);
}

.suite-modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .3);
}

.suite-modal-wide { width: min(980px, 100%); }

.suite-modal > header,
.suite-modal > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.suite-modal > footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.suite-modal > header h2 { margin: 0; font-size: 18px; }
.suite-modal-body { padding: 20px; }

.user-grid {
  display: grid;
  gap: 9px;
  margin-bottom: 20px;
}

.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.user-row small { display: block; color: var(--slate); }

.user-row > div:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-editor-actions { display: flex; gap: 8px; margin-left: auto; }

.temporary-password {
  padding: 12px;
  border: 1px solid #86efac;
  border-radius: 9px;
  background: #f0fdf4;
  color: #166534;
  word-break: break-all;
}

.integration-notice {
  display: grid;
  gap: 4px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid #fbbf24;
  border-radius: 9px;
  background: #fffbeb;
  color: #92400e;
  font-size: 11px;
  line-height: 1.45;
}

.cycle-section + .cycle-section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.cycle-section h3 { margin: 0 0 6px; }

.campaign-range {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  padding: 11px 13px;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  background: #eff6ff;
  font-size: 12px;
}

.campaign-range span { color: var(--slate); font-weight: 700; }
.campaign-range strong { color: var(--blue); }

.cycle-controls {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin: 15px 0;
}

.cycle-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}

.cycle-controls input { width: 86px; }

.cycle-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
  padding: 12px;
  border-radius: 10px;
  background: var(--blue-tint);
}

.cycle-summary strong { color: var(--blue); font-size: 20px; }
.cycle-summary span { color: var(--red); }
.cycle-summary small { margin-left: auto; color: var(--slate); }

.cycle-roster {
  display: grid;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.cycle-history-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.cycle-history-title p { margin: 0; }

.cycle-downloads {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cycle-history {
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.cycle-history-head,
.cycle-history-row {
  display: grid;
  grid-template-columns: minmax(190px, 2fr) repeat(3, minmax(70px, 1fr));
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
}

.cycle-history-head {
  background: #f8fafc;
  color: var(--slate);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.cycle-history-row {
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.history-complete { color: #15803d; font-weight: 800; }
.history-missing { color: #dc2626; font-weight: 800; }

.cycle-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}

.cycle-row:last-child { border-bottom: 0; }
.cycle-row.is-complete { background: #f0fdf4; }
.cycle-row.is-missing { background: #fff7f7; }
.cycle-row small { display: block; color: var(--slate); }
.cycle-row-status { font-size: 11px; font-weight: 700; }
.cycle-row.is-complete .cycle-row-status, .cycle-row.is-complete .cycle-dot { color: #15803d; }
.cycle-row.is-missing .cycle-row-status, .cycle-row.is-missing .cycle-dot { color: #dc2626; }

.cycle-dot {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  font-weight: 900;
}

.distribution-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 9px;
  margin: 14px 0;
}

.distribution-filters label {
  color: var(--slate);
  font-size: 10px;
  font-weight: 700;
}

.distribution-filters .control { width: 100%; margin-top: 5px; }

.allocation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.bulk-outreach-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0;
}

.bulk-outreach-controls label {
  color: var(--slate);
  font-size: 11px;
  font-weight: 600;
}

.bulk-outreach-controls .control { width: 100%; margin-top: 5px; }

.bulk-preview {
  display: grid;
  gap: 7px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fafc;
}

.bulk-preview span { color: var(--slate); font-size: 12px; }

.allocation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.allocation-row small { display: block; color: var(--slate); }
.allocation-row input { width: 86px; }
.compact-check { margin: 10px 0 14px; }

.call-survey-choice {
  display: grid;
  gap: 7px;
  margin-top: 15px;
  padding: 13px;
  border: 1px solid #c4b5fd;
  border-radius: 10px;
  background: #f5f3ff;
  color: #4c1d95;
  font-size: 11px;
  line-height: 1.45;
}

.call-survey-choice .btn { width: max-content; margin-top: 3px; }

.assist-call-live {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 13px;
  padding: 9px 11px;
  border: 1px solid #86efac;
  border-radius: 9px;
  background: #f0fdf4;
  color: #166534;
  font-size: 11px;
}

.assist-call-live > strong {
  margin-left: auto;
  font-size: 16px;
}

.cycle-indicator {
  display: block;
  width: max-content;
  margin-top: 5px;
  font-size: 10px;
  font-weight: 800;
}

.cycle-indicator.is-complete { color: #15803d; }
.cycle-indicator.is-missing { color: #dc2626; }

.roster tr.cycle-complete td:first-child { box-shadow: inset 4px 0 #22c55e; }
.roster tr.cycle-incomplete td:first-child { box-shadow: inset 4px 0 #ef4444; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.topbar-title { display: flex; flex-direction: column; gap: 2px; }

.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--slate-2);
}

.topbar-title h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.01em;
}

.topbar-spacer { flex: 1; }

.field-inline { display: flex; align-items: center; gap: 8px; }

.field-inline label { font-size: 12px; color: var(--slate); }

select.control, input.control, textarea.control {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  color: var(--ink);
}

select.control:hover, input.control:hover { border-color: var(--slate-2); }

.flag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--amber-tint);
  border: 1px solid #fed7aa;
  color: var(--amber);
  font-size: 11px;
  font-weight: 600;
}

.flag-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--amber);
}

/* ---------- counters ---------- */

.counters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.counter {
  background: var(--surface);
  padding: 14px 24px;
}

.counter-value {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -.02em;
}

.counter-label {
  font-size: 11px;
  color: var(--slate);
  margin-top: 1px;
}

.counter.is-warn .counter-value { color: var(--amber); }
.counter.is-done .counter-value { color: var(--green); }

/* ---------- layout ---------- */

.workspace {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 24px 40px;
}

.queue { flex: 1; min-width: 0; }

.panel-slot {
  width: var(--panel-w);
  flex: 0 0 var(--panel-w);
  position: sticky;
  top: 20px;
}

/* ---------- filters ---------- */

.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 550;
  color: var(--ink-2);
  cursor: pointer;
}

.chip:hover { border-color: var(--slate-2); }

.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.chip-count {
  color: var(--slate-2);
  margin-left: 5px;
  font-variant-numeric: tabular-nums;
}

.chip[aria-pressed="true"] .chip-count { color: rgba(255,255,255,.65); }

.search {
  margin-left: auto;
  min-width: 220px;
}

/* ---------- table ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

table.roster {
  width: 100%;
  border-collapse: collapse;
}

table.roster thead th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--slate-2);
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: #fcfdff;
  white-space: nowrap;
}

table.roster tbody tr {
  cursor: pointer;
  border-bottom: 1px solid var(--line-2);
}

table.roster tbody tr:last-child { border-bottom: 0; }
table.roster tbody tr:hover { background: #fafcff; }

table.roster tbody tr.is-active {
  background: var(--blue-tint);
  box-shadow: inset 3px 0 0 var(--blue);
}

table.roster td {
  padding: 12px 16px;
  vertical-align: middle;
}

.who-name { font-weight: 600; }

.who-sub {
  font-size: 12px;
  color: var(--slate);
  margin-top: 1px;
}

.muted { color: var(--slate); }
.tiny { font-size: 12px; }

.overdue { color: var(--red); font-weight: 600; }

.empty {
  padding: 44px 24px;
  text-align: center;
  color: var(--slate);
}

.empty strong { display: block; color: var(--ink); margin-bottom: 4px; }

/* ---------- status chips ---------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}

.status::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.s-neutral { background: var(--line-2); color: var(--slate); border-color: var(--line); }
.s-blue    { background: var(--blue-tint); color: var(--blue); border-color: #dbe6ff; }
.s-amber   { background: var(--amber-tint); color: var(--amber); border-color: #fed7aa; }
.s-green   { background: var(--green-tint); color: var(--green); border-color: #a7f3d0; }
.s-violet  { background: var(--violet-tint); color: var(--violet); border-color: #ddd0ff; }
.s-red     { background: var(--red-tint); color: var(--red); border-color: #fecaca; }

/* attempt ladder */

.ladder { display: inline-flex; gap: 3px; align-items: center; }

.rung {
  width: 16px; height: 16px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.rung-answered { background: var(--green); }
.rung-miss { background: var(--slate-2); }
.rung-bad { background: var(--red); }
.rung-callback { background: var(--amber); }

/* ---------- detail panel ---------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}

.panel-empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--slate);
}

.panel-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.01em;
}

.panel-close {
  float: right;
  border: 0;
  background: none;
  color: var(--slate-2);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
}

.panel-close:hover { color: var(--ink); }

.ref {
  font-size: 11px;
  color: var(--slate-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.panel-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fcfdff;
}

.meta-k {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--slate-2);
  font-weight: 600;
}

.meta-v { font-size: 13px; margin-top: 1px; }

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-body {
  overflow-y: auto;
  padding: 4px 18px 20px;
}

/* ---------- buttons ---------- */

.btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
}

.btn:hover:not(:disabled) { border-color: var(--slate-2); background: #fbfcfe; }

.btn:disabled { opacity: .45; cursor: not-allowed; }

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

.btn-primary:hover:not(:disabled) { background: #1a45c2; border-color: #1a45c2; }

.btn-violet {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}

.btn-violet:hover:not(:disabled) { background: #5b21b6; border-color: #5b21b6; }

.btn-danger { color: var(--red); border-color: #fecaca; background: var(--red-tint); }
.btn-danger:hover:not(:disabled) { border-color: var(--red); }

.danger-zone {
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 18px;
  background: #fff7f7;
}

.danger-zone p {
  margin: 4px 0 14px;
  color: #7f1d1d;
  line-height: 1.55;
}

.reset-warning {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff1f2;
  color: #7f1d1d;
  line-height: 1.45;
}

.btn-sm { padding: 5px 9px; font-size: 12px; }

/* ---------- section head ---------- */

.sec {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 20px 0 10px;
}

.sec h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.sec .badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--slate);
  background: var(--line-2);
  border-radius: 999px;
  padding: 2px 7px;
  letter-spacing: .04em;
}

/* ---------- evidence trail (signature) ---------- */

.trail { list-style: none; margin: 0; padding: 0 0 0 20px; position: relative; }

.trail::before {
  content: "";
  position: absolute;
  left: 4px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--line);
}

.trail li { position: relative; padding: 0 0 16px 0; }

.trail li::before {
  content: "";
  position: absolute;
  left: -20px; top: 5px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--slate-2);
}

.trail li.t-blue::before { border-color: var(--blue); }
.trail li.t-green::before { border-color: var(--green); }
.trail li.t-violet::before { border-color: var(--violet); }
.trail li.t-red::before { border-color: var(--red); }
.trail li.t-amber::before { border-color: var(--amber); }

.trail li.t-correction::before {
  border-style: dashed;
  border-color: var(--amber);
}

.t-title { font-weight: 600; font-size: 13px; }

.t-when {
  font-size: 11px;
  color: var(--slate-2);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

.t-note {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 5px;
  background: var(--line-2);
  border-radius: var(--radius-sm);
  padding: 7px 9px;
}

.t-corrects {
  display: inline-block;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--amber);
  background: var(--amber-tint);
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 2px 8px;
}

.trail-foot {
  margin-top: 4px;
  font-size: 11px;
  color: var(--slate-2);
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}

/* answers list */

.answers { margin: 0; padding: 0; list-style: none; }

.answers li {
  padding: 9px 0;
  border-bottom: 1px solid var(--line-2);
}

.answers li:last-child { border-bottom: 0; }

.a-q { font-size: 12px; color: var(--slate); }
.a-v { font-weight: 600; margin-top: 2px; }

/* ---------- modal ---------- */

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.modal {
  background: var(--surface);
  border-radius: 12px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .3);
}

.modal-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 { margin: 0; font-size: 16px; font-weight: 650; }

.modal-head p { margin: 4px 0 0; font-size: 12px; color: var(--slate); }

.modal-body { padding: 18px 20px; overflow-y: auto; }

.modal-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.modal-foot .spacer { flex: 1; }

.form-row { margin-bottom: 14px; }

.form-row > label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 5px;
}

.form-row .control { width: 100%; }

.comm-provider-card {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbff;
}

.comm-provider-card h3 { margin: 0 0 6px; }
.comm-provider-card p { margin: 0 0 14px; color: var(--muted); }

.comm-status-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.comm-ready { color: #087a4b; font-weight: 700; }
.comm-pending { color: #a45406; font-weight: 700; }
.comm-check { display: block; margin: 12px 0; }

.message-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding: 4px 2px 16px;
}

.message-bubble {
  max-width: 82%;
  padding: 11px 13px;
  border-radius: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-bubble small {
  display: block;
  margin-top: 7px;
  opacity: .72;
}

.message-bubble.is-incoming {
  align-self: flex-start;
  background: #eef2f7;
}

.message-bubble.is-outgoing {
  align-self: flex-end;
  color: #fff;
  background: #2853c7;
}

.message-compose {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.message-compose textarea {
  width: 100%;
  min-height: 90px;
  margin-top: 7px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.req { color: var(--red); }

.hint { font-size: 11px; color: var(--slate); margin-top: 4px; }

.err {
  font-size: 12px;
  color: var(--red);
  background: var(--red-tint);
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 12px;
}

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

.check {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  background: var(--blue-tint);
  border: 1px solid #dbe6ff;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.check input { margin-top: 2px; }
.check span { font-size: 12px; }

/* ---------- phone survey wizard ---------- */

.wiz-progress {
  height: 3px;
  background: var(--line-2);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}

.wiz-bar {
  height: 100%;
  background: var(--violet);
  transition: width .18s ease;
}

.q-text { font-size: 15px; font-weight: 600; margin: 0 0 4px; }

.q-meta { font-size: 11px; color: var(--slate-2); margin-bottom: 14px; }

.opts { display: flex; flex-direction: column; gap: 7px; }

.opt {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
}

.opt:hover { border-color: var(--slate-2); background: #fbfcfe; }

.opt.is-picked {
  border-color: var(--violet);
  background: var(--violet-tint);
  font-weight: 600;
}

.scale { display: flex; gap: 6px; flex-wrap: wrap; }

.scale button {
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

.scale button:hover { border-color: var(--slate-2); }

.scale button.is-picked {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}

.counterline {
  font-size: 11px;
  color: var(--slate-2);
  text-align: right;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.counterline.is-over { color: var(--red); font-weight: 600; }

/* evidence packet */

pre.packet {
  background: #0f172a;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.6;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 0;
}

.evidence-report { background: #f8fafc; }

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

.evidence-summary > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.evidence-summary span,
.evidence-facts dt {
  color: var(--slate-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.evidence-summary strong { font-size: 12px; }

.evidence-section {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.evidence-section h3 {
  margin: 0 0 12px;
  font-size: 13px;
}

.evidence-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.evidence-facts div { min-width: 0; }
.evidence-facts dd { margin: 4px 0 0; font-size: 12px; }

.evidence-timeline,
.evidence-answers {
  margin: 0;
  padding: 0;
  list-style: none;
}

.evidence-timeline li {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 9px;
  padding: 0 0 13px;
}

.evidence-timeline li:last-child { padding-bottom: 0; }
.evidence-timeline strong { display: block; font-size: 12px; }
.evidence-timeline small { display: block; color: var(--slate-2); margin-top: 2px; }
.evidence-timeline p { margin: 4px 0 0; font-size: 11px; color: var(--slate); }

.evidence-dot {
  width: 9px;
  height: 9px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-tint);
}

.evidence-table-wrap { overflow-x: auto; }

.evidence-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.evidence-table th,
.evidence-table td {
  padding: 8px 7px;
  border-bottom: 1px solid var(--line-2);
  text-align: left;
  white-space: nowrap;
}

.evidence-table th {
  color: var(--slate-2);
  font-size: 9px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.evidence-answers li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 11px;
}

.evidence-answers li:last-child { border-bottom: 0; }
.evidence-answers span { color: var(--slate); }
.evidence-answers strong { text-align: right; }
.evidence-response-meta { color: var(--slate-2); font-size: 11px; }
.evidence-empty { color: var(--slate-2); font-style: italic; }

.evidence-privacy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #a7f3d0;
  border-radius: 9px;
  background: #ecfdf5;
  color: #166534;
  font-size: 11px;
}

.ai-analysis-summary {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.ai-analysis-summary p { white-space: pre-wrap; }
.ai-analysis-summary h4 { margin: 14px 0 6px; font-size: 12px; }
.ai-analysis-summary ul { margin: 0; padding-left: 18px; }
.ai-analysis-summary li { margin: 5px 0; font-size: 11px; }

.ai-analysis-summary dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 12px 0 0;
}

.ai-analysis-summary dl div {
  padding-top: 8px;
  border-top: 1px solid var(--line-2);
}

.ai-analysis-summary dt {
  color: var(--slate-2);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.ai-analysis-summary dd { margin: 3px 0 0; font-size: 11px; }

.ai-severity {
  display: inline-flex;
  margin-bottom: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #166534;
  font-size: 10px;
  font-weight: 700;
}

.ai-severity-medium { background: #fff7ed; color: #9a3412; }
.ai-severity-high,
.ai-severity-critical { background: #fef2f2; color: #b91c1c; }
.ai-result-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.ai-action-heading { margin: 14px 0 6px; font-size: 11px; color: var(--slate); }

.ai-segments {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.ai-segment {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.ai-segment header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.ai-segment header span {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--blue-tint);
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
}

.ai-segment p { margin: 7px 0; color: var(--slate); font-size: 11px; }

.ai-segment dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0;
}

.ai-segment dt {
  color: var(--slate-2);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.ai-segment dd { margin: 2px 0 0; font-size: 10px; }

.ai-segment-message {
  margin: 9px 0;
  padding: 9px;
  border-radius: 7px;
  background: #f8fafc;
  font-size: 11px;
  white-space: pre-wrap;
}

.ai-supervisor-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0;
}

.ai-supervisor-metrics div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ai-supervisor-metrics div.needs-attention {
  border-color: #fdba74;
  background: #fff7ed;
}

.ai-supervisor-metrics span { color: var(--slate-2); font-size: 9px; }
.ai-supervisor-metrics strong { font-size: 12px; }

.call-ai-choice,
.ai-live-call {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #c4b5fd;
  border-radius: 10px;
  background: #f5f3ff;
}

.call-ai-choice {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.call-ai-choice span,
.ai-live-call p { color: var(--slate); font-size: 11px; }

.ai-live-call header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.ai-live-call header span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #166534;
  font-size: 9px;
  font-weight: 700;
}

.ai-live-call textarea {
  width: 100%;
  min-height: 120px;
  margin: 9px 0;
}

.ai-live-result {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.ai-live-result > div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ai-live-result span {
  display: block;
  color: var(--slate-2);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ai-live-result p { margin: 5px 0 0; font-size: 11px; white-space: pre-wrap; }
.ai-live-concern { border-color: #fca5a5 !important; background: #fef2f2 !important; }
.ai-live-concern span { color: #b91c1c; }

@media (max-width: 640px) {
  .evidence-summary,
  .evidence-facts { grid-template-columns: 1fr; }
  .evidence-answers li { flex-direction: column; gap: 4px; }
  .evidence-answers strong { text-align: left; }
  .ai-segment dl,
  .ai-supervisor-metrics { grid-template-columns: 1fr; }
}

/* ---------- toast ---------- */

.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 80;
}

.toast {
  background: var(--ink);
  color: #fff;
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  box-shadow: var(--shadow);
  max-width: 340px;
  animation: rise .16s ease-out;
}

.toast.is-bad { background: var(--red); }

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .workspace { display: block; padding: 16px; }

  .panel-slot {
    position: fixed;
    inset: 0;
    width: auto;
    z-index: 40;
    background: rgba(15, 23, 42, .4);
    padding: 0;
  }

  .panel-slot.is-hidden { display: none; }

  .panel {
    max-height: 100vh;
    height: 100%;
    border-radius: 0;
    border: 0;
    margin-left: auto;
    max-width: 520px;
  }

  .search { margin-left: 0; width: 100%; }
}

@media (max-width: 720px) {
  .topbar { padding: 12px 16px; }
  .counter { padding: 11px 16px; }
  .hide-sm { display: none; }
  .row-2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ============================================================
   RingCentral integration
   ============================================================ */

.flag-pill.is-ok {
  background: var(--green-tint);
  border-color: #a7f3d0;
  color: var(--green);
}

.flag-pill.is-ok .flag-dot { background: var(--green); }

.flag-pill.is-live {
  background: var(--violet-tint);
  border-color: #ddd0ff;
  color: var(--violet);
}

.flag-pill.is-live .flag-dot { background: var(--violet); }

button.flag-pill { cursor: pointer; font-family: inherit; }
button.flag-pill:hover { filter: brightness(.97); }

/* gate checklist */

.gates { list-style: none; margin: 0 0 16px; padding: 0; }

.gates li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2);
}

.gates li:last-child { border-bottom: 0; }

.gate-mark {
  width: 18px; height: 18px;
  border-radius: 50%;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  margin-top: 1px;
}

.gate-ok { background: var(--green); }
.gate-wait { background: var(--amber); }
.gate-bad { background: var(--slate-2); }

.gate-title { font-weight: 600; font-size: 13px; }
.gate-note { font-size: 12px; color: var(--slate); margin-top: 2px; }

.gate-toggle { margin-left: auto; flex: 0 0 auto; }

/* live call card */

.call-card { text-align: center; padding: 8px 0 4px; }

.call-to {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}

.call-who { font-size: 13px; color: var(--slate); margin-top: 2px; }

.call-state {
  margin: 18px 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--violet);
}

.call-timer {
  font-size: 34px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

.call-src {
  margin-top: 14px;
  font-size: 11px;
  color: var(--slate-2);
}

.dots { display: inline-flex; gap: 4px; margin-left: 6px; }

.dots i {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--violet);
  animation: blink 1.1s infinite;
}

.dots i:nth-child(2) { animation-delay: .18s; }
.dots i:nth-child(3) { animation-delay: .36s; }

@keyframes blink {
  0%, 60%, 100% { opacity: .25; }
  30% { opacity: 1; }
}

/* provider-verified marker */

.verified {
  display: inline-block;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--violet);
  background: var(--violet-tint);
  border: 1px solid #ddd0ff;
  border-radius: 999px;
  padding: 2px 8px;
}

.locked {
  background: var(--line-2);
  color: var(--slate);
  cursor: not-allowed;
}

.field-note {
  font-size: 11px;
  color: var(--violet);
  font-weight: 600;
  margin-top: 4px;
}

.blocked {
  background: var(--amber-tint);
  border: 1px solid #fed7aa;
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 12.5px;
  color: var(--amber);
  margin-bottom: 14px;
}

.blocked strong { display: block; margin-bottom: 3px; }

/* ============================================================
   Persistent call bar
   ============================================================ */

.callbar {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: #fff;
  padding: 11px 14px;
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, .28);
}

.callbar.is-hidden { display: none; }

.callbar-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #34d399;
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.8); }
}

.callbar-timer {
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.callbar-who {
  font-size: 12.5px;
  color: rgba(255, 255, 255, .72);
}

.callbar .btn {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .22);
  color: #fff;
}

.callbar .btn:hover { background: rgba(255, 255, 255, .2); }

@media (max-width: 720px) {
  .callbar { left: 12px; right: 12px; bottom: 12px; border-radius: var(--radius); }
  .callbar-who { display: none; }
}

/* callback chip sits under the guardian line */
.who-sub + .status { display: inline-flex; }

/* ============================================================
   Staff-assisted survey
   ============================================================ */

.assist-banner {
  display: inline-block;
  background: var(--violet-tint);
  border: 1px solid #ddd0ff;
  color: var(--violet);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 10px;
}

.scale-ends {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--slate-2);
  margin-top: 8px;
}

.answers.review li { padding: 11px 0; }

.answers.review li.is-missing {
  border-left: 3px solid var(--red);
  padding-left: 11px;
  background: var(--red-tint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.answers.review li.is-missing .a-v { color: var(--red); }

.answers.review .btn { margin-top: 7px; }

/* ============================================================
   Building the call list
   ============================================================ */

select.control.slim { padding: 6px 9px; font-size: 12.5px; max-width: 190px; }

.sources { display: flex; flex-direction: column; gap: 10px; }

.source {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: inherit;
}

.source:hover { border-color: var(--blue); background: var(--blue-tint); }

.source-title { font-weight: 650; font-size: 14px; }
.source-note { font-size: 12.5px; color: var(--slate); line-height: 1.45; }

/* drop zone */

.drop {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  background: #fcfdff;
}

.drop.is-over { border-color: var(--blue); background: var(--blue-tint); }
.drop strong { font-size: 15px; }
.drop span { font-size: 12px; color: var(--slate); }
.drop label { cursor: pointer; }

/* roster picker */

.pick-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex;
             flex-direction: column; gap: 7px; }
.pick-list .opt { align-items: flex-start; }
.pick-list .who-name { display: block; }
.pick-list .who-sub { display: block; font-weight: 400; }

/* column mapping */

.map-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-2);
}

.map-row:last-of-type { border-bottom: 0; }
.map-label { flex: 0 0 130px; font-size: 13px; font-weight: 600; }
.map-select { flex: 1; min-width: 0; }

/* import preview */

.import-list li { padding-left: 11px; border-left: 3px solid var(--line); }
.import-list li.row-ok { border-left-color: var(--green); }
.import-list li.row-dup { border-left-color: var(--amber); background: var(--amber-tint); }
.import-list li.row-bad { border-left-color: var(--red); background: var(--red-tint); }

.row-why { font-size: 12px; color: var(--red); margin-top: 3px; font-weight: 600; }
.import-list li.row-dup .row-why { color: var(--amber); }

@media (max-width: 720px) {
  .map-row { flex-direction: column; align-items: stretch; gap: 5px; }
  .map-label { flex: none; }
  select.control.slim { max-width: none; width: 100%; }
}
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #1e1b4b 0%, #6366f1 50%, #3b82f6 100%);
}

.auth-card {
  width: min(480px, 100%);
  padding: 40px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .3);
}

.auth-brand {
  margin: -18px -18px 26px;
  text-align: center;
}

.auth-brand-logo {
  display: block;
  width: 100%;
  height: clamp(160px, 24vw, 220px);
  border-radius: 13px;
  object-fit: cover;
  object-position: center;
}

.auth-module {
  margin-bottom: 8px;
  color: #4f46e5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.auth-card h1 {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 24px;
  font-weight: 800;
}

.auth-card > p {
  margin: 0 0 20px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.auth-card .form-row label {
  display: block;
  margin: 18px 0 6px;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.auth-card input.control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
}

.auth-card input.control:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .1);
  outline: none;
}

.auth-error {
  min-height: 22px;
  margin-top: 10px;
  color: #991b1b;
  font-size: 12px;
  font-weight: 600;
}

.auth-submit {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
  padding: 13px 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  font-weight: 700;
}

.auth-submit:hover {
  box-shadow: 0 10px 25px rgba(99, 102, 241, .3);
  transform: translateY(-1px);
}

.auth-help {
  margin-top: 20px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.auth-help strong {
  display: block;
  color: #334155;
  font-size: 12px;
}

.live-loading {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  background: rgba(247, 249, 252, 0.92);
  color: #1d4ed8;
  font-weight: 700;
}

@media (max-width: 900px) {
  :root { --suite-sidebar-w: 76px; }

  .suite-sidebar { padding: 10px 8px; }
  .suite-brand img { height: 56px; }
  .suite-nav-label,
  .suite-nav-item span:last-child,
  .suite-user { display: none; }
  .suite-nav,
  .suite-admin-nav { justify-items: center; }
  .suite-nav-item {
    width: 48px;
    justify-content: center;
    padding: 9px;
  }
  .suite-admin-nav { margin-top: 12px; padding-top: 12px; }
  .workspace { padding-right: 70px; }
}

@media (max-width: 560px) {
  :root { --suite-sidebar-w: 0px; }

  body { padding-left: 0; }
  .suite-sidebar { display: none; }
  .context-drawer { width: 100vw; }
  .auth-card { padding: 26px; }
  .auth-brand { margin: -10px -10px 22px; }
}
