/* ─── DeskNever Dashboard & Demo CSS ─── */

/* ─── Nav Bar ─── */
.dash-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 12, 14, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dash-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 20px;
}

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

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

.dash-clinic-tag {
  font-size: 13px;
  color: var(--fg-dim);
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
  margin-left: 4px;
}

.dash-nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-dot-wrap {
  font-size: 13px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.btn-accent-sm {
  font-size: 13px;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.2s;
}
.btn-accent-sm:hover { opacity: 0.85; }

.btn-ghost-sm {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-ghost-sm:hover { color: var(--fg); border-color: rgba(255,255,255,0.15); }

/* ─── Dashboard Main ─── */
.dash-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px;
}

/* ─── Stats Row ─── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: border-color 0.3s;
}
.stat-card:hover { border-color: rgba(212,168,83,0.15); }
.stat-card-accent { border-color: rgba(212,168,83,0.15); }

.stat-card-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 12px;
}

.stat-card-number {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card-sub {
  font-size: 13px;
  color: var(--fg-dim);
}

/* ─── Two-column layout ─── */
.dash-cols {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}

.dash-col-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ─── Panels ─── */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-head {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}

.panel-badge {
  font-size: 12px;
  color: var(--fg-muted);
  background: var(--bg-elevated);
  padding: 4px 10px;
  border-radius: 100px;
}

.loading-msg, .empty-msg {
  padding: 32px 24px;
  color: var(--fg-dim);
  font-size: 14px;
  text-align: center;
}

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

/* ─── Appointment List ─── */
.appt-list { padding: 8px 0; max-height: 520px; overflow-y: auto; }

.appt-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.appt-item:last-child { border-bottom: none; }
.appt-item:hover { background: rgba(255,255,255,0.02); }

.appt-date-block {
  min-width: 44px;
  text-align: center;
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 8px 6px;
}

.appt-day {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.appt-month {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-top: 2px;
}

.appt-details { flex: 1; min-width: 0; }

.appt-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.appt-meta { font-size: 13px; color: var(--fg-muted); }

.appt-type {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
}

.tag-emergency { background: rgba(239,68,68,0.12); color: #f87171; }
.tag-clean     { background: rgba(52,211,153,0.12); color: #34d399; }
.tag-white     { background: rgba(251,191,36,0.12); color: #fbbf24; }
.tag-fill      { background: rgba(139,92,246,0.12); color: #a78bfa; }
.tag-general   { background: var(--accent-glow); color: var(--accent); }

.appt-notes {
  font-size: 12px;
  color: var(--fg-dim);
  margin-top: 4px;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.appt-phone {
  font-size: 12px;
  color: var(--fg-dim);
  white-space: nowrap;
  padding-top: 4px;
}

/* ─── Calls List ─── */
.calls-list { padding: 4px 0; max-height: 300px; overflow-y: auto; }

.call-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.call-item:last-child { border-bottom: none; }
.call-item:hover { background: rgba(255,255,255,0.02); }

.call-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.intent-appt { background: var(--accent-glow); }
.intent-emerg { background: rgba(239,68,68,0.12); }
.intent-inq   { background: rgba(99,102,241,0.12); }
.intent-comp  { background: rgba(251,191,36,0.12); }

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

.call-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.call-summary {
  font-size: 12px;
  color: var(--fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.call-meta { text-align: right; flex-shrink: 0; }

.call-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 100px;
  margin-bottom: 4px;
  display: inline-block;
  color: var(--fg-muted);
  background: var(--bg-elevated);
}

.call-ago {
  font-size: 11px;
  color: var(--fg-dim);
}

/* ─── Leads List ─── */
.leads-list { padding: 4px 0; max-height: 240px; overflow-y: auto; }

.lead-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.lead-item:last-child { border-bottom: none; }

.lead-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid rgba(212,168,83,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
  flex-shrink: 0;
}

.lead-info { flex: 1; min-width: 0; }
.lead-name { font-size: 14px; font-weight: 600; }
.lead-interest { font-size: 12px; color: var(--fg-muted); margin-top: 2px; }
.lead-phone { font-size: 12px; color: var(--fg-dim); flex-shrink: 0; }

/* ─── Demo Page ─── */
.demo-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 32px;
}

.demo-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

/* ─── Phone Call Simulator Card ─── */
.demo-phone-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  position: sticky;
  top: 80px;
}

.phone-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.phone-avatar svg { display: block; }

.phone-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.phone-subtitle {
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 2px;
}

.calling-indicator {
  margin-left: auto;
  display: flex;
  gap: 5px;
  align-items: center;
  opacity: 0.4;
  transition: opacity 0.3s;
}

.ring-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: ring-pulse 1.2s infinite ease-in-out;
}
.ring-dot:nth-child(2) { animation-delay: 0.2s; }
.ring-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes ring-pulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.caller-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.demo-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.demo-input:focus { border-color: rgba(212,168,83,0.4); }
.demo-input::placeholder { color: var(--fg-dim); }

.scenario-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 10px;
}

.scenario-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.scenario-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.scenario-pill:hover, .scenario-pill.active {
  border-color: rgba(212,168,83,0.3);
  color: var(--accent);
  background: var(--accent-glow);
}

.demo-textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 16px;
}
.demo-textarea:focus { border-color: rgba(212,168,83,0.4); }
.demo-textarea::placeholder { color: var(--fg-dim); }

.call-btn {
  width: 100%;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 12px;
  padding: 16px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity 0.2s;
  margin-bottom: 12px;
}
.call-btn:hover:not(:disabled) { opacity: 0.88; }
.call-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.seed-btn {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.seed-btn:hover:not(:disabled) { border-color: rgba(255,255,255,0.15); color: var(--fg); }
.seed-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ─── Aria Response Panel ─── */
.demo-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.aria-card {
  background: var(--bg-card);
  border: 1px solid rgba(212,168,83,0.15);
  border-radius: 20px;
  padding: 28px;
}

.aria-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.aria-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}

.aria-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}

.aria-role {
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 2px;
}

.aria-live-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #4ade80;
  background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.2);
  padding: 4px 10px;
  border-radius: 100px;
}

