/* Demo page — matches Autopilote dark theme */
:root {
  --bg: #0a0e14;
  --surface: #111827;
  --accent: #f59e0b;
  --accent-dim: rgba(245, 158, 11, 0.12);
  --text: #f0ece4;
  --text-muted: #8b8a87;
  --border: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
}

.demo-body { padding: 0; }

/* Header */
.demo-header {
  padding: 20px 40px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
}
.demo-back {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.demo-back:hover { color: var(--text); }
.demo-badge {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.demo-header h1 { font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 700; }
.demo-subtitle { font-size: 0.85rem; color: var(--text-muted); }

/* Layout */
.demo-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px;
  min-height: calc(100vh - 80px);
  align-items: start;
}

/* Info panel */
.demo-info h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  margin-bottom: 24px;
}
.demo-steps { display: flex; flex-direction: column; gap: 20px; margin-bottom: 32px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step strong { display: block; font-size: 0.95rem; margin-bottom: 4px; }
.step p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.5; }

/* Stats */
.demo-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
}
.stat { text-align: center; }
.stat-value { display: block; font-family: 'Syne', sans-serif; font-size: 1.4rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); }

/* Widget */
.demo-widget-wrap { position: sticky; top: 40px; }
.widget-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.widget-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, #1a2535, #0f1922);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.widget-clinic-logo { font-size: 1.6rem; }
.widget-clinic-name {
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
}
.widget-online { color: #4ade80; font-size: 0.72rem; margin-left: auto; }
.widget-messages { height: 380px; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; }
.msg.user { justify-content: flex-end; }
.msg.bot { justify-content: flex-start; }
.msg-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
}
.msg.user .msg-bubble {
  background: var(--accent);
  color: #0a0e14;
  border-bottom-right-radius: 4px;
}
.msg.bot .msg-bubble {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

/* Input */
.widget-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}
.widget-input-area input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 16px;
  color: var(--text);
  font-size: 0.88rem;
  outline: none;
}
.widget-input-area input:focus { border-color: rgba(245, 158, 11, 0.4); }
.widget-input-area button {
  background: var(--accent);
  color: #0a0e14;
  border: none;
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.widget-input-area button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Suggestions */
.demo-suggestions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.suggestions-label { font-size: 0.75rem; color: var(--text-muted); }
.suggestion-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.2s;
}
.suggestion-btn:hover { border-color: var(--accent); color: var(--accent); }

/* API info */
.demo-api-info {
  margin-top: 10px;
  text-align: center;
}
.demo-api-info code {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  padding: 4px 10px;
  border-radius: 4px;
}