/* Rekva Dashboard — original design language, no framework */

:root {
  /* Brand palette (dashboard brief authoritative) */
  --blue: #1A56F0;
  --blue-deep: #1242C4;
  --blue-soft: #EEF3FE;
  --gold: #D4A437;
  --gold-soft: #FBF4E2;

  /* Warm surfaces */
  --bg: #FCFCFA;
  --surface: #FFFFFF;
  --surface-warm: #F7F6F2;
  --border: #ECECE8;
  --border-strong: #DEDED8;

  /* Ink */
  --ink: #111111;
  --ink-muted: #5C5C57;
  --ink-faint: #8A8A82;

  /* Status */
  --green: #1E9E5A;
  --green-soft: #E7F4EC;
  --red: #C8472F;

  --radius: 12px;
  --radius-sm: 10px;
  --radius-xs: 8px;

  --shadow-sm: 0 1px 2px rgba(17,17,17,.04), 0 1px 3px rgba(17,17,17,.05);
  --shadow-md: 0 6px 18px rgba(17,17,17,.06), 0 2px 6px rgba(17,17,17,.04);
  --shadow-lg: 0 24px 48px rgba(17,17,17,.10), 0 8px 20px rgba(17,17,17,.06);

  --mono: 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --topbar-h: 60px;
  --strip-h: 52px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
}

p { margin: 0; color: var(--ink-muted); }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-deep); }

button { font-family: inherit; cursor: pointer; }

.mono {
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

/* Phone numbers — signature treatment */
.phone {
  font-family: var(--mono);
  letter-spacing: 0.06em;
  font-size: 1.02em;
  color: var(--ink);
}

/* ---------- Wordmark ---------- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark:hover { color: var(--ink); }
.wordmark .mark {
  display: inline-flex;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  padding: 11px 18px;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover { background: var(--blue-deep); color: #fff; }
.btn-primary:disabled { background: #A9BEF7; cursor: not-allowed; }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--surface-warm); color: var(--ink); }
.btn-block { width: 100%; }

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--blue-soft) 0%, transparent 60%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 36px 32px;
}
.auth-card .wordmark { margin-bottom: 28px; }
.auth-card h1 {
  font-size: 22px;
  margin-bottom: 8px;
}
.auth-card .sub {
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 24px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}
.input {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.input.invalid { border-color: var(--red); }

.auth-foot {
  margin-top: 22px;
  font-size: 13px;
  color: var(--ink-faint);
  text-align: center;
}
.auth-success {
  text-align: center;
}
.auth-success .check {
  width: 46px; height: 46px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--green-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--green);
}
.auth-success h1 { font-size: 20px; margin-bottom: 10px; }
.resend-row {
  margin-top: 22px;
  font-size: 13px;
  color: var(--ink-faint);
}
.resend-row button {
  background: none; border: none; color: var(--blue);
  font-weight: 600; font-size: 13px; padding: 0;
}
.resend-row button:disabled { color: var(--ink-faint); cursor: default; }

.hidden { display: none !important; }

/* Verify page spinner */
.verify-state { text-align: center; }
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  margin: 0 auto 18px;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Top bar ---------- */
.topbar {
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar .left { flex: 1; display: flex; align-items: center; }
.topbar .center { flex: 0 0 auto; }
.topbar .right { flex: 1; display: flex; justify-content: flex-end; align-items: center; }

.tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
}
.tab {
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 7px;
  transition: background .15s ease, color .15s ease;
}
.tab:hover { color: var(--ink); }
.tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* Account menu */
.account {
  position: relative;
}
.account-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 5px 12px 5px 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.account-btn:hover { background: var(--surface-warm); }
.account-btn .avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}
.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  padding: 6px;
  z-index: 50;
}
.account-menu .who {
  padding: 8px 10px;
  font-size: 12px;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
  word-break: break-all;
}
.account-menu button {
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  padding: 9px 10px;
  border-radius: 7px;
}
.account-menu button:hover { background: var(--surface-warm); }

/* ---------- Answering status strip (signature) ---------- */
.status-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 11px 24px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.status-live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.pulse-dot {
  position: relative;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: var(--green);
  opacity: .35;
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(.6); opacity: .5; }
  100% { transform: scale(2.4); opacity: 0; }
}
.status-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink-muted);
}
.status-meta .sep { color: var(--border-strong); }
.status-number {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 13px;
  color: var(--ink-muted);
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border);
  background: var(--surface-warm);
  border-radius: 7px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.copy-btn:hover { background: var(--bg); }

/* ---------- Layout container ---------- */
.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}
.view { display: none; }
.view.active { display: block; }

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.view-head h2 { font-size: 22px; }
.view-head .lede { font-size: 14px; color: var(--ink-muted); margin-top: 4px; }

