.agent-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-page);
}
.agent-header {
  width: 100%;
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
}
.agent-logo {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.03em;
}
.agent-logo svg { flex-shrink: 0; }
.agent-badge {
  background: var(--indigo-50);
  color: var(--indigo-700);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
}

.agent-hero {
  text-align: center;
  padding: var(--space-16) var(--space-6) var(--space-6);
  max-width: 600px;
}
.agent-headline {
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}
.agent-headline span { color: var(--indigo-500); }
.agent-tagline {
  font-size: var(--text-md);
  color: var(--text-tertiary);
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.6;
}

.agent-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
}
.agent-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  box-shadow: var(--shadow-xs);
}

/* ── Hero Image ─────────────────────────────────────── */
.hero-image-wrap {
  width: 100%;
  max-width: 480px;
  padding: 0 var(--space-6);
  margin-bottom: var(--space-4);
}
.hero-image {
  width: 100%;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-2);
  object-fit: cover;
  max-height: 240px;
}

/* ── Mic Section ───────────────────────────────────── */
.mic-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-8) 0 var(--space-6);
  position: relative;
}

/* Glow background */
.mic-glow {
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91,116,237,0.08) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  pointer-events: none;
  transition: all 0.5s ease;
}
.mic-section.listening .mic-glow {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(91,116,237,0.2) 0%, rgba(91,116,237,0.05) 50%, transparent 70%);
}
.mic-section.speaking .mic-glow {
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(245,166,35,0.15) 0%, rgba(91,116,237,0.08) 50%, transparent 70%);
}

/* Ring container */
.mic-ring {
  width: 220px; height: 220px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Ring layers */
.mic-ring-layer {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(91,116,237,0.15);
  opacity: 0;
  pointer-events: none;
}
.ring-1 { width: 110%; height: 110%; }
.ring-2 { width: 130%; height: 130%; }
.ring-3 { width: 150%; height: 150%; }

.mic-ring.listening .ring-1 { animation: ringPulse 2s ease-out infinite; }
.mic-ring.listening .ring-2 { animation: ringPulse 2s ease-out 0.4s infinite; }
.mic-ring.listening .ring-3 { animation: ringPulse 2s ease-out 0.8s infinite; }
.mic-ring.speaking .ring-1 { animation: ringPulse 1.2s ease-out infinite; border-color: rgba(245,166,35,0.2); }
.mic-ring.speaking .ring-2 { animation: ringPulse 1.2s ease-out 0.3s infinite; border-color: rgba(245,166,35,0.15); }
.mic-ring.speaking .ring-3 { animation: ringPulse 1.2s ease-out 0.6s infinite; border-color: rgba(245,166,35,0.1); }

@keyframes ringPulse {
  0% { opacity: 0.6; transform: scale(0.9); }
  100% { opacity: 0; transform: scale(1.2); }
}

/* Mic button — dark orb */
.mic-btn {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--gray-800);
  border: none;
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  box-shadow:
    0 4px 16px rgba(0,0,0,0.15),
    0 0 0 1px rgba(255,255,255,0.05) inset,
    0 1px 0 rgba(255,255,255,0.08) inset;
}
.mic-btn:hover {
  background: var(--gray-700);
  box-shadow:
    0 4px 24px rgba(91,116,237,0.25),
    0 0 0 1px rgba(255,255,255,0.08) inset,
    0 1px 0 rgba(255,255,255,0.1) inset;
  color: white;
}

/* States */
.mic-btn.listening {
  background: var(--indigo-600);
  color: white;
  box-shadow:
    0 0 32px rgba(91,116,237,0.4),
    0 0 64px rgba(91,116,237,0.15),
    0 0 0 1px rgba(255,255,255,0.1) inset;
  animation: btnBreathe 2s ease-in-out infinite;
}
.mic-btn.speaking {
  background: var(--gray-800);
  color: var(--amber-400);
  box-shadow:
    0 0 24px rgba(245,166,35,0.25),
    0 0 48px rgba(245,166,35,0.1),
    0 0 0 1px rgba(255,255,255,0.05) inset;
}
.mic-btn.connecting {
  opacity: 0.7;
  animation: btnBreathe 1s ease-in-out infinite;
}

@keyframes btnBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* Wave SVG */
.mic-wave-svg { transition: all 0.3s ease; }
.mic-btn.listening .mic-wave-svg { filter: drop-shadow(0 0 6px rgba(255,255,255,0.4)); }
.mic-btn.speaking .mic-wave-svg { filter: drop-shadow(0 0 4px rgba(245,166,35,0.5)); }
.mic-btn.listening .mic-wave-path animate { dur: 0.8s; }
.mic-btn.speaking .mic-wave-path animate { dur: 1.2s; }

.mic-status { margin-top: var(--space-4); font-size: var(--text-sm); color: var(--text-tertiary); font-weight: 500; }
.mic-label { font-size: var(--text-sm); color: var(--text-hint); margin-top: var(--space-1); }

.end-btn {
  margin-top: var(--space-3);
  background: rgba(220, 38, 38, 0.06);
  color: var(--color-error-text);
  border: 1px solid rgba(220, 38, 38, 0.15);
  padding: 6px 20px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  height: auto;
}
.end-btn:hover { background: rgba(220, 38, 38, 0.1); }

