/* -------------------------------------------------------------------------
 * Design system
 * Light theme with a persistent dark sidebar.
 * Inter via Google Fonts; system fallback for offline boot.
 * ------------------------------------------------------------------------- */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  /* Surfaces */
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-alt: #f4f4f5;
  --surface-hover: #f9fafb;

  /* Sidebar (always dark) */
  --sidebar-bg: #0a0a0b;
  --sidebar-surface: #161618;
  --sidebar-border: #27272a;
  --sidebar-text: #e4e4e7;
  --sidebar-text-muted: #71717a;
  --sidebar-hover: #1c1c1f;

  /* Text */
  --text: #18181b;
  --text-muted: #71717a;
  --text-subtle: #a1a1aa;

  /* Borders */
  --border: #e4e4e7;
  --border-strong: #d4d4d8;

  /* Accent */
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --accent-soft-text: #3730a3;

  /* Semantic */
  --success: #10b981;
  --success-soft: #ecfdf5;
  --success-soft-text: #047857;

  --warning: #f59e0b;
  --warning-soft: #fffbeb;
  --warning-soft-text: #92400e;

  --danger: #ef4444;
  --danger-soft: #fef2f2;
  --danger-soft-text: #b91c1c;

  --info: #3b82f6;
  --info-soft: #eff6ff;
  --info-soft-text: #1d4ed8;

  /* Lead temperature */
  --hot-bg: #fef2f2;
  --hot-text: #b91c1c;
  --warm-bg: #fffbeb;
  --warm-text: #92400e;
  --cold-bg: #f4f4f5;
  --cold-text: #52525b;

  /* Radii / shadow */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.06), 0 2px 4px rgba(16, 24, 40, 0.04);

  /* Layout */
  --sidebar-w: 248px;
  --content-max: 1200px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* -------------------------------------------------------------------------
 * App shell — sidebar + content
 * ------------------------------------------------------------------------- */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

@media (max-width: 640px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

@media (max-width: 880px) and (min-width: 641px) {
  :root { --sidebar-w: 196px; }
  .sidebar { padding: 16px 10px; }
  .sidebar a.nav-item { font-size: 12.5px; padding: 7px 8px; }
  .sidebar .nav-section { padding: 12px 8px 4px; }
  .content { padding: 20px 18px 48px; }
}

/* Sidebar */
.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  border-right: 1px solid var(--sidebar-border);
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 18px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--sidebar-border);
}
.sidebar .brand .logo {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
  font-size: 13px;
}
.sidebar .brand .title { font-weight: 600; letter-spacing: -0.01em; font-size: 15px; }
.sidebar .brand .subtitle { font-size: 11px; color: var(--sidebar-text-muted); margin-top: -2px; }

.sidebar .nav-section {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sidebar-text-muted);
  padding: 16px 10px 6px;
}

.sidebar a.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background-color 0.12s ease;
}
.sidebar a.nav-item:hover { background: var(--sidebar-hover); }
.sidebar a.nav-item.active { background: var(--sidebar-hover); color: white; }
.sidebar a.nav-item .icon {
  width: 18px; height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sidebar-text-muted);
}
.sidebar a.nav-item.active .icon,
.sidebar a.nav-item:hover .icon { color: white; }

.sidebar .footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--sidebar-border);
  font-size: 12px;
  color: var(--sidebar-text-muted);
}
.sidebar .footer .row { display: flex; align-items: center; gap: 8px; }
.sidebar .footer .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.sidebar .footer .dot.offline { background: var(--danger); }

/* Main content */
.content {
  padding: 28px 36px 60px;
  max-width: 100%;
  overflow-x: hidden;
}
.content-inner { max-width: var(--content-max); margin: 0 auto; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-header h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}
.page-header .subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 4px;
}
.page-header .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* -------------------------------------------------------------------------
 * Cards
 * ------------------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 16px;
}
.card.flush { padding: 0; overflow: hidden; }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
}
.card-header h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.card-body { padding: 22px; }

