/* ═══════════════════════════════════════════════════════════
   Polygott — Live Translation Rooms · Premium UI
   Indigo palette · Depth · Rich interactions
   ═══════════════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  /* Polygott Blue Palette */
  --indigo-50:  #E8F4FD;
  --indigo-100: #C5E3F6;
  --indigo-200: #9ACFEF;
  --indigo-300: #6FB9E6;
  --indigo-400: #47A5DB;
  --indigo-500: #2E86C1;
  --indigo-600: #256DA0;
  --indigo-700: #1C5680;
  --indigo-800: #144060;
  --indigo-900: #0D2B42;

  /* Slate (Neutral) */
  --slate-50:  #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1E293B;
  --slate-900: #0F172A;
  --slate-950: #020617;

  /* Accent */
  --emerald-400: #34D399;
  --emerald-500: #10B981;
  --rose-400: #FB7185;
  --rose-500: #F43F5E;
  --amber-400: #FBBF24;

  /* Surfaces */
  --bg-base: #0A192F;
  --bg-elevated: rgba(10, 25, 47, 0.7);
  --glass-bg: rgba(15, 30, 55, 0.45);
  --glass-border: rgba(148, 163, 184, 0.10);
  --glass-highlight: rgba(255, 255, 255, 0.05);

  /* Layout */
  --sidebar-w: 280px;
  --sidebar-collapsed: 0px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.5);
  --shadow-glow: 0 0 40px rgba(0, 123, 255, .15);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 150ms;
  --t-normal: 250ms;
  --t-slow: 400ms;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--slate-200);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Views ── */
.view { display: none; }
.view.active { display: flex; }

/* ═══════════ LOBBY — 3-Column AI Workspace ═══════════ */
#lobby {
  position: relative;
  flex-direction: row;
  height: 100vh;
  overflow: hidden;
  background: #0A192F;
}

/* ── Animated Background ── */
.lobby-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0,123,255,.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgba(0,123,255,.05) 0%, transparent 50%),
    #0A192F;
}
.lobby-bg-beam {
  position: absolute;
  width: 300px;
  height: 600px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .25;
  animation: beamFloat 12s ease-in-out infinite alternate;
}
.lobby-bg-beam--1 {
  background: rgba(0,123,255,.3);
  top: -200px;
  left: 30%;
  animation-delay: 0s;
}
.lobby-bg-beam--2 {
  background: rgba(0,123,255,.15);
  bottom: -150px;
  right: 10%;
  animation-delay: -6s;
  animation-duration: 16s;
}
.lobby-bg-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,123,255,.06) 0%, transparent 70%);
}
@keyframes beamFloat {
  0% { transform: translateY(0) translateX(0) scale(1); }
  100% { transform: translateY(40px) translateX(-30px) scale(1.1); }
}

/* ── LEFT SIDEBAR (Narrow ~70px) ── */
.lobby-sidebar {
  width: 70px;
  min-width: 70px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(6,12,24,.92);
  border-right: 1px solid rgba(255,255,255,.06);
  z-index: 3;
  padding: 0;
  backdrop-filter: blur(20px);
}

.lsb-logo {
  padding: 18px 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}
.lsb-logo svg { filter: drop-shadow(0 0 10px rgba(0,123,255,.3)); }

.lsb-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  flex: 1;
}
.lsb-divider {
  width: 28px;
  height: 1px;
  background: rgba(255,255,255,.08);
  margin: 8px 0;
}

.lsb-item {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: rgba(224,230,237,.45);
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
}
.lsb-item .material-icons-round { font-size: 22px; }
.lsb-item:hover {
  background: rgba(0,123,255,.1);
  color: rgba(224,230,237,.9);
  box-shadow: 0 0 20px rgba(0,123,255,.1);
}
.lsb-item.active {
  background: rgba(0,123,255,.15);
  color: #007BFF;
}
.lsb-indicator {
  position: absolute;
  left: -12px;
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: #007BFF;
  box-shadow: 0 0 8px rgba(0,123,255,.5);
  display: none;
}
.lsb-item.active .lsb-indicator { display: block; }

.lsb-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px 0 14px;
  border-top: 1px solid rgba(255,255,255,.06);
  width: 100%;
}
.lsb-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 0 8px;
}
.lsb-link {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: rgba(224,230,237,.3);
  text-decoration: none;
  transition: all .2s;
}
.lsb-link .material-icons-round { font-size: 16px; }
.lsb-link:hover {
  background: rgba(0,123,255,.1);
  color: rgba(224,230,237,.8);
}

.lsb-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
}
.lsb-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #007BFF, #0056b3);
  flex-shrink: 0;
  cursor: default;
}
.lsb-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: rgba(224,230,237,.3);
  cursor: pointer;
  transition: all .2s;
}
.lsb-logout .material-icons-round { font-size: 18px; }
.lsb-logout:hover {
  background: rgba(239,68,68,.12);
  color: #ef4444;
}

/* Legacy compat aliases */
.lobby-nav-item { cursor: pointer; text-decoration: none; user-select: none; font-size: 0; }
.lobby-nav-item.nav-disabled { opacity: .45; }

/* ── MAIN CONTENT (Center) ── */
.lobby-main {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  position: relative;
  padding: 28px 36px 36px;
  z-index: 1;
}

/* ── Lobby Header ── */
.lobby-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}
.lobby-greeting {
  font-size: 1.6rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}
.lobby-date {
  font-size: 0.8rem;
  color: #E0E6ED;
  margin-top: 4px;
  opacity: .6;
}
.lobby-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lobby-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 100px;
  width: 240px;
  transition: all .2s ease;
  backdrop-filter: blur(12px);
}
.lobby-search:focus-within {
  border-color: #007BFF;
  background: rgba(0,123,255,.06);
  box-shadow: 0 0 0 3px rgba(0,123,255,.1), 0 0 20px rgba(0,123,255,.08);
}
.lobby-search .material-icons-round { font-size: 18px; color: rgba(224,230,237,.4); }
.lobby-search input {
  flex: 1;
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
}
.lobby-search input::placeholder { color: rgba(224,230,237,.35); }

/* Header Buttons */
.lobby-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
  border: none;
}
.lobby-header-btn .material-icons-round { font-size: 18px; }
.lobby-header-btn--primary {
  background: #007BFF;
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,123,255,.35), 0 0 30px rgba(0,123,255,.1);
}
.lobby-header-btn--primary:hover {
  background: #0069d9;
  box-shadow: 0 4px 20px rgba(0,123,255,.45), 0 0 40px rgba(0,123,255,.15);
  transform: translateY(-1px);
}
.lobby-header-btn--outline {
  background: rgba(255,255,255,.04);
  color: #E0E6ED;
  border: 1px solid rgba(255,255,255,.1);
}
.lobby-header-btn--outline:hover {
  background: rgba(0,123,255,.08);
  border-color: rgba(0,123,255,.3);
  color: #fff;
}

