:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-2: #182132;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #d9e2ec;
  --blue: #1F363C;
  --teal: #127c8a;
  --soft: #eef4f8;
  --green: #197149;
  --amber: #a16207;
  --danger: #b42318;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Inter, Aptos, Arial, sans-serif; background: #e8eef4; color: var(--ink); }
button, input, select, textarea { font: inherit; }
a { color: var(--teal); }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  background: #1F363C;
  color: white;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar h1 { margin: 0; font-size: 1.3rem; }
.topbar p { margin: 0.15rem 0 0; color: rgba(255,255,255,0.82); font-size: 0.95rem; }
.site-topbar {
  background: #1F363C;
  color: #fff;
  padding: 0.85rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-brand { display: inline-flex; align-items: center; }
.site-brand img { height: 42px; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.site-nav a { color: #dbeafe; text-decoration: none; font-weight: 600; }
.site-nav .nav-login {
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(219,234,254,0.35);
}
.landing-wrap {
  max-width: 980px;
  width: 100%;
  margin: 1rem auto;
  display: grid;
  gap: 1rem;
  padding: 0 1rem;
}
.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 14px;
  padding: 0.75rem 1rem;
  font-weight: 600;
}
.btn-link.primary { background: var(--blue); color: #fff; }
.btn-link.secondary { background: #dbe7f1; color: #17324d; }
.btn-link.ghost { background: #f4f7fb; border: 1px solid #dbe5ef; color: #334155; }

.badge-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.badge {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
}

.layout {
  display: grid;
  grid-template-columns: 360px 1fr 360px;
  gap: 1rem;
  padding: 1rem;
}

.column { display: flex; flex-direction: column; gap: 1rem; }
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  padding: 1rem;
}
.panel h2, .panel h3 { margin: 0 0 0.75rem; }
.panel p.helper { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.92rem; }
.panel summary { cursor: pointer; }
.panel summary h3 { display: inline; margin: 0; }
.section-collapse > summary { margin-bottom: 0.8rem; }

.stack { display: flex; flex-direction: column; gap: 0.75rem; }
.row { display: flex; gap: 0.75rem; }
.row.wrap { flex-wrap: wrap; }
.row > * { flex: 1; }
.inline-field { display: flex; gap: 0.55rem; align-items: center; }
.inline-field .inline-btn { flex: 0 0 auto; }

label.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: #334155;
}

.landing-page {
  max-width: 1180px;
  width: 100%;
  margin: 1rem auto 2rem;
  display: grid;
  gap: 1rem;
  padding: 0 1rem;
}

.landing-hero {
  padding: 1.4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 1rem;
  align-items: start;
  margin-top: 1rem;
}

.hero-lead {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #243b53;
  margin: 0.85rem 0 1rem;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}

.hero-card {
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8fb 100%);
}

.feature-list {
  margin: 0.5rem 0 0 1.1rem;
  padding: 0;
  line-height: 1.6;
}

.three-up {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.vision-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.mailing-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
}

.mailing-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.8rem;
  align-items: end;
  margin-top: 1rem;
}

@media (max-width: 980px) {
  .hero-grid,
  .three-up,
  .vision-grid,
  .mailing-form {
    grid-template-columns: 1fr;
  }
}

input[type="text"],
input[type="color"],
select,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
  background: white;
}

textarea { resize: vertical; min-height: 100px; }
input.compact-field { width: 140px; padding: 0.35rem; height: 44px; }

button {
  border: none;
  border-radius: 14px;
  padding: 0.8rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}
button:hover { transform: translateY(-1px); }
button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

