/* =============================================================
   EMBER — Getlead Voice Agent application stylesheet
   Built on the Ember design tokens (public/css/ember-tokens.css).
   One brand colour. Flat surfaces. Borders, not shadows.
   ============================================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');
@import url('./ember-tokens.css');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-text); font-size: var(--font-size-body); line-height: var(--line-height-body);
  color: var(--text-1); background: var(--bg-page); -webkit-font-smoothing: antialiased; min-height: 100vh;
  transition: background-color .2s ease, color .15s ease;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-red-soft); border-color: var(--brand-red) !important; }
[x-cloak] { display: none !important; }

/* ---- Typography ---- */
.num, .tabular { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: var(--tracking-num); }
.mono { font-family: var(--font-mono); font-size: 12.5px; }
.display { font-size: var(--font-size-display); font-weight: var(--font-weight-display); line-height: var(--line-height-display); letter-spacing: var(--tracking-display); }
h1 { font-size: 28px; font-weight: 600; letter-spacing: -.5px; line-height: 1.2; }
h2 { font-size: var(--font-size-h2); font-weight: var(--font-weight-h2); letter-spacing: var(--tracking-h2); line-height: var(--line-height-h2); }
h3 { font-size: var(--font-size-h3); font-weight: var(--font-weight-h3); line-height: var(--line-height-h3); }
.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--brand-red); }
.label { font-size: var(--font-size-label); font-weight: 500; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-3); }
.text-1 { color: var(--text-1); } .text-2 { color: var(--text-2); } .text-3 { color: var(--text-3); }
.text-success { color: var(--success); } .text-warning { color: var(--warning); } .text-danger { color: var(--danger); } .text-info { color: var(--info); } .text-brand { color: var(--brand-red); }
.sm { font-size: var(--font-size-sm); } .caption { font-size: var(--font-size-caption); color: var(--text-3); }
.fw-500 { font-weight: 500; } .fw-600 { font-weight: 600; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prose p + p { margin-top: 10px; }
.link { color: var(--brand-red); font-weight: 500; } .link:hover { color: var(--brand-red-dark); }

/* ---- Layout ---- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex-shrink: 0; display: flex; flex-direction: column; background: var(--bg-card);
  border-right: 1px solid var(--border); padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--border-soft); margin-bottom: 14px; }
.brand-mark { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-red); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -.3px; }
.brand-tag { font-size: 10px; font-weight: 600; background: var(--brand-red); color: #fff; padding: 2px 5px; border-radius: var(--radius-xs); letter-spacing: .3px; }
.nav { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.nav-section { font-size: 10px; font-weight: 500; letter-spacing: .6px; text-transform: uppercase; color: var(--text-3); padding: 10px 10px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--text-2);
  font-size: 13px; transition: background .1s, color .1s; user-select: none;
}
.nav-item:hover { background: var(--bg-neutral); color: var(--text-1); }
.nav-item.active { background: var(--brand-red-soft); color: var(--brand-red); font-weight: 500; }
.nav-item .count { margin-left: auto; font-family: var(--font-num); font-size: 11px; color: var(--text-3); }
.nav-divider { height: 1px; background: var(--border-soft); margin: 6px 0; }
.sidebar-footer { border-top: 1px solid var(--border-soft); padding-top: 12px; margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 32px; border-bottom: 1px solid var(--border); background: var(--bg-card); position: sticky; top: 0; z-index: var(--z-sticky); }
.topbar .spacer { flex: 1; }
.content { padding: 28px 32px 48px; max-width: 1400px; width: 100%; }
.content.narrow { max-width: 860px; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-header .sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.page-header .actions { display: flex; gap: 8px; padding-top: 4px; flex-wrap: wrap; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.breadcrumb a:hover { color: var(--text-1); }

/* ---- Grid / spacing utilities ---- */
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; } .row.end { justify-content: flex-end; } .row.start { align-items: flex-start; } .row.nowrap { flex-wrap: nowrap; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 24px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 24px; } .mt-6 { margin-top: 32px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-5 { margin-bottom: 24px; } .mb-6 { margin-bottom: 32px; }
.flex-1 { flex: 1; min-width: 0; } .w-full { width: 100%; } .center { text-align: center; } .right { text-align: right; }
.hide { display: none !important; }
@media (max-width: 1100px) { .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-main { grid-template-columns: 1fr; } }
@media (max-width: 800px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .content { padding: 20px 16px 40px; } .topbar { padding: 0 16px; } .sidebar { display: none; } .sidebar.open { display: flex; position: fixed; z-index: var(--z-drawer); box-shadow: var(--shadow-lg); } .menu-btn { display: inline-flex !important; } }
.menu-btn { display: none; }

/* ---- Cards ---- */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 22px; }
.card.pad-lg { padding: 28px; } .card.pad-sm { padding: 14px 16px; } .card.flush { padding: 0; overflow: hidden; }
.card.interactive { transition: border-color .1s; } .card.interactive:hover { border-color: var(--text-3); }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-header h3 { font-size: 14px; font-weight: 500; }
.card.flush .card-header { padding: 14px 18px; margin: 0; border-bottom: 1px solid var(--border-soft); }
.card-footer { border-top: 1px solid var(--border-soft); padding-top: 14px; margin-top: 16px; display: flex; gap: 8px; justify-content: flex-end; }
.divider { height: 1px; background: var(--border-soft); margin: 16px 0; }
.soft { background: var(--bg-neutral); border-radius: var(--radius-md); padding: 12px 14px; }