/* ── Lobby Panels (tab content) ── */
.lobby-panels { position: relative; z-index: 1; }
.lobby-panel { display: none; }
.lobby-panel.active { display: block; animation: fadeInPanel .3s ease; }
@keyframes fadeInPanel { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ══════ HOME PANEL ══════ */
.home-hero {
  margin-bottom: 0;
  display: none; /* Hidden — greeting is in the header now, but IDs kept for JS compat */
}

/* Home Action Cards */
.home-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}
.home-action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  cursor: pointer;
  transition: all .25s ease;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.home-action-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  opacity: 0;
  transition: opacity .25s;
  background: linear-gradient(135deg, rgba(0,123,255,.06), transparent);
}
.home-action-card:hover::before { opacity: 1; }
.home-action-card:hover {
  border-color: rgba(0,123,255,.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,123,255,.1), 0 0 0 1px rgba(0,123,255,.1);
}
.home-action-card--disabled {
  opacity: .45;
  pointer-events: none;
}
.home-action-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.home-action-card-icon .material-icons-round { font-size: 22px; color: #fff; }
.home-action-card-icon--blue { background: linear-gradient(135deg, #007BFF, #0056b3); box-shadow: 0 4px 16px rgba(0,123,255,.3); }
.home-action-card-icon--teal { background: linear-gradient(135deg, #059669, #34D399); box-shadow: 0 4px 16px rgba(16,185,129,.25); }
.home-action-card-icon--green { background: linear-gradient(135deg, #7C3AED, #A78BFA); box-shadow: 0 4px 16px rgba(124,58,237,.25); }
.home-action-card-icon--amber { background: linear-gradient(135deg, #D97706, #FBBF24); box-shadow: 0 4px 16px rgba(217,119,6,.25); }
.home-action-card-text { flex: 1; min-width: 0; }
.home-action-card-title { display: block; font-size: .85rem; font-weight: 600; color: #FFFFFF; }
.home-action-card-desc { display: block; font-size: .72rem; color: rgba(224,230,237,.5); margin-top: 2px; }
.home-action-card-arrow {
  font-size: 18px !important;
  color: rgba(224,230,237,.2);
  transition: all .2s;
}
.home-action-card:hover .home-action-card-arrow { color: #007BFF; transform: translateX(3px); }
.home-action-card-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: .55rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(251,191,36,.15);
  color: #FBBF24;
}

/* ── Active Rooms Section ── */
.home-rooms-section {
  position: relative;
  z-index: 1;
  margin-bottom: 24px;
}
.home-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.home-section-header .material-icons-round { font-size: 20px; color: #007BFF; }
.home-section-header h3 { font-size: .9rem; font-weight: 700; color: #E0E6ED; }
.home-rooms-count {
  font-size: .65rem;
  font-weight: 700;
  background: rgba(0,123,255,.15);
  color: #007BFF;
  padding: 2px 8px;
  border-radius: 100px;
  margin-left: 4px;
}
.home-rooms-scroll {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.home-recent-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 16px;
  color: rgba(224,230,237,.35);
  background: rgba(255,255,255,.02);
  border-radius: 16px;
  border: 1px dashed rgba(255,255,255,.06);
}
.home-recent-empty .material-icons-round { font-size: 36px; opacity: .35; }
.home-recent-empty p { font-size: .82rem; text-align: center; }

/* ── Create Room Bar (bottom of home) ── */
.home-create-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 16px 20px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 1;
}

/* ── Sidebar nav badges (legacy compat) ── */
.nav-badge { display: none; }
.lobby-nav-divider { display: none; }
.lobby-nav-label { display: none; }

/* ── Rooms Quick Actions ── */
.rooms-quick-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}
.rooms-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: #E0E6ED;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  backdrop-filter: blur(8px);
}
.rooms-quick-btn .material-icons-round { font-size: 18px; }
.rooms-btn-create {
  background: #007BFF;
  border-color: #007BFF;
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,123,255,.3);
}
.rooms-btn-create:hover {
  background: #0069d9;
  box-shadow: 0 4px 20px rgba(0,123,255,.4);
  transform: translateY(-1px);
}
.rooms-btn-join:hover {
  background: rgba(0,123,255,.08);
  border-color: rgba(0,123,255,.3);
  color: #fff;
}
.rooms-btn-test:hover {
  background: rgba(251,191,36,.06);
  border-color: rgba(251,191,36,.3);
  color: #FBBF24;
}

/* ── Rooms Profile Bar ── */
.rooms-profile-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(12px);
}
.rooms-profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007BFF, #0056b3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rooms-profile-avatar .material-icons-round { font-size: 22px; color: #fff; }
.rooms-profile-fields { display: flex; gap: 10px; flex: 1; min-width: 0; }
.rooms-profile-fields .input-group { flex: 1; margin-bottom: 0; min-width: 0; }

/* ── Channel-style Room List ── */
.rooms-channel-list {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  backdrop-filter: blur(12px);
}
.rooms-channel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.rooms-channel-header .material-icons-round { font-size: 20px; color: #007BFF; }
.rooms-channel-header h3 { font-size: .9rem; font-weight: 700; color: #E0E6ED; flex: 1; }
.rooms-channel-count {
  font-size: .7rem;
  font-weight: 700;
  background: rgba(0,123,255,.15);
  color: #007BFF;
  padding: 2px 8px;
  border-radius: 100px;
}

/* ══════ RIGHT PANEL — AI Insights ══════ */
.lobby-ai-panel {
  width: 280px;
  min-width: 280px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: rgba(6,12,24,.88);
  border-left: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(20px);
  z-index: 2;
  padding: 0;
  overflow-y: auto;
}
.ai-panel-header {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.ai-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
}
.ai-panel-title .material-icons-round { font-size: 20px; color: #007BFF; }
.ai-panel-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .7rem;
  color: rgba(224,230,237,.5);
}
.ai-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 8px rgba(52,211,153,.4);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.ai-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 16px;
}
.ai-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 12px;
  transition: all .2s;
}
.ai-stat-card:hover {
  background: rgba(0,123,255,.05);
  border-color: rgba(0,123,255,.15);
}
.ai-stat-card .material-icons-round { font-size: 18px; color: #007BFF; }
.ai-stat-value { font-size: .95rem; font-weight: 800; color: #FFFFFF; }
.ai-stat-label { font-size: .6rem; color: rgba(224,230,237,.4); font-weight: 500; text-transform: uppercase; letter-spacing: .5px; }

.ai-section { padding: 16px 18px; border-top: 1px solid rgba(255,255,255,.04); }
.ai-section-title {
  font-size: .65rem;
  font-weight: 700;
  color: rgba(224,230,237,.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.ai-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ai-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 12px;
  color: rgba(224,230,237,.6);
  font-family: inherit;
  font-size: .7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.ai-action-btn .material-icons-round { font-size: 20px; color: rgba(224,230,237,.4); transition: color .2s; }
.ai-action-btn:hover {
  background: rgba(0,123,255,.08);
  border-color: rgba(0,123,255,.2);
  color: #fff;
}
.ai-action-btn:hover .material-icons-round { color: #007BFF; }

.ai-info-list { display: flex; flex-direction: column; gap: 10px; }
.ai-info-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  transition: background .2s;
}
.ai-info-item:hover { background: rgba(255,255,255,.02); }
.ai-info-item .material-icons-round { font-size: 18px; color: #007BFF; margin-top: 1px; flex-shrink: 0; }
.ai-info-primary { font-size: .78rem; font-weight: 600; color: #E0E6ED; }
.ai-info-secondary { font-size: .68rem; color: rgba(224,230,237,.35); margin-top: 2px; }

.ai-panel-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,.04);
  font-size: .65rem;
  color: rgba(224,230,237,.25);
}
.ai-panel-footer .material-icons-round { font-size: 14px; color: rgba(0,123,255,.4); }

/* ── Coming Soon Panel ── */
.coming-soon-panel {
  text-align: center;
  padding: 48px 32px;
  max-width: 600px;
  margin: 0 auto;
}
.cs-icon {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #059669, #34D399);
  box-shadow: 0 12px 32px rgba(16,185,129,.3);
}
.cs-icon-travel {
  background: linear-gradient(135deg, #D97706, #FBBF24) !important;
  box-shadow: 0 12px 32px rgba(217,119,6,.3) !important;
}
.cs-icon .material-icons-round { font-size: 36px; color: #fff; }
.coming-soon-panel h2 { font-size: 1.6rem; font-weight: 800; color: #fff; margin-bottom: 6px; }
.cs-tagline { font-size: 0.95rem; color: rgba(224,230,237,.5); margin-bottom: 40px; }
.cs-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  text-align: left;
  margin-bottom: 36px;
}
.cs-feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  padding: 18px;
  backdrop-filter: blur(12px);
}
.cs-feature .material-icons-round { font-size: 22px; color: #007BFF; margin-top: 2px; flex-shrink: 0; }
.cs-feature strong { font-size: 0.85rem; color: #E0E6ED; display: block; margin-bottom: 4px; }
.cs-feature p { font-size: 0.78rem; color: rgba(224,230,237,.45); line-height: 1.5; margin: 0; }
.cs-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 40px;
  background: rgba(0,123,255,.08);
  border: 1px solid rgba(0,123,255,.15);
  color: #007BFF;
  font-size: 0.85rem;
  font-weight: 600;
}
.cs-cta .material-icons-round { font-size: 18px; }

/* ── Lobby Cards (used by voice test, settings) ── */
.lobby-card {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  transition: border-color .2s ease;
  backdrop-filter: blur(12px);
}
.lobby-card:hover { border-color: rgba(255,255,255,.1); }
.lobby-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.lobby-card-header .material-icons-round { font-size: 20px; color: #007BFF; }
.lobby-card-header h3 { font-size: 0.95rem; font-weight: 700; color: #E0E6ED; flex: 1; }

/* Legacy compat */
.lobby-profile-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.lobby-profile-row .input-group { margin-bottom: 0; }
.lobby-quick-stats { display: none; }
.quick-stat { display: none; }
.room-list-full { max-height: 500px; }
.server-row-inline .input-group { margin-bottom: 0; }
/* Legacy action btn compat (used as data-goto target in JS) */
.home-action-btn[data-goto] { cursor: pointer; }

/* ── Responsive Lobby ── */
@media (max-width: 1100px) {
  .lobby-ai-panel { display: none; }
}
@media (max-width: 768px) {
  #lobby { flex-direction: column; }
  .lobby-sidebar {
    width: 100%;
    min-width: 100%;
    height: 56px;
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .lsb-logo { padding: 0 12px; }
  .lsb-nav { flex-direction: row; flex: 1; overflow-x: auto; gap: 2px; padding: 0 4px; }
  .lsb-divider { width: 1px; height: 24px; margin: 0 4px; }
  .lsb-bottom { display: none; }
  .lsb-indicator { display: none !important; }
  .lsb-item { width: 40px; height: 40px; border-radius: 10px; }
  .lobby-main { padding: 16px; }
  .home-actions { grid-template-columns: 1fr 1fr; }
  .lobby-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .lobby-header-right { width: 100%; flex-wrap: wrap; }
  .lobby-search { width: 100%; }
  .rooms-profile-fields { flex-direction: column; }
  .rooms-quick-actions { flex-wrap: wrap; }
  .cs-features { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .home-actions { grid-template-columns: 1fr; }
  .lobby-header-btn { flex: 1; justify-content: center; }
  .rooms-profile-bar { flex-direction: column; align-items: stretch; }
  .rooms-quick-btn { padding: 8px 14px; font-size: 0.78rem; }
}

/* ═════════ End Lobby ═════════ */

/* Kept for compat: old lobby-user classes */
.lobby-user { display: none; }
.lobby-user-avatar { display: none; }
.lobby-user-name { display: none; }
.lobby-user-role { display: none; }
.lobby-user-logout { display: none; }


/* ── LEGACY — keep glass-card for room view modals ── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-lg);
  transition: transform var(--t-normal) var(--ease-out), box-shadow var(--t-normal) var(--ease-out);
}
.glass-card:hover {
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.card-header .material-icons-round {
  font-size: 20px;
  color: var(--indigo-400);
}
.card-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--slate-100);
  flex: 1;
}

/* Old responsive lobby rules removed — see new lobby styles above */

/* ── Inputs ── */
.input-group {
  margin-bottom: 14px;
}
.input-group:last-child { margin-bottom: 0; }

.input-group label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 6px;
}

.input-wrap, .select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  font-size: 18px;
  color: var(--slate-500);
  pointer-events: none;
  z-index: 1;
}

.input-wrap input, .select-wrap select {
  width: 100%;
  padding: 11px 14px 11px 42px;
  background: rgba(15, 23, 42, 0.6);
  color: var(--slate-100);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}

.input-wrap input:focus, .select-wrap select:focus {
  border-color: #007BFF;
  background: rgba(10, 25, 47, 0.8);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, .15);
}

.input-wrap input::placeholder {
  color: var(--slate-500);
  font-weight: 400;
}

select {
  appearance: none;
  cursor: pointer;
}

.lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: #007BFF;
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--t-fast);
  box-shadow: 0 2px 12px rgba(0, 123, 255, .3);
  white-space: nowrap;
}
.btn-primary:hover {
  background: #0069d9;
  box-shadow: 0 4px 20px rgba(0, 123, 255, .4);
  transform: translateY(-1px);
}
.btn-primary .material-icons-round { font-size: 18px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--slate-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--t-fast);
}
.icon-btn:hover {
  background: rgba(46, 134, 193, .1);
  border-color: var(--indigo-500);
  color: var(--indigo-300);
}
.icon-btn .material-icons-round { font-size: 20px; }

/* ── Room List (Teams channel style) ── */
.room-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 6px 0;
}

.room-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  margin-bottom: 0;
  cursor: pointer;
  transition: all .15s ease;
  position: relative;
}
.room-item:last-child { margin-bottom: 0; }
.room-item:hover {
  background: rgba(46, 134, 193, .08);
  border-left-color: var(--indigo-500);
}

.room-item-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo-700), var(--indigo-500));
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  position: relative;
}
.room-item-icon .material-icons-round {
  font-size: 18px;
  color: #fff;
}

/* Active room indicator (green dot) */
.room-item-icon.room-active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--emerald-400);
  border: 2px solid var(--slate-900);
  animation: pulseDot 2s ease-in-out infinite;
}

.room-item-info { flex: 1; min-width: 0; }
.room-item-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--slate-100);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-item-meta {
  font-size: 0.72rem;
  color: var(--slate-500);
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.room-item-join {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--indigo-400);
  opacity: 0;
  transition: opacity .15s ease;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: rgba(46,134,193,.1);
}
.room-item:hover .room-item-join { opacity: 1; }

/* Room lock icon */
.room-lock-icon {
  font-size: 14px !important;
  color: var(--amber-400);
  vertical-align: middle;
  margin-left: 4px;
}

/* ── Passcode Toast (after room creation) ── */
.passcode-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  transform: translateY(20px);
  opacity: 0;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
.passcode-toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.passcode-toast-inner {
  background: var(--surface-800);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  min-width: 300px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  backdrop-filter: blur(24px);
}
.passcode-toast-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--slate-200);
  font-size: 0.85rem;
  font-weight: 700;
}
.passcode-toast-header .material-icons-round { font-size: 18px; color: var(--indigo-400); }
.passcode-toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--slate-500);
  cursor: pointer;
  padding: 2px;
  border-radius: 6px;
  display: flex;
}
.passcode-toast-close:hover { color: var(--slate-200); background: var(--surface-700); }
.passcode-toast-close .material-icons-round { font-size: 18px; }

.passcode-code {
  font-family: 'Courier New', monospace;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 6px;
  text-align: center;
  padding: 14px 20px;
  background: var(--surface-900);
  border: 2px dashed var(--indigo-500);
  border-radius: var(--radius-lg);
  color: #fff;
  margin-bottom: 8px;
  user-select: all;
}
.passcode-hint {
  font-size: 0.75rem;
  color: var(--slate-500);
  text-align: center;
  margin-bottom: 14px;
}
.passcode-actions {
  display: flex;
  gap: 8px;
}
.passcode-copy-btn,
.passcode-share-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--surface-700);
  color: var(--slate-200);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}
.passcode-copy-btn:hover { background: rgba(46,134,193,.15); border-color: var(--indigo-500); color: var(--indigo-300); }
.passcode-share-btn:hover { background: rgba(16,185,129,.15); border-color: var(--emerald-400); color: var(--emerald-400); }
.passcode-copy-btn .material-icons-round,
.passcode-share-btn .material-icons-round { font-size: 16px; }

/* ── Password Prompt Overlay ── */
.pw-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .25s;
}
.pw-overlay.show { opacity: 1; }

.pw-box {
  background: var(--surface-800);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 380px;
  max-width: 90vw;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
  text-align: center;
  transform: scale(.95);
  transition: transform .25s;
}
.pw-overlay.show .pw-box { transform: scale(1); }

.pw-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}
.pw-header .material-icons-round { font-size: 24px; color: var(--indigo-400); }
.pw-header h3 { font-size: 1.1rem; font-weight: 700; color: #fff; margin: 0; }

.pw-room-name {
  font-size: 0.85rem;
  color: var(--slate-400);
  margin-bottom: 16px;
}
.pw-hint {
  font-size: 0.78rem;
  color: var(--slate-500);
  margin-bottom: 20px;
}

.pw-input-row { margin-bottom: 20px; }
.pw-input {
  width: 100%;
  text-align: center;
  font-family: 'Courier New', monospace;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 8px;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--glass-border);
  background: var(--surface-900);
  color: #fff;
  outline: none;
  transition: border-color .2s;
  text-transform: uppercase;
}
.pw-input:focus { border-color: var(--indigo-500); }
.pw-input::placeholder { color: var(--slate-600); font-size: 1.2rem; letter-spacing: 4px; }

.pw-actions {
  display: flex;
  gap: 10px;
}
.pw-cancel-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--surface-700);
  color: var(--slate-300);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}
.pw-cancel-btn:hover { background: var(--surface-600); }
.pw-submit-btn {
  flex: 1;
}

.room-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 36px 16px;
  color: var(--slate-500);
}
.room-empty .material-icons-round { font-size: 36px; opacity: .35; }
.room-empty p { font-size: 0.82rem; }

