html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
  background: #eef3f8;
  color: #102033;
}

.navbar-nav.me-auto {
  gap: 0.65rem;
}

.navbar-nav.me-auto .nav-link {
  padding-left: 0.7rem;
  padding-right: 0.7rem;
}

.app-page-shell {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: clamp(1rem, 2.4vw, 1.75rem) 0 2rem;
  display: grid;
  gap: 1rem;
}

.app-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.35rem);
  border-radius: 8px;
  background: linear-gradient(135deg, #123a5a 0%, #17605f 100%);
  color: #fff;
  box-shadow: 0 16px 36px rgba(16, 32, 51, 0.14);
}

.app-page-heading-muted {
  background: linear-gradient(135deg, #102033 0%, #2f5f74 100%);
}

.app-page-heading h1,
.section-title-row h2,
.meeting-command-header h2,
.recording-card h2,
.recording-empty-state h2 {
  margin: 0;
  font-weight: 750;
  letter-spacing: 0;
}

.app-page-heading h1 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.app-page-heading p,
.meeting-command-header p,
.app-empty-state p,
.recording-empty-state p,
.recording-card-header p {
  margin: 0.35rem 0 0;
  color: #d7e7f5;
}

.app-kicker {
  display: inline-block;
  margin-bottom: 0.25rem;
  color: #25d0a5;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-heading-action,
.app-primary-button,
.app-secondary-button,
.meeting-open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  border-radius: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.app-heading-action {
  border: 0;
  color: #123a5a;
  padding-inline: 1rem;
}

.app-primary-button {
  border-color: #1466c3;
  background: #1466c3;
  box-shadow: 0 10px 20px rgba(20, 102, 195, 0.16);
}

.app-secondary-button {
  border-color: #1466c3;
  color: #1466c3;
  background: #fff;
}

.app-control {
  min-height: 46px;
  border-radius: 8px;
  border-color: #cad7e6;
}

.app-control:focus {
  border-color: #178a78;
  box-shadow: 0 0 0 0.2rem rgba(23, 138, 120, 0.15);
}

.meeting-home-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
  gap: 1rem;
  align-items: start;
}

.meeting-command-panel,
.meeting-list-panel,
.recording-card,
.recording-empty-state,
.recording-warning {
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(16, 32, 51, 0.08);
}

.meeting-command-panel,
.meeting-list-panel {
  padding: clamp(1rem, 2vw, 1.25rem);
}

.meeting-command-header,
.section-title-row,
.recording-card-header,
.recording-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.meeting-command-header p,
.app-empty-state p,
.recording-empty-state p,
.recording-card-header p {
  color: #627184;
}

.meeting-command-icon,
.meeting-room-avatar,
.recording-room-icon {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #e6f6f2;
  color: #178a78;
  font-size: 1.35rem;
}

.meeting-action-box,
.meeting-join-box {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e6edf5;
}

.meeting-join-compact {
  margin-top: 1rem;
  padding: 0.85rem;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #f8fbfd;
}

.meeting-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.35rem;
  border-radius: 8px;
  background: #eef3f8;
}

.meeting-mode-tabs .nav-item {
  min-width: 0;
}

.meeting-mode-tab {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #405167;
  font-weight: 800;
}

.meeting-mode-tab.active {
  color: #123a5a;
  background: #fff;
  box-shadow: 0 8px 20px rgba(16, 32, 51, 0.08);
}

.meeting-mode-content .meeting-action-box {
  margin-top: 0.85rem;
  padding-top: 0;
  border-top: 0;
}

.meeting-field-stack {
  display: grid;
  gap: 0.7rem;
}

.meeting-form-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.meeting-form-title-row h3 {
  margin: 0;
  color: #102033;
  font-size: 1.05rem;
  font-weight: 800;
}

.meeting-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
}

.meeting-schedule-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.meeting-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.meeting-feature-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.55rem 0.65rem;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #f8fbfd;
  color: #405167;
  font-size: 0.9rem;
}

.meeting-feature-toggle input {
  flex: 0 0 auto;
}

.meeting-settings-dialog {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(16, 32, 51, 0.22);
}

.meeting-settings-dialog .modal-header,
.meeting-settings-dialog .modal-footer {
  border-color: #e6edf5;
}

.meeting-settings-dialog .modal-body {
  background: #f8fbfd;
}

.app-settings-modal {
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(16, 32, 51, 0.24);
}

.app-settings-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1rem;
  background: #f8fbfd;
}

.app-settings-sidebar {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  padding-right: 1rem;
  border-right: 1px solid #dbe4ee;
}

.app-settings-tab {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #405167;
  font-weight: 700;
  text-align: left;
}

.app-settings-tab.is-active {
  color: #123a5a;
  background: #e6f6f2;
}

.app-settings-content {
  display: grid;
  align-content: start;
  gap: 0.8rem;
  min-height: 260px;
}

.app-settings-content h3 {
  margin: 0;
  color: #102033;
  font-size: 1.2rem;
  font-weight: 800;
}

.language-choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.language-choice {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #fff;
  color: #102033;
  text-align: left;
}

.language-choice span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #eef5ff;
  color: #1466c3;
  font-weight: 900;
}

.language-choice strong {
  font-size: 1rem;
}

.language-choice.is-active {
  border-color: #178a78;
  box-shadow: 0 0 0 0.2rem rgba(23, 138, 120, 0.12);
}

.meeting-home-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.meeting-home-notes div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.65rem;
  border-radius: 8px;
  background: #f4f8fb;
  color: #405167;
  font-size: 0.92rem;
}