.aria-message {
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg-muted);
  min-height: 80px;
}

.aria-intent {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.intent-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
}

.intent-appointment { background: var(--accent-glow); color: var(--accent); }
.intent-emergency   { background: rgba(239,68,68,0.12); color: #f87171; }
.intent-inquiry     { background: rgba(99,102,241,0.12); color: #818cf8; }
.intent-complaint   { background: rgba(251,191,36,0.12); color: #fbbf24; }

.intent-dur { font-size: 12px; color: var(--fg-dim); }

/* ─── Outcome Panel ─── */
.outcome-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.outcome-icon { font-size: 32px; flex-shrink: 0; }

.outcome-text { flex: 1; min-width: 0; }

.outcome-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.outcome-detail {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.6;
}

.outcome-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.outcome-link:hover { text-decoration: underline; }

/* ─── How It Works Strip ─── */
.how-strip {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.how-strip-item {
  flex: 1;
  text-align: center;
}

.how-strip-icon { font-size: 24px; margin-bottom: 6px; }

.how-strip-text {
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.4;
}

.how-strip-arrow {
  color: var(--fg-dim);
  font-size: 16px;
  flex-shrink: 0;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .dash-cols { grid-template-columns: 1fr; }
  .demo-split { grid-template-columns: 1fr; }
  .demo-phone-card { position: static; }
  .dash-main { padding: 20px; }
  .demo-main { padding: 20px; }
}

@media (max-width: 600px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .dash-nav-inner { padding: 0 16px; }
  .dash-clinic-tag { display: none; }
  .status-dot-wrap { display: none; }
}