h2 { margin: 0 0 14px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
h3 {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

p { margin: 0 0 12px; }
.muted { color: var(--text-muted); font-size: 13px; }
.subtle { color: var(--text-subtle); font-size: 12px; }
code { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* -------------------------------------------------------------------------
 * Forms
 * ------------------------------------------------------------------------- */

label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="file"] { padding: 6px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
input[readonly] { background: var(--surface-alt); color: var(--text-muted); cursor: default; }
textarea { resize: vertical; min-height: 80px; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.row.full { grid-template-columns: 1fr; }
.row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 700px) {
  .row, .row.cols-3 { grid-template-columns: 1fr; }
}

.button-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

/* -------------------------------------------------------------------------
 * Buttons
 * ------------------------------------------------------------------------- */

button, .btn {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  text-decoration: none;
  white-space: nowrap;
}
button:disabled, .btn:disabled { opacity: 0.5; cursor: not-allowed; }

button, button.primary, .btn.primary {
  background: var(--accent);
  color: white;
}
button:hover:not(:disabled),
button.primary:hover:not(:disabled),
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); }

button.secondary, .btn.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
button.secondary:hover:not(:disabled), .btn.secondary:hover:not(:disabled) {
  background: var(--surface-alt);
  border-color: var(--border-strong);
}

button.ghost, .btn.ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 6px 10px;
}
button.ghost:hover:not(:disabled), .btn.ghost:hover:not(:disabled) {
  background: var(--surface-alt);
  color: var(--text);
}

button.danger, .btn.danger {
  background: var(--danger);
  color: white;
}
button.danger:hover:not(:disabled) { background: #dc2626; }

button.small {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 6px;
}

/* -------------------------------------------------------------------------
 * Status pills, badges, tags
 * ------------------------------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  border: 1px solid transparent;
  line-height: 1.5;
}

/* Status pills mapped to lifecycle states. */
.pill.created, .pill.uploaded, .pill.queued {
  background: var(--surface-alt); color: var(--text-muted); border-color: var(--border);
}
.pill.transcribing, .pill.analyzing, .pill.audio_uploaded, .pill.processing {
  background: var(--warning-soft); color: var(--warning-soft-text); border-color: rgba(245, 158, 11, 0.18);
}
.pill.analyzed, .pill.processed, .pill.online {
  background: var(--success-soft); color: var(--success-soft-text); border-color: rgba(16, 185, 129, 0.2);
}
.pill.error, .pill.offline, .pill.failed {
  background: var(--danger-soft); color: var(--danger-soft-text); border-color: rgba(239, 68, 68, 0.22);
}
.pill.info {
  background: var(--info-soft); color: var(--info-soft-text); border-color: rgba(59, 130, 246, 0.2);
}

.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.7; }

.temp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.temp.hot { background: var(--hot-bg); color: var(--hot-text); }
.temp.warm { background: var(--warm-bg); color: var(--warm-text); }
.temp.cold { background: var(--cold-bg); color: var(--cold-text); }

ul.tag-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
ul.tag-list li {
  background: var(--surface-alt);
  color: var(--text);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid var(--border);
}

/* -------------------------------------------------------------------------
 * Tables
 * ------------------------------------------------------------------------- */

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
th, td { padding: 12px 14px; text-align: left; font-size: 13.5px; }
th {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}
td { border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background-color 0.1s ease; }
tbody tr:hover td { background: var(--surface-hover); cursor: pointer; }
tbody tr.selected td { background: var(--accent-soft); }

/* Compact table variant for the conversation list. */
table.compact th, table.compact td { padding: 10px 14px; }

/* -------------------------------------------------------------------------
 * Stepper
 * ------------------------------------------------------------------------- */

.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
}
.step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  flex: 0 0 auto;
}
.step .dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.step.active { color: var(--text); background: var(--surface); }
.step.active .dot { background: var(--accent); border-color: var(--accent); color: white; }
.step.done .dot { background: var(--success); border-color: var(--success); color: white; }
.step.done .dot::after { content: "✓"; }
.step.done .dot { font-size: 0; }
.step.done .dot::after { font-size: 12px; line-height: 1; }
.step-divider { flex: 1; height: 1px; background: var(--border); margin: 0 4px; min-width: 16px; }