/* ---------- Calls layout (8/4) ---------- */
.calls-grid {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 24px;
  align-items: start;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.range-pills {
  display: inline-flex;
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  gap: 3px;
}
.range-pill {
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 7px;
}
.range-pill:hover { color: var(--ink); }
.range-pill.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.search-wrap {
  position: relative;
  margin-left: auto;
  min-width: 220px;
}
.search-wrap svg {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--ink-faint);
}
.search-wrap .input { padding-left: 34px; }

/* Calls table card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.calls-table { width: 100%; }
.calls-row {
  display: grid;
  grid-template-columns: 92px 1.3fr 84px 1fr 2fr;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s ease;
}
.calls-row:last-child { border-bottom: none; }
.calls-row:hover { background: var(--surface-warm); }
.calls-row.selected { background: var(--blue-soft); }
.calls-head {
  display: grid;
  grid-template-columns: 92px 1.3fr 84px 1fr 2fr;
  gap: 14px;
  padding: 12px 18px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--border);
}
.cell-time { font-size: 13px; color: var(--ink-muted); }
.cell-caller { font-weight: 600; font-size: 14px; }
.cell-caller .num { font-size: 12px; color: var(--ink-muted); }
.cell-dur { font-family: var(--mono); font-size: 13px; color: var(--ink-muted); }
.intent-tag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-warm);
  border: 1px solid var(--border);
  color: var(--ink-muted);
  white-space: nowrap;
}
.intent-tag.booking { background: var(--blue-soft); color: var(--blue-deep); border-color: transparent; }
.cell-summary {
  font-size: 13px;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Side panel (transcript) ---------- */
.side-panel {
  position: sticky;
  top: calc(var(--topbar-h) + var(--strip-h) + 24px);
}
.side-empty {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 48px 28px;
  text-align: center;
}
.side-empty .ic {
  width: 44px; height: 44px;
  margin: 0 auto 14px;
  border-radius: 11px;
  background: var(--surface-warm);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-faint);
}
.side-empty p { font-size: 14px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.panel-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.panel-head .row { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.panel-head h3 { font-size: 16px; }
.panel-head .meta { font-size: 13px; color: var(--ink-muted); margin-top: 4px; }
.panel-close {
  border: none; background: none; color: var(--ink-faint);
  font-size: 20px; line-height: 1; padding: 2px 6px; border-radius: 6px;
}
.panel-close:hover { background: var(--surface-warm); color: var(--ink); }
.panel-analysis {
  padding: 14px 20px;
  background: var(--surface-warm);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--ink-muted);
}
.panel-analysis strong { color: var(--ink); font-weight: 600; }
.transcript {
  padding: 16px 20px;
  max-height: 460px;
  overflow-y: auto;
}
.turn { margin-bottom: 16px; }
.turn .who-line {
  display: flex; align-items: baseline; gap: 9px; margin-bottom: 4px;
}
.turn .who {
  font-size: 12px; font-weight: 700; letter-spacing: .03em;
}
.turn.agent .who { color: var(--blue); }
.turn.caller .who { color: var(--ink-muted); }
.turn .ts {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
}
.turn .text {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.55;
}
.turn.caller .text { color: var(--ink-muted); }
.panel-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

/* ---------- Empty state big card ---------- */
.empty-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 52px 40px;
  text-align: center;
  max-width: 620px;
  margin: 8px auto;
}
.empty-hero .pulse-row {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; color: var(--green);
  margin-bottom: 16px;
}
.empty-hero h3 { font-size: 20px; margin-bottom: 10px; }
.empty-hero p { font-size: 15px; max-width: 440px; margin: 0 auto; }
.empty-hero .num-line {
  margin-top: 22px;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 16px;
}

/* ---------- Today / KPI ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}
.kpi .label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-faint);
}
.kpi .value {
  font-size: 34px; font-weight: 700; letter-spacing: -0.03em;
  margin-top: 10px; line-height: 1;
}
.kpi .value .unit { font-size: 16px; color: var(--ink-faint); font-weight: 600; margin-left: 4px; }
.kpi .delta { font-size: 13px; color: var(--ink-muted); margin-top: 8px; }

.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}
.section-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.section-head h3 { font-size: 15px; }
.section-body { padding: 18px 20px; }

.compact-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.compact-row:last-child { border-bottom: none; }
.compact-row .time { font-size: 13px; color: var(--ink-muted); width: 64px; flex-shrink: 0; }
.compact-row .who { font-weight: 600; font-size: 14px; flex: 1; }
.compact-row .who .num { font-size: 12px; color: var(--ink-muted); font-family: var(--mono); }

/* Usage progress */
.usage-bar-wrap { margin-top: 6px; }
.usage-line { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 9px; }
.usage-line .used { font-weight: 600; color: var(--ink); }
.usage-line .remain { color: var(--ink-muted); }
.bar {
  height: 9px;
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.bar .fill {
  height: 100%;
  background: var(--blue);
  border-radius: 999px;
  transition: width .4s ease;
}

.quiet-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
}
.quiet-card .pulse-row {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600; color: var(--ink);
}

