/* Dashboard-specific styles — extends theme.css tokens */

.dash-body {
  min-height: 100vh;
  background: var(--bg);
}

/* NAV */
.dash-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.dash-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--fg);
  flex-shrink: 0;
}

.dash-client-name {
  flex: 1;
  font-size: 0.875rem;
  color: var(--fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* NEW-LEAD NOTIFICATION BADGE */
.new-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 100px;
  padding: 3px 10px 3px 7px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fbbf24;
  cursor: default;
}

.new-badge-dot {
  width: 6px;
  height: 6px;
  background: #fbbf24;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
  flex-shrink: 0;
}

.dash-live-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* MAIN */
.dash-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

/* STAT CARDS */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
}

.stat-card:hover {
  border-color: rgba(255,255,255,0.1);
}

.stat-card.accent-border  { border-color: rgba(74, 222, 128, 0.15); }
.stat-card.booked-border  { border-color: rgba(74, 222, 128, 0.3);  }

.stat-card-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--fg-muted);
  margin-bottom: 8px;
}

.stat-card-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--fg);
  margin-bottom: 4px;
}

.stat-card-value.highlight { color: var(--accent); }
.response-val { font-size: 1.8rem; }

.stat-card-sub {
  font-size: 0.75rem;
  color: var(--fg-muted);
}

/* TWO-COL GRID */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* CARDS */
.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.dash-card-header h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.week-label, .feed-count {
  font-size: 0.75rem;
  color: var(--fg-muted);
  font-family: var(--font-body);
}

/* CALENDAR */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  padding: 12px;
  min-height: 180px;
}

.cal-day {
  border-right: 1px solid var(--border);
  padding: 6px 4px;
  min-height: 120px;
}

.cal-day:last-child { border-right: none; }

.cal-day--today .cal-day-header {
  color: var(--accent);
}

.cal-day-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.cal-day-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
}

.cal-day-date {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
}

.today-badge {
  background: var(--accent);
  color: #0a0a0f;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.cal-slots {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cal-empty {
  font-size: 0.7rem;
  color: rgba(136, 136, 160, 0.3);
  text-align: center;
  padding-top: 4px;
}

.cal-appt {
  background: var(--accent-dim);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 5px;
  padding: 3px 5px;
}

.cal-appt-time {
  display: block;
  font-size: 0.6rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1px;
}

.cal-appt-name {
  display: block;
  font-size: 0.65rem;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* FILTER TABS */
.filter-tabs {
  display: flex;
  gap: 0;
  padding: 12px 16px 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--fg-muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 12px 10px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.filter-tab:hover {
  color: var(--fg);
}

.filter-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* LEAD FEED */
.lead-feed {
  overflow-y: auto;
  max-height: 460px;
}

.feed-empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.9rem;
}

.lead-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.lead-row:last-child { border-bottom: none; }
.lead-row:hover { background: var(--bg-elevated); }

.lead-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.lead-info {
  flex: 1;
  min-width: 0;
}

.lead-name {
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.qual-chip {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1.4;
}

.qual-good {
  background: var(--accent-dim);
  color: var(--accent);
}

.qual-bad {
  background: var(--danger-dim);
  color: var(--danger);
}

.lead-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.lead-source {
  font-size: 0.72rem;
  color: var(--fg-muted);
  text-transform: capitalize;
}

.lead-time {
  font-size: 0.72rem;
  color: rgba(136, 136, 160, 0.55);
}

.lead-phone {
  font-size: 0.72rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.lead-phone:hover {
  text-decoration: underline;
}

.lead-note-preview {
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-top: 4px;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.lead-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  flex-shrink: 0;
}

/* STATUS BADGES */
.status-badge {
  font-size: 0.67rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  text-transform: capitalize;
  white-space: nowrap;
}

.status-new       { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; }
.status-contacted { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
.status-booked    { background: var(--accent-dim);         color: var(--accent); }
.status-lost      { background: var(--danger-dim);         color: var(--danger); }

/* ACTION BUTTON */
.action-menu-wrap {
  position: relative;
}

.status-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg-muted);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.status-btn:hover {
  background: var(--bg-elevated);
  color: var(--fg);
}

/* ACTION DROPDOWN */
.action-dropdown {
  position: absolute;
  right: 0;
  top: 34px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  min-width: 168px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  z-index: 200;
  overflow: hidden;
}

.action-dropdown.hidden { display: none; }

.action-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--fg-muted);
  padding: 10px 14px 4px;
}

.action-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.action-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  background: none;
  border: none;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s;
}