.meeting-count-pill,
.app-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.meeting-count-pill {
  background: #eef5ff;
  color: #1466c3;
}

.app-empty-state,
.recording-empty-state {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 0.45rem;
  padding: clamp(2rem, 7vw, 4rem) 1rem;
  color: #405167;
}

.app-empty-state > i,
.recording-empty-state > i {
  font-size: 2.5rem;
  color: #178a78;
}

.meeting-card-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
  max-height: min(58vh, 560px);
  overflow-y: auto;
  padding-right: 0.25rem;
  scrollbar-gutter: stable;
}

.meeting-summary-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem;
  border: 1px solid #e0e8f1;
  border-radius: 8px;
  background: #fbfdff;
}

.meeting-list-actions,
.meeting-row-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.meeting-list-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.meeting-row-actions {
  justify-content: flex-end;
}

.meeting-delete-form {
  margin: 0.8rem 0 0;
}

.meeting-select-all,
.meeting-select-box {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #405167;
  font-size: 0.9rem;
  font-weight: 700;
}

.meeting-select-box {
  justify-content: center;
}

.meeting-select-box input,
.meeting-select-all input {
  width: 1rem;
  height: 1rem;
}

.password-toggle-field {
  position: relative;
}

.password-toggle-field .form-control {
  padding-right: 3rem;
}

.password-toggle-button {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 8px;
  color: #405167;
  background: transparent;
  transform: translateY(-50%);
}

.password-toggle-button:hover {
  color: #0f766e;
  background: #e6f6f2;
}

.meeting-summary-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.meeting-summary-main h3 {
  margin: 0;
  color: #102033;
  font-size: 1.02rem;
  font-weight: 800;
}

.meeting-summary-main p {
  margin: 0.15rem 0 0;
  color: #627184;
  font-size: 0.88rem;
}

.meeting-summary-main p span {
  display: block;
}

.meeting-summary-main p span + span {
  margin-top: 0.05rem;
}

.meeting-summary-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.app-status-badge.is-private {
  background: #fff4e5;
  color: #a35400;
}

.app-status-badge.is-public {
  background: #e6f6f2;
  color: #08715f;
}

.app-status-badge.is-recording {
  background: #feeaea;
  color: #b42318;
}

.app-status-badge.is-idle {
  background: #eef5ff;
  color: #1466c3;
}

.recording-warning {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  color: #855600;
  background: #fff8e6;
  border-color: #f5d689;
}

.recording-library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.recording-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.recording-card h2 {
  color: #102033;
  font-size: 1.12rem;
}

.recording-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #101820;
}

.recording-file-path {
  min-width: 0;
  color: #627184;
  font-size: 0.84rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.admin-metric-card {
  display: grid;
  gap: 0.35rem;
  min-height: 110px;
  padding: 1rem;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(16, 32, 51, 0.08);
}

.admin-metric-card span {
  color: #627184;
  font-size: 0.88rem;
  font-weight: 700;
}

.admin-metric-card strong {
  color: #102033;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  line-height: 1;
}

.admin-table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
}

.admin-table {
  min-width: 760px;
}

.admin-table th {
  color: #627184;
  font-size: 0.78rem;
  text-transform: uppercase;
}

@media (max-width: 991.98px) {
  .meeting-home-grid,
  .recording-library-grid,
  .admin-metric-grid {
    grid-template-columns: 1fr;
  }

  .meeting-summary-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .meeting-summary-badges,
  .meeting-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .app-settings-body {
    grid-template-columns: 1fr;
  }

  .app-settings-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-right: 0;
    padding-bottom: 1rem;
    border-right: 0;
    border-bottom: 1px solid #dbe4ee;
  }
}