button.primary { background: var(--blue); color: white; }
button.secondary { background: #dbe7f1; color: var(--blue); }
button.ghost { background: #f4f7fb; color: #334155; border: 1px solid #dbe5ef; }
button.success { background: var(--green); color: white; }
button.warning { background: #fef3c7; color: #92400e; }

.chat-log {
  height: 52vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-right: 0.35rem;
}

.msg {
  border-radius: 18px;
  padding: 0.85rem 0.95rem;
  max-width: 92%;
  white-space: pre-wrap;
  line-height: 1.45;
}
.msg.user { align-self: flex-end; background: #dff2ff; }
.msg.assistant { align-self: flex-start; background: #eff6ff; }
.msg.system { align-self: center; background: #f8fafc; color: var(--muted); font-size: 0.88rem; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.38rem 0.72rem;
  background: #eef4f8;
  color: #334155;
  font-size: 0.82rem;
}
.status .dot {
  width: 9px; height: 9px; border-radius: 50%; background: #94a3b8;
}
.status.live .dot { background: #10b981; }
.status.warn .dot { background: #f59e0b; }
.status.offline { background: #f1f5f9; color: #475569; }
.status.offline .dot { background: #94a3b8; }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}
.quick-grid button.active {
  background: #cfe2f2;
  border-color: #9eb8d2;
  color: #102a43;
}

.feature-control-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.feature-action-panel.hidden { display: none; }

.two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}
.span-2 { grid-column: span 2; }
.admin-layout { grid-template-columns: 280px 1fr; }
.admin-layout .narrow { min-width: 0; }
.admin-layout .admin-wide { min-width: 0; }
.session-list-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: #fbfdff;
}
.table-pill {
  display: inline-block;
  border-radius: 999px;
  background: #e8f1f9;
  color: #17324d;
  padding: 0.2rem 0.55rem;
  font-size: 0.8rem;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-height: 32vh;
  overflow: auto;
}


.admin-session-list {
  max-height: none;
  overflow: visible;
}

.small-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.8rem;
  background: #fbfdff;
}
.small-card h4 { margin: 0 0 0.35rem; font-size: 0.98rem; }
.small-card p { margin: 0.15rem 0; color: #475569; }
.small-card ul { margin: 0.45rem 0 0 1rem; padding: 0; }

.word-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.8rem;
  align-items: center;
  min-height: 90px;
}
.word-cloud span {
  display: inline-block;
  color: var(--blue);
  background: #eef4f8;
  padding: 0.24rem 0.5rem;
  border-radius: 999px;
}

.poll-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #f8fafc;
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
}
.bar {
  height: 8px;
  background: #dbe7f1;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.35rem;
}
.bar > div {
  height: 100%;
  background: linear-gradient(90deg, #127c8a, #1F363C);
}

.footer-note { color: var(--muted); font-size: 0.82rem; }
.hidden { display: none !important; }
.branding-slot {
  border: 1px dashed #b7c6d6;
  border-radius: 14px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: #f8fbff;
  overflow: hidden;
  position: relative;
}

.branding-slot-image {
  max-width: 100%;
  max-height: 180px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 12px;
}
.chat-header-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.5rem;
}
.avatar-slot {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff1e3;
  font-size: 1.25rem;
}

.participant-layout {
  max-width: 920px;
  margin: 0 auto;
  padding: 1rem;
  display: grid;
  gap: 1rem;
}

.participant-shell {
  max-width: 1300px;
  grid-template-columns: 320px 1fr;
  align-items: start;
}
.participant-side { display: flex; flex-direction: column; gap: 1rem; }
.participant-main-chat .chat-log { height: 46vh; }
.transcript-pane { max-height: 36vh; overflow: auto; }

.three-up {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.connection-row { align-items: flex-start; }
.connection-row > button { flex: 0 0 auto; }

.admin-panel-wrap {
  max-width: 1200px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 0.8rem;
}

.admin-user-list,
.admin-log-list {
  max-height: none;
  overflow: visible;
}

.admin-user-controls {
  display: grid;
  grid-template-columns: auto minmax(110px, 1fr) auto minmax(110px, 1fr) auto auto;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.75rem;
}

.admin-password-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

@media (max-width: 1180px) {
  .layout { grid-template-columns: 1fr; }
  .participant-shell { grid-template-columns: 1fr; }
  .three-up { grid-template-columns: 1fr; }
  .two-up { grid-template-columns: 1fr; }
  .admin-form-grid { grid-template-columns: 1fr; }
  .admin-user-controls { grid-template-columns: 1fr; }
  .admin-password-row { grid-template-columns: 1fr; }
  .chat-log { height: 42vh; }
  .session-slide-card { grid-template-columns: 1fr; }
}

.marketing-placeholder {
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  padding: 1rem;
  color: #475569;
}

.chat-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.chat-action-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.avatar-image {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  object-fit: cover;
  background: #fff;
}

.avatar-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 0.2rem 0.55rem 0.2rem 0.25rem;
  font-weight: 600;
  color: #9a3412;
}

.avatar-chip .avatar-image {
  width: 30px;
  height: 30px;
}

button.connected { background: var(--green); color: #fff; }
button.disconnected { background: var(--blue); color: #fff; }
button.ghost.connected { background: #dcfce7; color: #166534; border-color: #86efac; }
button.ghost.disconnected { background: #f4f7fb; color: #334155; border-color: #dbe5ef; }


.voice-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: grid;
  place-items: center;
  z-index: 1000;
}

.voice-modal-card {
  width: min(760px, 92vw);
  background: #fff;
  border-radius: 16px;
  border: 1px solid #dbe5ef;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.25);
  padding: 1rem;
}

.voice-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.voice-modal-head h3 { margin: 0; }



.voice-avatar-wrap {
  display: grid;
  place-items: center;
  margin: 0.2rem 0 0.8rem;
}

.voice-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 3px solid #e2e8f0;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
}

.site-footer {
  margin-top: 2rem;
  padding: 1.5rem 1rem;
  border-top: 1px solid #d8e1e8;
  background: #f8f5ef;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-branding {
  max-width: 620px;
}

.footer-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: #5c3b1e;
}

.footer-text {
  margin: 0;
  color: #5b6570;
  line-height: 1.5;
}

.footer-logos {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-logo-link {
  display: inline-flex;
  align-items: center;
}

.footer-logo {
  max-height: 48px;
  width: auto;
  display: block;
}

.session-slide-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0.9rem;
}

.session-slide-preview-wrap {
  border: 1px solid #dbe5ef;
  border-radius: 12px;
  background: #f8fafc;
  min-height: 130px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.session-slide-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slides-presenter-body {
  background: #020617;
}

.slides-presenter-shell {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  padding: 2rem;
}

#facilitatorSlidesPresenter {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: #020617;
}

.slides-presenter-image {
  width: min(95vw, 1700px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.slides-presenter-empty {
  color: #cbd5e1;
}

.slides-presenter-controls {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.75);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.slides-presenter-back {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 0;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.45);
  display: grid;
  place-items: center;
}

.slides-presenter-back img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.slides-presenter-notes {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  max-width: 30vw;
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  background: rgba(15, 23, 42, 0.78);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.3);
  font-size: 0.9rem;
  line-height: 1.4;
}
