/* =======================================================================
   Harpioz — Clean Design System
   No animations. Full-viewport. Google Meet-inspired layout.
   Dark only. Amber accent.
   ======================================================================= */

:root {
  --bg: #0f0f11;
  --surface: #1a1a1f;
  --surface-2: #222228;
  --surface-3: #2a2a32;
  --border: #2e2e38;
  --text: #f0f0f3;
  --text-dim: #9898a8;
  --text-faint: #5a5a6a;

  --accent: #f5a623;
  --accent2: #f06292;
  --accent-bg: rgba(245, 166, 35, 0.12);
  --accent-border: rgba(245, 166, 35, 0.25);
  --live: #ef4444;
  --live-bg: rgba(239, 68, 68, 0.12);
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  height: 100%;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; margin: 0; letter-spacing: -0.02em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font-family: inherit; }

/* =======================================================================
   HEADER
   ======================================================================= */

.site-header {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.harpioz-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}
.harpioz-logo:hover { text-decoration: none; }

.harpioz-logo-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.harpioz-logo-mark svg { width: 16px; height: 16px; color: #fff; }

.harpioz-logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.harpioz-logo-text span { color: var(--accent); }

/* Desktop nav — hidden on mobile */
.header-nav {
  display: none;
  align-items: center;
  gap: 2px;
}

@media (min-width: 900px) {
  .header-nav { display: flex; }
}

.header-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.header-nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.header-nav-link.active { color: var(--accent); background: var(--accent-bg); }
.header-nav-link svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Desktop user chip — hidden on mobile */
.header-right {
  display: none;
  align-items: center;
  gap: 8px;
}
@media (min-width: 900px) {
  .header-right { display: flex; }
}

.header-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 5px;
  border-radius: 100px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
}
.header-user-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-display);
  flex-shrink: 0;
}

/* Hamburger button — shown only on mobile */
.hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-dim);
  cursor: pointer;
  flex-shrink: 0;
}
.hamburger:hover { color: var(--text); border-color: var(--text-faint); }
.hamburger svg { width: 18px; height: 18px; }
@media (min-width: 900px) {
  .hamburger { display: none; }
}

/* Mobile dropdown menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 56px; left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 18px 16px;
  z-index: 99;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
}
.mobile-menu-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.mobile-menu-link.active { color: var(--accent); background: var(--accent-bg); }
.mobile-menu-link svg { width: 18px; height: 18px; color: var(--text-faint); flex-shrink: 0; }
.mobile-menu-link.active svg { color: var(--accent); }
.mobile-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}
.mobile-menu-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--text-dim);
}

/* =======================================================================
   PAGE SHELL
   ======================================================================= */

.app-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 16px 90px; /* mobile: 16px sides, 90px bottom for tab bar */
}

@media (min-width: 640px) {
  .app-content { padding: 28px 24px 90px; }
}

@media (min-width: 900px) {
  .app-content { padding: 32px 32px 40px; }
}

/* Full-viewport home: fills screen between header and footer */
.home-shell {
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 18px 90px;
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .home-shell {
    padding: 36px 40px 40px;
    min-height: calc(100vh - 56px - 59px); /* header + footer */
  }
}

/* =======================================================================
   BUTTONS
   ======================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 20px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); text-decoration: none; border-color: var(--text-faint); }
.btn:active { opacity: 0.85; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a1000;
}
.btn-primary:hover { background: #fbb54e; border-color: #fbb54e; }

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); }

/* =======================================================================
   TWO-COLUMN HOME LAYOUT
   ======================================================================= */

.home-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 900px) {
  .home-layout {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
  }
  .tabbar-wrap { display: none; }
}

.home-left { display: flex; flex-direction: column; gap: 22px; }
.home-right { display: flex; flex-direction: column; gap: 12px; }

/* Hero text */
.home-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 100px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  width: fit-content;
}
.home-hero-eyebrow svg { width: 12px; height: 12px; }

.home-hero-title {
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text);
}
.home-hero-title span { color: var(--accent); }

