@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --panel: rgba(18, 21, 27, 0.94);
  --panel-soft: rgba(23, 27, 34, 0.82);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f2f4f8;
  --muted: #9ba3b3;
  --blue: #6da9ff;
  --green: #2fe58c;
  --amber: #f6b73c;
  --purple: #ba75ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(63, 127, 255, 0.16), transparent 36%),
    radial-gradient(circle at top right, rgba(186, 117, 255, 0.16), transparent 30%),
    linear-gradient(180deg, #0b0d10 0%, #0d1014 100%);
}

button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
code, pre { font-family: "Space Grotesk", ui-monospace, monospace; }

.bg-orbit { position: fixed; inset: auto; width: 30rem; height: 30rem; border-radius: 50%; filter: blur(80px); opacity: 0.35; pointer-events: none; z-index: 0; }
.bg-orbit-left { left: -8rem; top: 2rem; background: rgba(63, 127, 255, 0.22); }
.bg-orbit-right { right: -8rem; top: 18rem; background: rgba(186, 117, 255, 0.2); }

.shell { position: relative; z-index: 1; max-width: 1440px; margin: 0 auto; padding: 18px 18px 40px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px 22px; }
.crumbs { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.95rem; }
.crumbs strong { color: var(--text); }
.crumb-sep { opacity: 0.6; }
.top-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.icon-btn, .ghost-btn, .primary-btn, .secondary-btn {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 11px 14px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.icon-btn:hover, .ghost-btn:hover, .primary-btn:hover, .secondary-btn:hover { transform: translateY(-1px); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.06); }
.primary-btn { background: linear-gradient(180deg, rgba(63, 127, 255, 0.28), rgba(63, 127, 255, 0.14)); border-color: rgba(109, 169, 255, 0.3); }
.secondary-btn { background: rgba(255, 255, 255, 0.04); }

.content, .landing { display: grid; gap: 18px; }
.hero-card, .banner, .config-panel, .bot-card, .stat-card, .feature-card, .workspace-card, .auth-card, .pricing-card, .plan-card, .metric-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(18, 21, 27, 0.98), rgba(14, 17, 22, 0.9));
  box-shadow: var(--shadow);
}

.hero-card { display: grid; grid-template-columns: 72px 1fr auto; gap: 18px; align-items: center; padding: 22px; }
.hero-icon, .brand-mark, .workspace-icon {
  display: grid; place-items: center;
  width: 72px; height: 72px; border-radius: 20px;
  font-family: "Space Grotesk", sans-serif; font-size: 1.1rem; font-weight: 700;
  color: #cfe0ff;
  background: radial-gradient(circle at 20% 20%, rgba(109, 169, 255, 0.18), transparent 62%), linear-gradient(180deg, rgba(32, 39, 53, 0.95), rgba(16, 19, 26, 0.95));
  border: 1px solid rgba(109, 169, 255, 0.15);
}
.eyebrow, .panel-kicker, .note-title, .section-kicker, .small-kicker { margin: 0 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.75rem; }
.hero-copy h1, .panel-header h2, .landing-hero h1, .page-title { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: clamp(1.4rem, 2vw, 2.4rem); }
.hero-copy p, .hero-copy .subcopy, .landing-hero p, .workspace-copy p, .auth-copy p, .pricing-copy p, .feature-copy p { margin: 10px 0 0; max-width: 66ch; color: var(--muted); line-height: 1.65; }
.hero-note { padding: 16px 18px; border-radius: 18px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); min-width: 220px; }
.note-value { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.note-value::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 6px rgba(47, 229, 140, 0.12); }

.stats-grid, .metrics-grid, .feature-grid, .plans-grid, .guild-grid, .workspace-grid { display: grid; gap: 14px; }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plans-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.guild-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.stat-card, .metric-card, .feature-card, .plan-card, .workspace-card, .auth-card, .pricing-card { padding: 18px; }
.stat-label, .metric-label, .feature-label, .plan-label { color: var(--muted); font-size: 0.9rem; }
.stat-value, .metric-value, .plan-price { margin-top: 8px; font-family: "Space Grotesk", sans-serif; font-size: 1.6rem; font-weight: 700; }
.stat-foot, .metric-foot, .feature-copy, .plan-copy { margin-top: 8px; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }

.banner {
  display: flex; align-items: flex-start; gap: 16px; padding: 18px 20px;
  background: linear-gradient(90deg, rgba(63, 127, 255, 0.18), rgba(186, 117, 255, 0.16)), rgba(18, 21, 27, 0.95);
}
.banner-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(109, 169, 255, 0.35); color: #d6e6ff; flex: 0 0 auto; }
.banner-title { margin: 0; font-weight: 700; }
.banner-copy { margin: 6px 0 0; color: var(--muted); line-height: 1.6; }

.bot-card { padding: 18px; }
.bot-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.bot-title-wrap { display: flex; align-items: center; gap: 14px; }
.bot-badge, .plan-badge, .workspace-badge { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; font-family: "Space Grotesk", sans-serif; font-weight: 700; background: radial-gradient(circle at 30% 30%, rgba(109, 169, 255, 0.22), transparent 62%), rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.bot-header h3, .workspace-title, .auth-title, .pricing-title, .feature-title { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: 1.25rem; }
.bot-subtitle, .workspace-subtitle, .auth-subtitle { margin: 4px 0 0; color: var(--muted); }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.badge, .pill {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 7px 10px; font-size: 0.84rem; border: 1px solid transparent;
}
.badge.ready, .pill.ready { background: rgba(47, 229, 140, 0.12); color: #7ff0af; border-color: rgba(47, 229, 140, 0.18); }
.badge.pending, .pill.pending { background: rgba(246, 183, 60, 0.12); color: #ffd58a; border-color: rgba(246, 183, 60, 0.18); }
.badge.info, .pill.info { background: rgba(63, 127, 255, 0.12); color: #aecdff; border-color: rgba(63, 127, 255, 0.18); }

.group-layout { display: grid; grid-template-columns: 1.05fr 1.4fr; gap: 16px; }
.source-card, .speakers-shell, .section-panel { border: 1px solid var(--line); border-radius: 18px; background: var(--panel-soft); }
.source-card { padding: 18px; }
.source-card h4, .speakers-title, .section-title { margin: 0 0 12px; font-size: 1rem; font-family: "Space Grotesk", sans-serif; }
.field-grid, .form-grid { display: grid; gap: 12px; }
.field { display: grid; gap: 8px; }
.field label, .field span, .form-label { color: var(--muted); font-size: 0.84rem; letter-spacing: 0.04em; }
.field input, .form-input, .select-input {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; color: var(--text); background: rgba(255, 255, 255, 0.03); outline: none;
}
.field input:focus, .form-input:focus, .select-input:focus { border-color: rgba(109, 169, 255, 0.4); box-shadow: 0 0 0 3px rgba(63, 127, 255, 0.14); }
.source-foot, .section-foot { margin-top: 14px; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

.speakers-shell { padding: 18px; }
.speakers-head, .section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.speaker-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.speaker-card { position: relative; padding: 15px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)), rgba(18, 21, 27, 0.9); min-height: 204px; display: grid; align-content: start; gap: 12px; }
.speaker-card.ready { box-shadow: inset 0 0 0 1px rgba(47, 229, 140, 0.08); }
.speaker-card.pending { background: linear-gradient(180deg, rgba(246, 183, 60, 0.07), rgba(255, 255, 255, 0.02)), rgba(18, 21, 27, 0.9); }
.speaker-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.speaker-name, .workspace-name { margin: 0; font-weight: 700; }
.speaker-subtitle, .workspace-meta { margin: 3px 0 0; color: var(--muted); font-size: 0.9rem; }
.switch { position: relative; width: 46px; height: 26px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; }
.switch-track { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.16); border: 1px solid var(--line); transition: background 160ms ease; }
.switch-thumb { position: absolute; top: 50%; left: 3px; width: 18px; height: 18px; border-radius: 50%; transform: translateY(-50%); background: #fff; transition: transform 160ms ease, background 160ms ease; }
.switch input:checked + .switch-track { background: rgba(47, 229, 140, 0.28); border-color: rgba(47, 229, 140, 0.4); }
.switch input:checked + .switch-track .switch-thumb { transform: translate(20px, -50%); background: #d6ffe7; }
.speaker-chip-row, .chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.mini-badge, .mini-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 0.78rem; color: #dfe5ef; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.mini-badge.success, .mini-pill.success { background: rgba(47, 229, 140, 0.12); color: #7ff0af; border-color: rgba(47, 229, 140, 0.16); }
.mini-badge.warn, .mini-pill.warn { background: rgba(246, 183, 60, 0.12); color: #ffd58a; border-color: rgba(246, 183, 60, 0.16); }
.speaker-fields, .settings-grid { display: grid; gap: 10px; }
.speaker-fields input { width: 100%; padding: 10px 11px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); color: var(--text); }
.speaker-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: 0.85rem; }

.config-panel, .workspace-card { padding: 18px; }
.panel-header, .workspace-head, .auth-head, .pricing-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.panel-actions, .action-row { display: flex; gap: 10px; flex-wrap: wrap; }
.config-panel pre { margin: 0; overflow: auto; max-height: 520px; padding: 18px; border-radius: 18px; background: #0a0d11; border: 1px solid var(--line); color: #c8d3e0; line-height: 1.55; white-space: pre-wrap; }
.workspace-grid { grid-template-columns: 1.3fr 0.8fr; }
.workspace-section { border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, 0.02); padding: 16px; }
.workspace-section h4 { margin: 0 0 12px; font-family: "Space Grotesk", sans-serif; font-size: 1rem; }
.workspace-list { display: grid; gap: 12px; }
.workspace-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); text-decoration: none; }
.workspace-item { width: 100%; text-align: left; appearance: none; }
.workspace-item:hover { border-color: rgba(109, 169, 255, 0.32); }
.workspace-item strong { display: block; }
.workspace-item span { color: var(--muted); font-size: 0.9rem; }
.workspace-copy { color: var(--muted); line-height: 1.65; }

.landing-body, .app-body { min-height: 100vh; }
.landing-shell { position: relative; z-index: 1; max-width: 1440px; margin: 0 auto; padding: 24px 18px 60px; }
.landing-top { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 24px; }
.brand { display: flex; gap: 14px; align-items: center; }
.brand-name { font-family: "Space Grotesk", sans-serif; font-size: 1.1rem; font-weight: 700; }
.brand-sub { color: var(--muted); font-size: 0.9rem; }
.landing-hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 18px; align-items: start; margin-bottom: 18px; }
.hero-panel, .hero-side, .cta-panel, .auth-panel, .pricing-panel, .feature-panel { border: 1px solid var(--line); border-radius: 26px; background: linear-gradient(180deg, rgba(18, 21, 27, 0.98), rgba(14, 17, 22, 0.92)); box-shadow: var(--shadow); }
.hero-panel { padding: 26px; }
.hero-panel .lead { color: var(--muted); line-height: 1.7; max-width: 62ch; margin: 12px 0 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.hero-side { padding: 18px; display: grid; gap: 12px; }
.stat-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat-strip .metric-card { min-height: 100%; }
.section { margin-top: 18px; }
.section h2 { margin: 0 0 12px; font-family: "Space Grotesk", sans-serif; }
.feature-grid .feature-card { min-height: 100%; }
.pricing-panel { padding: 18px; }
.pricing-copy { max-width: 68ch; }
.plan-card { display: grid; gap: 12px; }
.plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.plan-name { font-family: "Space Grotesk", sans-serif; font-size: 1.2rem; margin: 0; }
.plan-price strong { font-size: 2rem; }
.plan-features { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 8px; }
.hero-side .auth-card { height: 100%; display: grid; align-content: start; gap: 12px; }
.auth-actions, .pricing-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.guild-grid .workspace-card { min-height: 100%; }
.notice {
  padding: 14px 16px; border-radius: 16px; background: rgba(63, 127, 255, 0.12); border: 1px solid rgba(109, 169, 255, 0.18); color: #dbe9ff;
}
.empty-state { padding: 22px; border-radius: 20px; border: 1px dashed var(--line-strong); color: var(--muted); text-align: center; }
.hidden { display: none !important; }

@media (max-width: 1180px) {
  .group-layout, .workspace-grid, .landing-hero { grid-template-columns: 1fr; }
  .speaker-grid, .stats-grid, .metrics-grid, .feature-grid, .plans-grid, .guild-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-card { grid-template-columns: 72px 1fr; }
  .hero-note { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .topbar, .panel-header, .bot-header, .workspace-head, .auth-head, .pricing-head, .landing-top { flex-direction: column; align-items: stretch; }
  .speaker-grid, .stats-grid, .metrics-grid, .feature-grid, .plans-grid, .guild-grid, .stat-strip { grid-template-columns: 1fr; }
  .hero-card { grid-template-columns: 1fr; }
  .hero-icon, .brand-mark, .workspace-icon { width: 60px; height: 60px; }
}