/* -------------------------------------------------------------------------
 * Recorder
 * ------------------------------------------------------------------------- */

.recorder {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px;
  background: var(--surface-alt);
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
  border: 1px dashed var(--border-strong);
}
.record-btn {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--danger);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.12s ease;
  border: none;
  padding: 0;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.25);
}
.record-btn:hover { transform: scale(1.04); }
.record-btn .inner {
  width: 30px;
  height: 30px;
  background: white;
  border-radius: 5px;
  transition: border-radius 0.15s ease, transform 0.15s ease;
}
.record-btn.recording .inner { border-radius: 50%; animation: rec-pulse 1.2s ease-in-out infinite; }
@keyframes rec-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.85); }
}
.timer {
  margin-top: 16px;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.recorder-status { margin-top: 6px; font-size: 13px; color: var(--text-muted); }

audio { width: 100%; }

/* -------------------------------------------------------------------------
 * Alerts
 * ------------------------------------------------------------------------- */

.alert {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13.5px;
  margin-bottom: 14px;
  border: 1px solid;
  align-items: flex-start;
}
.alert.error { background: var(--danger-soft); color: var(--danger-soft-text); border-color: rgba(239, 68, 68, 0.22); }
.alert.info { background: var(--info-soft); color: var(--info-soft-text); border-color: rgba(59, 130, 246, 0.2); }
.alert.success { background: var(--success-soft); color: var(--success-soft-text); border-color: rgba(16, 185, 129, 0.2); }
.alert.warning { background: var(--warning-soft); color: var(--warning-soft-text); border-color: rgba(245, 158, 11, 0.2); }

/* -------------------------------------------------------------------------
 * Detail grid (used for the lead profile view)
 * ------------------------------------------------------------------------- */

dl.detail-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 18px;
  font-size: 13.5px;
  margin: 0;
}
dl.detail-grid dt { color: var(--text-muted); font-weight: 500; }
dl.detail-grid dd { margin: 0; }

/* -------------------------------------------------------------------------
 * Topbar inside content (page chip strip)
 * ------------------------------------------------------------------------- */

.chip-strip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hidden { display: none !important; }

/* Transcript block */
.transcript {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 320px;
  overflow-y: auto;
  font-family: "Inter", sans-serif;
}

/* Empty state */
.empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty h2 { color: var(--text); margin-bottom: 6px; }
.empty p { margin: 0 0 16px; font-size: 13.5px; }

/* KPI / stat cards (used on dashboard top) */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
}
.stat .label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; font-weight: 500; }
.stat .value { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.stat .delta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* -------------------------------------------------------------------------
 * Auth pages (login / signup)
 * ------------------------------------------------------------------------- */

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(79, 70, 229, 0.10), transparent 70%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-md);
}
.auth-card .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.auth-card .brand .logo {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 15px;
}
.auth-card h1 { font-size: 19px; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.02em; }
.auth-card .sub { font-size: 13px; color: var(--text-muted); margin: 0 0 22px; }
.auth-card .field { margin-bottom: 14px; }
.auth-card button[type="submit"] { width: 100%; margin-top: 6px; padding: 11px; }
.auth-card .switch {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.auth-card .switch a { color: var(--accent); text-decoration: none; font-weight: 500; }
.auth-card .switch a:hover { text-decoration: underline; }

/* Sidebar account block */
.sidebar .account {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--sidebar-text-muted);
}
.sidebar .account .avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--sidebar-surface);
  border: 1px solid var(--sidebar-border);
  display: grid; place-items: center;
  font-size: 11px; color: var(--sidebar-text);
  flex: 0 0 auto;
}
.sidebar .account .email {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--sidebar-text);
}
.sidebar a.logout {
  display: block;
  margin-top: 4px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--sidebar-text-muted);
  text-decoration: none;
  cursor: pointer;
}
.sidebar a.logout:hover { background: var(--sidebar-hover); color: var(--sidebar-text); }

/* Two-column split for dashboard list + detail */
.split-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 16px;
}
@media (max-width: 1100px) { .split-2 { grid-template-columns: 1fr; } }