/* ---- KPI ---- */
.kpi { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; min-width: 0; }
.kpi .label { margin-bottom: 8px; display: block; }
.kpi .value { font-family: var(--font-num); font-size: 22px; font-weight: 500; letter-spacing: -.4px; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi .row { margin-top: 0; align-items: baseline; gap: 8px; }
.kpi .delta { font-size: 11px; font-weight: 500; padding: 2px 6px; border-radius: var(--radius-xs); }
.kpi .delta.up { background: var(--success-soft); color: var(--success); } .kpi .delta.down { background: var(--brand-red-soft); color: var(--brand-red-dark); }
.kpi .sub { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.kpi .bars { display: flex; align-items: flex-end; gap: 2px; height: 24px; margin-top: 10px; }
.kpi .bars i { flex: 1; min-height: 2px; background: var(--bg-neutral-2); border-radius: 1px; } .kpi .bars i:last-child { background: var(--brand-red); }
.hero-num { font-family: var(--font-num); font-size: var(--font-size-hero-num); font-weight: 600; letter-spacing: -1px; line-height: 1; }

/* ---- Chips (semantic action chips) ---- */
.chip { border-radius: var(--radius-lg); padding: 14px 18px; border: 1px solid var(--border); background: var(--bg-card); min-width: 0; }
.chip .tag { font-size: 10px; font-weight: 500; letter-spacing: .6px; text-transform: uppercase; }
.chip .value { font-family: var(--font-num); font-size: 22px; font-weight: 500; line-height: 1.2; margin-top: 6px; letter-spacing: -.4px; }
.chip .sub { font-size: 12px; margin-top: 2px; }
.chip.danger { background: var(--brand-red-soft); border-color: var(--brand-red-border); } .chip.danger .tag { color: var(--brand-red); } .chip.danger .value { color: var(--danger-text); } .chip.danger .sub { color: var(--danger); }
.chip.warning { background: var(--warning-soft); border-color: var(--warning-border); } .chip.warning .tag { color: var(--warning); } .chip.warning .value { color: var(--warning-text); } .chip.warning .sub { color: var(--warning); }
.chip.success { background: var(--success-soft); border-color: var(--success-border); } .chip.success .tag { color: var(--success); } .chip.success .value { color: var(--success-text); } .chip.success .sub { color: var(--success); }
.chip.info { background: var(--info-soft); border-color: var(--info-border); } .chip.info .tag { color: var(--info); } .chip.info .value { color: var(--info-text); } .chip.info .sub { color: var(--info); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; font-size: 13px; font-weight: 500;
  border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background .1s, border-color .1s, color .1s; line-height: 1.3;
}
.btn-primary { background: var(--brand-red); color: #fff; } .btn-primary:hover { background: var(--brand-red-dark); }
.btn-secondary { background: var(--bg-card); color: var(--text-1); border-color: var(--border); } .btn-secondary:hover { background: var(--bg-neutral); border-color: var(--text-3); }
.btn-ghost { background: transparent; color: var(--text-2); } .btn-ghost:hover { background: var(--bg-neutral); color: var(--text-1); }
.btn-danger { background: var(--bg-card); color: var(--danger); border-color: var(--danger-border); } .btn-danger:hover { background: var(--danger-soft); }
.btn-sm { padding: 5px 10px; font-size: 12px; } .btn-lg { padding: 11px 18px; font-size: 14px; } .btn-block { width: 100%; }
.btn-icon { padding: 6px; width: 30px; height: 30px; } .btn-icon.btn-sm { width: 26px; height: 26px; padding: 4px; }
.btn:disabled, .btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn .spinner { width: 14px; height: 14px; }

/* ---- Badges / status ---- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: var(--radius-xs); font-size: 11.5px; font-weight: 500; line-height: 1.5; border: 1px solid transparent; white-space: nowrap; }
.badge-neutral { background: var(--bg-neutral); color: var(--text-2); border-color: var(--border); }
.badge-success { background: var(--success-soft); color: var(--success); border-color: var(--success-border); }
.badge-warning { background: var(--warning-soft); color: var(--warning); border-color: var(--warning-border); }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }
.badge-info { background: var(--info-soft); color: var(--info); border-color: var(--info-border); }
.badge-brand { background: var(--brand-red-soft); color: var(--brand-red); border-color: var(--brand-red-border); }
.status-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.status-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.status-dot.success { color: var(--success); } .status-dot.warning { color: var(--warning); } .status-dot.danger { color: var(--danger); } .status-dot.info { color: var(--info); } .status-dot.neutral { color: var(--text-3); } .status-dot.brand { color: var(--brand-red); }
.status-dot.live::before { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 10%, transparent); } }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: var(--radius-pill); font-size: 12px; background: var(--bg-neutral); color: var(--text-2); border: 1px solid var(--border); }
.pill.on { background: var(--brand-red-soft); color: var(--brand-red); border-color: var(--brand-red-border); }
.cc { font-family: var(--font-num); font-size: 11px; color: var(--text-3); background: var(--bg-neutral); padding: 1px 5px; border-radius: var(--radius-xs); margin-right: 6px; }
.id-tag { font-family: var(--font-num); font-size: 10px; color: var(--text-3); background: var(--bg-neutral); padding: 2px 5px; border-radius: var(--radius-xs); font-variant-numeric: tabular-nums; }

/* ---- Avatar ---- */
.avatar { width: 28px; height: 28px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 500; flex-shrink: 0; }
.avatar.lg { width: 40px; height: 40px; font-size: 15px; } .avatar.sm { width: 22px; height: 22px; font-size: 9px; }

/* ---- Forms ---- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label, .field-label { font-size: 13px; font-weight: 500; color: var(--text-1); }
.field .help { font-size: 12px; color: var(--text-3); }
.field .error { font-size: 12px; color: var(--danger); }
.input, .select, .textarea {
  width: 100%; padding: 8px 11px; font-size: 13px; background: var(--bg-card); color: var(--text-1);
  border: 1px solid var(--border); border-radius: var(--radius-sm); transition: border-color .1s; min-height: 36px;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.input.num { font-family: var(--font-num); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input-group { display: flex; } .input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); } .input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-left: -1px; }
.input-prefix { display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--border); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: var(--bg-neutral); color: var(--text-3); font-size: 12px; font-family: var(--font-num); }
.input-prefix + .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.checkbox, .radio { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; cursor: pointer; }
.checkbox input, .radio input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--brand-red); flex-shrink: 0; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 34px; height: 20px; border-radius: 999px; background: var(--bg-neutral-2); position: relative; transition: background .15s; flex-shrink: 0; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: var(--shadow-sm); }
.switch input:checked + .track { background: var(--brand-red); } .switch input:checked + .track::after { transform: translateX(14px); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; } .form-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 800px) { .form-row, .form-row-3 { grid-template-columns: 1fr; } }
.form-section { padding: 22px 0; border-top: 1px solid var(--border-soft); } .form-section:first-child { border-top: 0; padding-top: 0; }
.form-section-title { margin-bottom: 4px; } .form-section-desc { font-size: 12.5px; color: var(--text-3); margin-bottom: 16px; }
.otp-input { font-family: var(--font-num); font-size: 28px; letter-spacing: 12px; text-align: center; padding: 12px; font-weight: 500; }
.range { width: 100%; accent-color: var(--brand-red); }
.code-block { font-family: var(--font-mono); font-size: 12px; background: var(--inverse-bg); color: var(--inverse-fg); padding: 14px 16px; border-radius: var(--radius-md); overflow-x: auto; white-space: pre; line-height: 1.6; }
[data-theme="dark"] .code-block { background: #000; color: #E4E4E7; }
.copy-field { display: flex; align-items: center; gap: 8px; background: var(--bg-neutral); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 10px; font-family: var(--font-mono); font-size: 12px; overflow: hidden; }
.copy-field span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 10px; font-weight: 500; letter-spacing: .6px; text-transform: uppercase; color: var(--text-3); padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--bg-card); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--bg-row-hover); }
.table tr.urgent { background: var(--warning-soft); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.num { font-family: var(--font-num); font-weight: 500; }
.table .actions { text-align: right; white-space: nowrap; }
.table a.row-link { color: var(--text-1); font-weight: 500; } .table a.row-link:hover { color: var(--brand-red); }
.table .muted { color: var(--text-3); font-size: 12px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--border-soft); font-size: 12px; color: var(--text-3); }
.pagination nav { display: flex; gap: 4px; } .pagination a, .pagination span.pg { padding: 4px 9px; border-radius: var(--radius-sm); font-family: var(--font-num); font-size: 12px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-2); }
.pagination a:hover { border-color: var(--text-3); } .pagination .current { background: var(--brand-red-soft); color: var(--brand-red); border-color: var(--brand-red-border); }

/* ---- Tabs / filters ---- */
.tabs { display: flex; gap: 2px; background: var(--bg-neutral); padding: 3px; border-radius: var(--radius-sm); width: fit-content; }
.tabs a, .tabs button { padding: 5px 12px; border-radius: 4px; font-size: 12.5px; color: var(--text-2); border: 0; background: transparent; cursor: pointer; white-space: nowrap; }
.tabs a.active, .tabs button.active { background: var(--bg-card); color: var(--text-1); font-weight: 500; box-shadow: var(--shadow-sm); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { position: relative; min-width: 220px; } .toolbar .search .input { padding-left: 32px; } .toolbar .search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.filter-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-card); font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.filter-pill:hover { border-color: var(--text-3); } .filter-pill.active { background: var(--brand-red-soft); border-color: var(--brand-red-border); color: var(--brand-red); }

/* ---- Alerts / flash ---- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--bg-neutral); font-size: 13px; margin-bottom: 16px; }
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--success-soft); border-color: var(--success-border); color: var(--success-text); }
.alert-warning { background: var(--warning-soft); border-color: var(--warning-border); color: var(--warning-text); }
.alert-danger { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger-text); }
.alert-info { background: var(--info-soft); border-color: var(--info-border); color: var(--info-text); }
.snackbar { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--inverse-bg); color: var(--inverse-fg); padding: 10px 16px; border-radius: var(--radius-md); font-size: 13px; box-shadow: var(--shadow-lg); z-index: var(--z-toast); animation: snack .2s ease-out; display: flex; gap: 12px; align-items: center; }
@keyframes snack { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* ---- Empty state ---- */
.empty { text-align: center; padding: 48px 24px; color: var(--text-2); }
.empty .icon { width: 48px; height: 48px; border-radius: var(--radius-lg); background: var(--bg-neutral); display: inline-flex; align-items: center; justify-content: center; color: var(--text-3); margin-bottom: 14px; }
.empty h3 { color: var(--text-1); margin-bottom: 4px; } .empty p { font-size: 13px; max-width: 380px; margin: 0 auto 16px; }

/* ---- Modal / drawer ---- */
.backdrop { position: fixed; inset: 0; background: var(--backdrop); z-index: var(--z-modal); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; animation: modal .18s ease-out; }
.modal.wide { max-width: 760px; }
@keyframes modal { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header { padding: 18px 22px 0; display: flex; justify-content: space-between; align-items: center; } .modal-body { padding: 16px 22px; } .modal-footer { padding: 0 22px 18px; display: flex; justify-content: flex-end; gap: 8px; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 460px; max-width: 100%; background: var(--bg-card); border-left: 1px solid var(--border); box-shadow: var(--shadow-drawer); z-index: var(--z-drawer); overflow-y: auto; padding: 22px; }
.dropdown { position: absolute; right: 0; top: calc(100% + 4px); min-width: 180px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: 4px; z-index: var(--z-dropdown); }
.dropdown a, .dropdown button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 7px 10px; border-radius: var(--radius-sm); font-size: 13px; color: var(--text-1); background: none; border: 0; cursor: pointer; }
.dropdown a:hover, .dropdown button:hover { background: var(--bg-neutral); } .dropdown .danger { color: var(--danger); }
.tooltip { background: var(--inverse-bg); color: var(--inverse-fg); font-size: 11.5px; padding: 4px 8px; border-radius: var(--radius-xs); }

/* ---- Progress / stepper ---- */
.progress { height: 6px; background: var(--bg-neutral-2); border-radius: var(--radius-pill); overflow: hidden; } .progress i { display: block; height: 100%; background: var(--brand-red); border-radius: var(--radius-pill); }
.progress.thin { height: 4px; } .progress.success i { background: var(--success); } .progress.warning i { background: var(--warning); }
.stepper { display: flex; gap: 0; margin-bottom: 28px; }
.step { flex: 1; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-3); position: relative; padding-right: 16px; }
.step .n { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-num); font-size: 11px; background: var(--bg-card); flex-shrink: 0; }
.step.done { color: var(--text-2); } .step.done .n { background: var(--success); border-color: var(--success); color: #fff; }
.step.active { color: var(--text-1); font-weight: 500; } .step.active .n { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.meter { display: flex; align-items: center; gap: 10px; } .meter .progress { flex: 1; }

/* ---- Timeline / transcript ---- */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; } .timeline-item:last-child { border-bottom: 0; }
.timeline-item .when { font-family: var(--font-num); font-size: 11px; color: var(--text-3); width: 96px; flex-shrink: 0; padding-top: 2px; }
.transcript { display: flex; flex-direction: column; gap: 10px; }
.turn { display: flex; gap: 10px; align-items: flex-start; max-width: 80%; }
.turn.agent { align-self: flex-start; } .turn.customer { align-self: flex-end; flex-direction: row-reverse; } .turn.tool, .turn.system { align-self: center; max-width: 100%; }
.turn .bubble { padding: 9px 12px; border-radius: var(--radius-lg); font-size: 13px; line-height: 1.5; border: 1px solid var(--border); background: var(--bg-card); }
.turn.customer .bubble { background: var(--bg-neutral); }
.turn.agent .bubble { border-color: var(--brand-red-border); background: var(--brand-red-soft); }
.turn.tool .bubble { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); background: transparent; border-style: dashed; }
.turn .who { font-size: 10px; font-weight: 500; letter-spacing: .6px; text-transform: uppercase; color: var(--text-3); margin-bottom: 3px; }
.turn .ts { font-family: var(--font-num); font-size: 10px; color: var(--text-3); }

/* ---- Auth / marketing ---- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--inverse-bg); color: var(--inverse-fg); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
[data-theme="dark"] .auth-side { background: var(--bg-card); color: var(--text-1); border-right: 1px solid var(--border); }
.auth-side .quote { font-size: 22px; font-weight: 500; letter-spacing: -.4px; line-height: 1.35; max-width: 440px; }
.auth-side .points { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; font-size: 13.5px; opacity: .85; }
.auth-side .points div { display: flex; gap: 10px; align-items: flex-start; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { margin: 18px 0 6px; } .auth-card .lead { color: var(--text-2); font-size: 13.5px; margin-bottom: 24px; }
.auth-footer { font-size: 13px; color: var(--text-2); margin-top: 20px; text-align: center; }
@media (max-width: 900px) { .auth-shell { grid-template-columns: 1fr; } .auth-side { display: none; } }
.marketing-nav { display: flex; align-items: center; gap: 16px; padding: 18px 32px; border-bottom: 1px solid var(--border); background: var(--bg-card); }
.hero { padding: 72px 32px 48px; max-width: 1080px; margin: 0 auto; text-align: center; }
.hero h1 { font-size: 44px; font-weight: 600; letter-spacing: -1px; line-height: 1.12; max-width: 760px; margin: 14px auto 16px; }
.hero p { font-size: 16px; color: var(--text-2); max-width: 600px; margin: 0 auto 26px; }
.features { max-width: 1080px; margin: 0 auto; padding: 24px 32px 72px; }
.feature { padding: 20px; } .feature .icon { width: 36px; height: 36px; border-radius: var(--radius-md); background: var(--brand-red-soft); color: var(--brand-red); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.feature h3 { margin-bottom: 4px; } .feature p { font-size: 13px; color: var(--text-2); }
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 28px auto 0; max-width: 1080px; }
.flow .stage { padding: 14px; text-align: left; } .flow .stage .n { font-family: var(--font-num); font-size: 11px; color: var(--brand-red); font-weight: 500; }
@media (max-width: 900px) { .flow { grid-template-columns: 1fr; } .hero h1 { font-size: 32px; } }

/* ---- Misc ---- */
.spinner { width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--brand-red); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--bg-neutral) 25%, var(--bg-neutral-2) 50%, var(--bg-neutral) 75%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: var(--radius-xs); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.icon-box { width: 32px; height: 32px; border-radius: var(--radius-md); background: var(--bg-neutral); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon-box.brand { background: var(--brand-red-soft); color: var(--brand-red); } .icon-box.success { background: var(--success-soft); color: var(--success); } .icon-box.warning { background: var(--warning-soft); color: var(--warning); } .icon-box.info { background: var(--info-soft); color: var(--info); } .icon-box.danger { background: var(--danger-soft); color: var(--danger); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 13px; } .kv dt { color: var(--text-3); } .kv dd { color: var(--text-1); }
.provider-card { display: flex; gap: 14px; align-items: flex-start; }
.score-ring { font-family: var(--font-num); font-weight: 600; font-size: 20px; width: 56px; height: 56px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 3px solid var(--border); }
.score-ring.high { border-color: var(--success); color: var(--success); } .score-ring.mid { border-color: var(--warning); color: var(--warning); } .score-ring.low { border-color: var(--text-3); color: var(--text-3); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.audio { width: 100%; height: 36px; }
details.expander summary { cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-2); list-style: none; display: flex; align-items: center; gap: 6px; } details.expander summary::-webkit-details-marker { display: none; }
.sortable th a { color: inherit; }
.list { display: flex; flex-direction: column; } .list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; } .list-item:last-child { border-bottom: 0; }
