/* styles.css  --  KT Demo Kit
   Dark premium theme. 8px grid. 300ms transitions. */

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── CSS Variables ───────────────────────────────────── */
:root {
  --bg:         #0b1020;
  --card:       #141b2e;
  --card-hover: #1a2340;
  --accent:     #2563eb;
  --accent-dim: #1d4ed8;
  --amber:      #d97706;
  --amber-bg:   #1a1200;
  --success:    #059669;
  --success-bg: #001a0d;
  --danger:     #dc2626;
  --hot:        #ef4444;
  --hot-bg:     #2a0000;
  --text:       #e6e9f0;
  --text-muted: #6b7280;
  --text-dim:   #94a3b8;
  --border:     #1e2a42;
  --border-dim: #0f1a2e;
  --shadow:     0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-sm:  0 2px 8px rgba(0, 0, 0, 0.3);
  --radius:     12px;
  --radius-sm:  8px;
  --radius-xs:  4px;

  /* Spacing (8px grid) */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 40px;
  --s6: 48px;

  /* Font */
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
}

/* ── Base ────────────────────────────────────────────── */
html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Top bar ─────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 var(--s3);
  gap: var(--s2);
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar-left {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.topbar-left span {
  color: var(--accent);
}

.scene-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text);
  background: var(--card-hover);
}

.tab-btn.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--s1);
  flex-shrink: 0;
}

#vertical-select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 5px 10px;
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

#vertical-select:hover {
  border-color: var(--accent);
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 7px 16px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  outline: none;
  white-space: nowrap;
}

.btn:hover:not(:disabled) {
  background: var(--accent-dim);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

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

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(37, 99, 235, 0.1);
}

.btn-lg {
  padding: 10px 22px;
  font-size: 14px;
}

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

/* ── Card ────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--s3);
  transition: border-color 0.3s;
}

.card-active {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 1px var(--accent), var(--shadow);
}

/* ── Main content ────────────────────────────────────── */
.main-content {
  margin-top: 56px;
  height: calc(100vh - 56px);
  overflow: hidden;
  position: relative;
}

/* ── Scenes ──────────────────────────────────────────── */
.scene {
  display: none;
  flex-direction: column;
  height: 100%;
  padding: var(--s3);
  gap: var(--s3);
  overflow: hidden;
}

.scene.active {
  display: flex;
}

.panel-header {
  margin-bottom: var(--s2);
}

.panel-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

/* ── Scene footer (action buttons) ──────────────────── */
.scene-footer {
  display: flex;
  gap: var(--s2);
  justify-content: center;
  flex-shrink: 0;
  padding-top: var(--s1);
}

/* ── Scene 1: Intake ─────────────────────────────────── */
.scene-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Form */
#intake-form {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  flex: 1;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-row label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-input {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 8px 12px;
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.panel-actions {
  display: flex;
  gap: var(--s1);
  margin-top: var(--s2);
  flex-wrap: wrap;
}

/* PDF chip */
.pdf-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--s1);
  padding: 8px 12px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: var(--radius-xs);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pdf-chip.visible {
  opacity: 1;
}

.file-icon-badge {
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

.file-name-text {
  font-size: 12px;
  color: var(--text-dim);
}

/* Shimmer bar */
.shimmer-bar {
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  color: var(--text-muted);
  background: linear-gradient(90deg, var(--card) 25%, #1e2f50 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease infinite;
}

/* Table */
.table-scroll {
  flex: 1;
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th {
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.07em;
  padding: 8px 12px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}

.data-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-dim);
  color: var(--text);
  white-space: nowrap;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.row-new {
  animation: row-slide-in 0.4s ease forwards;
}

.row-highlight td {
  background: rgba(37, 99, 235, 0.12) !important;
  transition: background 2s ease;
}

/* ── Scene 2: Weekly Report ──────────────────────────── */
.scene-layout-report {
  display: grid;
  grid-template-columns: 220px 48px 1fr;
  gap: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.sources-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-right: 0;
}

.source-cards-list {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  height: 100%;
  justify-content: space-evenly;
}

.source-card {
  padding: var(--s2);
  flex: 0 0 auto;
}

.source-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: var(--s1);
}

.source-stat {
  font-size: 12px;
  color: var(--text-dim);
  padding: 2px 0;
}

/* Connector column */
.connector-column {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  padding: 0 4px;
}

.connector-beam {
  height: 2px;
  width: 0;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.4s ease;
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.6);
}

.connector-beam.active {
  width: 100%;
}

/* Report panel */
.report-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-left: var(--s1);
}

.report-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.empty-state {
  color: var(--text-muted);
  font-size: 13px;
  padding: var(--s4) 0;
  text-align: center;
}

.report-section {
  margin-bottom: var(--s3);
}

