/* ─── DASHBOARD THEME (matches landing page) ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0D0D0F;
  --bg-card: #141416;
  --bg-card-hover: #1A1A1D;
  --fg: #FFFFFF;
  --fg-muted: #9A9A9A;
  --fg-subtle: #555555;
  --lime: #BFFF00;
  --lime-dim: #8FBF00;
  --border: #2A2A2E;
  --red: #FF4D4D;
  --green: #4DFF88;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --font-body: 'DM Sans', sans-serif;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Header reuse */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.wordmark .lime { color: var(--lime); }
.header-nav {
  display: flex;
  gap: 32px;
}
.header-nav a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}
.header-nav a:hover { color: var(--fg); }
.header-nav a.active { color: var(--lime); }

/* Dashboard layout */
.dashboard-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 32px;
}
.dashboard-header {
  margin-bottom: 40px;
}
.dashboard-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.dashboard-subtitle {
  color: var(--fg-muted);
  font-size: 15px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.dashboard-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.section-label {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}
.section-link {
  color: var(--lime);
  text-decoration: none;
  font-size: 13px;
  font-family: var(--font-mono);
  transition: opacity 0.15s;
}
.section-link:hover { opacity: 0.8; }

/* Call list */
.call-list { display: flex; flex-direction: column; gap: 2px; }
.call-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 8px;
  transition: background 0.15s;
}
.call-row:hover { background: var(--bg-card-hover); }
.call-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.call-icon.answered { background: rgba(77, 255, 136, 0.15); color: var(--green); }
.call-icon.missed   { background: rgba(255, 77, 77, 0.15);  color: var(--red); }
.call-icon.error    { background: rgba(154, 154, 154, 0.15); color: var(--fg-muted); }
.call-info { flex: 1; min-width: 0; }
.call-number { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-meta { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--fg-muted); font-family: var(--font-mono); }
.disposition-tag { padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.disposition-tag.answered { background: rgba(77,255,136,0.12); color: var(--green); }
.disposition-tag.missed   { background: rgba(255,77,77,0.12);  color: var(--red); }
.disposition-tag.error    { background: rgba(154,154,154,0.12); color: var(--fg-muted); }
.disposition-tag.in-progress { background: rgba(191,255,0,0.12); color: var(--lime); }
.call-time { font-family: var(--font-mono); font-size: 12px; color: var(--fg-muted); text-align: right; display: flex; flex-direction: column; }

/* Appointment list */
.appt-list { display: flex; flex-direction: column; gap: 4px; }
.appt-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 8px;
  border-radius: 8px;
  transition: background 0.15s;
}
.appt-row:hover { background: var(--bg-card-hover); }
.appt-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 40px;
  background: var(--bg-card-hover);
  border-radius: 8px;
  padding: 6px 8px;
}
.appt-month { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--lime); font-family: var(--font-mono); }
.appt-day { font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1; }
.appt-info { flex: 1; }
.appt-name { display: block; font-size: 14px; font-weight: 500; }
.appt-meta { display: block; font-size: 12px; color: var(--fg-muted); font-family: var(--font-mono); }
.status-tag { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 4px; font-family: var(--font-mono); }
.status-tag.confirmed { background: rgba(77,255,136,0.12); color: var(--green); }
.status-tag.cancelled { background: rgba(255,77,77,0.12);  color: var(--red); }
.status-tag.completed { background: rgba(154,154,154,0.12); color: var(--fg-muted); }

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}
.stat-value { display: block; font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--lime); margin-bottom: 4px; }
.stat-label { display: block; font-size: 13px; color: var(--fg-muted); font-family: var(--font-mono); }

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--fg-muted);
  text-align: center;
  font-size: 14px;
}
.empty-state svg { color: var(--fg-subtle); }

/* ─── INBOX ─── */
.inbox-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 32px;
}
.inbox-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}
.inbox-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.inbox-subtitle {
  color: var(--fg-muted);
  font-size: 15px;
}
.email-address {
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 13px;
}
.back-link {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 13px;
  font-family: var(--font-mono);
  transition: color 0.15s;
  padding-top: 8px;
}
.back-link:hover { color: var(--fg); }

.email-list { display: flex; flex-direction: column; gap: 8px; }
.email-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: background 0.15s;
}
.email-row:hover { background: var(--bg-card-hover); }
.email-row.unread { border-left: 3px solid var(--lime); }
.email-row.read { opacity: 0.65; }
.email-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}
.email-row.unread .email-status-dot { background: var(--lime); }
.email-row.read .email-status-dot { background: transparent; }
.email-content { flex: 1; min-width: 0; }
.email-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 4px; }
.email-from { font-size: 14px; font-weight: 600; }
.email-date { font-family: var(--font-mono); font-size: 12px; color: var(--fg-muted); display: flex; flex-direction: column; text-align: right; }
.email-subject { font-size: 13px; color: var(--fg); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.email-body-preview { font-size: 12px; color: var(--fg-muted); font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 768px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .inbox-container { padding: 24px 16px; }
}