/* ── Bubbles ────────────────────────────────────────── */
.bubbles {
  width: 100%;
  max-width: 480px;
  padding: 0 var(--space-6);
  display: flex;
  flex-direction: column;
}
.bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  line-height: 1.55;
  animation: fadeIn 0.2s ease;
}
.bubble.user {
  background: var(--indigo-600);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: var(--radius-xs);
}
.bubble.assistant {
  background: var(--bg-muted);
  color: var(--text-primary);
  align-self: flex-start;
  border-bottom-left-radius: var(--radius-xs);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Booking ────────────────────────────────────────── */
.booking-section { width: 100%; max-width: 480px; padding: var(--space-5) var(--space-6); }
.booking-toggle {
  background: var(--indigo-50);
  color: var(--indigo-700);
  border: 1px solid var(--indigo-100);
  width: 100%;
  padding: 8px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  height: auto;
}
.booking-toggle:hover { background: var(--indigo-100); }
.booking-panel {
  margin-top: var(--space-3);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: none;
  box-shadow: var(--shadow-1);
}
.booking-panel.active { display: block; }

.slot-grid { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--space-3) 0; }
.slot-pill {
  padding: 5px 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  font-size: 11px;
  cursor: pointer;
  background: var(--bg-surface);
  color: var(--text-tertiary);
  font-weight: 500;
  box-shadow: var(--shadow-xs);
}
.slot-pill:hover { border-color: var(--indigo-300); color: var(--text-primary); }
.slot-pill.selected { background: var(--indigo-600); color: white; border-color: var(--indigo-600); }

/* ── Hub ────────────────────────────────────────────── */
.hub-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-16) var(--space-6);
  background: var(--bg-page);
}
.hub-title { font-size: var(--text-2xl); font-weight: 700; letter-spacing: -0.03em; margin-bottom: var(--space-2); }
.hub-subtitle { color: var(--text-tertiary); font-size: var(--text-md); margin-bottom: var(--space-8); }
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
  width: 100%;
  max-width: 860px;
}
.hub-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-1);
}
.hub-card:hover { border-color: var(--indigo-200); transform: translateY(-2px); box-shadow: var(--shadow-3); }
.hub-card-icon { font-size: 2rem; margin-bottom: var(--space-3); }
.hub-card-name { font-size: var(--text-md); font-weight: 600; margin-bottom: 2px; color: var(--text-primary); }
.hub-card-tagline { font-size: var(--text-sm); color: var(--text-hint); margin-bottom: var(--space-4); line-height: 1.5; }
.hub-card-btn {
  display: inline-block;
  background: var(--indigo-50);
  color: var(--indigo-700);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
}

/* ── Transcript Toggle ──────────────────────────────── */
.transcript-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 34px;
  background: var(--bg-surface);
  color: var(--text-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
}
.transcript-toggle:hover { color: var(--text-primary); border-color: var(--border-emphasis); }

/* ── Transcript Drawer ─────────────────────────────── */
.transcript-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.15);
  z-index: 50;
}
.transcript-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-default);
  box-shadow: -8px 0 24px rgba(0,0,0,0.08);
  z-index: 51;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.2s ease;
}
@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.transcript-drawer.hidden { display: none; }
.transcript-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-default);
}
.transcript-drawer-header h3 { font-size: var(--text-md); font-weight: 600; margin: 0; }
.transcript-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.transcript-msg {
  max-width: 90%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: 1.5;
  animation: fadeIn 0.15s ease;
}
.transcript-msg.user {
  background: var(--indigo-600);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: var(--radius-xs);
}
.transcript-msg.assistant {
  background: var(--bg-muted);
  color: var(--text-primary);
  align-self: flex-start;
  border-bottom-left-radius: var(--radius-xs);
}
.transcript-msg-meta {
  font-size: 10px;
  color: var(--text-hint);
  margin-top: 2px;
}

/* ── Powered By ────────────────────────────────────── */
.powered-by {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--space-4);
  font-size: var(--text-xs);
  color: var(--text-hint);
  font-weight: 500;
}

/* ── Agent Responsive ───────────────────────────────── */
@media (max-width: 768px) {
  .agent-hero { padding: var(--space-8) var(--space-4) var(--space-4); }
  .agent-headline { font-size: var(--text-2xl); }
  .agent-tagline { font-size: var(--text-sm); }
  .mic-section { padding: var(--space-6) 0 var(--space-4); }
  .mic-ring { width: 160px; height: 160px; }
  .mic-btn { width: 90px; height: 90px; }
  .mic-btn svg { width: 40px; height: 40px; }
  .bubbles { max-width: 100%; padding: 0 var(--space-4); }
  .booking-section { padding: var(--space-4); }
  .booking-panel { padding: var(--space-4); }
  .hub-page { padding: var(--space-10) var(--space-4); }
  .hub-title { font-size: var(--text-xl); }
  .hub-grid { grid-template-columns: 1fr; }
  .agent-pills { gap: 4px; }
  .agent-pill { font-size: var(--text-xs); padding: 4px 10px; }
  .transcript-drawer { width: 100%; max-width: 100%; }
  .transcript-toggle { font-size: var(--text-xs); padding: 0 10px; height: 30px; }
}

@media (max-width: 480px) {
  .agent-header { padding: var(--space-3) var(--space-4); }
  .agent-hero { padding: var(--space-6) var(--space-3) var(--space-3); }
  .agent-headline { font-size: var(--text-xl); }
  .mic-ring { width: 140px; height: 140px; }
  .mic-btn { width: 80px; height: 80px; }
  .bubble { max-width: 90%; }
}