@media (max-width: 575.98px) {
  body {
    background: #f3f7fb;
  }

  main.container {
    max-width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .navbar .container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .navbar-brand {
    max-width: 68vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .navbar-nav.me-auto {
    gap: 0.15rem;
    padding-top: 0.5rem;
  }

  .app-page-heading,
  .meeting-command-header,
  .meeting-form-title-row,
  .section-title-row,
  .recording-card-header,
  .recording-card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .app-page-shell {
    padding-top: 0.25rem;
    gap: 0.75rem;
  }

  .app-page-heading {
    padding: 1rem;
  }

  .app-page-heading h1,
  .section-title-row h2,
  .meeting-command-header h2 {
    font-size: 1.45rem;
    line-height: 1.12;
  }

  .meeting-command-panel,
  .meeting-list-panel {
    padding: 0.85rem;
  }

  .meeting-code-row,
  .meeting-schedule-row,
  .meeting-summary-card,
  .meeting-home-notes,
  .meeting-feature-grid,
  .language-choice-row,
  .app-settings-sidebar {
    grid-template-columns: 1fr;
  }

  .meeting-code-row {
    gap: 0.5rem;
  }

  .meeting-summary-card {
    align-items: stretch;
    gap: 0.65rem;
  }

  .meeting-select-box {
    justify-content: flex-start;
  }

  .meeting-summary-main {
    align-items: flex-start;
  }

  .meeting-summary-badges {
    justify-content: flex-start;
  }

  .meeting-row-actions {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    width: 100%;
  }

  .app-heading-action,
  .app-primary-button,
  .app-secondary-button,
  .meeting-open-button {
    width: 100%;
  }
}

.meeting-fullscreen-shell.is-in-room .meeting-fullscreen-toolbar {
  display: none;
}

.meeting-fullscreen-shell.is-in-room {
  grid-template-rows: minmax(0, 1fr);
}

.card {
  border: 0;
}


/* In-room layout (Google Meet-inspired) */
.livekit-room-stage {
  min-height: 0;
  width: 100%;
  height: 100%;
}

.livekit-meeting-canvas {
  height: 100%;
  min-height: 0;
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  overflow: hidden;
  grid-template-rows: 70px minmax(0, 1fr);
}

.livekit-meet-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
  height: 70px;
  min-height: 70px;
  max-height: 70px;
  overflow: hidden;
}

.livekit-meet-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.meet-room-name {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.meet-room-meta {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.livekit-meet-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.meet-room-status {
  font-size: 0.82rem;
  color: #93c5fd;
}

.livekit-connection-pill {
  flex: 0 0 auto;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.9);
  color: #eff6ff;
  font-size: 0.72rem;
  font-weight: 600;
}

.livekit-meet-body {
  --chat-panel-width: clamp(280px, 18vw, 340px);
  display: flex;
  gap: 0;
  height: 100%;
  min-height: 0;
  position: relative;
}

.livekit-duration-pill {
  flex: 0 0 auto;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #bfdbfe;
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.livekit-meet-sidebar {
  display: none;
  min-width: 0;
}

.meeting-fullscreen-shell.is-settings-open .livekit-meet-body {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.meeting-fullscreen-shell.is-settings-open .livekit-meet-sidebar {
  display: flex;
}

.livekit-meet-stage {
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.14);
  padding: 0.6rem;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.livekit-meet-main {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 86px;
  gap: 0.6rem;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.livekit-stage-primary {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  flex: 1;
  min-height: 0;
}

.livekit-stage-mode {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
}

.stage-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  cursor: pointer;
}

.stage-mode-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: rgba(11, 17, 32, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  padding: 0.35rem;
  min-width: 140px;
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.45);
  display: grid;
  gap: 0.35rem;
}

.stage-mode-menu.d-none {
  display: none;
}

.stage-mode-item {
  background: transparent;
  border: none;
  color: #e2e8f0;
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
}

.stage-mode-item:hover {
  background: rgba(59, 130, 246, 0.2);
}

.stage-mode-item.is-active {
  background: rgba(37, 99, 235, 0.28);
  color: #bfdbfe;
}

.livekit-stage-tile {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #0b1220;
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.livekit-stage-tile.no-video {
  display: grid;
  place-items: center;
  background: #111827;
}

.livekit-stage-tile.no-video .livekit-tile-name {
  position: static;
  background: transparent;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  letter-spacing: 0;
  text-align: center;
}

.livekit-stage-tile.is-screen-share .livekit-video.is-share {
  object-fit: contain;
  background: #000;
}

.livekit-stage-tile.is-screen-share,
.livekit-tile.is-screen-share {
  background: #000;
}

.livekit-stage-tile.is-screen-share .livekit-tile-media,
.livekit-tile.is-screen-share .livekit-tile-media {
  background: #000;
}

.livekit-tile.is-screen-share video,
.livekit-tile.is-screen-share canvas,
.livekit-tile.is-screen-share .livekit-video,
.livekit-stage-tile.is-screen-share video,
.livekit-stage-tile.is-screen-share canvas,
.livekit-stage-tile.is-screen-share .livekit-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.livekit-stage-placeholder {
  color: rgba(148, 163, 184, 0.7);
  font-size: 1rem;
  text-align: center;
}

.livekit-meet-roster {
  flex: 0 0 clamp(190px, 12.2vw, 232px);
  margin-left: 0.9rem;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.14);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 0;
  overflow: hidden;
}

.livekit-roster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #e2e8f0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.livekit-roster-count {
  font-size: 0.75rem;
  color: #93c5fd;
}

.livekit-roster-list {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  overflow-y: auto;
  padding-right: 4px;
  flex: 1;
  min-height: 0;
}

.livekit-roster-search {
  width: 100%;
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.78);
  color: #e2e8f0;
  padding: 0.4rem 0.6rem;
  font-size: 0.78rem;
  outline: none;
}

.livekit-roster-search::placeholder {
  color: rgba(148, 163, 184, 0.72);
}

.livekit-roster-search:focus {
  border-color: rgba(96, 165, 250, 0.65);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.livekit-roster-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
  font-size: 0.82rem;
  min-height: 52px;
}

.livekit-roster-item.is-pinned {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
}

.livekit-roster-item.is-sharing {
  border-color: rgba(34, 197, 94, 0.5);
}

.livekit-roster-name {
  font-weight: 600;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-hand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #facc15;
  font-size: 1rem;
  filter: drop-shadow(0 0 8px rgba(250, 204, 21, 0.32));
}

.livekit-roster-item.has-raised-hand {
  border-color: rgba(250, 204, 21, 0.42);
}

.livekit-roster-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.roster-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
  font-size: 0.7rem;
}

.roster-status.is-on {
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.18);
}

.roster-status.is-off {
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0.72;
}

.roster-status.roster-share {
  color: #22c55e;
  background: rgba(22, 163, 74, 0.16);
  border-color: rgba(34, 197, 94, 0.35);
}

.roster-action {
  background: transparent;
  border: none;
  color: #cbd5e1;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.roster-action:hover {
  background: rgba(59, 130, 246, 0.15);
}

.roster-action.is-active {
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.2);
}

.livekit-room-sidebar-card {
  border-radius: 16px;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: none;
  padding: 0.9rem;
  color: #e2e8f0;
  height: 100%;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.55) rgba(15, 23, 42, 0.55);
}

