/* ---- NAV ---- */
.app-nav, .landing-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);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--fg-primary);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo {
  background: var(--accent);
  color: var(--bg-primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 7px;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--fg-secondary);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover, .nav-link.active {
  color: var(--fg-primary);
  background: var(--bg-card);
}

.nav-link.active {
  color: var(--accent);
}

.nav-biz {
  font-size: 0.8rem;
  color: var(--fg-muted);
  padding-left: 16px;
  border-left: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}
.btn-primary:hover { opacity: 0.88; }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline:hover { background: var(--accent-glow); }

.btn-ghost {
  background: var(--bg-card);
  color: var(--fg-primary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--fg-muted); }

.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-full { width: 100%; }

/* ---- HERO CTAs ---- */
.hero-cta {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* ---- APP LAYOUT ---- */
.app-main {
  min-height: calc(100vh - 64px);
  padding: 48px 40px;
}

.app-container {
  max-width: 1200px;
  margin: 0 auto;
}

.app-container.narrow {
  max-width: 680px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 24px;
}

.page-title {
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin-bottom: 6px;
}

.page-sub {
  color: var(--fg-secondary);
  font-size: 0.95rem;
}

/* ---- STATS GRID ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.stat-card.accent {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}

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

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

.stat-label {
  font-size: 0.85rem;
  color: var(--fg-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-display);
  font-weight: 500;
}

/* ---- TWO COL ---- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ---- CARD ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

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

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

.card-count {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 2px 10px;
  font-size: 0.8rem;
  color: var(--fg-secondary);
  font-family: var(--font-display);
}

/* ---- CALL LIST ---- */
.call-list, .appt-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.call-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.call-item:first-child { border-top: none; }

.call-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
}

.call-name {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 2px;
}

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

.call-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

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

/* ---- STATUS BADGES ---- */
.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-family: var(--font-display);
  font-weight: 500;
}

.status-new { background: rgba(138,138,154,0.15); color: var(--fg-secondary); }
.status-ai_handled { background: rgba(0,232,121,0.12); color: var(--accent); }
.status-booked { background: rgba(0,232,121,0.2); color: var(--accent); border: 1px solid rgba(0,232,121,0.4); }

/* ---- APPOINTMENTS ---- */
.appt-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.appt-item:first-child { border-top: none; }

.appt-time-block {
  text-align: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 4px;
}

.appt-day {
  font-size: 0.7rem;
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
}

.appt-hour {
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 2px;
}

.appt-name { font-size: 0.9rem; font-weight: 500; margin-bottom: 2px; }
.appt-service { font-size: 0.8rem; color: var(--fg-secondary); margin-bottom: 2px; }
.appt-phone { font-size: 0.75rem; color: var(--fg-muted); }

/* ---- EMPTY STATES ---- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--fg-secondary);
  font-size: 0.9rem;
}

.empty-icon { font-size: 2rem; margin-bottom: 12px; }

.link-accent { color: var(--accent); text-decoration: underline; }

/* ---- DEMO LAYOUT ---- */
.demo-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

.demo-phone-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 20px;
}

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

.demo-hint {
  color: var(--fg-secondary);
  font-size: 0.9rem;
  max-width: 340px;
  line-height: 1.6;
  margin-top: 12px;
}

.hidden { display: none !important; }

/* Ring animation */
.ring-animation {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
}

.ring-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent-glow);
  animation: pulse 1.2s ease-out infinite;
}

.ring-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

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

.demo-caller-name { font-size: 1.2rem; font-weight: 600; margin: 4px 0; }
.demo-caller-number { color: var(--fg-secondary); font-size: 0.9rem; }

.missed-badge, .ai-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-family: var(--font-display);
  font-weight: 500;
  margin-bottom: 8px;
}

.missed-badge { background: rgba(255,60,60,0.15); color: #ff6b6b; }
.ai-badge { background: rgba(0,232,121,0.15); color: var(--accent); }

.chat-container {
  width: 100%;
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  text-align: left;
}

/* reuse .chat-bubble from theme.css */

/* Booking confirmed */
.booking-confirmed { width: 100%; text-align: center; }

.booking-check {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 auto 16px;
}

.booking-details {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
  text-align: left;
}

.booking-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

.booking-row:first-child { border-top: none; }
.booking-row span { color: var(--fg-secondary); }

/* Demo steps */
.demo-note { text-align: center; font-size: 0.8rem; color: var(--fg-muted); margin-top: 8px; }

.demo-steps-title {
  font-size: 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--fg-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.demo-steps { display: flex; flex-direction: column; gap: 0; }

.demo-step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  opacity: 0.4;
  transition: opacity 0.3s;
}

.demo-step.active { opacity: 1; }
.demo-step:first-child { border-top: none; }

.demo-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg-muted);
  flex-shrink: 0;
}

.demo-step.active .demo-step-num {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.demo-step-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
}

.demo-step-content strong { font-size: 0.9rem; font-weight: 600; }
.demo-step-content span { font-size: 0.85rem; color: var(--fg-secondary); }

.demo-result-card {
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  margin-top: 24px;
  box-shadow: 0 0 32px var(--accent-glow);
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--fg-secondary);
  margin-bottom: 8px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-value {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.result-sub { font-size: 0.8rem; color: var(--fg-muted); margin-top: 6px; }

/* ---- SETUP FORM ---- */
.setup-form { display: flex; flex-direction: column; gap: 24px; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg-primary);
}

.form-group input,
.form-group textarea {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--fg-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  width: 100%;
  transition: border-color 0.15s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group textarea { resize: vertical; }

.form-hint {
  font-size: 0.8rem;
  color: var(--fg-muted);
  line-height: 1.5;
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 8px;
}

.setup-tip {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  background: rgba(0,232,121,0.06);
  border: 1px solid rgba(0,232,121,0.2);
  border-radius: var(--radius);
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--fg-secondary);
  line-height: 1.6;
}

.tip-icon { font-size: 1.4rem; flex-shrink: 0; }

/* ---- ALERTS ---- */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.alert-success {
  background: rgba(0,232,121,0.1);
  border: 1px solid rgba(0,232,121,0.3);
  color: var(--fg-primary);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .demo-layout { grid-template-columns: 1fr; }
  .app-main { padding: 32px 20px; }
  .nav-inner { padding: 0 20px; }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .page-header { flex-direction: column; }
  .hero-cta { flex-direction: column; }
  .nav-biz { display: none; }
}