.create-room-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--glass-border);
  background: rgba(15, 23, 42, 0.3);
}
.flex-1 { flex: 1; }

/* ── Server row (settings panel) ── */
.server-row-inline .input-group { margin-bottom: 0; }

/* ═══════════ ROOM VIEW ═══════════ */
#room {
  flex-direction: row;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 40% at 0% 0%, rgba(46, 134, 193, .08) 0%, transparent 50%),
    var(--bg-base);
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  transition: width var(--t-slow) var(--ease-out), min-width var(--t-slow) var(--ease-out), padding var(--t-slow) var(--ease-out);
  overflow: hidden;
}
.sidebar.collapsed {
  width: 0;
  min-width: 0;
  padding: 0;
  border-right: none;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--glass-border);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-brand .material-icons-round {
  font-size: 22px;
  color: var(--indigo-400);
}
.sidebar-brand-text {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--indigo-300);
}

.sidebar-section {
  padding: 16px;
}

.room-info-card {
  padding: 16px;
  background: rgba(46, 134, 193, .08);
  border: 1px solid rgba(46, 134, 193, .15);
  border-radius: var(--radius-md);
}
.room-info-card h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-50);
  margin-bottom: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: rgba(46, 134, 193, .15);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--indigo-300);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 12px;
}
.section-label .material-icons-round { font-size: 16px; }

.flex-1 { flex: 1; overflow: hidden; }

/* ── Participants ── */
.participants-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.participant-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  transition: all var(--t-fast);
}
.participant-card:hover {
  background: rgba(15, 23, 42, 0.6);
  border-color: var(--glass-border);
}
.participant-card.speaking {
  border-color: var(--emerald-400);
  box-shadow: 0 0 12px rgba(52, 211, 153, .15);
}

.participant-avatar {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--indigo-700), var(--indigo-500));
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.participant-info { flex: 1; min-width: 0; }
.participant-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate-100);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.participant-lang {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.participant-status {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--emerald-400);
  flex-shrink: 0;
}
.participant-card.muted .participant-status { background: var(--slate-600); }

/* ── Sidebar Footer ── */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--glass-border);
}

.btn-danger-outline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid rgba(244, 63, 94, .25);
  border-radius: var(--radius-md);
  color: var(--rose-400);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--t-fast);
}
.btn-danger-outline:hover {
  background: rgba(244, 63, 94, .1);
  border-color: var(--rose-400);
}
.btn-danger-outline .material-icons-round { font-size: 18px; }

/* ── Main content ── */
.room-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 0;
}

/* ── Topbar ── */
.topbar {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(15, 23, 42, .5);
  backdrop-filter: blur(10px);
  gap: 12px;
}

.topbar-center { flex: 1; display: flex; justify-content: center; }

.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-400);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--slate-600);
}
.status-dot.connected { background: var(--emerald-400); box-shadow: 0 0 8px rgba(52, 211, 153, .4); }

.topbar-actions { display: flex; gap: 8px; }

.hide-desktop { display: none; }

/* ── Transcript area ── */
.transcript-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  scroll-behavior: smooth;
}

.transcript-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  gap: 12px;
}

.placeholder-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xl);
  background: rgba(46, 134, 193, .08);
  border: 1px solid rgba(46, 134, 193, .15);
}
.placeholder-icon .material-icons-round {
  font-size: 36px;
  color: var(--indigo-400);
}
.transcript-placeholder h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--slate-200);
}
.transcript-placeholder p {
  font-size: 0.85rem;
  color: var(--slate-500);
  max-width: 360px;
  line-height: 1.6;
}

/* ── Subtitle Messages ── */
.msg {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  animation: msgIn var(--t-slow) var(--ease-out);
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-avatar {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--indigo-700), var(--indigo-500));
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  margin-top: 2px;
}

.msg-body { flex: 1; min-width: 0; }

.msg-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.msg-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--indigo-300);
}

.msg-time {
  font-size: 0.65rem;
  color: var(--slate-500);
}

.msg-lang {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--indigo-400);
  background: rgba(46, 134, 193, .1);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.msg-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--slate-100);
  word-wrap: break-word;
}

.msg-original {
  font-size: 0.8rem;
  color: var(--slate-500);
  font-style: italic;
  margin-top: 4px;
  padding-left: 10px;
  border-left: 2px solid var(--glass-border);
}

/* System messages */
.msg-system {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  animation: msgIn var(--t-slow) var(--ease-out);
}
.msg-system-text {
  font-size: 0.72rem;
  color: var(--slate-500);
  background: rgba(30, 41, 59, .5);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
}

/* Interim (partial) speech recognition indicator */
.interim-typing {
  opacity: 0.7;
}
.interim-typing em {
  font-size: 0.8rem;
  color: var(--indigo-300);
}
.interim-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--indigo-400);
  border-radius: 50%;
  margin-right: 6px;
  animation: interimPulse 1s ease-in-out infinite;
}
@keyframes interimPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ── Composer ── */
.composer {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--glass-border);
  background: rgba(15, 23, 42, .6);
  backdrop-filter: blur(10px);
}

.composer-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 16px;
  background: rgba(30, 41, 59, .5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.composer-inner:focus-within {
  border-color: var(--indigo-500);
  box-shadow: 0 0 0 3px rgba(46, 134, 193, .1);
}

.audio-viz {
  flex-shrink: 0;
}
.audio-viz canvas {
  display: block;
  border-radius: 6px;
}

.composer-input-wrap {
  flex: 1;
  min-width: 0;
}
.composer-input-wrap input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--slate-100);
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 500;
  outline: none;
}
.composer-input-wrap input::placeholder {
  color: var(--slate-500);
  font-weight: 400;
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.send-btn {
  border-color: transparent;
}
.send-btn:hover {
  background: var(--indigo-600);
  color: white;
}

.divider-v {
  width: 1px;
  height: 24px;
  background: var(--glass-border);
}

/* ── Mic Toggle ── */
.mic-toggle {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--indigo-600), var(--indigo-500));
  border: none;
  color: white;
  cursor: pointer;
  transition: all var(--t-fast);
  box-shadow: 0 2px 8px rgba(46, 134, 193, .3);
}
.mic-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(46, 134, 193, .4);
}
.mic-toggle .material-icons-round { font-size: 22px; z-index: 1; }

.mic-pulse {
  position: absolute;
  inset: -4px;
  border-radius: var(--radius-full);
  border: 2px solid var(--indigo-400);
  opacity: 0;
  animation: micPulse 2s infinite;
}

@keyframes micPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

.mic-toggle.muted {
  background: rgba(244, 63, 94, .15);
  box-shadow: none;
}
.mic-toggle.muted .material-icons-round { color: var(--rose-400); }
.mic-toggle.muted .mic-pulse { animation: none; opacity: 0; }

/* ── Recording status ── */
.composer-status {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.rec-status {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--emerald-400);
}
.rec-status.active {
  display: inline-flex;
}

.rec-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--emerald-400);
  animation: recPulse 1.5s infinite;
}

@keyframes recPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

/* ═══════════ SCROLLBAR ═══════════ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--slate-700);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--slate-600); }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 768px) {
  .lobby-container { padding: 0 4px; }
  .brand-name { font-size: 2rem; }
  .lang-grid { grid-template-columns: 1fr; }
  .glass-card { padding: 18px; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.collapsed {
    transform: translateX(-100%);
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
  }

  .hide-desktop { display: inline-flex; }
}

@media (max-width: 480px) {
  .brand-name { font-size: 1.7rem; }
  .create-room-bar { flex-direction: column; }
  .btn-primary { width: 100%; justify-content: center; }
  .composer-inner { padding: 6px 6px 6px 12px; }
  .audio-viz { display: none; }
}

/* ═══════════ VOICE TEST ═══════════ */
.voice-test-panel .vt-desc {
  font-size: 0.82rem;
  color: var(--slate-400);
  line-height: 1.5;
  margin-bottom: 16px;
}

.vt-info-row {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
}
.vt-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-400);
  background: rgba(15, 23, 42, 0.5);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
}
.vt-info-item .material-icons-round { font-size: 16px; color: var(--indigo-400); }

.vt-meter-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.vt-meter-track {
  flex: 1;
  height: 10px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  overflow: hidden;
}
.vt-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--indigo-600), var(--indigo-400), var(--emerald-400));
  transition: width 80ms ease-out;
  box-shadow: 0 0 8px rgba(46, 134, 193, .3);
}
.vt-meter-fill.hot {
  background: linear-gradient(90deg, var(--amber-400), var(--rose-400));
  box-shadow: 0 0 8px rgba(244, 63, 94, .4);
}
.vt-meter-val {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--slate-400);
  min-width: 32px;
  text-align: right;
}

.vt-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.vt-btn {
  flex: 1;
}
.btn-vt-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(30, 41, 59, .5);
  color: var(--slate-200);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.btn-vt-secondary:hover:not(:disabled) {
  background: rgba(46, 134, 193, .12);
  border-color: var(--indigo-500);
  color: var(--indigo-300);
}
.btn-vt-secondary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.btn-vt-secondary .material-icons-round { font-size: 16px; }

/* Recording pulse */
.btn-vt-secondary.recording {
  border-color: var(--rose-400);
  color: var(--rose-400);
  animation: recPulse 1s infinite;
}

.vt-status {
  font-size: 0.75rem;
  color: var(--slate-500);
  text-align: center;
  padding: 6px;
  background: rgba(15, 23, 42, 0.3);
  border-radius: var(--radius-sm);
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.vt-status.good { color: var(--emerald-400); }
.vt-status.warn { color: var(--amber-400); }
.vt-status.bad { color: var(--rose-400); }

/* ── Beta Toggle (SeamlessM4T) ── */
.beta-toggle {
  position: relative;
}
.beta-toggle .beta-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  font-size: 0.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--amber-400), #f59e0b);
  color: var(--slate-900);
  border-radius: 4px;
  padding: 0px 3px;
  line-height: 1.3;
  pointer-events: none;
}
.beta-toggle.active {
  background: linear-gradient(135deg, rgba(46, 134, 193, 0.3), rgba(139, 92, 246, 0.3)) !important;
  border: 1px solid var(--indigo-400) !important;
  box-shadow: 0 0 12px rgba(46, 134, 193, 0.3);
}
.beta-toggle.active .material-icons-round {
  color: var(--indigo-300);
}
.beta-toggle.loading {
  animation: betaPulse 1.5s infinite ease-in-out;
}
@keyframes betaPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Seamless mode indicator in transcript */
.seamless-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--indigo-300);
  background: rgba(46, 134, 193, 0.15);
  border: 1px solid rgba(46, 134, 193, 0.25);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════
   ZOOM-STYLE FEATURES
   ═══════════════════════════════════════════════════════════ */

/* ── Sidebar Tabs ── */
.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 0 8px;
}
.sidebar-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
  font-size: 13px;
}
.sidebar-tab:hover { color: var(--text-secondary); }
.sidebar-tab.active {
  color: var(--indigo-400);
  border-bottom-color: var(--indigo-400);
}
.tab-count {
  font-size: 11px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(255,255,255,.08);
}
.chat-unread {
  background: var(--indigo-600) !important;
  color: #fff;
}
.chat-unread.hidden { display: none; }
.sidebar-tab-content { display: none; flex-direction: column; flex: 1; overflow: hidden; }
.sidebar-tab-content.active { display: flex; }

/* ── Chat ── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chat-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.chat-empty .material-icons-round { font-size: 40px; margin-bottom: 8px; opacity: .3; }
.chat-empty p { font-size: 13px; }

.chat-msg {
  display: flex;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  transition: background .15s;
}
.chat-msg:hover { background: rgba(255,255,255,.03); }
.chat-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.chat-msg-body { flex: 1; min-width: 0; }
.chat-msg-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 2px;
}
.chat-msg-name { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.chat-msg-time { font-size: 10px; color: var(--text-muted); }
.chat-msg-text { font-size: 13px; color: var(--text-secondary); line-height: 1.4; word-break: break-word; }

.chat-input-bar {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.chat-input-bar input {
  flex: 1;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}
.chat-input-bar input:focus {
  border-color: var(--indigo-500);
  box-shadow: 0 0 0 2px rgba(46,134,193,.2);
}

/* ── Room Info Meta ── */
.room-info-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.rec-badge {
  background: rgba(239,68,68,.15) !important;
  color: var(--rose-400) !important;
  border: 1px solid rgba(239,68,68,.3) !important;
}
.rec-dot-sm {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rose-400);
  animation: recPulse 1s infinite;
}
.lock-badge {
  background: rgba(250,166,26,.15) !important;
  color: var(--amber-400) !important;
  border: 1px solid rgba(250,166,26,.3) !important;
}