.livekit-stage-grid {
  display: grid;
  gap: 0.5rem;
  padding: 0.5rem;
  justify-items: stretch;
  align-items: stretch;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  width: 100%;
  height: 100%;
  flex: 1;
  min-height: 0;
  margin: 0 auto;
}

.livekit-stage-grid.count-1 {
  grid-template-columns: minmax(0, 1fr);
}

.livekit-stage-grid.count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.livekit-stage-grid.count-3,
.livekit-stage-grid.count-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.livekit-stage-grid.count-5,
.livekit-stage-grid.count-6,
.livekit-stage-grid.count-7,
.livekit-stage-grid.count-8,
.livekit-stage-grid.count-9 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.livekit-stage-grid:empty::after {
  content: "Waiting for participants...";
  color: rgba(148, 163, 184, 0.6);
  font-size: 0.95rem;
}

.livekit-participants-grid {
  padding: 0;
}

.livekit-selfview-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0b1220;
}

.livekit-tile {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  position: relative;
}

.livekit-tile.no-video {
  background: #111827;
  display: grid;
  place-items: center;
}

.livekit-tile-media {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.livekit-tile-name {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.livekit-hand-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #facc15;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(250, 204, 21, 0.48);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.35);
}

.livekit-hand-badge i {
  font-size: 1.15rem;
}

.livekit-tile.has-raised-hand,
.livekit-stage-tile.has-raised-hand {
  box-shadow: inset 0 0 0 2px rgba(250, 204, 21, 0.36);
}

.livekit-tile.no-video .livekit-tile-name {
  position: static;
  background: transparent;
  font-size: clamp(1.7rem, 3.6vw, 3rem);
  letter-spacing: 0;
  text-align: center;
  padding: 0 0.75rem;
  overflow-wrap: anywhere;
}

.livekit-tile video,
.livekit-tile canvas,
.livekit-tile .video-slot {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Name overlay (bottom-left) similar to Meet */
.livekit-tile .name-overlay {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* Self view: small rounded rectangle at bottom-right like Meet */
/* self-view removed; using tile-based layout only */

@media (max-width: 1024px) {
  .livekit-meet-body {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(120px, 190px);
    gap: 0.9rem;
  }

  .meeting-fullscreen-shell.is-chat-open .livekit-meet-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(120px, 190px) minmax(220px, 280px);
  }

  .meeting-fullscreen-shell.is-chat-closing .livekit-meet-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(120px, 190px) 0px;
  }

  .livekit-meet-roster {
    order: 2;
    flex: none;
    margin-left: 0;
    max-height: 190px;
  }

  .livekit-chat-panel {
    order: 3;
    flex: none;
    max-width: none;
    margin-left: 0;
    max-height: 280px;
    transform: translateY(12px);
  }

  .meeting-fullscreen-shell.is-chat-open .livekit-chat-panel {
    flex-basis: auto;
    max-width: none;
    margin-left: 0;
    transform: translateY(0);
  }

  #self-view-slot {
    width: 150px;
    height: 92px;
    bottom: 88px;
  }
}

/* Bottom-centered control bar like Google Meet */

.meet-controls-dock {
  position: relative;
  left: auto;
  transform: none;
  bottom: auto;
  z-index: 1250;
  opacity: 1;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.meet-controls-dock::before {
  content: none;
}

.livekit-meet-main.controls-compact {
  display: flex;
  flex-direction: column;
}

.livekit-meet-main.controls-compact .meet-controls-dock {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(64px);
  bottom: 16px;
  opacity: 0;
  pointer-events: none;
}

.livekit-meet-main.controls-compact .meet-controls-dock::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(760px, 92vw);
  height: 128px;
  transform: translateX(-50%);
  z-index: -1;
}