.home-hero-subtitle {
  font-size: 15.5px;
  color: var(--text-dim);
  line-height: 1.65;
  max-width: 420px;
  margin: 0;
}

.home-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.home-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.stat-item .stat-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.stat-item .stat-label {
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
  margin-top: 3px;
}

/* Feature bullets below hero on left */
.feature-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feature-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.feature-row-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}
.feature-row-icon svg { width: 14px; height: 14px; }
.feature-row-title { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 1px; }
.feature-row-desc { font-size: 12.5px; color: var(--text-faint); line-height: 1.45; }

/* =======================================================================
   QUICK-ACTION TILES (right column)
   ======================================================================= */

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
  position: relative;
}
.quick-tile:hover { background: var(--surface-2); border-color: var(--accent); text-decoration: none; }

.quick-tile-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.quick-tile-icon svg { width: 18px; height: 18px; }

.quick-tile-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.quick-tile-desc {
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.45;
}
.quick-tile-pip {
  position: absolute;
  top: 10px; right: 10px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--live);
}

/* =======================================================================
   SESSION CARDS
   ======================================================================= */

.section-label {
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin: 0 0 10px;
}

.section-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.section-row-header .view-all {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
}

.session-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.session-card:hover { border-color: var(--text-faint); }
.session-card-live { border-color: var(--live); }

.session-card-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
}
.session-card-meta {
  font-size: 12.5px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
  flex-wrap: wrap;
}
.session-card-meta svg { width: 12px; height: 12px; vertical-align: middle; margin-right: 2px; }

/* =======================================================================
   BADGES
   ======================================================================= */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-live { background: var(--live-bg); color: var(--live); }
.badge-upcoming { background: var(--accent-bg); color: var(--accent); }
.badge-completed { background: var(--surface-2); color: var(--text-faint); border: 1px solid var(--border); }
.badge-active { background: var(--success-bg); color: var(--success); }
.badge-disabled { background: var(--danger-bg); color: var(--danger); }

.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--live);
  display: inline-block;
}

/* =======================================================================
   FORMS
   ======================================================================= */

form .field { margin-bottom: 16px; }

label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 6px;
}

input[type=text], input[type=password], input[type=email],
input[type=datetime-local], input[type=file], textarea, select {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

.checkbox-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.checkbox-grid label {
  display: flex; align-items: center; gap: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text);
  margin: 0;
  font-weight: 500;
}
.checkbox-grid input { width: auto; }

.help-text { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
.error-text { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* =======================================================================
   CARDS / PANELS
   ======================================================================= */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* =======================================================================
   TABLES
   ======================================================================= */

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}

table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 480px; }
th {
  text-align: left;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
}
td { padding: 13px 16px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-2); }

.password-cell { cursor: pointer; font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); }
.password-cell:hover { color: var(--text); }

/* =======================================================================
   MESSAGES
   ======================================================================= */

.messages { list-style: none; padding: 0; margin: 0 0 20px; }
.messages li {
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.messages .success { border-color: var(--success); color: var(--success); }
.messages .error { border-color: var(--danger); color: var(--danger); }
.messages .warning { border-color: var(--accent); color: var(--accent); }

/* =======================================================================
   PAGE HEADERS (admin pages)
   ======================================================================= */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header h1 { font-size: 22px; margin: 0; }
.page-header .subtitle { color: var(--text-dim); font-size: 13.5px; margin-top: 4px; }

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.app-header h1 { font-size: 22px; }
.app-header .subtitle { color: var(--text-dim); font-size: 13.5px; margin-top: 3px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 16px;
}
.back-link:hover { color: var(--text); text-decoration: none; }
.back-link svg { width: 14px; height: 14px; }

.section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  font-family: var(--font-mono);
  margin: 28px 0 12px;
}
.section-title:first-child { margin-top: 0; }

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 12px;
}
.section-row .section-title { margin: 0; }
.section-row .view-all { font-size: 12.5px; font-weight: 600; color: var(--accent); }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-faint);
  font-size: 14px;
}
.empty-state .empty-icon {
  width: 44px; height: 44px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint);
}
.empty-state .empty-icon svg { width: 20px; height: 20px; }