/* Quick-transcribe: speaker count + talk-time breakdown panel. */
.speaker-summary { margin: 4px 0 16px; display: flex; flex-direction: column; gap: 10px; }
.speaker-chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.speaker-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  background: #f3f4f6; color: #111827;
  font-size: 12.5px; font-weight: 500;
  border: 1px solid #e5e7eb;
}
.speaker-chip.count { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }
.speaker-chip .ic { font-size: 13px; opacity: .75; }
/* Renamable chip/legend buttons — reset native button chrome and add a
   subtle hover + pencil affordance. */
button.speaker-chip.rename,
button.legend-item.rename {
  font-family: inherit; cursor: pointer; appearance: none;
  -webkit-appearance: none; outline: none;
}
button.speaker-chip.rename { transition: background .15s, border-color .15s; }
button.speaker-chip.rename:hover { background: #eef2ff; border-color: #c7d2fe; }
button.speaker-chip.rename .edit-ic {
  font-size: 11px; opacity: .45; margin-left: 2px;
}
button.speaker-chip.rename:hover .edit-ic { opacity: 1; }
button.legend-item.rename {
  background: transparent; border: none; padding: 2px 4px;
  border-radius: 6px; color: inherit; font-size: 13px;
}
button.legend-item.rename:hover { background: #f3f4f6; }
.speaker-chip .dot,
.speaker-legend .dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.speaker-bar {
  display: flex; height: 6px; width: 100%; border-radius: 999px;
  overflow: hidden; background: #f3f4f6;
}
.speaker-bar .seg { height: 100%; display: block; }
.speaker-bar .seg:first-child { border-top-left-radius: 999px; border-bottom-left-radius: 999px; }
.speaker-bar .seg:last-child { border-top-right-radius: 999px; border-bottom-right-radius: 999px; }
.speaker-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; }
.speaker-legend .legend-item { display: inline-flex; align-items: center; gap: 6px; }
.speaker-footer { display: flex; gap: 18px; font-size: 12.5px; padding-top: 4px; }
.speaker-footer .ic { margin-right: 4px; opacity: .8; }

/* Quick-transcribe loading card: dashed bordered panel with spinner +
   progress bar, shown only while a transcription is in-flight. */
.t-loader { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.t-loader-card {
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  padding: 28px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: #fafafa;
}
.t-spinner {
  width: 38px; height: 38px;
  border: 3px solid #ede9fe;
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: t-spin 0.9s linear infinite;
}
@keyframes t-spin { to { transform: rotate(360deg); } }
.t-loader-title { color: #6d28d9; font-weight: 600; font-size: 15px; }
.t-loader-sub { color: #6b7280; font-size: 13px; }
.t-progress {
  height: 6px; width: 100%; background: #e5e7eb;
  border-radius: 999px; overflow: hidden;
}
.t-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
  width: 0%;
  transition: width 240ms ease-out;
  border-radius: 999px;
}
.t-loader-status { text-align: center; font-size: 12.5px; }

/* Quick-transcribe dropzone. */
.dropzone {
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  background: #fafafa;
  padding: 22px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
  outline: none;
}
.dropzone:hover,
.dropzone:focus-visible { border-color: #8b5cf6; background: #faf5ff; }
.dropzone.is-dragging {
  border-color: #7c3aed;
  background: #ede9fe;
  transform: scale(1.01);
}
.dropzone .dz-icon {
  font-size: 26px; color: #7c3aed; line-height: 1;
  margin-bottom: 8px;
}
.dropzone .dz-title { color: #111827; font-size: 14px; }
.dropzone .dz-sub { color: #6b7280; font-size: 12.5px; margin-top: 4px; }
.dropzone .dz-link { color: #7c3aed; text-decoration: underline; }
.dropzone .dz-file { margin-top: 10px; font-size: 12.5px; }

/* Hide the real file input visually but keep it focusable + clickable.
   Using display:none / hidden attr breaks programmatic .click() in some
   browsers, so we use the standard "visually-hidden" pattern instead. */
.dz-input-hidden {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important; border: 0 !important;
}
.dropzone .dz-file.has-file { color: #111827; font-weight: 500; }