.report-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: var(--s1);
}

.report-stats {
  display: flex;
  gap: var(--s3);
}

.report-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Trend chart */
.trend-chart {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  height: 80px;
}

.trend-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.trend-bar-outer {
  flex: 1;
  width: 100%;
  background: var(--bg);
  border-radius: 3px;
  display: flex;
  align-items: flex-end;
  min-height: 0;
  height: 56px;
}

.trend-bar-inner {
  width: 100%;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  opacity: 0.85;
  animation: bar-grow 0.5s ease forwards;
  transform-origin: bottom;
}

.trend-day {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.trend-val {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
}

/* Anomaly callout */
.anomaly-callout {
  background: var(--amber-bg);
  border: 1px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: var(--s2);
  color: var(--amber);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.anomaly-icon {
  font-weight: 900;
  font-size: 14px;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--amber);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* Email card */
.email-card {
  margin-top: var(--s2);
  padding: var(--s2);
  background: rgba(5, 150, 105, 0.1);
  border: 1px solid var(--success);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.email-card.slide-up {
  opacity: 1;
  transform: translateY(0);
}

.email-icon {
  font-size: 16px;
}

/* ── Scene 3: Follow-up chain ────────────────────────── */
.scene-centered {
  display: flex;
  justify-content: center;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.timeline-panel {
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  height: fit-content;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-node {
  display: flex;
  align-items: flex-start;
  gap: var(--s2);
  padding: var(--s2) 0;
  position: relative;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.timeline-node.node-appear {
  opacity: 1;
  transform: translateY(0);
}

.timeline-node::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 36px;
  bottom: -8px;
  width: 2px;
  background: var(--border);
}

.timeline-node:last-child::before {
  display: none;
}

.node-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg);
  flex-shrink: 0;
  margin-top: 3px;
  position: relative;
  z-index: 1;
}

.node-accent .node-dot {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.15);
}

.node-hot .node-dot {
  border-color: var(--hot);
  background: rgba(239, 68, 68, 0.15);
}

.node-body {
  flex: 1;
}

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

.node-hot .node-text {
  color: var(--hot);
  font-weight: 600;
}

.node-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.day-counter {
  font-size: 12px;
  color: var(--text-muted);
  padding: var(--s1) 0 var(--s1) var(--s4);
  font-style: italic;
  animation: pulse 0.5s ease;
}

/* Queue card */
.queue-card-wrap {
  margin-top: var(--s2);
  padding: var(--s2);
  border: 1px solid var(--hot);
  border-radius: var(--radius-sm);
  background: var(--hot-bg);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.queue-card-wrap.slide-up {
  opacity: 1;
  transform: translateY(0);
}

.hot-tag {
  display: inline-block;
  background: var(--hot);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.queue-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.queue-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Scene 4: Lead Routing ───────────────────────────── */
.leads-stage {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  padding-bottom: var(--s3);
}

.leads-intro {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  width: 100%;
}

.leads-arena {
  display: grid;
  grid-template-columns: 1fr 280px 1fr;
  gap: var(--s3);
  width: 100%;
  min-height: 300px;
}

.arena-col {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.col-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: var(--s1) var(--s2);
  border-radius: var(--radius-xs);
  text-align: center;
}

.col-header-nurture {
  color: var(--text-muted);
  background: var(--border-dim);
}

.col-header-queue {
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid var(--success);
}

.col-slot {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.arena-center {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  align-items: center;
}

/* Lead cards */
.lead-card {
  width: 260px;
  padding: var(--s2);
  opacity: 0;
  transform: translateY(-16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.lead-card.card-visible {
  opacity: 1;
  transform: translateY(0);
}

.lead-card.in-column {
  width: 100%;
  opacity: 1;
  transform: none;
}

.lead-text {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: var(--s2);
}

.score-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  float: right;
  margin: -4px 0 var(--s1) var(--s2);
}

.score-high {
  border-color: var(--success);
  background: var(--success-bg);
}

.score-low {
  border-color: var(--amber);
  background: var(--amber-bg);
}

.score-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.score-high .score-val {
  color: var(--success);
}

.score-low .score-val {
  color: var(--amber);
}

.score-label {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 1px;
}

.cal-chip {
  margin-top: var(--s1);
  padding: 5px 10px;
  background: rgba(5, 150, 105, 0.1);
  border: 1px solid var(--success);
  border-radius: var(--radius-xs);
  font-size: 11px;
  color: var(--success);
  clear: both;
}

/* ── Notes drawer ────────────────────────────────────── */
.notes-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0d1526;
  border-top: 1px solid var(--border);
  padding: var(--s2) var(--s3);
  z-index: 200;
  transform: translateY(0);
  transition: transform 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.notes-drawer.hidden {
  transform: translateY(100%);
  pointer-events: none;
}

.notes-header {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
}

.notes-content {
  font-size: 14px;
  color: var(--text);
  line-height: 1.65;
  max-width: 800px;
}

/* Keyboard hint */
.keyboard-hint {
  position: fixed;
  bottom: 12px;
  right: 16px;
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.3;
  pointer-events: none;
  z-index: 150;
}

/* ── Keyframe animations ─────────────────────────────── */
@keyframes row-slide-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bar-grow {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

.fade-in {
  animation: fade-in 0.4s ease forwards;
}

/* ── Scene 5: After-Hours Call ───────────────────────── */
.call-layout {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--s2);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.call-left {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.call-middle {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.call-right {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  min-height: 0;
  overflow-y: auto;
}

/* Phone card */
.call-phone-card {
  display: flex;
  flex-direction: column;
}

.call-caller-line {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  padding: var(--s2) 0 var(--s1);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.call-answered-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(5, 150, 105, 0.12);
  border: 1px solid var(--success);
  border-radius: var(--radius-xs);
  font-size: 12px;
  color: var(--success);
  font-weight: 600;
  margin-top: var(--s1);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.call-answered-chip.visible {
  opacity: 1;
}

/* Ring pulse on phone card */
@keyframes ring-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(37, 99, 235, 0.55), var(--shadow); }
  50%  { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0),   var(--shadow); }
  100% { box-shadow: 0 0 0 0   rgba(37, 99, 235, 0),   var(--shadow); }
}

.ring-pulse {
  animation: ring-pulse 0.9s ease-in-out 3;
}

/* Transcript */
.call-transcript-card {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.call-transcript-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding-top: var(--s1);
}

@keyframes transcript-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.call-transcript-line {
  font-size: 13px;
  line-height: 1.55;
  opacity: 0;
  animation: transcript-fade 0.3s ease forwards;
}

.call-transcript-line .tl-who {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 3px;
}

.call-transcript-line.tl-caller .tl-who {
  color: var(--text-muted);
}

.call-transcript-line.tl-system .tl-who {
  color: var(--accent);
}

.call-transcript-line .tl-text {
  color: var(--text);
}

/* Extracted details */
.call-extracted-card {
  flex-shrink: 0;
}

.call-fields-list {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}

@keyframes field-reveal-flash {
  0%   { opacity: 1; border-color: var(--accent); background: rgba(37, 99, 235, 0.12); }
  55%  { opacity: 1; border-color: var(--accent); background: rgba(37, 99, 235, 0.06); }
  100% { opacity: 1; border-color: var(--border-dim); background: transparent; }
}

.call-field-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
  opacity: 0;
}

.call-field-row.field-visible {
  animation: field-reveal-flash 0.85s ease forwards;
}

.call-field-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.call-field-value {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

/* Triage */
.call-triage-card {
  flex-shrink: 0;
}

.call-triage-content {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}

.call-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 3px;
}

.call-badge-emergency {
  background: rgba(217, 119, 6, 0.15);
  color: var(--amber);
  border: 1px solid var(--amber);
}

.call-badge-routine {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.call-triage-text {
  font-size: 13px;
  color: var(--text);
  margin-top: var(--s1);
}

/* Notification card (Slack/Teams style) */
@keyframes notify-slide {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.call-notify-wrap {
  margin-top: var(--s1);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.call-notify-wrap.notify-visible {
  opacity: 1;
  transform: translateY(0);
}

.call-notify-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: var(--s2);
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-sm);
}

.notify-avatar-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.notify-body {
  flex: 1;
  min-width: 0;
}

.notify-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.notify-synopsis {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
  line-height: 1.5;
}

.notify-timestamp {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 3px;
}

.cal-booking-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--s1);
  padding: 5px 12px;
  background: rgba(5, 150, 105, 0.1);
  border: 1px solid var(--success);
  border-radius: var(--radius-xs);
  font-size: 12px;
  color: var(--success);
  font-weight: 500;
}

/* Queue */
.call-queue-card {
  flex-shrink: 0;
}

.call-queue-list {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}

.call-queue-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
}

.call-queue-row.row-priority {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.06);
  animation: row-slide-in 0.4s ease forwards;
}

.call-queue-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.call-queue-note {
  font-size: 11px;
  color: var(--text-muted);
}

/* Responsive: stack to 1-col under 900px */
@media (max-width: 900px) {
  .call-layout {
    grid-template-columns: 1fr;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .call-left,
  .call-middle,
  .call-right {
    overflow: visible;
    min-height: unset;
  }
  .call-transcript-card {
    min-height: 200px;
  }
}

/* ── Utilities ───────────────────────────────────────── */
.hidden {
  display: none !important;
}

.clearfix::after {
  content: '';
  display: block;
  clear: both;
}

/* ── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