/* =======================================================================
   PROFILE LIST ROWS
   ======================================================================= */

.list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 6px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
}
.list-row:hover { background: var(--surface-2); border-color: var(--text-faint); text-decoration: none; }
.list-row-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent-bg);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.list-row-icon svg { width: 15px; height: 15px; }
.list-row-label { flex: 1; font-size: 14px; font-weight: 500; }
.list-row-chevron { color: var(--text-faint); }
.list-row-chevron svg { width: 15px; height: 15px; }
.list-row.danger .list-row-icon { background: var(--danger-bg); color: var(--danger); }
.list-row.danger .list-row-label { color: var(--danger); }

.profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.profile-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
.profile-name { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.profile-meta { color: var(--text-dim); font-size: 13px; margin-top: 2px; }

/* =======================================================================
   EDU BADGE
   ======================================================================= */

.edu-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 100px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 11.5px;
  font-weight: 500;
}
.edu-badge svg { width: 12px; height: 12px; color: var(--accent); flex-shrink: 0; }

/* =======================================================================
   SITE FOOTER
   ======================================================================= */

.site-footer {
  padding: 20px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--bg);
}
.site-footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-dim);
}
.site-footer-brand span { color: var(--accent); }
.site-footer-copy { font-size: 12px; color: var(--text-faint); }
.site-footer-links { display: flex; align-items: center; gap: 16px; }
.site-footer-links a { font-size: 12.5px; color: var(--text-faint); }
.site-footer-links a:hover { color: var(--text-dim); }

/* =======================================================================
   MOBILE BOTTOM TAB BAR
   ======================================================================= */

.tabbar-wrap {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: center;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  z-index: 100;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

@media (min-width: 900px) {
  .tabbar-wrap { display: none; }
}

.tabbar {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 400px;
  gap: 2px;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  color: var(--text-faint);
  text-decoration: none;
  position: relative;
}
.tab-item:hover { color: var(--text-dim); text-decoration: none; }
.tab-item svg { width: 21px; height: 21px; }
.tab-item .tab-label { font-size: 10.5px; font-weight: 600; }
.tab-item.current { color: var(--accent); }
.tab-item.current svg { color: var(--accent); }
.live-pip {
  position: absolute;
  top: 6px; right: 28%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--live);
}

/* =======================================================================
   LOGIN PAGE
   ======================================================================= */

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.login-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  width: 100%;
  max-width: 900px;
  align-items: center;
}

@media (min-width: 680px) {
  .login-layout { grid-template-columns: 1fr 1fr; gap: 56px; }
}

.login-brand { margin-bottom: 20px; }

.login-hero-title {
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 12px;
}
.login-hero-title span { color: var(--accent); }
.login-hero-sub { font-size: 15px; color: var(--text-dim); line-height: 1.65; max-width: 340px; }

/* =======================================================================
   BROADCAST / SESSION ROOM
   ======================================================================= */

.room-shell {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  z-index: 200;
}
.room-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.65), transparent);
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  pointer-events: none;
}
.room-topbar > * { pointer-events: auto; }
.room-topbar-info { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 14px; }
.room-topbar-title { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.room-back {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  cursor: pointer;
}
.room-back:hover { background: rgba(255,255,255,0.22); }
.room-back svg { width: 17px; height: 17px; }
.room-pill-link {
  display: inline-flex; align-items: center;
  height: 36px; padding: 0 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.12);
  color: #fff; font-size: 12.5px; font-weight: 600;
  transition: background 0.12s;
}
.room-pill-link:hover { background: rgba(255,255,255,0.22); text-decoration: none; color: #fff; }

.room-main { flex: 1; display: flex; min-height: 0; position: relative; }
.room-video-area {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #1a1a22 0%, #000 75%);
  position: relative; min-width: 0;
}
.room-video-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  color: rgba(255,255,255,0.5); font-size: 14px; text-align: center; max-width: 340px; padding: 24px;
}
.room-video-placeholder-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.55);
}
.room-video-placeholder-icon svg { width: 24px; height: 24px; }
#live-video { width: 100%; height: 100%; object-fit: contain; background: #000; }