.action-opt:hover { background: rgba(255,255,255,0.06); }

.action-icon {
  font-size: 0.85rem;
  line-height: 1;
  width: 16px;
  text-align: center;
}

/* NOTE MODAL */
.note-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.note-modal-overlay.hidden { display: none; }

.note-modal {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.5);
}

.note-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.note-modal-header h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

.note-close {
  background: none;
  border: none;
  color: var(--fg-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s;
}

.note-close:hover { color: var(--fg); }

.note-textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 12px;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
  line-height: 1.5;
}

.note-textarea:focus {
  border-color: rgba(74, 222, 128, 0.4);
}

.note-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.btn-note-cancel {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg-muted);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 9px 20px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-note-cancel:hover {
  border-color: rgba(255,255,255,0.2);
  color: var(--fg);
}

.btn-note-save {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #0a0a0f;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 9px 20px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-note-save:hover { opacity: 0.88; }
.btn-note-save:disabled { opacity: 0.5; cursor: default; }

/* RESPONSIVE — TABLET */
@media (max-width: 1024px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-grid {
    grid-template-columns: 1fr;
  }
}

/* RESPONSIVE — MOBILE */
@media (max-width: 600px) {
  .dash-main { padding: 16px 12px 48px; }

  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
  }

  .stat-card { padding: 14px; }
  .stat-card-value { font-size: 1.8rem; }
  .response-val { font-size: 1.5rem; }

  .calendar-grid {
    padding: 8px 4px;
  }

  .cal-day { min-height: 90px; padding: 4px 2px; }
  .cal-day-label { font-size: 0.58rem; }
  .cal-appt-name { display: none; }

  .lead-note-preview { max-width: 140px; }

  /* Stack stat cards 2x2 on very small screens */
  .stat-card-label { font-size: 0.7rem; }

  /* Action dropdown opens upward on mobile to avoid viewport clipping */
  .action-dropdown {
    right: 0;
    top: auto;
    bottom: 34px;
  }

  /* Ensure feed is fully scrollable on mobile */
  .lead-feed { max-height: 400px; }
}

/* SAFE AREA INSETS (notch/home bar) */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .dash-main {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
}

/* ─── AUTOMATION SECTION ─────────────────────────────────────── */

.automation-section {
  max-width: 1200px;
  margin: 32px auto 0;
  padding: 0 20px 48px;
}

.automation-header { margin-bottom: 24px; }

.automation-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.automation-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.plan-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
}
/* plan-premium badge removed — single plan, no premium tier */
.plan-premium {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}

.automation-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

/* Stats row */
.automation-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.auto-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}

.auto-stat-icon { font-size: 22px; margin-bottom: 6px; }
.auto-stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}
.auto-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Feature toggle grid */
.automation-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.auto-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.auto-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auto-card-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.auto-card-icon { font-size: 20px; margin-top: 2px; flex-shrink: 0; }

.auto-card-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 3px;
}

.auto-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.config-needed {
  color: #f59e0b;
  font-weight: 500;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 13px;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

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

/* Template editor */
.template-editor-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 24px;
}

.template-editor-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 18px;
}

.template-field { margin-bottom: 16px; }
.template-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.template-textarea,
.template-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-body);
  padding: 10px 12px;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.template-textarea:focus,
.template-input:focus {
  outline: none;
  border-color: var(--accent);
}

.template-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.template-hint code {
  background: rgba(255,255,255,0.07);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
}