/* ── Zoom-style Toolbar ── */
.zoom-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 16px;
  background: rgba(15,23,42,.95);
  border-top: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(12px);
}
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 2px;
  position: relative;
}
.toolbar-group + .toolbar-group {
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid rgba(255,255,255,.08);
}
.toolbar-end { margin-left: auto !important; }

.toolbar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .2s;
  position: relative;
}
.toolbar-btn:hover {
  background: rgba(255,255,255,.08);
  color: var(--text-primary);
}
.toolbar-btn.active {
  background: rgba(46,134,193,.15);
  color: var(--indigo-400);
}
.toolbar-btn .material-icons-round { font-size: 22px; }
.toolbar-btn .toolbar-emoji { font-size: 20px; }
.toolbar-label {
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}
.toolbar-btn.muted {
  color: var(--rose-400);
}
.toolbar-btn.muted .material-icons-round { color: var(--rose-400); }

.btn-leave-room {
  background: rgba(239,68,68,.15) !important;
  color: var(--rose-400) !important;
  border: 1px solid rgba(239,68,68,.2);
}
.btn-leave-room:hover {
  background: rgba(239,68,68,.3) !important;
}

.host-only.hidden { display: none; }
.toolbar-btn.recording {
  color: var(--rose-400);
  animation: recPulse 1s infinite;
}

/* ── Hand Raise indicator on participant card ── */
.participant-card.hand-raised::after {
  content: '✋';
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 16px;
  animation: handWave .6s ease-in-out infinite alternate;
}
@keyframes handWave {
  from { transform: rotate(-10deg); }
  to { transform: rotate(10deg); }
}
.participant-card { position: relative; }
.participant-card .host-badge {
  font-size: 9px;
  background: rgba(250,166,26,.2);
  color: var(--amber-400);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
  margin-left: 4px;
}

/* ── Reaction Picker ── */
.reaction-picker {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  display: flex;
  gap: 4px;
  padding: 8px 10px;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  z-index: 100;
}
.reaction-picker.hidden { display: none; }
.reaction-btn {
  font-size: 22px;
  padding: 4px 6px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all .15s;
}
.reaction-btn:hover {
  background: rgba(255,255,255,.1);
  transform: scale(1.3);
}

/* ── Reaction Overlay (floating emojis) ── */
.reaction-overlay {
  position: fixed;
  bottom: 120px;
  right: 30px;
  width: 60px;
  pointer-events: none;
  z-index: 999;
}
.reaction-float {
  position: absolute;
  bottom: 0;
  font-size: 32px;
  animation: floatUp 2.5s ease-out forwards;
  opacity: 0;
}
@keyframes floatUp {
  0% { transform: translateY(0) scale(0.5); opacity: 0; }
  15% { opacity: 1; transform: translateY(-20px) scale(1.1); }
  100% { transform: translateY(-200px) scale(0.6); opacity: 0; }
}

/* ── Screen Share ── */

/* ── Video Grid (WebRTC camera feeds — remote strip) ── */
.video-grid {
  display: flex;
  gap: 6px;
  padding: 6px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  background: rgba(15, 23, 42, 0.55);
  border-bottom: 1px solid rgba(255,255,255,.06);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
  max-height: 110px;
  align-items: center;
}
.video-grid.hidden { display: none; }

/* Remote camera tiles — compact horizontal strip */
.video-tile {
  position: relative;
  flex: 0 0 auto;
  width: 140px;
  height: 90px;
  background: #0f172a;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  transition: border-color .2s, transform .2s, box-shadow .2s;
  cursor: pointer;
}
.video-tile:hover {
  border-color: var(--indigo-400);
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(46,134,193,.25);
  z-index: 2;
}
.video-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-tile .video-label {
  position: absolute;
  bottom: 4px;
  left: 5px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: rgba(0,0,0,.65);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
  max-width: calc(100% - 10px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Local Camera PiP (Picture-in-Picture) ── */
.local-camera-pip {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 180px;
  height: 120px;
  background: #0f172a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--indigo-500);
  box-shadow: 0 8px 32px rgba(0,0,0,.5), 0 0 0 1px rgba(46,134,193,.2);
  z-index: 1000;
  cursor: grab;
  transition: box-shadow .2s, transform .15s;
  user-select: none;
}
.local-camera-pip:hover {
  box-shadow: 0 8px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(46,134,193,.4);
}
.local-camera-pip:active {
  cursor: grabbing;
  transform: scale(1.03);
}
.local-camera-pip.hidden { display: none; }
.local-camera-pip video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scaleX(-1); /* mirror */
}
.local-camera-pip .pip-label {
  position: absolute;
  bottom: 4px;
  left: 6px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: rgba(0,0,0,.6);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}
.local-camera-pip .pip-label::before {
  content: '📷 ';
}
.local-camera-pip .pip-close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s;
}
.local-camera-pip:hover .pip-close {
  opacity: 1;
}
.local-camera-pip .pip-close:hover {
  background: rgba(239,68,68,.8);
}

/* Expanded remote video overlay (click to enlarge) */
.video-expanded-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.video-expanded-overlay.hidden { display: none; }
.video-expanded-overlay video {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius-lg);
  border: 2px solid var(--indigo-500);
}
.video-expanded-overlay .expanded-label {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: rgba(0,0,0,.7);
  padding: 4px 16px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
}
.video-expanded-overlay .expanded-close-hint {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 12px;
  color: rgba(255,255,255,.5);
}

/* Camera button active state */
.toolbar-btn.camera-active {
  background: rgba(46, 134, 193, 0.2);
  border-color: var(--indigo-400);
}
.toolbar-btn.camera-active .material-icons-round {
  color: var(--indigo-400);
}

/* ── Screen Share View ── */
.screen-share-view {
  background: #000;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex;
  flex-direction: column;
  max-height: 55vh;
}
.screen-share-view.hidden { display: none; }
.screen-share-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  background: rgba(15,23,42,.8);
}
.screen-share-header .material-icons-round { font-size: 18px; color: var(--emerald-400); }
.btn-stop-share {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-md);
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.3);
  color: var(--rose-400);
  font-size: 12px;
  cursor: pointer;
}
.btn-stop-share.hidden { display: none; }
.btn-stop-share .material-icons-round { font-size: 16px; }
/* Screen share video wrapper (relative for overlay positioning) */
.screen-share-video-wrapper {
  position: relative;
  width: 100%;
  max-height: calc(55vh - 40px);
  background: #000;
  overflow: hidden;
}
#screenShareVideo {
  width: 100%;
  max-height: calc(55vh - 40px);
  object-fit: contain;
  background: #000;
  display: block;
}

/* ── Screen Control UI ── */
.btn-request-control, .btn-release-control {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  cursor: pointer;
  transition: all .2s;
}
.btn-request-control {
  background: rgba(59,130,246,.15);
  border: 1px solid rgba(59,130,246,.3);
  color: var(--blue-400, #60A5FA);
}
.btn-request-control:hover { background: rgba(59,130,246,.25); }
.btn-release-control {
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.3);
  color: var(--rose-400);
}
.btn-release-control:hover { background: rgba(239,68,68,.25); }
.btn-request-control.hidden, .btn-release-control.hidden { display: none; }
.btn-request-control .material-icons-round,
.btn-release-control .material-icons-round { font-size: 16px; }

/* Control request banner */
.control-request-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(59,130,246,.1);
  border-bottom: 1px solid rgba(59,130,246,.2);
  color: var(--blue-400, #60A5FA);
  font-size: 13px;
  animation: controlPulse 2s ease-in-out infinite;
}
.control-request-banner.hidden { display: none; }
.control-request-banner .material-icons-round { font-size: 18px; }
@keyframes controlPulse {
  0%, 100% { background: rgba(59,130,246,.1); }
  50% { background: rgba(59,130,246,.2); }
}
.btn-grant-control, .btn-deny-control {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  font-size: 12px;
  cursor: pointer;
}
.btn-grant-control {
  background: rgba(16,185,129,.2);
  border: 1px solid rgba(16,185,129,.4);
  color: var(--emerald-400);
  margin-left: auto;
}
.btn-grant-control:hover { background: rgba(16,185,129,.35); }
.btn-deny-control {
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.3);
  color: var(--rose-400);
}
.btn-deny-control:hover { background: rgba(239,68,68,.25); }
.btn-grant-control .material-icons-round,
.btn-deny-control .material-icons-round { font-size: 14px; }

/* Active control banner */
.control-active-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(16,185,129,.1);
  border-bottom: 1px solid rgba(16,185,129,.2);
  color: var(--emerald-400);
  font-size: 13px;
}
.control-active-banner.hidden { display: none; }
.control-active-banner .material-icons-round { font-size: 18px; }
.btn-revoke-control {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.3);
  color: var(--rose-400);
  font-size: 12px;
  cursor: pointer;
}
.btn-revoke-control:hover { background: rgba(239,68,68,.25); }
.btn-revoke-control .material-icons-round { font-size: 14px; }

/* Annotation canvas overlay */
.annotation-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 5;
}
.annotation-canvas.active {
  pointer-events: auto;
  cursor: crosshair;
}
.annotation-canvas.hidden { display: none; }

/* Remote cursor */
.remote-cursor {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  transform: translate(-4px, -4px);
  transition: left 0.05s linear, top 0.05s linear;
}
.remote-cursor.hidden { display: none; }
.remote-cursor .material-icons-round {
  font-size: 24px;
  color: var(--blue-400, #60A5FA);
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.5));
  transform: rotate(-30deg);
}
.remote-cursor-label {
  position: absolute;
  left: 20px;
  top: 16px;
  background: var(--blue-400, #60A5FA);
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* ── Control Mode Toggle Button ── */
.btn-toggle-control-mode {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 8px;
  background: rgba(30,41,59,.6);
  color: rgba(255,255,255,.8);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  margin-left: 8px;
  transition: all .15s ease;
}
.btn-toggle-control-mode:hover {
  background: rgba(99,102,241,.2);
  border-color: rgba(99,102,241,.4);
}
.btn-toggle-control-mode.mode-interact {
  background: rgba(59,130,246,.15);
  border-color: rgba(59,130,246,.3);
  color: #60A5FA;
}
.btn-toggle-control-mode.mode-annotate {
  background: rgba(239,68,68,.15);
  border-color: rgba(239,68,68,.3);
  color: #F87171;
}
.btn-toggle-control-mode.hidden { display: none; }
.btn-toggle-control-mode .material-icons-round { font-size: 15px; }
.btn-toggle-control-mode .mode-label { font-size: 11px; }

/* ── Click Ripple Effects ── */
.click-ripple-local,
.click-ripple-remote {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 15;
  transform: translate(-50%, -50%);
  animation: clickRipple 0.5s ease-out forwards;
}
.click-ripple-local {
  border: 2px solid rgba(59,130,246,.7);
  background: rgba(59,130,246,.15);
}
.click-ripple-remote {
  border: 2px solid rgba(96,165,250,.8);
  background: rgba(96,165,250,.2);
}
.click-ripple-remote.dbl {
  border-color: rgba(251,191,36,.8);
  background: rgba(251,191,36,.2);
  animation: clickRippleDbl 0.6s ease-out forwards;
}

@keyframes clickRipple {
  0% { width: 10px; height: 10px; opacity: 1; }
  100% { width: 50px; height: 50px; opacity: 0; }
}
@keyframes clickRippleDbl {
  0% { width: 10px; height: 10px; opacity: 1; }
  50% { width: 40px; height: 40px; opacity: .6; }
  100% { width: 60px; height: 60px; opacity: 0; }
}

/* ── Remote Click Label ── */
.remote-click-label {
  position: absolute;
  z-index: 16;
  color: rgba(96,165,250,.9);
  font-size: 10px;
  font-weight: 600;
  pointer-events: none;
  white-space: nowrap;
  animation: fadeUpOut 1.2s ease-out forwards;
}
@keyframes fadeUpOut {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-16px); }
}