.livekit-meet-main.controls-compact .meet-controls-dock:hover,
.livekit-meet-main.controls-compact .meet-controls-dock:focus-within,
.livekit-meet-main.controls-compact.is-controls-visible .meet-controls-dock {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.meet-controls-peek {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 1240;
  width: 30px;
  height: 20px;
  align-items: center;
  justify-content: center;
  color: #bfdbfe;
  opacity: 0.82;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.meet-controls-peek i {
  transition: transform 0.22s ease;
}

.livekit-meet-main.controls-compact .meet-controls-peek {
  display: inline-flex;
}

.livekit-meet-main.controls-compact.is-controls-visible .meet-controls-peek {
  opacity: 1;
}

.livekit-meet-main.controls-compact.is-controls-visible .meet-controls-peek i {
  transform: rotate(180deg);
}

.meeting-control-group {
  background: rgba(11, 17, 32, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.12);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.meet-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 60px;
}

.meeting-control-group .btn {
  border-radius: 999px;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  border: none;
  padding: 0;
  transition: transform 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.meeting-control-group .btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

.meeting-control-group .btn i {
  font-size: 1.15rem;
  line-height: 1;
}

.meet-control-label {
  font-size: 0.7rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.75);
}

/* Accent: primary action (leave / record) */
.meeting-control-group .btn.primary {
  background: #dc2626;
}

/* Hover and active states for control buttons */
.meeting-control-group .btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 18px rgba(2,6,23,0.35);
}

.meeting-control-group .btn.active {
  background: rgba(30, 41, 59, 0.95);
  color: #fff;
  box-shadow: 0 8px 20px rgba(2,6,23,0.45);
}

.meeting-control-group .btn.is-sharing {
  background: #16a34a;
  color: #fff;
}

.meeting-control-group .btn.is-sharing:hover {
  background: #dc2626;
  color: #fff;
}

.meeting-control-group .btn.is-raised {
  background: #16a34a;
  color: #fff;
}

.meeting-control-group .btn.is-raised:hover {
  background: #dc2626;
}

.meeting-control-group .btn.is-on {
  background: rgba(37, 99, 235, 0.95);
  color: #fff;
}

.pending-requests-badge {
  border: 0;
  min-width: 34px;
  height: 30px;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: #16a34a;
  color: #ecfdf5;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.pending-requests-badge:hover {
  background: #22c55e;
}

.livekit-chat-panel {
  flex: 0 0 0;
  max-width: 0;
  min-width: 0;
  margin-left: 0;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: #e2e8f0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  opacity: 0;
  transform: translateX(18px);
  pointer-events: none;
  will-change: flex-basis, max-width, margin-left, opacity, transform;
  transition: flex-basis 0.28s ease, max-width 0.28s ease, margin-left 0.28s ease, opacity 0.2s ease, transform 0.28s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.livekit-chat-panel.d-none {
  display: none;
}

.meeting-fullscreen-shell.is-chat-open .livekit-chat-panel {
  flex-basis: var(--chat-panel-width);
  max-width: var(--chat-panel-width);
  margin-left: 0.9rem;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.livekit-chat-panel.is-light {
  background: #f8fafc;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.12);
}

.livekit-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.livekit-chat-title {
  font-weight: 800;
  font-size: 0.95rem;
}

.livekit-chat-subtitle {
  color: #94a3b8;
  font-size: 0.76rem;
}

.livekit-chat-close,
.livekit-chat-icon-btn,
.livekit-chat-send {
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.livekit-chat-close {
  width: 30px;
  height: 30px;
  color: inherit;
  background: transparent;
}

.livekit-chat-close:hover {
  background: rgba(148, 163, 184, 0.16);
}

.livekit-chat-target {
  padding: 0.75rem 0.9rem;
  display: grid;
  gap: 0.35rem;
}

.livekit-chat-target label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  font-size: 0.7rem;
}

.livekit-chat-target .form-select {
  background-color: rgba(15, 23, 42, 0.78);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.18);
}

.livekit-chat-panel.is-light .livekit-chat-target .form-select {
  background-color: #fff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.16);
}

.livekit-chat-messages {
  min-height: 0;
  overflow-y: auto;
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.78) rgba(15, 23, 42, 0.62);
}

.livekit-chat-messages::-webkit-scrollbar,
.livekit-chat-form textarea::-webkit-scrollbar {
  width: 8px;
}

.livekit-chat-messages::-webkit-scrollbar-track,
.livekit-chat-form textarea::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
}

.livekit-chat-messages::-webkit-scrollbar-thumb,
.livekit-chat-form textarea::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.86);
}

.livekit-chat-panel.is-light .livekit-chat-messages,
.livekit-chat-panel.is-light .livekit-chat-form textarea {
  scrollbar-color: rgba(100, 116, 139, 0.6) rgba(226, 232, 240, 0.82);
}

.livekit-chat-panel.is-light .livekit-chat-messages::-webkit-scrollbar-track,
.livekit-chat-panel.is-light .livekit-chat-form textarea::-webkit-scrollbar-track {
  background: rgba(226, 232, 240, 0.82);
}

.livekit-chat-panel.is-light .livekit-chat-messages::-webkit-scrollbar-thumb,
.livekit-chat-panel.is-light .livekit-chat-form textarea::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.62);
}

.livekit-chat-message {
  display: grid;
  gap: 0.18rem;
  justify-items: start;
}

.livekit-chat-message.is-own {
  justify-items: end;
}

.livekit-chat-message-meta {
  color: #94a3b8;
  font-size: 0.7rem;
  margin-bottom: 0.1rem;
}

.livekit-chat-message-time {
  color: #93a4ba;
  font-size: 0.68rem;
  margin-top: 0.06rem;
  line-height: 1;
}

.livekit-chat-message.is-own .livekit-chat-message-time {
  justify-self: end;
  color: #9bbcf8;
}

.livekit-chat-panel.is-light .livekit-chat-message-time {
  color: #64748b;
}

.livekit-chat-panel.is-light .livekit-chat-message.is-own .livekit-chat-message-time {
  color: #2563eb;
}

.livekit-chat-bubble {
  max-width: 90%;
  border-radius: 14px;
  padding: 0.55rem 0.7rem;
  background: rgba(30, 41, 59, 0.9);
  color: #e2e8f0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.livekit-chat-panel.is-light .livekit-chat-bubble {
  background: #e2e8f0;
  color: #0f172a;
}

.livekit-chat-message.is-own .livekit-chat-bubble {
  background: rgba(37, 99, 235, 0.95);
  color: #fff;
}

.livekit-chat-bubble a {
  color: #93c5fd;
  text-decoration: underline;
}

.livekit-chat-message.is-own .livekit-chat-bubble a {
  color: #dbeafe;
}

.livekit-chat-bubble img {
  width: min(220px, 100%);
  border-radius: 10px;
  display: block;
}

.livekit-chat-caption {
  margin-top: 0.45rem;
}

.livekit-chat-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.45rem;
  padding: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  align-items: end;
}

.livekit-chat-attach {
  position: relative;
}

.livekit-chat-form textarea {
  resize: none;
  min-height: 38px;
  max-height: 120px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.78);
  color: #e2e8f0;
  padding: 0.5rem 0.65rem;
  outline: none;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.86) rgba(15, 23, 42, 0.62);
}

.livekit-chat-form textarea.is-scrollable {
  overflow-y: auto;
}