.template-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.btn-save-templates {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-save-templates:hover { opacity: 0.85; }
.btn-save-templates:disabled { opacity: 0.5; cursor: default; }

.template-saved {
  color: #22c55e;
  font-size: 13px;
  font-weight: 600;
}

/* Automation events log */
.auto-events-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}

.auto-events-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 14px;
}

.auto-event-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.auto-event-row:last-child { border-bottom: none; }

.auto-event-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }

.auto-event-info {
  flex: 1;
  font-size: 13px;
}

.auto-event-type { color: var(--text); text-transform: capitalize; }
.auto-event-lead { color: var(--text-muted); }
.auto-event-time { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }

/* Upgrade CTA */
.upgrade-cta {
  max-width: 1200px;
  margin: 32px auto 0;
  padding: 0 20px 48px;
}

.upgrade-cta-inner {
  background: linear-gradient(135deg, rgba(249,115,22,0.08), rgba(249,115,22,0.03));
  border: 1px solid rgba(249,115,22,0.25);
  border-radius: 16px;
  padding: 28px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.upgrade-icon { font-size: 32px; flex-shrink: 0; }

.upgrade-text { flex: 1; }
.upgrade-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.upgrade-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.btn-upgrade {
  background: #f97316;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.btn-upgrade:hover { opacity: 0.85; }

/* ─── AI PHONE CALLS SECTION ─────────────────────────────────── */

.calls-section {
  max-width: 1200px;
  margin: 32px auto 0;
  padding: 0 20px 64px;
}

.calls-header { margin-bottom: 24px; }

.calls-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.calls-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.calls-phone-badge {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.calls-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

.calls-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.call-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}

.call-stat-icon { font-size: 20px; margin-bottom: 6px; }
.call-stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}
.call-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.calls-log-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
}

.calls-log-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 16px;
}

.calls-loading,
.calls-empty {
  color: var(--text-muted);
  font-size: 14px;
  padding: 16px 0;
  text-align: center;
}

.call-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.call-row:last-child { border-bottom: none; }

.call-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.call-icon.call-answered { background: rgba(34, 197, 94, 0.12); }
.call-icon.call-missed   { background: rgba(239, 68, 68, 0.10); }

.call-info { flex: 1; min-width: 0; }

.call-caller {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}

.call-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.call-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.call-status-badge.call-answered { background: rgba(34,197,94,0.15); color: #22c55e; }
.call-status-badge.call-missed   { background: rgba(239,68,68,0.12);  color: #ef4444; }

.call-dur, .call-when {
  font-size: 12px;
  color: var(--text-muted);
}

.call-summary {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
  background: rgba(255,255,255,0.03);
  border-left: 3px solid var(--border);
  padding: 6px 10px;
  border-radius: 0 6px 6px 0;
}

/* Responsive: stack on mobile */
@media (max-width: 640px) {
  .automation-stats { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .auto-stat-value { font-size: 22px; }
  .automation-grid { grid-template-columns: 1fr; }
  .upgrade-cta-inner { flex-direction: column; text-align: center; }
  .btn-upgrade { width: 100%; text-align: center; }
  .calls-stats { grid-template-columns: repeat(2, 1fr); }
  .call-stat-value { font-size: 22px; }
}

/* A2HS BANNER */
.a2hs-banner {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: calc(100% - 32px);
  max-width: 480px;
  background: #141b2d;
  border: 1px solid rgba(0, 229, 160, 0.25);
  border-radius: 16px;
  padding: 16px 16px 16px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  gap: 14px;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.a2hs-banner.visible {
  display: flex;
  opacity: 1;
}

.a2hs-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: rgba(0, 229, 160, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.a2hs-content {
  flex: 1;
  min-width: 0;
}

.a2hs-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.a2hs-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.a2hs-install {
  flex-shrink: 0;
  background: #00e5a0;
  color: #0a0f1e;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  font-family: var(--font-display);
}

.a2hs-install:hover { opacity: 0.85; }
.a2hs-install.hidden { display: none; }

.a2hs-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.a2hs-dismiss:hover { color: #fff; }

@media (max-width: 480px) {
  .a2hs-banner { bottom: 16px; }
}