.room-controls {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(20,20,24,0.88);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  padding: 8px 10px;
  z-index: 10;
}
.control-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
  transition: background 0.12s;
  position: relative;
  flex-shrink: 0;
}
.control-btn:hover { background: rgba(255,255,255,0.18); }
.control-btn svg { width: 21px; height: 21px; }
.control-btn.active { background: var(--accent); color: #1a1000; }
.control-btn-leave { background: var(--live); width: 56px; }
.control-btn-leave:hover { background: #c72020; }
.control-badge-dot {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--live);
  border: 2px solid rgba(20,20,24,0.88);
}

.chat-panel {
  background: var(--bg);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  width: 300px; flex-shrink: 0;
  transform: translateX(100%);
  transition: transform 0.22s ease;
}
.chat-panel.open { transform: translateX(0); }

@media (min-width: 821px) {
  .chat-panel { position: relative; margin-right: -300px; }
  .chat-panel.open { margin-right: 0; }
}
@media (max-width: 820px) {
  .chat-panel {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: 88%; max-width: 340px;
    z-index: 20;
  }
  .room-scrim {
    display: none; position: absolute; inset: 0;
    background: rgba(0,0,0,0.6); z-index: 15;
  }
  .room-scrim.open { display: block; }
}

.chat-header {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.chat-header-title { font-size: 12px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); }
.chat-close {
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: transparent; color: var(--text-dim); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.chat-close:hover { background: var(--surface-2); color: var(--text); }
.chat-close svg { width: 15px; height: 15px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-message { font-size: 13.5px; }
.chat-message .author { color: var(--accent); font-weight: 700; margin-right: 5px; }
.chat-message .time { color: var(--text-faint); font-size: 11px; margin-left: 5px; font-family: var(--font-mono); }
.chat-message .text { color: var(--text); word-wrap: break-word; }
.chat-message .delete-link { color: var(--text-faint); font-size: 11px; margin-left: 7px; cursor: pointer; }
.chat-message .delete-link:hover { color: var(--danger); }
.chat-input-row { display: flex; gap: 7px; padding: 12px; border-top: 1px solid var(--border); flex-shrink: 0; }
.chat-input-row input { flex: 1; }
.chat-disabled-note { padding: 14px 16px; color: var(--text-faint); font-size: 13px; font-style: italic; flex-shrink: 0; }

/* Broadcast specific */
.broadcast-status {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 100px;
  background: rgba(20,20,24,0.88); border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.6); font-size: 12px; font-weight: 600; font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: 0.05em; z-index: 10;
}
.broadcast-status.is-live { color: var(--live); border-color: rgba(239,68,68,0.3); }
.broadcast-status .live-dot { display: none; }
.broadcast-status.is-live .live-dot { display: inline-block; }
.source-toggle-group { display: flex; gap: 7px; background: rgba(20,20,24,0.88); border: 1px solid rgba(255,255,255,0.12); border-radius: 100px; padding: 4px; }
.source-toggle-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 100px; border: none;
  background: transparent; color: rgba(255,255,255,0.55); font-size: 13px; font-weight: 600; cursor: pointer;
}
.source-toggle-btn svg { width: 15px; height: 15px; }
.source-toggle-btn.active { background: var(--accent); color: #1a1000; }
.broadcast-go-btn { padding: 0 22px; border-radius: 100px; font-size: 14px; font-weight: 700; }
.broadcast-go-btn.stop { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.15); }
.mic-meter { position: absolute; bottom: 90px; left: 50%; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 2px; height: 16px; z-index: 10; }
.mic-meter-bar { width: 3px; background: var(--accent); border-radius: 2px; height: 4px; transition: height 0.08s ease; }
.broadcast-help-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 13px; color: var(--text-dim); margin-top: 12px; }

/* Utilities */
.mono { font-family: var(--font-mono); }
.text-faint { color: var(--text-faint); }
.text-dim { color: var(--text-dim); }
.flex-row { display: flex; align-items: center; gap: 10px; }
.gap-8 { gap: 8px; }
.glass-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  padding: 0 4px;
}
