/* Dashboard Styles — FirstResponse AI Voice Receptionist */

.dashboard {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}

.dashboard-header {
  margin-bottom: 2rem;
}

.dashboard-title {
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--fg);
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}

.dashboard-sub {
  color: var(--fg-muted);
  font-size: 0.9rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}

.stat-card .stat-num {
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg-muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

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

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

/* Panels */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.panel-actions {
  margin-bottom: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: #e55a2a;
}

/* Call List */
.call-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.call-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  transition: border-color 0.2s;
}

.call-row:hover {
  border-color: rgba(255, 107, 53, 0.2);
}

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

.call-phone {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--fg);
  margin-bottom: 0.2rem;
}

.call-time {
  font-size: 0.78rem;
  color: var(--fg-muted);
}

.call-status {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
}

.status-completed { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.status-incoming { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.status-no_answer, .status-busy { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.status-failed { background: rgba(239, 68, 68, 0.12); color: #ef4444; }

.call-duration {
  font-size: 0.8rem;
  color: var(--fg-muted);
  min-width: 60px;
  text-align: right;
}

.lead-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 4px;
}

/* Lead List */
.lead-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lead-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  transition: border-color 0.2s;
}

.lead-row:hover {
  border-color: rgba(255, 107, 53, 0.2);
}

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

.lead-phone {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--fg);
  margin-bottom: 0.15rem;
}

.lead-name {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.15rem;
}

.lead-intent {
  font-size: 0.82rem;
  color: var(--fg-muted);
  margin-bottom: 0.2rem;
}

.lead-time {
  font-size: 0.75rem;
  color: var(--fg-muted);
  opacity: 0.6;
}

.lead-status-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.lead-status-select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.8rem;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}

.sms-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border-radius: 4px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--fg-muted);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state p {
  font-size: 0.9rem;
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .call-row, .lead-row {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .call-status {
    order: 3;
  }

  .lead-status-row {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}