/* ─── DESIGN TOKENS ─── */
:root {
  --bg: #060b18;
  --bg-deep: #030710;
  --surface: rgba(12, 18, 34, 0.92);
  --surface-hover: rgba(20, 28, 50, 0.96);
  --glass: rgba(10, 16, 30, 0.78);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glow: rgba(57, 230, 255, 0.12);
  --glow-strong: rgba(57, 230, 255, 0.28);
  --text: #eaf2ff;
  --text-dim: #7b90b8;
  --cyan: #39e6ff;
  --blue: #3b82f6;
  --emerald: #10b981;
  --orange: #f59e0b;
  --rose: #f43f5e;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 10% 0%, rgba(57, 230, 255, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 0%, rgba(59, 130, 246, 0.06) 0%, transparent 40%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── SHELL ─── */
.large-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 8px;
  gap: 6px;
}

/* ─── TOPBAR ─── */
.large-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  min-height: 42px;
  flex-wrap: wrap;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-icon {
  color: var(--cyan);
  flex-shrink: 0;
}

.brand-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.pill--accent {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(245, 158, 11, 0.10));
  border-color: rgba(245, 158, 11, 0.30);
  color: #fcd34d;
}

.pill--role {
  font-size: 9px;
  padding: 1px 6px;
}

.pill--count {
  background: rgba(57, 230, 255, 0.12);
  border-color: rgba(57, 230, 255, 0.20);
  color: var(--cyan);
  font-size: 10px;
  min-width: 18px;
}

.pill--health {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.28);
  color: var(--emerald);
}

.pill--rec {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(244, 63, 94, 0.28);
  color: var(--rose);
}

.topbar-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.topbar-room-id {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
  white-space: nowrap;
}

.topbar-center {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.server-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(57, 230, 255, 0.05);
  border: 1px solid rgba(57, 230, 255, 0.10);
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chip-dot--cpu {
  background: var(--cyan);
}

.chip-dot--ram {
  background: var(--emerald);
}

.chip-dot--net {
  background: var(--orange);
}

.server-chip strong {
  color: var(--text);
  font-weight: 600;
  min-width: 28px;
  text-align: right;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ─── UI MODE TOGGLE ─── */
.ui-mode-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .4s;
  border: 1px solid var(--glass-border);
}

.slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text-dim);
  transition: .4s;
}

input:checked+.slider {
  background-color: rgba(57, 230, 255, 0.2);
}

input:checked+.slider:before {
  transform: translateX(14px);
  background-color: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* ─── SADE MODE LOGIC ─── */
body.sade-mode .lecture-dashboard,
body.sade-mode .whiteboard-container,
body.sade-mode .whiteboard-tools,
body.sade-mode .control-tab[data-tab="health"],
body.sade-mode .control-tab[data-tab="recordings"],
body.sade-mode .server-chip {
  display: none !important;
}

.stat-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 48px;
}

.stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: 9px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── VIDEO AREA ─── */
.video-area {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  overflow-y: auto;
  padding: 8px;
  min-height: 0;
  align-content: flex-start;
}

/* Screen share */
.screen-share-wrap {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 30px rgba(57, 230, 255, 0.15);
  background: #000;
}

.screen-share-video {
  width: 100%;
  aspect-ratio: 16/9;
  max-height: 65vh;
}

.screen-share-video video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Screen share active mode */
.video-area.screen-share-active .host-section,
.video-area.screen-share-active .grid-section {
  flex-direction: row;
  overflow-x: auto;
  gap: 6px;
  min-height: 80px;
  max-height: 100px;
}

.video-area.screen-share-active .vtile {
  min-width: 140px;
  max-width: 180px;
  aspect-ratio: 16/9;
  flex: 0 0 auto;
}

.video-area.screen-share-active .vtile--host {
  min-width: 200px;
  max-width: 240px;
  border-color: var(--glow-strong);
}

/* Host section */
.host-section {
  flex: 0 0 auto;
  min-width: 320px;
}

/* ─── VIDEO TILES ─── */
.vtile {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  aspect-ratio: 16/9;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.vtile:hover {
  border-color: rgba(57, 230, 255, 0.15);
}

.vtile--host {
  width: 100%;
  border-color: rgba(57, 230, 255, 0.20);
  box-shadow: 0 0 24px rgba(57, 230, 255, 0.08), 0 8px 32px rgba(0, 0, 0, 0.30);
}

.vtile--host:hover {
  border-color: var(--glow-strong);
  box-shadow: 0 0 36px rgba(57, 230, 255, 0.14), 0 12px 40px rgba(0, 0, 0, 0.35);
}

.vtile.resizing {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(57, 230, 255, 0.12);
}

.vtile-media,
.vtile-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--bg-deep);
  display: block;
}

.vtile-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
  font-size: 12px;
  pointer-events: none;
}