.livekit-chat-panel.is-light .livekit-chat-form textarea {
  background: #fff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.16);
}

.livekit-chat-icon-btn,
.livekit-chat-send {
  width: 38px;
  height: 38px;
  background: rgba(30, 41, 59, 0.95);
  color: #e2e8f0;
}

.livekit-chat-icon-btn i {
  transition: transform 0.2s ease;
}

.livekit-chat-icon-btn.is-open i {
  transform: rotate(45deg);
}

.livekit-chat-attach-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 5;
  display: grid;
  gap: 0.35rem;
  min-width: 132px;
  padding: 0.4rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 34px rgba(2, 6, 23, 0.42);
  opacity: 1;
  transform: translateY(0) scale(1);
  transform-origin: bottom left;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.livekit-chat-attach-menu.d-none {
  display: grid !important;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.96);
}

.livekit-chat-attach-option {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #e2e8f0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.5rem;
  text-align: left;
  font-size: 0.8rem;
}

.livekit-chat-attach-option:hover {
  background: rgba(37, 99, 235, 0.22);
}

.livekit-chat-panel.is-light .livekit-chat-attach-menu {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
}

.livekit-chat-panel.is-light .livekit-chat-attach-option {
  color: #0f172a;
}

.livekit-chat-panel.is-light .livekit-chat-attach-option:hover {
  background: rgba(37, 99, 235, 0.1);
}

.livekit-chat-send {
  background: #2563eb;
  color: #fff;
}

.livekit-chat-file {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "icon name"
    "icon size";
  gap: 0 0.55rem;
  align-items: center;
  color: inherit !important;
  text-decoration: none !important;
}

.livekit-chat-file i {
  grid-area: icon;
  font-size: 1.3rem;
}

.livekit-chat-file span {
  grid-area: name;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.livekit-chat-file small {
  grid-area: size;
  color: rgba(226, 232, 240, 0.75);
}

.livekit-chat-panel.is-light .livekit-chat-file small {
  color: rgba(15, 23, 42, 0.55);
}

.meet-pagination {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
  background: rgba(11, 17, 32, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.12);
  padding: 0.45rem 0.5rem;
  border-radius: 14px;
  backdrop-filter: blur(6px);
}

.meet-page-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  background: rgba(0,0,0,0.6);
  color: #e2e8f0;
  font-size: 1rem;
}

.meet-page-btn:disabled {
  opacity: 0.4;
}

.meet-page-indicator {
  font-size: 0.72rem;
  color: rgba(148, 163, 184, 0.8);
}

/* Settings modal (Google Meet-like popup) */
.meet-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
}

.meet-modal.d-none {
  display: none;
}

.meet-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(2px);
}

.meet-modal-card {
  position: relative;
  width: min(820px, 92vw);
  max-height: min(760px, 86vh);
  border-radius: 16px;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #e2e8f0;
}

.meet-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.98);
}

.meet-modal-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.meet-modal-close {
  background: transparent;
  border: none;
  color: #e2e8f0;
  font-size: 1.4rem;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 999px;
}

.meet-modal-close:hover {
  background: rgba(148, 163, 184, 0.16);
}

.meet-modal-body {
  padding: 1rem 1.15rem 1.15rem;
  overflow: auto;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.55) rgba(15, 23, 42, 0.55);
}

.meet-settings-nav {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  position: sticky;
  top: 0;
}

.meet-settings-tab {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #94a3b8;
  padding: 0.55rem 0.65rem;
  text-align: left;
  font-weight: 700;
}

.meet-settings-tab:hover,
.meet-settings-tab.is-active {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(96, 165, 250, 0.34);
  color: #e2e8f0;
}

.meet-settings-tab i {
  width: 18px;
  text-align: center;
}

.meet-settings-content {
  min-width: 0;
}

.meet-settings-panel {
  display: none;
}

.meet-settings-panel.is-active {
  display: block;
}

.settings-panel-title {
  color: #f8fafc;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.settings-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.settings-wide-card {
  grid-column: 1 / -1;
}

.settings-card-hint {
  color: #94a3b8;
  font-size: 0.82rem;
  margin-top: 0.25rem;
}

.settings-inline-form,
.settings-device-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.settings-switch {
  position: relative;
  width: 50px;
  height: 28px;
  flex: 0 0 auto;
}

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

.settings-switch span {
  position: absolute;
  inset: 0;
  cursor: pointer;
  border-radius: 999px;
  background: rgba(71, 85, 105, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.settings-switch span::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #e2e8f0;
  transition: transform 0.18s ease;
}

.settings-switch input:checked + span {
  background: #2563eb;
  border-color: rgba(147, 197, 253, 0.6);
}

.settings-switch input:checked + span::before {
  transform: translateX(22px);
}

.settings-inline-form .form-control {
  min-width: 0;
}

.settings-participants-list {
  display: grid;
  gap: 0.5rem;
}

.settings-participant-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.settings-participant-summary {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}

.settings-participant-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.meet-modal-body::-webkit-scrollbar,
.livekit-roster-list::-webkit-scrollbar,
.livekit-room-sidebar-card::-webkit-scrollbar {
  width: 8px;
}

.meet-modal-body::-webkit-scrollbar-track,
.livekit-roster-list::-webkit-scrollbar-track,
.livekit-room-sidebar-card::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.55);
  border-radius: 999px;
}

.meet-modal-body::-webkit-scrollbar-thumb,
.livekit-roster-list::-webkit-scrollbar-thumb,
.livekit-room-sidebar-card::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 999px;
}