/* ── Remote Keystroke Indicator ── */
.remote-keystroke-indicator {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 16;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15,23,42,.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(148,163,184,.15);
  border-radius: 8px;
  padding: 6px 14px;
  pointer-events: none;
  animation: fadeInUp .15s ease-out;
}
.remote-keystroke-indicator .keystroke-user {
  color: rgba(148,163,184,.7);
  font-size: 11px;
}
.remote-keystroke-indicator kbd {
  display: inline-block;
  background: rgba(99,102,241,.2);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 4px;
  padding: 2px 8px;
  font-family: 'Inter', monospace;
  font-size: 13px;
  font-weight: 600;
  color: #A5B4FC;
  min-width: 20px;
  text-align: center;
}
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateX(-50%) translateY(6px); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Remote Keyboard Input ── */
.remote-keyboard-input {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 14;
  width: 260px;
  padding: 8px 14px;
  background: rgba(15,23,42,.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 10px;
  color: #E2E8F0;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  text-align: center;
  transition: border-color .15s, box-shadow .15s;
}
.remote-keyboard-input:focus {
  border-color: rgba(99,102,241,.6);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1), 0 4px 16px rgba(0,0,0,.3);
}
.remote-keyboard-input::placeholder {
  color: rgba(148,163,184,.5);
}
.remote-keyboard-input.hidden { display: none; }

/* ── Remote Click Ripple (in HTML) ── */
.remote-click-ripple.hidden { display: none; }

/* ── Room Timer ── */
.room-timer {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-left: 8px;
}

/* ── Responsive: toolbar ── */
@media (max-width: 640px) {
  .toolbar-label { display: none; }
  .toolbar-btn { padding: 8px 10px; }
  .zoom-toolbar { gap: 2px; padding: 6px 8px; }
  .toolbar-group + .toolbar-group { margin-left: 4px; padding-left: 4px; }
}

/* ═══════════════════════════════════════════════════════════
   NEW FEATURES: Modals, Toast, Polls, Breakout, Whiteboard,
   Virtual BG, Settings, DM, Waiting Room, File Share
   ═══════════════════════════════════════════════════════════ */

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(30,41,59,.95);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-md);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  color: var(--slate-100);
  font-size: 13px;
  font-weight: 500;
  pointer-events: auto;
  animation: toastIn .35s var(--ease-out);
  max-width: 360px;
}
.toast .material-icons-round { font-size: 20px; }
.toast.toast-info .material-icons-round { color: var(--indigo-400); }
.toast.toast-success .material-icons-round { color: var(--emerald-400); }
.toast.toast-warning .material-icons-round { color: var(--amber-400); }
.toast.toast-error .material-icons-round { color: var(--rose-400); }
.toast-exit { animation: toastOut .3s ease-in forwards; }
@keyframes toastIn { from { opacity:0; transform:translateX(40px); } to { opacity:1; transform:translateX(0); } }
@keyframes toastOut { from { opacity:1; transform:translateX(0); } to { opacity:0; transform:translateX(40px); } }

/* ── Modal Overlay ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  animation: fadeIn .2s;
}
.modal-overlay.hidden { display: none; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.modal-card {
  background: rgba(15,23,42,.95);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-xl);
  padding: 24px;
  width: 420px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 16px 64px rgba(0,0,0,.5);
  animation: modalIn .3s var(--ease-out);
}
.modal-card.modal-lg { width: 560px; }
.modal-card.modal-xl { width: 90vw; max-width: 1200px; padding: 16px; }
@keyframes modalIn { from { opacity:0; transform:scale(.95) translateY(10px); } to { opacity:1; transform:none; } }

.modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.modal-header .material-icons-round { color: var(--indigo-400); }
.modal-header h3 { font-size: 1rem; font-weight: 700; color: var(--slate-100); }
.modal-close { margin-left: auto; }

/* ── DM Tab ── */
.dm-user-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.dm-user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background .15s;
}
.dm-user-item:hover { background: rgba(255,255,255,.06); }
.dm-user-item .participant-avatar { width: 30px; height: 30px; font-size: 11px; }
.dm-user-item-name { font-size: 13px; font-weight: 600; color: var(--slate-200); }
.dm-unread {
  background: var(--indigo-600) !important;
  color: #fff;
}
.dm-unread.hidden { display: none; }

.dm-conv-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.dm-target-name { font-size: 14px; font-weight: 600; color: var(--slate-100); }
.dm-conversation.hidden { display: none; }

/* ── File Upload ── */
.file-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--slate-400);
  transition: all .15s;
  flex-shrink: 0;
}
.file-upload-btn:hover { color: var(--indigo-400); background: rgba(46,134,193,.1); }
.file-upload-btn .material-icons-round { font-size: 18px; }

.file-msg-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(46,134,193,.08);
  border: 1px solid rgba(46,134,193,.15);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background .15s;
}
.file-msg-card:hover { background: rgba(46,134,193,.15); }
.file-msg-icon { font-size: 20px; color: var(--indigo-400); }
.file-msg-info { flex: 1; }
.file-msg-name { font-size: 12px; font-weight: 600; color: var(--slate-200); }
.file-msg-size { font-size: 10px; color: var(--slate-500); }

/* ── Poll ── */
.poll-options-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.poll-option-input {
  display: flex;
  align-items: center;
  gap: 6px;
}
.poll-option-input input {
  flex: 1;
  padding: 8px 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  color: var(--slate-200);
  font-size: 13px;
  outline: none;
}
.poll-option-input input:focus { border-color: var(--indigo-500); }

.poll-settings {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--slate-400);
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  accent-color: var(--indigo-500);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: none;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  color: var(--slate-400);
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.btn-ghost:hover { background: rgba(255,255,255,.06); color: var(--slate-200); }
.btn-ghost .material-icons-round { font-size: 16px; }

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--indigo-600), var(--indigo-500));
  color: white;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.btn-sm:hover { filter: brightness(1.1); }

.btn-danger-sm {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.3);
  color: var(--rose-400);
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-danger-sm:hover { background: rgba(239,68,68,.25); }
.btn-danger-sm .material-icons-round { font-size: 14px; }

/* Active polls display */
.active-polls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
.poll-card {
  padding: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-md);
}
.poll-card-question {
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-100);
  margin-bottom: 10px;
}
.poll-card-options { display: flex; flex-direction: column; gap: 6px; }
.poll-option-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.04);
  cursor: pointer;
  transition: all .15s;
  position: relative;
  overflow: hidden;
}
.poll-option-row:hover { background: rgba(46,134,193,.1); }
.poll-option-row.voted { background: rgba(46,134,193,.12); border: 1px solid rgba(46,134,193,.25); }
.poll-option-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: rgba(46,134,193,.1);
  border-radius: var(--radius-sm);
  transition: width .4s var(--ease-out);
}
.poll-option-text { flex: 1; font-size: 13px; color: var(--slate-200); z-index: 1; position: relative; }
.poll-option-votes { font-size: 12px; font-weight: 600; color: var(--indigo-400); z-index: 1; position: relative; }
.poll-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 11px;
  color: var(--slate-500);
}

/* ── Breakout Rooms ── */
.breakout-rooms-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.breakout-room-card {
  padding: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-md);
}
.breakout-room-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--indigo-300);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.breakout-room-name .material-icons-round { font-size: 18px; }
.breakout-room-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 28px;
}
.breakout-part-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(46,134,193,.1);
  border-radius: var(--radius-full);
  font-size: 11px;
  color: var(--slate-300);
  cursor: grab;
}
.breakout-part-chip.dragging { opacity: 0.5; }
.breakout-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: flex-end;
}

/* ── Whiteboard ── */
.wb-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.wb-tool {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: none;
  border: 1px solid rgba(255,255,255,.08);
  color: var(--slate-400);
  cursor: pointer;
  transition: all .15s;
}
.wb-tool:hover { background: rgba(255,255,255,.08); color: var(--slate-200); }
.wb-tool.active { background: rgba(46,134,193,.15); color: var(--indigo-400); border-color: var(--indigo-500); }
.wb-tool .material-icons-round { font-size: 18px; }
.wb-color-picker {
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.wb-stroke-picker {
  padding: 4px 8px;
  background: rgba(15,23,42,.8);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  color: var(--slate-300);
  font-size: 12px;
  outline: none;
}
#whiteboardCanvas {
  width: 100%;
  background: #fff;
  border-radius: var(--radius-md);
  cursor: crosshair;
  touch-action: none;
}

/* ── Virtual Background ── */
.vbg-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.vbg-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  background: rgba(255,255,255,.04);
  cursor: pointer;
  transition: all .15s;
  font-size: 11px;
  color: var(--slate-400);
}
.vbg-option:hover { background: rgba(255,255,255,.08); }
.vbg-option.active { border-color: var(--indigo-500); background: rgba(46,134,193,.1); color: var(--indigo-300); }
.vbg-option .material-icons-round { font-size: 24px; }
.vbg-preview {
  width: 40px;
  height: 30px;
  border-radius: 6px;
}
.vbg-preview-area {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  aspect-ratio: 4/3;
}
.vbg-preview-area video, .vbg-preview-area canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vbg-preview-area canvas {
  position: absolute;
  inset: 0;
}

/* ── Settings Modal ── */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  transition: background .15s;
  gap: 12px;
}
.settings-item:hover { background: rgba(255,255,255,.03); }
.settings-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.settings-info .material-icons-round { font-size: 20px; color: var(--indigo-400); }
.settings-title { font-size: 13px; font-weight: 600; color: var(--slate-200); }
.settings-desc { font-size: 11px; color: var(--slate-500); margin-top: 2px; }
.settings-input {
  padding: 6px 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  color: var(--slate-200);
  font-size: 12px;
  outline: none;
  width: 120px;
}
.settings-input:focus { border-color: var(--indigo-500); }
.settings-action {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.15);
  border-radius: 11px;
  cursor: pointer;
  transition: background .2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  top: 2px;
  left: 2px;
  transition: transform .2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--indigo-500); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ── Waiting Room Panel ── */
.waiting-room-panel {
  position: fixed;
  top: 60px;
  right: 20px;
  width: 300px;
  background: rgba(15,23,42,.95);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  backdrop-filter: blur(16px);
  z-index: 4000;
  padding: 16px;
  animation: modalIn .3s var(--ease-out);
}
.waiting-room-panel.hidden { display: none; }

/* ── Waiting Room Overlay (shown to users waiting for admission) ── */
.waiting-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,.92);
  backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn .4s var(--ease-out);
}
.waiting-overlay.hidden { display: none; }
.waiting-overlay-content {
  text-align: center;
  padding: 48px 40px;
  background: rgba(15,23,42,.85);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-xl, 20px);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  max-width: 400px;
}
.waiting-overlay-content h2 {
  color: var(--slate-100);
  font-size: 22px;
  font-weight: 700;
  margin: 16px 0 8px;
}
.waiting-overlay-content p {
  color: var(--slate-400);
  font-size: 14px;
  margin-bottom: 8px;
}
.waiting-spinner {
  font-size: 48px;
  color: var(--amber-400);
  animation: spin 2s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.wr-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-100);
  margin-bottom: 12px;
}
.wr-header .material-icons-round { font-size: 20px; color: var(--amber-400); }
.wr-count {
  margin-left: auto;
  background: var(--amber-400);
  color: var(--slate-900);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}
.wr-close { margin-left: 4px; }
.wr-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}
.wr-user-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,.03);
  border-radius: var(--radius-sm);
}
.wr-user-name { flex: 1; font-size: 13px; color: var(--slate-200); }
.wr-user-actions { display: flex; gap: 4px; }
.wr-admit-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  background: rgba(52,211,153,.15);
  border: 1px solid rgba(52,211,153,.3);
  color: var(--emerald-400);
  cursor: pointer;
}
.wr-deny-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.3);
  color: var(--rose-400);
  cursor: pointer;
}

/* ── Pin/Spotlight indicator ── */
.participant-card.pinned {
  border-color: var(--amber-400);
  box-shadow: 0 0 12px rgba(251,191,36,.15);
}
.participant-card.pinned::before {
  content: '📌';
  position: absolute;
  top: -6px;
  left: -6px;
  font-size: 14px;
}

