:root {
  --bg: #eff6f7;
  --surface: #ffffff;
  --surface-soft: #f7fbfc;
  --text: #13232b;
  --muted: #667f87;
  --accent: #23b5b5;
  --accent-strong: #168989;
  --dark: #0e1116;
  --dark-soft: #171c23;
  --dark-card: #202631;
  --border: rgba(35, 181, 181, 0.18);
  --danger: #ea4335;
  --shadow: 0 22px 56px rgba(19, 35, 43, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(35, 181, 181, 0.18), transparent 26%),
    linear-gradient(180deg, #fbfeff, var(--bg));
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
}

.login-screen,
.dashboard-screen,
.waiting-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: min(100%, 520px);
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.brand {
  margin: 0;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 12px 0 0;
  font-family: "Space Grotesk", sans-serif;
}

.subtext,
.hint,
.meta-text {
  color: var(--muted);
}

.auth-form,
.meeting-form,
.wait-form {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.93rem;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(35, 181, 181, 0.5);
  box-shadow: 0 0 0 4px rgba(35, 181, 181, 0.14);
}

.primary-btn,
.secondary-btn,
.danger-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), #54d8d8);
  color: #fff;
}

.secondary-btn {
  background: #ebf8f9;
  color: var(--accent-strong);
}

.danger-btn {
  background: var(--danger);
  color: #fff;
}

.demo-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.demo-box p {
  margin: 0 0 8px;
  font-weight: 700;
}

.demo-box code {
  display: block;
  margin-top: 4px;
}

.dashboard-screen {
  padding: 18px;
  align-content: start;
  gap: 18px;
}

.dashboard-shell {
  width: min(1200px, 100%);
  display: grid;
  gap: 18px;
}

.dashboard-shell--split {
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
}

.home-sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 16px;
}

.home-nav {
  display: grid;
  gap: 8px;
}

.nav-btn,
.black-btn {
  border: 0;
  border-radius: 18px;
  padding: 12px 16px;
  font-weight: 800;
}

.nav-btn {
  text-align: left;
  background: #eef4f5;
  color: var(--text);
}

.nav-btn.active,
.black-btn {
  background: #111317;
  color: #fff;
}

.home-main {
  display: grid;
  gap: 18px;
}

.meeting-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.meeting-action-card,
.usage-mini-card {
  padding: 18px;
  border-radius: 22px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.usage-mini-card strong {
  display: block;
  font-size: 2rem;
  margin: 10px 0 6px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
}

.avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #158888);
  color: #fff;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
}

.panel {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.metric-card {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.metric-card strong {
  display: block;
  font-size: 1.6rem;
  margin-top: 10px;
}

.usage-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.usage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-soft);
}

.meeting-call {
  min-height: 100vh;
  display: block;
  background: var(--dark);
  color: #f4f7fb;
}

.meeting-main {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  padding: 12px 16px 8px;
}

.meeting-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.meeting-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.meeting-code-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.topbar-chip,
.panel-close-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
}

.meeting-stage {
  position: relative;
  min-height: 70vh;
  padding: 10px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(180deg, #0a0b0e, #101217 55%, #0c0e12);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.tiles-grid {
  height: 100%;
  display: grid;
  gap: 10px;
}

.stage-focus-layout {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 10px;
}

.stage-focus-layout--solo-ai {
  grid-template-columns: minmax(0, 1fr);
}

.stage-primary,
.stage-secondary {
  min-height: 0;
}

.stage-secondary {
  display: grid;
  gap: 10px;
  align-content: start;
  overflow: auto;
}

.stage-pip {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: min(24vw, 230px);
  z-index: 5;
}

.tile {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #26313a, #161c24);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 190px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.tile:hover {
  transform: translateY(-1px);
}

.tile.focused {
  box-shadow: 0 0 0 2px rgba(88, 155, 255, 0.55);
}

.tile--hero {
  min-height: 100%;
}

.tile video,
.tile .share-surface {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tile .share-surface {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(35, 181, 181, 0.22), rgba(18, 25, 31, 0.78)),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.06) 0,
      rgba(255, 255, 255, 0.06) 18px,
      transparent 18px,
      transparent 36px
    );
  font-weight: 700;
}

.ai-board-surface {
  position: absolute;
  inset: 0;
  padding: 22px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  background:
    linear-gradient(180deg, rgba(16, 20, 28, 0.92), rgba(8, 10, 14, 0.98)),
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 30%);
  color: #eef3f7;
}

.ai-board-header {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.ai-board-lines {
  display: grid;
  align-content: start;
  gap: 14px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.3rem);
}

.ai-board-line {
  padding: 10px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.tile-avatar {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.tile-avatar .avatar-circle {
  width: 96px;
  height: 96px;
  font-size: 2rem;
}

.tile-label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  font-size: 0.9rem;
}

.tile-badges {
  position: absolute;
  right: 12px;
  top: 12px;
  display: flex;
  gap: 8px;
}

.badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  font-size: 0.76rem;
}

.pip-self {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: auto;
  z-index: 6;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.meeting-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 0 10px;
}

.ctrl-btn {
  min-width: 56px;
  min-height: 56px;
  border: 0;
  border-radius: 50%;
  padding: 0 14px;
  background: #23262d;
  color: #fff;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.11);
}

.ctrl-btn.active {
  background: #00677f;
}

.ctrl-btn.danger {
  background: var(--danger);
  min-width: 68px;
  border-radius: 999px;
}

.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(390px, 94vw);
  padding: 14px 14px 18px 0;
  transform: translateX(105%);
  transition: transform 180ms ease;
  z-index: 12;
  pointer-events: none;
}

.side-panel.open {
  transform: translateX(0);
  pointer-events: auto;
}

.side-shell {
  height: 100%;
  border-radius: 16px 0 0 16px;
  background: #1b1f27;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
}

.side-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-switcher {
  display: flex;
  gap: 8px;
}

.switch-btn {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
}

.switch-btn.active {
  background: var(--accent);
}

.scroll-box {
  overflow: auto;
  display: grid;
  gap: 10px;
  align-content: start;
}

.list-row,
.chat-message,
.request-card {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.request-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.chat-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.chat-compose textarea {
  min-height: 70px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  padding: 12px;
}

.chat-compose textarea::placeholder {
  color: #a9bac4;
}

.chat-message strong,
.request-card strong,
.list-row strong {
  display: block;
  margin-bottom: 6px;
}

.waiting-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

@media (max-width: 1100px) {
  .dashboard-grid,
  .meeting-call {
    grid-template-columns: 1fr;
  }

  .dashboard-shell--split,
  .meeting-actions-grid {
    grid-template-columns: 1fr;
  }

  .side-panel {
    width: min(420px, 100vw);
    padding: 0;
  }

  .side-shell {
    border-radius: 24px;
    border-left: 0;
  }
}

@media (max-width: 900px) {
  .meeting-topbar,
  .meeting-topbar-actions {
    flex-wrap: wrap;
  }

  .home-sidebar {
    position: static;
  }

  .stage-focus-layout {
    grid-template-columns: 1fr;
  }

  .stage-secondary {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .stage-pip {
    width: min(38vw, 190px);
  }
}

@media (max-width: 720px) {
  .card,
  .panel {
    padding: 18px;
  }

  .metrics-row {
    grid-template-columns: 1fr;
  }

  .meeting-stage {
    min-height: 60vh;
  }

  .stage-pip {
    width: 140px;
  }

  .meeting-controls {
    flex-wrap: wrap;
    gap: 10px;
  }
}