.meet-modal-body::-webkit-scrollbar-thumb:hover,
.livekit-roster-list::-webkit-scrollbar-thumb:hover,
.livekit-room-sidebar-card::-webkit-scrollbar-thumb:hover {
  background: rgba(191, 219, 254, 0.72);
}

/* Recording badge minimal */
#recording-status-badge {
  margin-left: 6px;
  color: #d93025;
}

.livekit-prejoin-panel {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 0.75rem 1rem 1rem;
}

.livekit-prejoin-card {
  width: min(1200px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
  gap: 1rem;
  padding: 1rem;
  border-radius: 28px;
  background:
    linear-gradient(160deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.94)),
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 42%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.12), transparent 32%);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.45);
}

.livekit-prejoin-preview-shell {
  position: relative;
  min-height: 460px;
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.72)),
    radial-gradient(circle at center, rgba(37, 99, 235, 0.22), transparent 45%);
  border: 1px solid rgba(96, 165, 250, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.livekit-prejoin-preview {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
  background: transparent;
}

.livekit-prejoin-preview::cue {
  display: none;
}

.livekit-prejoin-preview-hint {
  position: absolute;
  inset: auto 1rem 1rem 1rem;
  z-index: 2;
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.livekit-prejoin-preview-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #dbeafe;
  border: 1px solid rgba(147, 197, 253, 0.24);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.livekit-prejoin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.1rem 1rem;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
}

.livekit-prejoin-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #93c5fd;
  margin-bottom: 0;
}

.livekit-prejoin-title {
  margin: 0;
  font-size: clamp(1.65rem, 2.45vw, 2.25rem);
  line-height: 1.05;
}

.livekit-prejoin-text {
  color: #cbd5e1;
  margin-bottom: 0;
}

.livekit-prejoin-meta-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.livekit-prejoin-meta-card {
  padding: 0.95rem;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.72));
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.livekit-prejoin-meta-card .form-control,
.meet-modal-card .form-control {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  color: #f8fafc;
  box-shadow: none;
}

.livekit-prejoin-meta-card .form-control::placeholder,
.meet-modal-card .form-control::placeholder {
  color: #94a3b8;
}

.livekit-prejoin-meta-card .form-control:focus,
.meet-modal-card .form-control:focus {
  background: rgba(15, 23, 42, 0.98);
  border-color: rgba(96, 165, 250, 0.72);
  color: #f8fafc;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.meet-modal-card .btn-light,
.meet-modal-card .btn-outline-light,
.meet-modal-card .btn-success,
.meet-modal-card .btn-danger,
.meet-modal-card .btn-outline-danger {
  border-radius: 10px;
  font-weight: 600;
}

.meet-modal-card .btn-light {
  background: #e2e8f0;
  border-color: #e2e8f0;
  color: #0f172a;
}

.meet-modal-card .btn-outline-light {
  background: rgba(15, 23, 42, 0.42);
  border-color: rgba(226, 232, 240, 0.45);
  color: #e2e8f0;
}

.meet-modal-card .btn-outline-light:hover {
  background: rgba(37, 99, 235, 0.24);
  border-color: rgba(147, 197, 253, 0.68);
}

.livekit-prejoin-meta-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #94a3b8;
  margin-bottom: 0.2rem;
}

.livekit-prejoin-meta-value {
  font-size: 0.98rem;
  font-weight: 600;
  color: #f8fafc;
  word-break: break-word;
}

.meeting-members-list {
  display: grid;
  gap: 0.5rem;
}

.meeting-member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.meeting-member-name {
  color: #f8fafc;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meeting-member-kind {
  flex: 0 0 auto;
  color: #93c5fd;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.livekit-prejoin-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.livekit-control-toggle {
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.92);
  color: #e2e8f0;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.livekit-control-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.45);
}

.livekit-control-toggle.is-active {
  background: rgba(37, 99, 235, 0.95);
  border-color: rgba(96, 165, 250, 0.45);
}

.livekit-join-button {
  width: 100%;
  border-radius: 16px;
  padding-block: 0.9rem;
  font-weight: 600;
  font-size: 1.02rem;
}

.livekit-prejoin-help {
  font-size: 0.88rem;
  color: #cbd5e1;
}

.livekit-prejoin-status {
  min-height: 1.35rem;
}

.livekit-room-admin-panel {
  display: grid;
  gap: 0.75rem;
}

.meeting-request-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.meeting-request-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.meeting-request-item:last-child {
  padding-bottom: 0;
}

.meeting-create-form {
  padding: 0.25rem 0 0;
}

.meeting-create-form .form-select {
  background-color: #fff;
}

.meeting-requests-list {
  display: grid;
  gap: 0.25rem;
}

.livekit-tile {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #0f172a;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.livekit-video.is-share,
.livekit-tile.is-screen-share .livekit-video,
.livekit-stage-tile.is-screen-share .livekit-video {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  background: #000 !important;
}

.livekit-tile.is-screen-share,
.livekit-stage-tile.is-screen-share {
  display: grid !important;
  place-items: center !important;
  background: #000 !important;
}

.livekit-tile.is-screen-share .livekit-tile-media,
.livekit-stage-tile.is-screen-share .livekit-tile-media {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: #000;
  overflow: hidden;
}

.livekit-audio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.livekit-audio-root {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.livekit-name {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  background: rgba(15, 23, 42, 0.8);
  color: #e2e8f0;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
}

.meeting-fullscreen-shell {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 35%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.12), transparent 28%),
    #0c111d;
  display: grid;
  grid-template-rows: 76px minmax(0, 1fr);
  overflow: hidden;
}