.vtile-bar strong {
  font-weight: 600;
}

.tile-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 12px;
  text-align: center;
  padding: 12px;
}

/* Resize handle */
.vtile-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  z-index: 10;
  opacity: 0;
  transition: opacity var(--transition);
}

.vtile-resize::after {
  content: '';
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
  border-radius: 0 0 2px 0;
}

.vtile:hover .vtile-resize {
  opacity: 1;
}

/* Participant grid */
.grid-section {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 6px;
}

/* Stage tile compat */
.stage-tile {
  position: absolute;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--surface);
}

.stage-canvas {
  position: relative;
  display: none;
}

.tile-overlay {
  position: absolute;
  inset: auto 8px 8px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.7));
  font-size: 12px;
}

/* ─── CAPTIONS ─── */
.captions-bar {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 10px 14px;
}

/* --- Advanced Player Overlay --- */
.player-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.player-modal {
  background: #1a1a1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}

.player-head {
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.player-head h3 {
  margin: 0;
  font-weight: 500;
  color: #fff;
}

.close-btn {
  background: none;
  border: none;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  opacity: 0.7;
}

.close-btn:hover {
  opacity: 1;
}

.player-body {
  padding: 20px;
  overflow-y: auto;
}

#adv-video {
  width: 100%;
  border-radius: 8px;
  background: #000;
  outline: none;
}

.player-tracks {
  margin-top: 20px;
}

.player-tracks h4 {
  margin: 0 0 12px;
  font-size: 14px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.track-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.track-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.track-btn.active {
  background: #00ffff;
  color: #000;
  font-weight: 600;
}

.track-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.1);
}

.bar-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.bar-head h3 {
  font-size: 13px;
  font-weight: 600;
}

.captions-feed {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 140px;
  overflow-y: auto;
}

.caption-line {
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  line-height: 1.5;
}

.caption-line strong {
  color: var(--cyan);
}

/* ─── CONTROL DRAWER ─── */
.control-drawer {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.drawer-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 14px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font: 600 12px/1 var(--font);
  cursor: pointer;
  transition: color var(--transition);
}

.drawer-toggle:hover {
  color: var(--text);
}

.drawer-toggle svg {
  transition: transform var(--transition);
}

.control-drawer.collapsed .drawer-toggle svg {
  transform: rotate(-90deg);
}

.control-drawer.collapsed .drawer-body {
  display: none;
}

.drawer-body {
  padding: 0 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Quick row */
.quick-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-row .field {
  flex: 1;
  min-width: 140px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.field--wide {
  flex: 1;
}

.field-lbl {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.field select,
.field input {
  width: 100%;
  appearance: none;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: 500 12px/1.3 var(--font);
  transition: border-color var(--transition);
}

.field select:focus,
.field input:focus {
  outline: none;
  border-color: rgba(57, 230, 255, 0.30);
}

.field input[readonly] {
  color: var(--text-dim);
}

.toggle-group {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.toggle-btn {
  appearance: none;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  font: 600 11px/1 var(--font);
  cursor: pointer;
  transition: all var(--transition);
}

.toggle-btn.active {
  background: rgba(57, 230, 255, 0.12);
  border-color: rgba(57, 230, 255, 0.24);
  color: var(--cyan);
}

/* Tab bar */
.tab-bar {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 2px 0;
}

.tab-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-dim);
  font: 600 11px/1 var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}

.tab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  background: rgba(57, 230, 255, 0.08);
  border-color: rgba(57, 230, 255, 0.18);
  color: var(--cyan);
}

.tab-btn strong {
  font-size: 10px;
  color: var(--cyan);
  opacity: 0.8;
}

/* Panels */
.panel-wrap {
  max-height: 250px;
  overflow: hidden;
}

.panel {
  display: none;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  max-height: 230px;
}

.panel.active {
  display: flex;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.empty-hint {
  color: var(--text-dim);
  font-size: 12px;
}

/* Cards */
.waiting-card,
.participant-card,
.file-card,
.channel-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.meta-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-dim);
  font-size: 11px;
}

.meta-line strong {
  color: var(--text);
}

.participant-actions,
.waiting-actions,
.file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.participant-actions button,
.waiting-actions button,
.file-actions button {
  appearance: none;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: 600 10px/1 var(--font);
  cursor: pointer;
  transition: all var(--transition);
}

.participant-actions button:hover,
.waiting-actions button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.participant-actions button.critical,
.waiting-actions button.critical {
  border-color: rgba(244, 63, 94, 0.30);
  color: #fecdd3;
}

.participant-actions button.good,
.waiting-actions button.good,
.file-actions button.good {
  border-color: rgba(16, 185, 129, 0.30);
}

.participant-card.is-draggable {
  cursor: grab;
}

.participant-card.is-dragging {
  opacity: 0.4;
}

/* Bulk row */
.bulk-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 4px;
}

