/* ── Dashboard ── */

.dash-body {
  min-height: 100vh;
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.dash-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dash-tag {
  font-size: 0.8rem;
  color: var(--fg-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
}

.nav-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg);
  text-decoration: none;
}

.btn-sm-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn-sm-primary:hover {
  opacity: 0.85;
}

.dash-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* KPI row */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.kpi-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.kpi-card.kpi-blue  { border-color: rgba(59,130,246,0.2); }
.kpi-card.kpi-amber { border-color: rgba(245,158,11,0.2); }
.kpi-card.kpi-green { border-color: rgba(16,185,129,0.2); }
.kpi-card.kpi-purple{ border-color: rgba(168,85,247,0.2); }

.kpi-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
}

.kpi-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--fg);
}

.kpi-card.kpi-blue  .kpi-value { color: var(--accent); }
.kpi-card.kpi-amber .kpi-value { color: var(--accent-warm); }
.kpi-card.kpi-green .kpi-value { color: var(--accent-green); }
.kpi-card.kpi-purple .kpi-value { color: #a855f7; }

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

/* Section */
.dash-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
}

.dash-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

/* Funnel viz */
.funnel-viz {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.funnel-bar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.funnel-bar-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg-muted);
  width: 70px;
  flex-shrink: 0;
  text-align: right;
}

.funnel-bar-track {
  flex: 1;
  height: 28px;
  background: var(--bg-card);
  border-radius: 6px;
  overflow: hidden;
}

.funnel-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.8s ease;
  min-width: 4px;
}

.funnel-bar-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  width: 32px;
  flex-shrink: 0;
  color: var(--fg);
}

/* Two column layout */
.dash-two-col {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1.5rem;
  align-items: start;
}

/* Booking list */
.booking-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.booking-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.booking-avatar {
  width: 36px;
  height: 36px;
  background: rgba(59,130,246,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
  flex-shrink: 0;
}

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

.booking-name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.booking-meta {
  font-size: 0.75rem;
  color: var(--fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.booking-time {
  text-align: right;
  flex-shrink: 0;
}

.booking-date {
  font-size: 0.85rem;
  font-weight: 600;
}

.booking-hour {
  font-size: 0.75rem;
  color: var(--fg-muted);
}

/* Lead table */
.lead-table-wrap {
  overflow-x: auto;
}

.lead-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.lead-table th {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.lead-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}

.lead-table tr:last-child td {
  border-bottom: none;
}

.lead-name {
  font-weight: 600;
  font-size: 0.875rem;
}

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

.service-badge {
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(59,130,246,0.1);
  color: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  white-space: nowrap;
}

.status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  display: inline-block;
}

.status-new       { background: rgba(139,139,154,0.15); color: var(--fg-muted); }
.status-contacted { background: rgba(59,130,246,0.12); color: var(--accent); }
.status-qualified { background: rgba(245,158,11,0.12); color: var(--accent-warm); }
.status-booked    { background: rgba(245,158,11,0.18); color: var(--accent-warm); }
.status-showed    { background: rgba(16,185,129,0.12); color: var(--accent-green); }
.status-closed    { background: rgba(168,85,247,0.12); color: #a855f7; }
.status-lost      { background: rgba(239,68,68,0.1); color: #f87171; }

.status-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 0.78rem;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  max-width: 120px;
}

.status-select:focus {
  border-color: var(--accent);
}

.empty-state {
  color: var(--fg-muted);
  font-size: 0.9rem;
  padding: 1.5rem 0;
  text-align: center;
}

.empty-state a {
  color: var(--accent);
  text-decoration: none;
}

/* Responsive */
@media (max-width: 900px) {
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
  .dash-two-col { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .dash-main { padding: 1rem 1rem 4rem; }
  .dash-header { padding: 0.875rem 1rem; }
  .kpi-value { font-size: 1.8rem; }
}