.meeting-fullscreen-toolbar,
.meeting-fullscreen-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.4rem 0.75rem;
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  min-height: 76px;
  max-height: 76px;
  overflow: hidden;
}

.meeting-room-meta {
  display: flex;
  flex-direction: column;
}

.meeting-room-meta p {
  color: #94a3b8;
  font-size: 0.78rem;
  margin-top: 0.15rem;
}

.meeting-room-meta h1 {
  font-size: 0.95rem;
  line-height: 1.1;
}

.meeting-fullscreen-toolbar .badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
}

.meeting-toolbar-actions {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.meeting-fullscreen-stage {
  min-height: 0;
  width: 100%;
  height: 100%;
  background: #020617;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.meeting-fullscreen-stage iframe {
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

@media (max-width: 768px) {
  .meeting-fullscreen-shell {
    grid-template-rows: minmax(0, 1fr);
    min-height: 100dvh;
  }

  .meeting-fullscreen-toolbar {
    min-height: auto;
    max-height: none;
    align-items: flex-start;
  }

  .meeting-room-meta {
    min-width: 0;
  }

  .meeting-room-meta p {
    display: none;
  }

  .meeting-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
  }

  .meeting-toolbar-actions .btn {
    min-height: 38px;
  }

  .livekit-prejoin-panel {
    align-items: start;
    min-height: 100dvh;
    overflow-y: auto;
    padding: 0.65rem;
  }

  .meet-modal-body {
    grid-template-columns: 1fr;
  }

  .meet-settings-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    position: static;
  }

  .meet-settings-tab {
    justify-content: center;
  }

  .meet-settings-tab span {
    display: none;
  }

  .settings-card-grid,
  .settings-participant-row {
    grid-template-columns: 1fr;
  }

  .settings-inline-form,
  .settings-device-row {
    align-items: stretch;
    flex-direction: column;
  }

  .livekit-meeting-intro,
  .livekit-selfview-layout,
  .livekit-prejoin-card {
    grid-template-columns: 1fr;
  }

  .livekit-meeting-canvas {
    padding: 0.75rem;
  }

  .livekit-meeting-intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .livekit-selfview-slot {
    min-height: 260px;
  }

  .livekit-prejoin-card {
    padding: 0.8rem;
    border-radius: 24px;
    width: 100%;
    gap: 0.75rem;
  }

  .livekit-prejoin-preview-shell,
  .livekit-prejoin-preview {
    min-height: min(42dvh, 320px);
  }

  .livekit-prejoin-meta-grid {
    grid-template-columns: 1fr;
  }

  .livekit-prejoin-sidebar {
    padding: 0.9rem;
    gap: 0.75rem;
  }

  .livekit-prejoin-title {
    font-size: 1.45rem;
  }

  .livekit-prejoin-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .livekit-control-toggle {
    min-width: 0;
    min-height: 44px;
    padding-inline: 0.65rem;
  }

  .livekit-meeting-canvas {
    height: 100dvh;
    padding: 0.45rem;
    gap: 0.45rem;
    grid-template-rows: 52px minmax(0, 1fr);
  }

  .livekit-meet-topbar {
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    padding: 0.55rem 0.7rem;
    border-radius: 14px;
  }

  .meet-room-name {
    font-size: 0.9rem;
  }

  .meet-room-meta,
  .livekit-connection-pill {
    display: none;
  }

  .livekit-meet-body {
    display: block;
    min-height: 0;
    overflow: hidden;
  }

  .livekit-meet-main {
    height: 100%;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0.45rem;
  }

  .livekit-meet-stage {
    border-radius: 14px;
    padding: 0.35rem;
  }

  .livekit-stage-grid {
    align-items: center;
    justify-items: center;
  }

  .livekit-stage-grid .livekit-tile:not(.is-screen-share),
  .livekit-stage-primary .livekit-stage-tile:not(.is-screen-share) {
    aspect-ratio: 1 / 1;
    width: min(100%, 68dvh);
    height: auto;
    max-width: 100%;
    max-height: 100%;
    align-self: center;
    justify-self: center;
  }

  .livekit-stage-grid .livekit-tile.is-screen-share,
  .livekit-stage-primary .livekit-stage-tile.is-screen-share {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
  }

  .livekit-meet-roster {
    display: none;
  }

  .stage-mode-toggle {
    max-width: 126px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .meet-controls-dock {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0.15rem 0.2rem 0.25rem;
    scrollbar-width: none;
  }

  .meet-controls-dock::-webkit-scrollbar {
    display: none;
  }

  .meeting-control-group {
    gap: 0.45rem !important;
    flex-wrap: nowrap;
  }

  .meet-control {
    min-width: 58px;
  }

  .meet-control .btn {
    width: 44px;
    height: 44px;
  }

  .meet-control-label {
    font-size: 0.65rem;
  }

  .livekit-chat-panel {
    position: absolute;
    inset: 56px 0 0 0;
    max-height: none;
    width: 100%;
    border-radius: 14px;
    z-index: 1300;
  }

  .meeting-fullscreen-shell.is-chat-open .livekit-chat-panel {
    transform: translateY(0);
  }

  .meeting-fullscreen-toolbar,
  .meeting-fullscreen-controls {
    padding: 0.6rem 0.75rem;
    gap: 0.5rem;
  }

  .meeting-toolbar-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .meeting-fullscreen-controls .ms-auto {
    margin-left: 0 !important;
  }

  .meeting-room-meta h1 {
    font-size: 1rem;
  }
}