/* Buttons */
.btn {
  appearance: none;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: 600 12px/1 var(--font);
  cursor: pointer;
  transition: all var(--transition);
}

.btn--sm {
  padding: 5px 10px;
  font-size: 11px;
}

.btn--primary {
  background: linear-gradient(135deg, rgba(57, 230, 255, 0.18), rgba(59, 130, 246, 0.18));
  border-color: rgba(57, 230, 255, 0.28);
}

.btn--primary:hover {
  background: linear-gradient(135deg, rgba(57, 230, 255, 0.26), rgba(59, 130, 246, 0.26));
}

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.08);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Health / rec strip */
.health-strip,
.rec-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.muted {
  color: var(--text-dim);
  font-size: 12px;
}

.panel h4 {
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Drop zone */
.drop-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(57, 230, 255, 0.28);
  background: rgba(57, 230, 255, 0.04);
  cursor: pointer;
  font-size: 12px;
  color: var(--text-dim);
  transition: all var(--transition);
}

.drop-zone:hover {
  border-color: rgba(57, 230, 255, 0.45);
  background: rgba(57, 230, 255, 0.08);
}

/* Share strip */
.share-strip {
  display: flex;
  gap: 8px;
}

/* Audience bar */
.audience-bar {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.audience-bar h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}

/* ─── TOOLBAR ─── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  bottom: 8px;
  z-index: 30;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.30);
}

.toolbar-left,
.toolbar-right {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.toolbar-center {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-btn {
  appearance: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-dim);
  font: 600 9px/1 var(--font);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.tool-btn svg {
  transition: transform var(--transition);
}

.tool-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.tool-btn.active {
  color: var(--cyan);
  background: rgba(57, 230, 255, 0.10);
  border-color: rgba(57, 230, 255, 0.20);
}

.tool-btn--action {
  font-size: 9px;
}

.tool-btn--action:hover {
  color: var(--cyan);
}

.tool-btn--primary {
  background: linear-gradient(135deg, rgba(57, 230, 255, 0.14), rgba(59, 130, 246, 0.14));
  border-color: rgba(57, 230, 255, 0.22);
  color: var(--cyan);
}

.tool-btn--primary:hover {
  background: linear-gradient(135deg, rgba(57, 230, 255, 0.22), rgba(59, 130, 246, 0.22));
  box-shadow: 0 4px 16px rgba(57, 230, 255, 0.14);
}

.tool-btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* Footer compat */
.footer-btn {
  display: none;
}

.footer-status {
  display: none;
}

/* ─── VISIBILITY ─── */
.attendee-only {
  display: none;
}

.host-only {
  visibility: visible;
}

.is-hidden {
  display: none !important;
}

.settings-tray {
  display: none;
}

.filmstrip,
.mobile-pages,
.sidebar-tab,
.sidebar-panel {
  display: none;
}

.stage-head,
.stage-head-actions,
.preset-btn,
.filmstrip-card {
  display: none;
}

/* Attendee mode */
body.lm-attendee-mode .toolbar-right,
body.lm-attendee-mode .share-strip {
  display: none;
}

body.lm-attendee-mode .audience-bar {
  display: flex;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.10);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Video connecting */
.video-connecting {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 12px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .grid-section {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media (max-width: 860px) {
  .large-shell {
    padding: 6px;
    gap: 4px;
  }

  .large-topbar {
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 10px;
  }

  .topbar-center {
    margin-left: 0;
    width: 100%;
    order: 3;
  }

  .topbar-right {
    margin-left: auto;
  }

  .grid-section {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .quick-row {
    flex-direction: column;
  }

  .quick-row .field {
    min-width: 100%;
  }

  .toolbar {
    flex-wrap: wrap;
    gap: 6px;
  }

  .toolbar-left {
    width: 100%;
    justify-content: center;
  }

  .toolbar-center {
    width: 100%;
    order: 3;
  }

  .toolbar-right {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .brand-title {
    font-size: 13px;
  }

  .stat-block {
    min-width: 36px;
  }

  .stat-value {
    font-size: 14px;
  }

  .grid-section {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .tool-btn span {
    display: none;
  }

  .tool-btn {
    padding: 8px;
  }
}

/* ─── LOBBY (guest join page) ─── */
.lobby-shell {
  max-width: 1100px;
  margin: 30px auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  padding: 20px;
  border-radius: var(--radius);
}

.preview-frame {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--surface);
}

.preview-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-overlay {
  position: absolute;
  inset: auto 12px 12px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.6), transparent);
  font-size: 12px;
}

.quick-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-toggle-row.stretch>* {
  flex: 1;
}

@media (max-width: 860px) {
  .lobby-shell {
    grid-template-columns: 1fr;
  }
}

.status-banner {
  padding: 12px;
  background: rgba(57, 230, 255, 0.08);
  border: 1px solid rgba(57, 230, 255, 0.2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--cyan);
  text-align: center;
  margin-top: 16px;
  display: none;
}

.status-banner.active {
  display: block;
}

.color-emerald {
  color: var(--emerald) !important;
}

.color-yellow {
  color: var(--orange) !important;
}

.color-cyan {
  color: var(--cyan) !important;
}

.color-rose {
  color: var(--rose) !important;
}


/* ─── ANIMATIONS ─── */
@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(57, 230, 255, 0.08);
  }

  50% {
    box-shadow: 0 0 36px rgba(57, 230, 255, 0.16);
  }
}