/* ---------- Settings (accordion, instant-commit) ---------- */
.settings-wrap { max-width: 760px; }
.endow-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.endow-banner .ic { color: var(--gold); flex-shrink: 0; }
.endow-banner .txt { font-size: 14px; color: var(--ink); }
.endow-banner .txt span { color: var(--ink-muted); }

.accordion {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  overflow: hidden;
}
.acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: none;
  background: var(--surface);
  padding: 18px 20px;
  text-align: left;
}
.acc-head:hover { background: var(--surface-warm); }
.acc-head .t { display: flex; flex-direction: column; gap: 3px; }
.acc-head .t .name { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.acc-head .t .desc { font-size: 13px; color: var(--ink-muted); }
.acc-head .chev { color: var(--ink-faint); transition: transform .2s ease; flex-shrink: 0; }
.accordion.open .acc-head .chev { transform: rotate(180deg); }
.acc-body { display: none; padding: 4px 20px 22px; border-top: 1px solid var(--border); }
.accordion.open .acc-body { display: block; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.form-row.single { grid-template-columns: 1fr; }
.select {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235C5C57' stroke-width='2.5'><path d='M6 9l6 6 6-6'/></svg>")
    no-repeat right 12px center;
  appearance: none;
  -webkit-appearance: none;
}
.select:focus, textarea.input:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft);
}
textarea.input { resize: vertical; min-height: 76px; }

/* Forwarding reference cards */
.fwd-number-banner {
  display: flex; align-items: center; gap: 14px;
  background: var(--blue-soft);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 16px 0 18px;
}
.fwd-number-banner .lbl { font-size: 13px; color: var(--ink-muted); }
.fwd-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.fwd-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  background: var(--surface-warm);
}
.fwd-card.rec { border-color: var(--blue); background: var(--surface); position: relative; }
.fwd-card .tag {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-faint); margin-bottom: 8px;
}
.fwd-card.rec .tag { color: var(--blue); }
.fwd-card .code {
  font-family: var(--mono); font-size: 18px; font-weight: 600; color: var(--ink);
  letter-spacing: .04em;
}
.fwd-card .note { font-size: 12px; color: var(--ink-muted); margin-top: 8px; line-height: 1.45; }
.fwd-fallback { font-size: 13px; color: var(--ink-muted); margin-top: 16px; line-height: 1.5; }

/* ---------- Billing ---------- */
.billing-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}
.bill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}
.bill-card .label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-faint); margin-bottom: 12px;
}
.plan-name {
  display: flex; align-items: center; gap: 10px;
  font-size: 24px; font-weight: 700; letter-spacing: -0.02em;
}
.plan-badge {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  background: var(--gold-soft); color: var(--gold);
  border: 1px solid #EAD9A8;
  border-radius: 999px; padding: 3px 9px;
}
.plan-price { font-size: 14px; color: var(--ink-muted); margin-top: 6px; }
.pay-method { display: flex; align-items: center; gap: 12px; }
.card-chip {
  width: 42px; height: 28px; border-radius: 6px;
  background: linear-gradient(135deg, #2A2A28, #444440);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 9px; font-weight: 700; letter-spacing: .04em;
}
.pay-method .digits { font-family: var(--mono); font-size: 15px; color: var(--ink); }
.bill-cta { margin-top: 4px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 11px 16px;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 9px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
  z-index: 80;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

/* ---------- Skeleton ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--surface-warm) 25%, #EFEEEA 37%, var(--surface-warm) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.sk-row { height: 18px; margin: 10px 0; }

/* ---------- Mobile ---------- */
@media (max-width: 920px) {
  .calls-grid { grid-template-columns: 1fr; }
  .side-panel { position: static; }
  .billing-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .fwd-cards { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .topbar { padding: 0 14px; height: auto; min-height: var(--topbar-h); flex-wrap: wrap; gap: 8px 0; padding-top: 10px; padding-bottom: 10px; }
  .topbar .left { flex: 1 1 auto; order: 1; }
  .topbar .right { flex: 0 0 auto; order: 2; }
  .topbar .center { order: 3; flex: 1 1 100%; }
  .tabs { width: 100%; justify-content: space-between; }
  .tab { flex: 1; padding: 8px 6px; text-align: center; }
  .status-strip { padding: 11px 14px; gap: 8px 16px; }
  .status-number { margin-left: 0; flex: 1 1 100%; }
  .page { padding: 20px 14px 56px; }
  .calls-head { display: none; }
  .calls-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "caller dur" "summary summary" "intent time";
    gap: 6px 12px;
    row-gap: 7px;
  }
  .cell-time { grid-area: time; justify-self: end; }
  .cell-caller { grid-area: caller; }
  .cell-dur { grid-area: dur; justify-self: end; }
  .intent-tag { grid-area: intent; justify-self: start; }
  .cell-summary { grid-area: summary; white-space: normal; }
  .search-wrap { margin-left: 0; width: 100%; min-width: 0; }
  .toolbar { gap: 10px; }
  .range-pills { width: 100%; overflow-x: auto; }
  .form-row { grid-template-columns: 1fr; }
}
