:root {
  --bg:           #000000;
  --panel:        #0a0a0b;
  --panel2:       #101012;
  --panel-hover:  #16161a;
  --border:       #1c1c20;
  --border-strong:#2a2a30;
  --text:         #ededed;
  --muted:        #7a7a85;
  --muted-dim:    #52525a;
  --accent:       #10b981;
  --accent-dim:   #059669;
}

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "cv02","cv03","cv04","cv11";
  letter-spacing: -0.005em;
}

/* Action buttons in the table — quieter, monochrome, accent on hover. */
.action-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 7px;
  min-width: 48px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 120ms, background 120ms, color 120ms, transform 80ms;
}
.action-btn:hover {
  border-color: var(--border-strong);
  background: var(--panel-hover);
  color: var(--text);
}
.action-btn:active { transform: scale(0.96); }
.action-btn .action-label {
  font-size: 10px;
  color: inherit;
}
.action-active {
  border-color: var(--accent);
  background: rgba(16, 185, 129, 0.12);
  color: var(--text);
}
.action-active .action-label { color: var(--text); }

.action-maps:hover {
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(248, 113, 113, 0.06);
  color: #fca5a5;
}
.action-maps svg { color: #f87171; }

/* Hover hints on disposition buttons preview the outcome color. */
.action-no_pickup:hover {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24;
}
.action-not_interested:hover {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.08);
  color: #f87171;
}
.action-booked:hover {
  border-color: var(--accent);
  background: rgba(16, 185, 129, 0.10);
  color: var(--accent);
}

/* HTMX swap nicety: no layout flash on outerHTML row swap */
tr.htmx-swapping { opacity: 0.4; transition: opacity 100ms; }

/* Subtle panel border via box-shadow — crisper than 1px border at this elevation. */
.panel-edge {
  box-shadow: 0 0 0 1px var(--border), 0 1px 0 0 rgba(255,255,255,0.02) inset;
}

/* Status dot — used in row hours + status pill. */
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  flex: 0 0 6px;
}

/* Compact status pill — gray tint + colored dot, never a full color wash. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
}
.pill .dot { width: 5px; height: 5px; }

/* ── Row outcome states ────────────────────────────────────────────────
   Each dispositioned outcome gets its own visual identity so a caller
   scanning the queue sees at a glance: bright = next to dial, dimmed +
   coloured stripe = already handled. Specificity bumped with the
   [data-outcome] attribute selector so we beat plain Tailwind utilities. */

tr.lead-row {
  position: relative;
}
tr.lead-row[data-outcome] > td:first-child {
  position: relative;
}
tr.lead-row[data-outcome] > td:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
}

/* BOOKED — celebrate it. Faint green wash + bright accent name + stripe. */
tr.lead-row[data-outcome="booked"] {
  background: rgba(16, 185, 129, 0.04);
}
tr.lead-row[data-outcome="booked"]:hover {
  background: rgba(16, 185, 129, 0.08);
}
tr.lead-row[data-outcome="booked"] > td:first-child::before {
  background: var(--accent);
}
tr.lead-row[data-outcome="booked"] .lead-name {
  color: var(--accent) !important;
}

/* CALLED — gray it out, it's handled but unremarkable. */
tr.lead-row[data-outcome="called"] > td:first-child::before {
  background: var(--muted-dim);
}
tr.lead-row[data-outcome="called"] .lead-name {
  color: var(--muted) !important;
}
tr.lead-row[data-outcome="called"] .lead-phone {
  color: var(--muted) !important;
}
tr.lead-row[data-outcome="called"] .lead-hours {
  opacity: 0.5;
}

/* NO PICKUP — amber stripe, partially faded; clearly retry-able. */
tr.lead-row[data-outcome="no_pickup"] > td:first-child::before,
tr.lead-row[data-outcome="no_answer"] > td:first-child::before {
  background: #f59e0b;
}
tr.lead-row[data-outcome="no_pickup"] .lead-name,
tr.lead-row[data-outcome="no_answer"] .lead-name {
  color: rgba(245, 158, 11, 0.9) !important;
}
tr.lead-row[data-outcome="no_pickup"] .lead-phone,
tr.lead-row[data-outcome="no_answer"] .lead-phone {
  color: var(--muted) !important;
}
tr.lead-row[data-outcome="no_pickup"] .lead-hours,
tr.lead-row[data-outcome="no_answer"] .lead-hours {
  opacity: 0.5;
}

/* NOT INTERESTED — red stripe, red strikethrough name, faint red row wash.
   These dudes didn't want it. Visually dead at a glance. */
tr.lead-row[data-outcome="not_interested"] {
  background: rgba(239, 68, 68, 0.04);
}
tr.lead-row[data-outcome="not_interested"]:hover {
  background: rgba(239, 68, 68, 0.08);
}
tr.lead-row[data-outcome="not_interested"] > td:first-child::before {
  background: #ef4444;
}
tr.lead-row[data-outcome="not_interested"] .lead-name {
  color: rgba(239, 68, 68, 0.85) !important;
  text-decoration: line-through;
  text-decoration-color: rgba(239, 68, 68, 0.45);
  text-decoration-thickness: 1.5px;
}
tr.lead-row[data-outcome="not_interested"] .lead-phone {
  color: var(--muted-dim) !important;
  text-decoration: line-through;
  text-decoration-color: rgba(82, 82, 90, 0.5);
}
tr.lead-row[data-outcome="not_interested"] .lead-hours {
  opacity: 0.4;
}

/* Outcome pills — text labels next to the business name. */
.outcome-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.4;
  border: 1px solid transparent;
  white-space: nowrap;
}
.outcome-new {
  color: var(--muted);
  border-color: var(--border);
  background: var(--panel2);
}
.outcome-booked {
  color: #04231a;
  background: var(--accent);
  border-color: var(--accent);
}
.outcome-no_pickup {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.10);
  border-color: rgba(245, 158, 11, 0.35);
}
.outcome-not_interested {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.40);
}
/* Legacy buckets — still rendered for any pre-migration row that slipped through. */
.outcome-called {
  color: var(--muted);
  background: rgba(82, 82, 90, 0.12);
  border-color: rgba(82, 82, 90, 0.4);
}
.outcome-no_answer {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.10);
  border-color: rgba(245, 158, 11, 0.35);
}

/* Hero card subtle accent glow when there's a next lead to call. */
.hero-glow {
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(16,185,129,0.06), transparent 50%),
    radial-gradient(80% 60% at 100% 100%, rgba(16,185,129,0.04), transparent 50%),
    var(--panel);
}

/* Day-grid cell (compressed sidebar). */
.day-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  width: 32px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid transparent;
  transition: color 120ms, border-color 120ms, background 120ms;
}
.day-cell:hover {
  color: var(--text);
  background: var(--panel-hover);
}
.day-cell.is-today {
  color: var(--text);
  border-color: var(--border-strong);
}
.day-cell.is-active {
  background: var(--accent);
  color: #04231a;
  border-color: var(--accent);
}