.vtile--host {
  animation: pulse-glow 4s ease-in-out infinite;
}

/* Compat classes */
.action-btn {
  display: none;
}

.footer-group {
  display: none;
}

.status-pill {
  display: none;
}

.badge-pill {
  display: none;
}

/* ─── LECTURE DASHBOARD ─── */
.lecture-dashboard {
  margin-top: 24px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.dashboard-head h4 {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: #00ffff;
  /* Color cyan */
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.lang-stat-card {
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  text-align: center;
  transition: transform 0.2s;
}

.lang-stat-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
}

.lang-stat-label {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  /* Muted */
  margin-bottom: 4px;
}

.lang-stat-count {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

/* ─── WHITEBOARD ─── */
.whiteboard-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#lm-whiteboard-canvas {
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.whiteboard-tools {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}

.wb-tool {
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 12px;
  cursor: pointer;
}

.wb-tool.active {
  background: #00ffff;
  color: black;
}

#lm-wb-color {
  width: 30px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

/* ─── CAPTIONS BAR ACTIONS ─── */
.bar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn--xs {
  padding: 2px 8px;
  font-size: 11px;
}

@media (max-width: 860px) {
  .dashboard-body {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* MTAC Large Room premium operation layer */
:root {
  --lm-bg: #05080d;
  --lm-panel: rgba(13, 20, 28, 0.84);
  --lm-panel-solid: #0f1720;
  --lm-line: rgba(219, 239, 255, 0.13);
  --lm-line-hot: rgba(121, 231, 255, 0.38);
  --lm-text: #f5f8fb;
  --lm-muted: #92a2b4;
  --lm-cyan: #79e7ff;
  --lm-lime: #a4ff79;
  --lm-amber: #ffc05f;
  --lm-red: #ff6f7d;
}

.large-body {
  font-family: "Manrope", sans-serif;
  color: var(--lm-text);
  background:
    radial-gradient(circle at 18% 10%, rgba(121, 231, 255, 0.12), transparent 28%),
    radial-gradient(circle at 82% 14%, rgba(164, 255, 121, 0.08), transparent 26%),
    linear-gradient(180deg, #05080d, #081017 60%, #05080d) !important;
}

.large-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.74), transparent 78%);
  z-index: -1;
}

.brand-title,
.lobby-header h1,
.stage-title,
.group-title,
.drawer-title,
.pill {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  letter-spacing: -0.03em;
}

.glass-panel,
.large-topbar,
.large-drawer,
.lobby-card,
.info-card,
.preview-container,
.settings-tray,
.dashboard-card,
.participant-row,
.asset-card {
  border-radius: 14px !important;
  border: 1px solid var(--lm-line) !important;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)), var(--lm-panel) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28) !important;
}

.btn,
.tool-btn,
.toggle-btn,
.tab-btn,
.wb-tool,
.drawer-toggle {
  border-radius: 11px !important;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.btn--primary,
.tool-btn--primary,
.tool-btn--accent {
  background: linear-gradient(135deg, var(--lm-cyan), #b9f3ff) !important;
  border-color: var(--lm-line-hot) !important;
  color: #041019 !important;
}

.btn--ghost,
.tool-btn,
.toggle-btn,
.tab-btn {
  background: rgba(255, 255, 255, 0.065) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.btn:hover:not(:disabled),
.tool-btn:hover:not(:disabled),
.toggle-btn:hover:not(:disabled),
.tab-btn:hover:not(:disabled),
.wb-tool:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(121, 231, 255, 0.12);
}

.btn:disabled,
.tool-btn:disabled,
.toggle-btn:disabled,
.tab-btn:disabled,
button[aria-busy="true"] {
  opacity: 0.58 !important;
  cursor: wait !important;
  transform: none !important;
}

.status-banner,
.caption-bar,
.server-chip,
.info-card {
  border-color: var(--lm-line) !important;
}

@media (max-width: 860px) {
  .large-topbar,
  .lobby-grid,
  .stage-layout,
  .large-footer-toolbar {
    grid-template-columns: 1fr !important;
  }

  .large-footer-toolbar,
  .topbar-left,
  .topbar-right,
  .setup-actions {
    flex-wrap: wrap;
  }
}
