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

.dashboard-page {
  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 rgba(255,255,255,0.06);
}

.dash-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.dash-brand:hover { color: var(--accent); }

.dash-nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.dash-nav-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  /* Pulse animation */
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.nav-link {
  font-size: 0.88rem;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* PAGE HEADER */
.dash-header {
  padding: 40px 24px 0;
  background: var(--bg);
}

.dash-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.dash-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 8px;
}

.dash-subtitle {
  color: var(--fg-muted);
  font-size: 0.95rem;
  max-width: 420px;
}

/* DEMO BUTTON */
.demo-trigger-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #0a0a0f;
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
}

.demo-trigger-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.demo-trigger-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-icon { font-size: 1.1rem; }
.btn-icon.spin { display: inline-block; animation: spin 0.8s linear infinite; }

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* STATS ROW */
.stats-row {
  padding: 32px 24px;
}

.stats-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

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

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

.stat-card.accent {
  border-color: rgba(0, 232, 123, 0.2);
  background: linear-gradient(135deg, rgba(0,232,123,0.06) 0%, var(--bg-card) 100%);
}

.stat-card-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.stat-card.accent .stat-card-number { color: var(--accent); }

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

/* DEMO TOAST */
.demo-toast {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 999;
  width: 400px;
  max-width: calc(100vw - 48px);
  transform: translateX(calc(100% + 24px));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.demo-toast.visible {
  transform: translateX(0);
}

.toast-inner {
  background: var(--bg-card);
  border: 1px solid rgba(0, 232, 123, 0.3);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,232,123,0.1);
}

.toast-icon { font-size: 1.6rem; flex-shrink: 0; }

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

.toast-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--fg);
  margin-bottom: 6px;
}

.toast-body {
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast-badge {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  background: var(--accent-dim);
  border-radius: 6px;
  padding: 4px 8px;
  white-space: nowrap;
}

/* CALLS SECTION */
.calls-section {
  padding: 0 24px 80px;
}

.calls-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

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

.calls-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
}

.calls-count {
  font-size: 0.82rem;
  color: var(--fg-muted);
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 100px;
  padding: 3px 12px;
}

/* CALL CARDS */
.calls-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.call-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: center;
  transition: border-color 0.2s;
}

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

.call-card.is-demo { border-color: rgba(0, 232, 123, 0.12); }

.call-card.animate-in {
  animation: slideInCard 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes slideInCard {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Caller info */
.call-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.caller-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--fg-muted);
  flex-shrink: 0;
}

.is-demo .caller-avatar {
  background: var(--accent-dim);
  border-color: rgba(0,232,123,0.2);
  color: var(--accent);
}

.caller-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--fg);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0,232,123,0.2);
  border-radius: 4px;
  padding: 2px 6px;
}

.caller-phone {
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-bottom: 2px;
}

.caller-time {
  font-size: 0.78rem;
  color: rgba(136,136,160,0.6);
}

/* Response panel */
.call-response {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.response-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.response-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.response-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

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

.sms-bubble {
  background: var(--bg-elevated);
  border: 1px solid rgba(0, 232, 123, 0.12);
  border-radius: 12px;
  padding: 14px 16px;
  position: relative;
}

.sms-label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(136,136,160,0.5);
  margin-bottom: 6px;
}

.sms-text {
  font-size: 0.9rem;
  color: var(--fg);
  line-height: 1.55;
  font-style: italic;
}

.no-response { justify-content: center; }

.no-response-label {
  font-size: 0.82rem;
  color: rgba(136,136,160,0.4);
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  background: var(--bg-card);
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: 20px;
}

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

.empty-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
}

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

/* MOBILE */
@media (max-width: 768px) {
  .dash-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .call-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .demo-toast {
    width: calc(100vw - 48px);
    right: 24px;
  }
}

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