/* ── Screen Translation ── */
.btn-translate-screen {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 15;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15,23,42,.85);
  border: 1px solid rgba(255,255,255,.15);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: all .2s;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.btn-translate-screen:hover {
  background: rgba(59,130,246,.3);
  color: var(--blue-400, #60A5FA);
  border-color: rgba(59,130,246,.4);
  transform: scale(1.1);
}
.btn-translate-screen.active {
  background: rgba(59,130,246,.25);
  color: var(--blue-400, #60A5FA);
  border-color: rgba(59,130,246,.5);
}
.btn-translate-screen.hidden { display: none; }
.btn-translate-screen .material-icons-round { font-size: 22px; }

.screen-translate-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: rgba(15,23,42,.9);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(59,130,246,.3);
  color: var(--blue-400, #60A5FA);
  font-size: 14px;
  backdrop-filter: blur(8px);
}
.screen-translate-loading.hidden { display: none; }
.translate-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(96,165,250,.3);
  border-top-color: var(--blue-400, #60A5FA);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}



/* ── Translation Overlay (numbered markers on video) ── */
.screen-translate-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 12;
  pointer-events: none;
}
.screen-translate-overlay.hidden { display: none; }

.translate-marker {
  position: absolute;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--blue-500, #3B82F6);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.5), 0 0 0 2px rgba(255,255,255,.3);
  animation: markerPop .3s ease;
  animation-delay: calc(var(--block-index, 0) * 50ms);
  animation-fill-mode: backwards;
  transition: all .2s ease;
  z-index: 2;
}
.translate-marker:hover,
.translate-marker.active {
  transform: translate(-50%, -50%) scale(1.3);
  background: var(--emerald-400, #34D399);
  box-shadow: 0 2px 16px rgba(52,211,153,.5), 0 0 0 3px rgba(255,255,255,.5);
  z-index: 5;
}
@keyframes markerPop {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ── Translation Floating Popup ── */
.translate-popup {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 380px;
  max-height: 50vh;
  background: rgba(15,23,42,.97);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.05);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  animation: popupAppear .3s ease;
  backdrop-filter: blur(20px);
  overflow: hidden;
}
.translate-popup.hidden { display: none; }
@keyframes popupAppear {
  from { opacity: 0; transform: translateY(16px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.translate-popup-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.08);
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
}
.translate-popup-header:active { cursor: grabbing; }
.translate-popup-header .material-icons-round {
  font-size: 20px;
  color: var(--emerald-400, #34D399);
}
.translate-popup-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #F1F5F9);
}
.translate-popup-count {
  background: var(--blue-500, #3B82F6);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}
.translate-popup-btn {
  margin-left: auto;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--text-secondary, #CBD5E1);
  cursor: pointer;
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.translate-popup-btn:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.translate-popup-btn.close:hover {
  background: rgba(239,68,68,.15);
  border-color: rgba(239,68,68,.3);
  color: #F87171;
}
.translate-popup-btn .material-icons-round { font-size: 16px; }
.translate-popup-btn + .translate-popup-btn { margin-left: 6px; }

.translate-popup-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.translate-popup-list::-webkit-scrollbar { width: 5px; }
.translate-popup-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 5px; }
.translate-popup-list::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); }

.translate-popup-item {
  display: flex;
  gap: 12px;
  padding: 10px 16px;
  transition: background .15s;
  cursor: default;
  animation: popupItemIn .2s ease;
  animation-delay: calc(var(--item-index, 0) * 25ms);
  animation-fill-mode: backwards;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.translate-popup-item:last-child { border-bottom: none; }
.translate-popup-item:hover,
.translate-popup-item.highlight {
  background: rgba(59,130,246,.08);
}
@keyframes popupItemIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.translate-popup-num {
  width: 26px; height: 26px;
  min-width: 26px;
  border-radius: 50%;
  background: var(--blue-500, #3B82F6);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: background .15s;
}
.translate-popup-item.highlight .translate-popup-num,
.translate-popup-item:hover .translate-popup-num {
  background: var(--emerald-400, #34D399);
}
.translate-popup-content {
  flex: 1;
  min-width: 0;
}
.translate-popup-original {
  font-size: 12px;
  color: var(--text-muted, #94A3B8);
  line-height: 1.4;
  word-break: break-word;
  margin-bottom: 3px;
}
.translate-popup-translated {
  font-size: 13px;
  color: var(--text-primary, #F1F5F9);
  font-weight: 500;
  line-height: 1.4;
  word-break: break-word;
}


/* ═══════════════════════════════════════════════════════════
   POLYGOTT NOTES — Panel UI
   ═══════════════════════════════════════════════════════════ */

/* ── Layout ── */
.notes-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  height: calc(100vh - 100px);
  padding: 0 4px;
}

.notes-input-panel,
.notes-output-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Input Panel ── */
.notes-input-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--glass-border);
}
.notes-input-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.notes-input-title .material-icons-round {
  font-size: 22px;
  color: var(--indigo-400);
}
.notes-input-title h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.notes-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--slate-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
}
.notes-icon-btn:hover {
  background: rgba(251,191,36,.1);
  color: var(--rose-400);
  border-color: rgba(244,63,94,.3);
}
.notes-icon-btn .material-icons-round { font-size: 18px; }

/* ── Form ── */
.notes-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 20px 20px;
  gap: 16px;
  overflow-y: auto;
}

.notes-textarea-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.notes-textarea-wrap textarea {
  flex: 1;
  min-height: 180px;
  resize: none;
  background: rgba(15,23,42,.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--slate-200);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  line-height: 1.7;
  padding: 14px 16px;
  outline: none;
  transition: border-color var(--t-fast);
}
.notes-textarea-wrap textarea::placeholder {
  color: var(--slate-600);
}
.notes-textarea-wrap textarea:focus {
  border-color: var(--indigo-500);
}
.notes-textarea-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.notes-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--slate-400);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}
.notes-file-btn .material-icons-round { font-size: 16px; }
.notes-file-btn:hover {
  background: rgba(46,134,193,.1);
  border-color: var(--indigo-500);
  color: var(--indigo-300);
}
.notes-file-name {
  font-size: 0.72rem;
  color: var(--indigo-400);
  font-weight: 500;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Options ── */
.notes-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.notes-option {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.notes-option label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.notes-option select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(15,23,42,.5);
  color: var(--slate-200);
  font-family: inherit;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
  transition: border-color var(--t-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2364748b'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.notes-option select:focus {
  border-color: var(--indigo-500);
}
.notes-option-toggle {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  grid-column: span 2;
  padding: 8px 0 0;
}

/* Toggle Switch */
.notes-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  cursor: pointer;
}
.notes-toggle input { display: none; }
.notes-toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: var(--slate-700);
  transition: background var(--t-fast);
}
.notes-toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--slate-300);
  top: 3px;
  left: 3px;
  transition: transform var(--t-fast);
}
.notes-toggle input:checked + .notes-toggle-slider {
  background: var(--indigo-500);
}
.notes-toggle input:checked + .notes-toggle-slider::before {
  transform: translateX(18px);
  background: #fff;
}

/* ── Generate Button ── */
.notes-generate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, var(--indigo-600), var(--indigo-500));
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t-normal);
  box-shadow: 0 4px 16px rgba(46,134,193,.3);
}
.notes-generate-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(46,134,193,.4);
}
.notes-generate-btn:disabled {
  opacity: .7;
  cursor: wait;
}
.notes-generate-btn .material-icons-round { font-size: 20px; }

/* ── Output Panel ── */
.notes-loading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notes-loading-animation {
  text-align: center;
}
.notes-loading-animation p {
  color: var(--slate-300);
  font-weight: 600;
  margin-top: 16px;
}
.notes-loading-sub {
  font-size: .78rem !important;
  color: var(--slate-500) !important;
  font-weight: 400 !important;
  margin-top: 4px !important;
}
.notes-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--slate-500);
}
.notes-empty .material-icons-round {
  font-size: 48px;
  opacity: .4;
}
.notes-empty p { font-size: .9rem; }

/* Spinner */
.notes-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--indigo-400);
  border-radius: 50%;
  animation: notesSpin .8s linear infinite;
}
@keyframes notesSpin { to { transform: rotate(360deg); } }

/* ── Results Header ── */
.notes-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border);
}
.notes-result-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}
.notes-participants {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.notes-participant-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(46,134,193,.12);
  color: var(--indigo-300);
  font-size: 0.7rem;
  font-weight: 600;
}
.notes-process-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--slate-500);
}
.notes-process-time .material-icons-round { font-size: 14px; }
.notes-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--slate-400);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}
.notes-copy-btn .material-icons-round { font-size: 16px; }
.notes-copy-btn:hover {
  background: rgba(46,134,193,.1);
  border-color: var(--indigo-500);
  color: var(--indigo-300);
}

/* ── Tabs ── */
.notes-tabs {
  display: flex;
  gap: 0;
  padding: 0 20px;
  border-bottom: 1px solid var(--glass-border);
  overflow-x: auto;
}
.notes-tab-btn {
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: var(--slate-500);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.notes-tab-btn:hover { color: var(--slate-300); }
.notes-tab-btn.active {
  color: var(--indigo-400);
  border-bottom-color: var(--indigo-400);
}
.notes-tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.notes-tab-content.active { display: block; }

/* ── Result Sections ── */
.notes-result-section { margin-bottom: 24px; }
.notes-result-section.hidden { display: none; }
.notes-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.notes-section-header .material-icons-round {
  font-size: 20px;
  color: var(--indigo-400);
}
.notes-section-header h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

/* Summary */
.notes-summary-text {
  font-size: 0.85rem;
  color: var(--slate-300);
  line-height: 1.8;
  background: rgba(15,23,42,.3);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  border-left: 3px solid var(--indigo-500);
}

/* Key Points */
.notes-key-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.notes-key-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.83rem;
  color: var(--slate-300);
  line-height: 1.6;
  padding: 10px 14px;
  background: rgba(15,23,42,.3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
}
.notes-check {
  font-size: 18px !important;
  color: var(--emerald-400) !important;
  margin-top: 1px;
  flex-shrink: 0;
}

/* Action Items */
.notes-action-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.notes-action-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(15,23,42,.3);
  border: 1px solid var(--glass-border);
}
.notes-action-item .material-icons-round {
  font-size: 20px;
  color: var(--emerald-400);
  margin-top: 2px;
  flex-shrink: 0;
}
.notes-action-item strong {
  display: block;
  font-size: 0.83rem;
  color: var(--slate-200);
  margin-bottom: 4px;
}
.notes-assignee {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--indigo-400);
  font-weight: 600;
  margin-right: 10px;
}
.notes-deadline {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--amber-400);
  font-weight: 500;
}

/* Study Notes */
.notes-study-notes {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.notes-study-group h5 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate-200);
  margin: 0 0 10px;
}
.notes-study-group h5 .material-icons-round {
  font-size: 18px;
  color: var(--indigo-400);
}
.notes-study-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.notes-study-group li {
  font-size: 0.82rem;
  color: var(--slate-300);
  line-height: 1.6;
  padding: 8px 14px;
  background: rgba(15,23,42,.3);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--indigo-600);
}

/* Transcript */
.notes-transcript {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 500px;
  overflow-y: auto;
}
.notes-transcript-line {
  font-size: 0.8rem;
  color: var(--slate-400);
  line-height: 1.6;
  padding: 4px 0;
  margin: 0;
  border-bottom: 1px solid rgba(148,163,184,.06);
}

/* Shake animation */
@keyframes notesShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}
.notes-shake {
  animation: notesShake .4s ease;
  border-color: var(--rose-400) !important;
}

.notes-no-data {
  color: var(--slate-600);
  font-size: 0.8rem;
}

/* ── Notes Responsive ── */
@media (max-width: 900px) {
  .notes-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - 100px);
  }
  .notes-input-panel {
    max-height: 50vh;
  }
  .notes-options {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .notes-layout { padding: 0; gap: 12px; }
  .notes-input-header { padding: 14px 16px 10px; }
  .notes-form { padding: 12px 16px 16px; }
  .notes-tabs { padding: 0 12px; }
  .notes-tab-content { padding: 16px; }
}

/* ═══════════ NOTES RESULT MODAL (Room → Notes) ═══════════ */
.notes-modal-card {
  width: 560px;
  max-width: 95vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
.notes-modal-header {
  background: linear-gradient(135deg, rgba(16,185,129,.12), rgba(20,184,166,.08));
  border-bottom: 1px solid rgba(16,185,129,.2);
}
.notes-modal-header h3 { color: var(--emerald-400, #34d399); }
.notes-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--slate-300);
}
.notes-spinner-lg {
  width: 40px; height: 40px;
  border: 3px solid rgba(16,185,129,.2);
  border-top-color: var(--emerald-400, #34d399);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.notes-modal-body {
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.nr-section {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 1rem;
}
.nr-section-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .75rem;
}
.nr-section-header h4 {
  font-size: .85rem;
  font-weight: 600;
  color: var(--slate-200);
  margin: 0;
}
.nr-section-header .material-icons-round {
  font-size: 1.15rem;
  color: var(--emerald-400, #34d399);
}
.nr-summary-text {
  font-size: .875rem;
  line-height: 1.6;
  color: var(--slate-300);
  margin: 0;
}
.nr-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.nr-list li {
  font-size: .85rem;
  color: var(--slate-300);
  line-height: 1.5;
  padding: .4rem .5rem;
  background: rgba(59,130,246,.05);
  border-radius: 8px;
  border-left: 2px solid var(--blue-400, #60a5fa);
}
.nr-action-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.nr-action-item {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .85rem;
  color: var(--slate-300);
  padding: .5rem;
  background: rgba(245,158,11,.05);
  border-radius: 8px;
  border-left: 2px solid var(--amber-400, #fbbf24);
}
.nr-action-item > div { display: flex; flex-wrap: wrap; gap: .35rem; align-items: baseline; }
.nr-chip {
  display: inline-block;
  font-size: .7rem;
  padding: .15rem .45rem;
  background: rgba(139,92,246,.15);
  color: var(--violet-300, #c4b5fd);
  border-radius: 6px;
}
.nr-chip-muted {
  display: inline-block;
  font-size: .7rem;
  padding: .15rem .45rem;
  background: rgba(148,163,184,.1);
  color: var(--slate-400);
  border-radius: 6px;
}
.nr-participants {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.nr-participant {
  padding: .3rem .7rem;
  background: rgba(139,92,246,.1);
  color: var(--violet-300, #c4b5fd);
  border-radius: 20px;
  font-size: .78rem;
  border: 1px solid rgba(139,92,246,.2);
}
.nr-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .75rem;
  border-top: 1px solid rgba(255,255,255,.06);
}
.nr-time {
  font-size: .75rem;
  color: var(--slate-500);
}
.nr-footer-actions {
  display: flex;
  gap: .5rem;
}
.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .75rem;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background .15s;
}
.btn-sm .material-icons-round { font-size: .9rem; }
.btn-outline {
  background: rgba(255,255,255,.05);
  color: var(--slate-300);
  border: 1px solid rgba(255,255,255,.1);
}
.btn-outline:hover { background: rgba(255,255,255,.1); }
.btn-emerald {
  background: rgba(16,185,129,.15);
  color: var(--emerald-400, #34d399);
}
.btn-emerald:hover { background: rgba(16,185,129,.25); }

/* ═══ AI COPILOT PANEL (Teams/Zoom style) ═══ */

/* Toolbar Copilot button glow */
.copilot-btn { position: relative; }
.copilot-btn.active { color: #a78bfa !important; background: rgba(167,139,250,.12) !important; }
.copilot-btn.flash .material-icons-round {
  animation: copilotFlash 1s ease-in-out 2;
}
@keyframes copilotFlash {
  0%, 100% { color: inherit; }
  50% { color: #a78bfa; text-shadow: 0 0 8px rgba(167,139,250,.5); }
}
.copilot-pulse {
  position: absolute; top: 4px; right: 4px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #a78bfa;
  animation: copilotPulse 2s ease-in-out infinite;
}
@keyframes copilotPulse {
  0%, 100% { opacity: .4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* Panel container */
.copilot-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 380px; max-width: 90vw;
  background: linear-gradient(180deg, #0e1225 0%, #0b0f1a 100%);
  border-left: 1px solid rgba(167,139,250,.15);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  z-index: 50;
  box-shadow: -8px 0 32px rgba(0,0,0,.4);
}
.copilot-panel.open {
  transform: translateX(0);
}

/* Header */
.copilot-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(167,139,250,.04);
}
.copilot-header-left {
  display: flex; align-items: center; gap: 10px;
}
.copilot-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(124,58,237,.3);
}
.copilot-logo .material-icons-round {
  font-size: 20px; color: #fff;
}
.copilot-title {
  font-size: 15px; font-weight: 700; color: #fff;
  margin: 0; letter-spacing: -.2px;
}
.copilot-status {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--slate-400);
}
.copilot-status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #34d399;
  animation: copilotPulse 2s ease-in-out infinite;
}
.copilot-header-actions {
  display: flex; align-items: center; gap: 8px;
}
.copilot-privacy-select {
  padding: 4px 8px; border-radius: 6px;
  background: rgba(255,255,255,.06); color: var(--slate-300);
  border: 1px solid rgba(255,255,255,.08); font-size: 11px;
  outline: none; cursor: pointer;
}
.copilot-privacy-select:focus { border-color: #7c3aed; }
.copilot-privacy-select option { background: #0e1225; }
.copilot-close {
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(255,255,255,.05); border: none;
  color: var(--slate-400); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.copilot-close:hover { background: rgba(255,255,255,.12); color: #fff; }
.copilot-close .material-icons-round { font-size: 18px; }

/* Tabs */
.copilot-tabs {
  display: flex; border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 0 8px; gap: 2px;
}
.copilot-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 10px 4px; font-size: 12px; font-weight: 500;
  color: var(--slate-500); background: none; border: none;
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: all .2s; white-space: nowrap;
}
.copilot-tab .material-icons-round { font-size: 16px; }
.copilot-tab:hover { color: var(--slate-300); }
.copilot-tab.active {
  color: #a78bfa;
  border-bottom-color: #7c3aed;
}

/* Tab content */
.copilot-body {
  flex: 1; overflow-y: auto; padding: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}
.copilot-tab-content {
  display: none;
}
.copilot-tab-content.active {
  display: block;
  animation: copilotFadeIn .2s ease;
}
@keyframes copilotFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cards */
.copilot-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
}
.copilot-card-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px 10px;
  font-size: 12px; font-weight: 600; color: var(--slate-300);
  text-transform: uppercase; letter-spacing: .3px;
}
.copilot-card-header .material-icons-round {
  font-size: 16px; color: #a78bfa;
}
.copilot-card-body {
  padding: 0 14px 14px;
}
.copilot-card-body p {
  font-size: 13px; color: var(--slate-200);
  line-height: 1.6; margin: 0;
}

/* Live badge */
.copilot-live-badge {
  margin-left: auto;
  display: flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; color: #f87171;
  letter-spacing: .5px;
}
.copilot-live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #f87171;
  animation: livePulse 1.5s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}

/* Copilot list (key points, decisions, actions) */
.copilot-list {
  list-style: none; padding: 0; margin: 0;
}
.copilot-list li {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 14px;
  font-size: 13px; color: var(--slate-200); line-height: 1.5;
  border-top: 1px solid rgba(255,255,255,.04);
}
.copilot-list li::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: #a78bfa; flex-shrink: 0;
  margin-top: 7px;
}
.copilot-list-decisions li::before { background: #60a5fa; }
.copilot-list-actions li::before { background: #34d399; }
.copilot-list li em {
  font-style: normal; color: #a78bfa; font-weight: 500;
}

/* Empty state */
.copilot-empty-state {
  text-align: center; padding: 32px 16px;
}
.copilot-empty-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: rgba(167,139,250,.08);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.copilot-empty-icon .material-icons-round {
  font-size: 26px; color: rgba(167,139,250,.4);
}
.copilot-empty-state p {
  font-size: 13px; color: var(--slate-400); margin: 0 0 4px;
}
.copilot-empty-hint {
  font-size: 11px; color: var(--slate-600);
}

/* Intents Feed */
.copilot-intents-feed {
  display: flex; flex-direction: column; gap: 8px;
}
.copilot-intent-item {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px; padding: 12px 14px;
  animation: copilotFadeIn .3s ease;
}
.copilot-intent-top {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.copilot-intent-badge {
  font-size: 10px; font-weight: 700; padding: 3px 9px;
  border-radius: 6px; text-transform: uppercase; letter-spacing: .3px;
}
.copilot-intent-badge.decision { background: rgba(96,165,250,.15); color: #60a5fa; }
.copilot-intent-badge.question { background: rgba(192,132,252,.15); color: #c084fc; }
.copilot-intent-badge.task_assignment { background: rgba(251,191,36,.15); color: #fbbf24; }
.copilot-intent-badge.concern { background: rgba(248,113,113,.15); color: #f87171; }
.copilot-intent-badge.agreement { background: rgba(52,211,153,.15); color: #34d399; }
.copilot-intent-badge.hiring_need { background: rgba(56,189,248,.15); color: #38bdf8; }
.copilot-intent-time {
  font-size: 10px; color: var(--slate-600); margin-left: auto;
}
.copilot-intent-desc {
  font-size: 13px; color: var(--slate-200); line-height: 1.5;
}
.copilot-intent-speaker {
  font-size: 11px; color: var(--slate-500); margin-top: 4px;
}

/* Engagement */
.copilot-engagement-body {
  padding: 8px 0;
}
.copilot-engagement-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.03);
  transition: background .15s;
}
.copilot-engagement-row:hover { background: rgba(255,255,255,.02); }
.copilot-engagement-row:last-child { border-bottom: none; }
.copilot-engagement-avatar {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.copilot-engagement-info { flex: 1; min-width: 0; }
.copilot-engagement-name {
  font-size: 13px; font-weight: 500; color: var(--slate-200);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.copilot-engagement-stats {
  display: flex; gap: 10px; margin-top: 2px;
}
.copilot-engagement-stat {
  font-size: 10px; color: var(--slate-500);
  display: flex; align-items: center; gap: 3px;
}
.copilot-engagement-stat .material-icons-round { font-size: 12px; }
.copilot-engagement-bar-wrap {
  width: 60px; height: 4px; background: rgba(255,255,255,.06);
  border-radius: 2px; overflow: hidden; flex-shrink: 0;
}
.copilot-engagement-bar {
  height: 100%; border-radius: 2px; transition: width .5s ease;
}
.copilot-engagement-bar.high { background: linear-gradient(90deg, #34d399, #6ee7b7); }
.copilot-engagement-bar.medium { background: linear-gradient(90deg, #60a5fa, #93c5fd); }
.copilot-engagement-bar.low { background: var(--slate-600); }
.copilot-engagement-level {
  font-size: 10px; font-weight: 600; padding: 2px 8px;
  border-radius: 6px; flex-shrink: 0;
}
.copilot-engagement-level.high { background: rgba(52,211,153,.12); color: #34d399; }
.copilot-engagement-level.medium { background: rgba(96,165,250,.12); color: #60a5fa; }
.copilot-engagement-level.low { background: rgba(148,163,184,.1); color: var(--slate-500); }
.copilot-refresh-btn {
  margin-left: auto; width: 26px; height: 26px; border-radius: 6px;
  background: rgba(255,255,255,.05); border: none; color: var(--slate-400);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.copilot-refresh-btn:hover { background: rgba(255,255,255,.12); color: #a78bfa; }
.copilot-refresh-btn .material-icons-round { font-size: 16px; }

/* Bookmarks */
.copilot-bookmark-actions {
  margin-bottom: 12px;
}
.copilot-add-bookmark-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(124,58,237,.15), rgba(167,139,250,.08));
  border: 1px dashed rgba(167,139,250,.3);
  color: #a78bfa; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.copilot-add-bookmark-btn:hover {
  background: linear-gradient(135deg, rgba(124,58,237,.25), rgba(167,139,250,.15));
  border-color: #7c3aed;
}
.copilot-add-bookmark-btn .material-icons-round { font-size: 18px; }
.copilot-bookmarks-feed {
  display: flex; flex-direction: column; gap: 8px;
}
.copilot-bookmark-item {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px; padding: 12px 14px;
  animation: copilotFadeIn .3s ease;
}
.copilot-bookmark-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(251,191,36,.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.copilot-bookmark-icon .material-icons-round { font-size: 16px; color: #fbbf24; }
.copilot-bookmark-text {
  font-size: 13px; color: var(--slate-200); line-height: 1.4;
}
.copilot-bookmark-meta {
  font-size: 11px; color: var(--slate-500); margin-top: 3px;
}

/* Footer */
.copilot-footer {
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.copilot-export-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  color: var(--slate-300); font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all .15s;
}
.copilot-export-btn:hover {
  background: rgba(255,255,255,.08); color: #fff;
}
.copilot-export-btn .material-icons-round { font-size: 16px; }

/* Summary card special styling */
.copilot-summary-card {
  border-color: rgba(167,139,250,.12);
  background: linear-gradient(135deg, rgba(124,58,237,.06) 0%, rgba(255,255,255,.02) 100%);
}

/* Responsive */
@media (max-width: 768px) {
  .copilot-panel { width: 100%; max-width: 100%; }
}
/* ═══ Executive Dashboard Layout ═══ */
.home-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.home-dashboard-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.home-dashboard-aside { display: flex; flex-direction: column; gap: 16px; }

/* Hero Card */
.home-hero-card {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(108,99,255,.12) 0%, rgba(79,70,229,.06) 100%);
  border: 1px solid rgba(108,99,255,.22);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(108,99,255,.08);
}
.home-hero-content { flex: 1; min-width: 0; }
.home-hero-summary {
  margin: 8px 0 0 0; font-size: 13px; color: rgba(255,255,255,.7);
  font-weight: 500;
}
.home-hero-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(108,99,255,.18);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.home-hero-icon .material-icons-round { font-size: 32px; color: #a78bfa; }

/* Violet icon variant */
.home-action-card-icon--violet {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

/* Section header improvements */
.home-section-link {
  margin-left: auto; background: none; border: none;
  color: #a78bfa; font-size: 12px; font-weight: 600;
  cursor: pointer; padding: 4px 8px; border-radius: 6px;
  transition: background .15s;
}
.home-section-link:hover { background: rgba(167,139,250,.1); }

/* Upcoming Meetings */
.home-upcoming {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  padding: 18px 20px;
}
.home-upcoming-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.home-upcoming-empty {
  text-align: center; padding: 28px 16px;
  color: rgba(255,255,255,.4);
}
.home-upcoming-empty .material-icons-round { font-size: 36px; opacity: .4; display: block; margin-bottom: 8px; }
.home-upcoming-empty p { margin: 0; font-size: 13px; }
.home-upcoming-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 10px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.05);
  cursor: pointer; transition: all .15s;
}
.home-upcoming-item:hover {
  background: rgba(108,99,255,.06);
  border-color: rgba(108,99,255,.2);
  transform: translateX(2px);
}
.home-upcoming-time {
  font-size: 14px; font-weight: 700; color: #a78bfa;
  width: 56px; text-align: center;
}
.home-upcoming-info { flex: 1; min-width: 0; }
.home-upcoming-title { font-size: 13px; font-weight: 600; color: #fff; margin: 0 0 4px; }
.home-upcoming-meta { font-size: 11px; color: rgba(255,255,255,.5); }

/* Aside Cards */
.home-aside-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  padding: 18px;
}
.home-aside-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.home-aside-header h4 {
  margin: 0; font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .5px;
}
.home-aside-header .material-icons-round { font-size: 18px; color: #a78bfa; }

/* Timezone Widget */
.home-tz-card {
  text-align: center;
  background: linear-gradient(135deg, rgba(14,165,233,.12), rgba(2,132,199,.06));
  border: 1px solid rgba(14,165,233,.2);
}
.home-tz-time {
  font-size: 36px; font-weight: 700;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px; font-variant-numeric: tabular-nums;
}
.home-tz-date { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 4px; }
.home-tz-meta {
  margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 11px; color: rgba(255,255,255,.5);
}
.home-tz-meta .material-icons-round { font-size: 14px; }

/* Timeline */
.home-timeline { position: relative; padding-left: 8px; }
.home-timeline-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 8px 0; position: relative;
}
.home-timeline-time {
  font-size: 11px; font-weight: 600; color: #a78bfa;
  width: 40px; text-align: right; padding-top: 2px;
}
.home-timeline-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #a78bfa; box-shadow: 0 0 0 3px rgba(167,139,250,.18);
  margin-top: 4px; flex-shrink: 0;
  position: relative;
}
.home-timeline-dot::after {
  content: ''; position: absolute; top: 13px; left: 4px;
  width: 2px; height: 18px; background: rgba(167,139,250,.2);
}
.home-timeline-item:last-child .home-timeline-dot::after { display: none; }
.home-timeline-content { flex: 1; padding-top: 0; }
.home-timeline-title { font-size: 12px; color: #fff; font-weight: 500; }
.home-timeline-desc { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 2px; }
.home-timeline-empty { padding: 16px 0; text-align: center; }
.home-timeline-empty p { margin: 0; font-size: 11px; color: rgba(255,255,255,.4); }

/* Recent Chats */
.home-recent-chats { display: flex; flex-direction: column; gap: 8px; }
.home-chats-empty {
  text-align: center; padding: 20px 0;
  color: rgba(255,255,255,.4);
}
.home-chats-empty .material-icons-round { font-size: 28px; opacity: .4; display: block; margin-bottom: 6px; }
.home-chats-empty p { margin: 0; font-size: 11px; }
.home-aside-btn {
  width: 100%; margin-top: 12px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px; border-radius: 10px;
  background: rgba(167,139,250,.08);
  border: 1px solid rgba(167,139,250,.2);
  color: #a78bfa; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.home-aside-btn:hover {
  background: rgba(167,139,250,.14);
  border-color: rgba(167,139,250,.3);
}
.home-aside-btn .material-icons-round { font-size: 16px; }

/* Responsive */
@media (max-width: 1100px) {
  .home-dashboard-grid { grid-template-columns: 1fr; }
  .home-dashboard-aside { order: -1; flex-direction: row; flex-wrap: wrap; }
  .home-dashboard-aside .home-aside-card { flex: 1 1 280px; }
}
@media (max-width: 600px) {
  .home-hero-card { flex-direction: column; text-align: center; }
  .home-dashboard-aside { flex-direction: column; }
}

/* Chat items in dashboard */
.home-chat-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.04);
  cursor: pointer; transition: all .15s;
}
.home-chat-item:hover {
  background: rgba(108,99,255,.06);
  border-color: rgba(108,99,255,.2);
}
.home-chat-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #6c63ff, #4338ca);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.home-chat-info { flex: 1; min-width: 0; }
.home-chat-name { font-size: 12px; font-weight: 600; color: #fff; }
.home-chat-preview {
  font-size: 11px; color: rgba(255,255,255,.5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}

/* ═══ Dashboard proportional layout (after removing create bar) ═══ */
#panelHome {
  display: flex; flex-direction: column;
  height: 100%; min-height: calc(100vh - 120px);
  padding: 20px 24px 24px;
  gap: 0;
  overflow: hidden;
}
#panelHome .home-dashboard-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 20px;
  align-items: stretch;
}
#panelHome .home-dashboard-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}
#panelHome .home-dashboard-aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}
#panelHome .home-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
#panelHome .home-upcoming {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}
#panelHome .home-upcoming-list {
  flex: 1;
  overflow-y: auto;
}
/* Custom scrollbar for dashboard panes */
#panelHome .home-dashboard-main::-webkit-scrollbar,
#panelHome .home-dashboard-aside::-webkit-scrollbar,
#panelHome .home-upcoming-list::-webkit-scrollbar {
  width: 6px;
}
#panelHome .home-dashboard-main::-webkit-scrollbar-thumb,
#panelHome .home-dashboard-aside::-webkit-scrollbar-thumb,
#panelHome .home-upcoming-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.08);
  border-radius: 3px;
}
#panelHome .home-dashboard-main::-webkit-scrollbar-thumb:hover,
#panelHome .home-dashboard-aside::-webkit-scrollbar-thumb:hover,
#panelHome .home-upcoming-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,.16);
}

@media (max-width: 1100px) {
  #panelHome .home-dashboard-grid { grid-template-columns: 1fr; }
  #panelHome .home-actions { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  #panelHome { padding: 14px; }
  #panelHome .home-actions { grid-template-columns: 1fr; }
}

/* Message center item */
.msg-center-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  cursor: pointer; transition: all .15s;
}
.msg-center-item:hover {
  background: rgba(108,99,255,.08);
  border-color: rgba(108,99,255,.2);
}

/* ═══════════════════════════════════════════════
   Message Center (Teams-style 2-pane slide panel)
   ═══════════════════════════════════════════════ */
.msg-center-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(8, 12, 24, .7);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s ease;
}
.msg-center-overlay.show { opacity: 1; }
.msg-center-panel {
  width: min(880px, 92vw);
  height: min(620px, 86vh);
  background: linear-gradient(180deg, #1a1f2e 0%, #131825 100%);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,.6);
  display: flex; flex-direction: column;
  overflow: hidden;
  transform: scale(.96); transition: transform .2s ease;
}
.msg-center-overlay.show .msg-center-panel { transform: scale(1); }
.msg-center-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.msg-center-title { display: flex; align-items: center; gap: 10px; }
.msg-center-title h3 { margin: 0; font-size: 16px; font-weight: 600; color: #fff; }
.msg-center-title .material-icons-round { color: #a78bfa; font-size: 22px; }
.msg-center-close {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.6); cursor: pointer; transition: all .15s;
}
.msg-center-close:hover { background: rgba(239,68,68,.15); color: #ef4444; border-color: rgba(239,68,68,.3); }
.msg-center-body { display: flex; flex: 1; min-height: 0; }
.msg-center-list {
  width: 300px; border-right: 1px solid rgba(255,255,255,.06);
  overflow-y: auto; padding: 8px;
}
.msg-center-empty {
  text-align: center; padding: 60px 20px;
  color: rgba(255,255,255,.4);
}
.msg-center-empty .material-icons-round { font-size: 48px; opacity: .4; display: block; margin-bottom: 12px; }
.msg-center-empty p { margin: 4px 0; font-size: 13px; }
.msg-center-empty-hint { font-size: 11px; opacity: .7; }
.msg-center-conv {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  cursor: pointer; transition: all .15s; margin-bottom: 4px;
}
.msg-center-conv:hover { background: rgba(255,255,255,.04); }
.msg-center-conv.active { background: rgba(108,99,255,.14); }
.msg-center-conv-info { flex: 1; min-width: 0; }
.msg-center-conv-name { font-size: 13px; font-weight: 600; color: #fff; }
.msg-center-conv-preview {
  font-size: 11px; color: rgba(255,255,255,.5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px;
}
.msg-center-conv-time { font-size: 10px; color: rgba(255,255,255,.4); white-space: nowrap; }
.msg-center-thread { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.msg-center-thread-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: rgba(255,255,255,.3);
}
.msg-center-thread-empty .material-icons-round { font-size: 56px; opacity: .3; margin-bottom: 12px; }
.msg-center-thread-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,.06);
}
.msg-center-thread-name { font-size: 14px; font-weight: 600; color: #fff; }
.msg-center-thread-meta { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 2px; }
.msg-center-thread-messages {
  flex: 1; overflow-y: auto; padding: 16px 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.msg-bubble {
  max-width: 70%; padding: 10px 14px; border-radius: 14px;
  font-size: 13px; line-height: 1.5;
}
.msg-bubble-other {
  align-self: flex-start;
  background: rgba(255,255,255,.06);
  border-bottom-left-radius: 4px;
  color: #fff;
}
.msg-bubble-self {
  align-self: flex-end;
  background: linear-gradient(135deg, #6c63ff, #4338ca);
  border-bottom-right-radius: 4px;
  color: #fff;
}
.msg-bubble-time {
  font-size: 9px; opacity: .6; margin-top: 4px;
}
.msg-center-thread-info {
  padding: 12px 20px; border-top: 1px solid rgba(255,255,255,.06);
  font-size: 11px; color: rgba(255,255,255,.5);
  display: flex; align-items: center; gap: 6px;
}
.msg-center-thread-info .material-icons-round { font-size: 14px; color: #a78bfa; }

@media (max-width: 720px) {
  .msg-center-panel { height: 100vh; width: 100vw; border-radius: 0; }
  .msg-center-list { width: 100%; }
  .msg-center-thread { display: none; }
}

/* ═══════════════════════════════════════════════
   Room View — Modern centered video + bubble transcript
   ═══════════════════════════════════════════════ */
/* Make video grid centered + dominant */
.room-main {
  display: flex; flex-direction: column;
  position: relative;
}
#videoGrid:not(.hidden) {
  display: flex !important;
  align-items: center; justify-content: center;
  flex: 1;
  padding: 24px;
  gap: 14px;
  flex-wrap: wrap;
}
#videoGrid:not(.hidden) .video-tile {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
  border: 1px solid rgba(255,255,255,.08);
  position: relative;
}
/* Single tile = large centered */
#videoGrid:not(.hidden) .video-tile:only-child {
  max-width: min(900px, 75%);
  aspect-ratio: 16/10;
}

/* Live caption overlay on video (pinned to bottom of grid area) */
.transcript-area .transcript-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1; padding: 32px;
}

/* Floating bottom control bar (Zoom-like pill) */
.zoom-toolbar {
  position: relative;
  margin: 0 auto 16px;
  padding: 10px 16px !important;
  background: rgba(20, 24, 38, .85) !important;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 22px !important;
  box-shadow: 0 12px 36px rgba(0,0,0,.4);
  width: fit-content;
  max-width: calc(100% - 32px);
}
.zoom-toolbar .toolbar-btn {
  border-radius: 14px !important;
  transition: all .15s ease;
}
.zoom-toolbar .toolbar-btn:hover {
  background: rgba(255,255,255,.08) !important;
  transform: translateY(-1px);
}

/* Live indicator on title */
.room-info-card h2::before {
  content: ''; display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239,68,68,.2);
  margin-right: 8px; vertical-align: middle;
  animation: pulse-rec 2s ease-in-out infinite;
}
@keyframes pulse-rec {
  0%, 100% { box-shadow: 0 0 0 4px rgba(239,68,68,.2); }
  50% { box-shadow: 0 0 0 8px rgba(239,68,68,.05); }
}
