:root {
  --meeting-bg: #0a0d14;
  --meeting-panel: rgba(25, 29, 40, 0.94);
  --meeting-panel-soft: rgba(255, 255, 255, 0.07);
  --meeting-line: rgba(255, 255, 255, 0.13);
  --meeting-text: #f8fafc;
  --meeting-muted: #aeb7c8;
  --meeting-blue: #3478f6;
  --meeting-blue-strong: #1565e8;
  --meeting-danger: #ff453a;
  --meeting-success: #30d158;
  --meeting-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  --meeting-mobile-header: 56px;
  --meeting-mobile-toolbar: 84px;
}

body.meeting-route-active {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  color: var(--meeting-text);
  background:
    radial-gradient(circle at 12% 0%, rgba(45, 106, 230, 0.22), transparent 34%),
    radial-gradient(circle at 90% 100%, rgba(27, 119, 255, 0.15), transparent 28%),
    var(--meeting-bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

body.meeting-route-active #app {
  min-height: 100dvh;
}

.meeting-page,
.meeting-room {
  min-height: 100dvh;
  color: var(--meeting-text);
}

.meeting-page {
  overflow: auto;
  background:
    radial-gradient(circle at 16% 16%, rgba(67, 126, 244, 0.18), transparent 28rem),
    linear-gradient(145deg, #0b0f18, #101521 58%, #0b0e15);
}

.meeting-page-centered {
  display: grid;
  grid-template-rows: auto 1fr;
}

.meeting-brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0;
}

.meeting-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.meeting-brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #5290ff, #165bd7);
  box-shadow: 0 10px 25px rgba(21, 101, 232, 0.32);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.meeting-brand strong,
.meeting-brand small {
  display: block;
}

.meeting-brand strong {
  font-size: 15px;
}

.meeting-brand small {
  margin-top: 2px;
  color: var(--meeting-muted);
  font-size: 12px;
}

.meeting-secure-badge,
.meeting-room-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--meeting-muted);
  font-size: 13px;
}

.meeting-secure-badge svg,
.meeting-room-meta svg,
.meeting-control svg,
.meeting-end-button svg,
.meeting-leave-button svg,
.meeting-round-button svg,
.meeting-host-line svg,
.meeting-schedule svg,
.meeting-tile-mic svg,
.meeting-raised-hand svg,
.meeting-person-mic svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.meeting-secure-badge svg {
  width: 16px;
  height: 16px;
  color: var(--meeting-success);
}

.meeting-centered-card {
  align-self: center;
  width: min(480px, calc(100% - 40px));
  margin: 32px auto 80px;
  padding: 38px;
  border: 1px solid var(--meeting-line);
  border-radius: 28px;
  text-align: center;
  background: rgba(24, 29, 41, 0.8);
  box-shadow: var(--meeting-shadow);
  backdrop-filter: blur(28px);
}

.meeting-centered-card h1 {
  margin: 18px 0 10px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.08;
}

.meeting-centered-card p {
  margin: 0;
  color: var(--meeting-muted);
  line-height: 1.55;
}

.meeting-loader {
  display: inline-block;
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-top-color: #5892ff;
  border-radius: 50%;
  animation: meeting-spin 0.8s linear infinite;
}

@keyframes meeting-spin {
  to { transform: rotate(360deg); }
}

.meeting-state-icon {
  display: grid;
  width: 56px;
  height: 56px;
  margin: 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--meeting-danger);
  font-size: 28px;
  font-weight: 700;
}

.meeting-state-icon.is-success {
  background: var(--meeting-success);
}

.meeting-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.meeting-button {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 15px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

.meeting-button:hover {
  transform: translateY(-1px);
}

.meeting-button:focus-visible,
.meeting-control:focus-visible,
.meeting-round-button:focus-visible,
.meeting-room button:focus-visible,
.meeting-field input:focus-visible,
.meeting-field select:focus-visible {
  outline: 3px solid rgba(100, 159, 255, 0.55);
  outline-offset: 2px;
}

.meeting-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.meeting-button-primary {
  color: #fff;
  background: linear-gradient(145deg, #3f82fa, var(--meeting-blue-strong));
  box-shadow: 0 10px 28px rgba(21, 101, 232, 0.3);
}

.meeting-button-secondary {
  color: var(--meeting-text);
  background: rgba(255, 255, 255, 0.09);
}

.meeting-prejoin-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(350px, 0.75fr);
  gap: 28px;
  width: min(1180px, calc(100% - 48px));
  margin: 34px auto 72px;
}

.meeting-preview-card,
.meeting-prejoin-card {
  overflow: hidden;
  border: 1px solid var(--meeting-line);
  border-radius: 28px;
  background: rgba(23, 28, 40, 0.8);
  box-shadow: var(--meeting-shadow);
  backdrop-filter: blur(26px);
}

.meeting-preview-card {
  position: relative;
  min-height: 560px;
}

.meeting-video-preview {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, #252e41, #111722 70%);
}

.meeting-video-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.meeting-preview-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
}

.meeting-preview-placeholder[hidden],
.meeting-video-preview video[hidden] {
  display: none;
}

.meeting-preview-placeholder span,
.meeting-tile-avatar {
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #3478f6, #6a4df4);
  box-shadow: 0 20px 50px rgba(20, 68, 160, 0.35);
  font-size: 34px;
  font-weight: 750;
}

.meeting-preview-placeholder p {
  color: var(--meeting-muted);
}

.meeting-preview-status {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 99px;
  background: rgba(9, 12, 19, 0.62);
  backdrop-filter: blur(14px);
  font-size: 12px;
}

.meeting-preview-status > span {
  display: flex;
  align-items: flex-end;
  width: 13px;
  height: 14px;
}

.meeting-preview-status i {
  width: 100%;
  min-height: 4px;
  border-radius: 4px;
  background: var(--meeting-success);
}

.meeting-preview-controls {
  position: absolute;
  right: 0;
  bottom: 28px;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 14px;
}

.meeting-round-button {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  color: #fff;
  background: rgba(20, 24, 34, 0.82);
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.meeting-round-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.meeting-round-button.is-off {
  background: var(--meeting-danger);
}

.meeting-prejoin-card {
  align-self: center;
  padding: 34px;
}

.meeting-eyebrow {
  color: #75a7ff;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.meeting-prejoin-card h1 {
  margin: 10px 0 6px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.04;
}

.meeting-company-name {
  margin: 0 0 24px;
  color: var(--meeting-muted);
  font-size: 16px;
}

.meeting-host-line {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 20px 0;
  padding: 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
}

.meeting-host-line > span {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #2d65d8;
  font-size: 13px;
  font-weight: 750;
}

.meeting-host-line small,
.meeting-host-line strong {
  display: block;
}

.meeting-host-line small {
  color: var(--meeting-muted);
  font-size: 11px;
}

.meeting-host-line strong {
  margin-top: 2px;
  font-size: 14px;
}

.meeting-schedule {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--meeting-muted);
  font-size: 13px;
}

.meeting-field {
  display: grid;
  gap: 7px;
  margin-top: 15px;
}

.meeting-field > span {
  color: var(--meeting-muted);
  font-size: 12px;
  font-weight: 650;
}

.meeting-field input,
.meeting-field select,
.meeting-chat-form input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  color: var(--meeting-text);
  background: rgba(255, 255, 255, 0.075);
  font: inherit;
}

.meeting-field input,
.meeting-field select {
  min-height: 46px;
  padding: 0 13px;
}

.meeting-field input[readonly] {
  opacity: 0.76;
}

.meeting-device-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
}

.meeting-field-wide {
  grid-column: 1 / -1;
}

.meeting-consent {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  margin: 18px 0;
  color: var(--meeting-muted);
  font-size: 12px;
  line-height: 1.45;
}

.meeting-consent input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--meeting-blue);
}

.meeting-prejoin-card > .meeting-button {
  width: 100%;
}

.meeting-privacy-note {
  margin: 13px 0 0;
  color: #7e899d;
  text-align: center;
  font-size: 11px;
}

.meeting-inline-error {
  margin: 14px 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 69, 58, 0.3);
  border-radius: 12px;
  color: #ffaaa4;
  background: rgba(255, 69, 58, 0.1);
  font-size: 13px;
}

.meeting-waiting-visual {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 20px;
  border: 2px solid rgba(83, 145, 255, 0.85);
  border-radius: 50%;
}

.meeting-waiting-visual::before,
.meeting-waiting-visual::after {
  position: absolute;
  inset: -2px;
  border: 2px solid rgba(83, 145, 255, 0.38);
  border-radius: inherit;
  content: "";
  animation: meeting-pulse 2s ease-out infinite;
}

.meeting-waiting-visual::after {
  animation-delay: 0.8s;
}

.meeting-waiting-visual.is-stopped {
  display: grid;
  place-items: center;
  border-color: rgba(255, 69, 58, 0.6);
  color: #ff7770;
  font-size: 40px;
}

.meeting-waiting-visual.is-stopped::before,
.meeting-waiting-visual.is-stopped::after {
  display: none;
}

@keyframes meeting-pulse {
  to { opacity: 0; transform: scale(1.7); }
}

.meeting-waiting-pulse {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
}

.meeting-waiting-pulse i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #74a8ff;
  animation: meeting-dot 1.2s ease-in-out infinite;
}

.meeting-waiting-pulse i:nth-child(2) { animation-delay: 0.15s; }
.meeting-waiting-pulse i:nth-child(3) { animation-delay: 0.3s; }

@keyframes meeting-dot {
  50% { opacity: 0.28; transform: translateY(-4px); }
}

.meeting-room {
  display: grid;
  height: 100dvh;
  grid-template-rows: 64px minmax(0, 1fr) 86px;
  overflow: hidden;
  background: #090c12;
}

.meeting-room-header {
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 22px;
  border-bottom: 1px solid var(--meeting-line);
  background: rgba(15, 18, 27, 0.92);
  backdrop-filter: blur(22px);
}

.meeting-room-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.meeting-room-title strong,
.meeting-room-title small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meeting-room-title strong {
  font-size: 14px;
}

.meeting-room-title small {
  margin-top: 2px;
  color: var(--meeting-muted);
  font-size: 11px;
}

.meeting-live-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--meeting-success);
  box-shadow: 0 0 0 5px rgba(48, 209, 88, 0.1);
}

.meeting-live-dot.is-recording {
  background: var(--meeting-danger);
  box-shadow: 0 0 0 5px rgba(255, 69, 58, 0.12);
  animation: meeting-recording-pulse 1.5s ease-in-out infinite;
}

.meeting-recording-label {
  color: #ff817b !important;
  font-weight: 700;
}

@keyframes meeting-recording-pulse {
  50% { opacity: 0.45; }
}

.meeting-room-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--meeting-muted);
  font-size: 12px;
}

.meeting-room-meta button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  color: var(--meeting-text);
  background: rgba(255, 255, 255, 0.075);
  cursor: pointer;
}

.meeting-room-meta button svg {
  width: 16px;
  height: 16px;
}

.meeting-room-layout {
  display: flex;
  min-height: 0;
}

.meeting-stage {
  position: relative;
  min-height: 0;
  min-width: 0;
  flex: 1;
  padding: 14px;
}

.meeting-video-grid {
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

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

.meeting-grid-count-5,
.meeting-grid-count-6 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.meeting-grid-count-7,
.meeting-grid-count-8 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.meeting-participant-tile {
  position: relative;
  min-width: 0;
  min-height: 0;
  contain: layout paint;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 30%, #283146, #151a25 75%);
}

.meeting-participant-tile.is-speaking {
  border-color: var(--meeting-success);
  box-shadow: 0 0 0 2px rgba(48, 209, 88, 0.18);
}

.meeting-tile-media {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.meeting-tile-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meeting-tile-media video[data-local-video] {
  transform: scaleX(-1);
}

.meeting-tile-avatar {
  width: clamp(58px, 9vw, 96px);
  height: clamp(58px, 9vw, 96px);
  font-size: clamp(20px, 3vw, 32px);
}

.meeting-tile-footer {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  pointer-events: none;
}

.meeting-tile-name {
  max-width: calc(100% - 50px);
  overflow: hidden;
  padding: 6px 9px;
  border-radius: 9px;
  background: rgba(4, 7, 12, 0.66);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

.meeting-tile-mic,
.meeting-raised-hand {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: rgba(4, 7, 12, 0.68);
  backdrop-filter: blur(10px);
}

.meeting-tile-mic svg,
.meeting-raised-hand svg {
  width: 15px;
  height: 15px;
}

.meeting-tile-mic.is-muted {
  color: #ff817b;
}

.meeting-raised-hand {
  color: #ffd60a;
}

.meeting-host-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #dbe8ff;
  background: rgba(19, 92, 222, 0.7);
  font-size: 10px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.meeting-network-banner {
  position: absolute;
  z-index: 5;
  top: 24px;
  left: 50%;
  max-width: calc(100% - 48px);
  padding: 9px 14px;
  border-radius: 11px;
  color: #fff;
  background: rgba(255, 159, 10, 0.88);
  font-size: 12px;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.meeting-audio-banner {
  position: absolute;
  z-index: 7;
  top: 24px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 48px);
  padding: 8px 9px 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: #fff;
  background: rgba(24, 30, 43, 0.94);
  box-shadow: var(--meeting-shadow);
  font-size: 12px;
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.meeting-audio-banner button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--meeting-blue);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.meeting-device-panel {
  position: absolute;
  z-index: 9;
  right: 22px;
  bottom: 22px;
  display: grid;
  width: min(360px, calc(100% - 44px));
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  color: var(--meeting-text);
  background: rgba(22, 27, 38, 0.96);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(18px);
}

.meeting-device-panel[hidden] {
  display: none;
}

.meeting-device-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.meeting-device-panel header > div {
  display: grid;
  gap: 2px;
}

.meeting-device-panel header strong {
  font-size: 15px;
}

.meeting-device-panel header small,
.meeting-device-panel label > span {
  color: var(--meeting-muted);
  font-size: 11px;
}

.meeting-device-panel header button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--meeting-text);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.meeting-device-panel header button svg {
  width: 15px;
  height: 15px;
}

.meeting-device-panel label {
  display: grid;
  gap: 6px;
}

.meeting-device-panel select {
  width: 100%;
  min-height: 42px;
  padding: 0 36px 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  outline: 0;
  color: var(--meeting-text);
  background: #202736;
  font: inherit;
}

.meeting-device-panel select:focus-visible {
  border-color: var(--meeting-blue);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.22);
}

.meeting-toast {
  position: absolute;
  z-index: 8;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  padding: 11px 15px;
  border: 1px solid var(--meeting-line);
  border-radius: 12px;
  background: rgba(27, 31, 42, 0.92);
  box-shadow: var(--meeting-shadow);
  font-size: 13px;
  backdrop-filter: blur(16px);
}

.meeting-toast.is-error { background: rgba(138, 35, 31, 0.94); }
.meeting-toast.is-success { background: rgba(24, 112, 48, 0.94); }

.meeting-sidepanel {
  width: min(390px, 38vw);
  min-width: 320px;
  border-left: 1px solid var(--meeting-line);
  background: rgba(19, 23, 33, 0.97);
}

.meeting-sidepanel[hidden] {
  display: none;
}

.meeting-sidepanel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  padding: 0 14px 0 18px;
  border-bottom: 1px solid var(--meeting-line);
}

.meeting-panel-tabs {
  display: flex;
  gap: 4px;
}

.meeting-panel-tabs button,
.meeting-panel-close {
  border: 0;
  color: var(--meeting-muted);
  background: transparent;
  cursor: pointer;
}

.meeting-panel-tabs button {
  padding: 9px 10px;
  border-radius: 9px;
  font-weight: 650;
}

.meeting-panel-tabs button.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.meeting-panel-tabs b {
  margin-left: 4px;
  font-size: 11px;
}

.meeting-panel-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
}

.meeting-panel-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.meeting-panel-view {
  height: calc(100% - 58px);
  overflow: auto;
}

.meeting-panel-view[data-meeting-panel="chat"] {
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
}

.meeting-panel-view[hidden] {
  display: none;
}

.meeting-waiting-list,
.meeting-participant-list {
  padding: 16px;
}

.meeting-waiting-list {
  border-bottom: 1px solid var(--meeting-line);
}

.meeting-waiting-list h3,
.meeting-participant-list h3 {
  margin: 0 0 12px;
  color: var(--meeting-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meeting-waiting-person,
.meeting-person-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.meeting-waiting-person > span,
.meeting-person-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #2d65d8;
  font-size: 12px;
  font-weight: 750;
}

.meeting-waiting-person > div,
.meeting-person-row > div {
  min-width: 0;
  flex: 1;
}

.meeting-waiting-person strong,
.meeting-waiting-person small,
.meeting-person-row strong,
.meeting-person-row small {
  display: block;
}

.meeting-waiting-person strong,
.meeting-person-row strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meeting-waiting-person small,
.meeting-person-row small {
  margin-top: 2px;
  color: var(--meeting-muted);
  font-size: 10px;
}

.meeting-waiting-person button,
.meeting-person-actions button {
  min-height: 32px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: #2369df;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

.meeting-waiting-person button {
  padding: 0 10px;
}

.meeting-waiting-person button:last-child,
.meeting-person-actions button.is-danger {
  color: #ff928c;
  background: rgba(255, 69, 58, 0.1);
}

.meeting-person-actions {
  position: relative;
  display: flex;
  gap: 5px;
}

.meeting-person-actions button {
  padding: 0 8px;
  color: var(--meeting-muted);
  background: rgba(255, 255, 255, 0.07);
}

.meeting-person-mic {
  color: var(--meeting-muted);
}

.meeting-person-mic.is-muted {
  color: #ff817b;
}

.meeting-chat-list {
  overflow: auto;
  padding: 16px;
}

.meeting-chat-message {
  margin-bottom: 14px;
}

.meeting-chat-message header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.meeting-chat-message strong {
  font-size: 12px;
}

.meeting-chat-message time {
  color: #717c90;
  font-size: 10px;
}

.meeting-chat-message p {
  margin: 0;
  color: #dce2ed;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.meeting-chat-message.is-own {
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(52, 120, 246, 0.14);
}

.meeting-chat-empty {
  display: grid;
  min-height: 100%;
  place-content: center;
  justify-items: center;
  color: #6f798b;
}

.meeting-chat-empty svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
}

.meeting-chat-form {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--meeting-line);
}

.meeting-chat-form input {
  min-height: 42px;
  padding: 0 12px;
}

.meeting-chat-form button {
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--meeting-blue);
  cursor: pointer;
  font-size: 20px;
}

.meeting-toolbar {
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 18px;
  border-top: 1px solid var(--meeting-line);
  background: rgba(15, 18, 27, 0.96);
  backdrop-filter: blur(22px);
}

.meeting-toolbar-main {
  display: flex;
  align-items: center;
  gap: 7px;
}

.meeting-control {
  display: grid;
  min-width: 66px;
  min-height: 62px;
  place-items: center;
  gap: 4px;
  padding: 6px 7px;
  border: 0;
  border-radius: 12px;
  color: #e5e9f2;
  background: transparent;
  cursor: pointer;
}

.meeting-control:hover {
  background: rgba(255, 255, 255, 0.07);
}

.meeting-control svg {
  width: 23px;
  height: 23px;
}

.meeting-control span {
  font-size: 10px;
}

.meeting-control.is-off {
  color: #fff;
  background: rgba(255, 69, 58, 0.85);
}

.meeting-control.is-active {
  color: #fff;
  background: rgba(52, 120, 246, 0.85);
}

.meeting-control.is-recording {
  color: #fff;
  background: rgba(255, 69, 58, 0.88);
}

.meeting-end-button,
.meeting-leave-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: var(--meeting-danger);
  cursor: pointer;
  font-weight: 700;
}

.meeting-leave-button {
  background: rgba(255, 69, 58, 0.18);
}

@media (max-width: 900px) {
  .meeting-prejoin-shell {
    grid-template-columns: 1fr;
    max-width: 680px;
  }

  .meeting-preview-card {
    min-height: min(52vh, 440px);
  }

  .meeting-room-meta > span {
    display: none;
  }

  .meeting-control-mobile-hide {
    display: none;
  }

  .meeting-sidepanel {
    position: absolute;
    z-index: 10;
    inset: 64px 0 86px auto;
    width: min(390px, 92vw);
    min-width: 0;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.28);
  }

  .meeting-video-grid,
  .meeting-grid-count-5,
  .meeting-grid-count-6,
  .meeting-grid-count-7,
  .meeting-grid-count-8 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .meeting-brandbar {
    width: calc(100% - 28px);
    padding: 15px 0;
  }

  .meeting-secure-badge {
    font-size: 0;
  }

  .meeting-prejoin-shell {
    width: calc(100% - 24px);
    gap: 14px;
    margin: 10px auto 32px;
  }

  .meeting-preview-card {
    min-height: 34vh;
    border-radius: 22px;
  }

  .meeting-prejoin-card {
    padding: 23px 18px;
    border-radius: 22px;
  }

  .meeting-device-grid {
    grid-template-columns: 1fr;
  }

  .meeting-field-wide {
    grid-column: auto;
  }

  .meeting-centered-card {
    width: calc(100% - 24px);
    box-sizing: border-box;
    margin-bottom: 28px;
    padding: 28px 20px;
    border-radius: 22px;
  }

  .meeting-room {
    grid-template-rows: 56px minmax(0, 1fr) 74px;
  }

  .meeting-room-header {
    padding: 0 12px;
  }

  .meeting-room-meta {
    gap: 8px;
  }

  .meeting-room-meta button {
    width: 38px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  .meeting-stage {
    padding: 6px;
  }

  .meeting-device-panel {
    right: 10px;
    bottom: 10px;
    width: calc(100% - 20px);
  }

  .meeting-video-grid {
    gap: 6px;
  }

  .meeting-participant-tile {
    border-radius: 13px;
  }

  .meeting-toolbar {
    gap: 6px;
    padding: 0 7px;
  }

  .meeting-toolbar-main {
    min-width: 0;
    flex: 1;
    justify-content: space-around;
    gap: 1px;
  }

  .meeting-control {
    min-width: 43px;
    min-height: 54px;
    padding: 4px;
  }

  .meeting-control span {
    display: none;
  }

  .meeting-end-button,
  .meeting-leave-button {
    width: 46px;
    min-height: 46px;
    justify-content: center;
    padding: 0;
    font-size: 0;
  }

  .meeting-sidepanel {
    inset: 56px 0 74px;
    width: 100%;
  }

  .meeting-grid-count-5,
  .meeting-grid-count-6,
  .meeting-grid-count-7,
  .meeting-grid-count-8 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.video-meeting-recordings {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--border, rgba(117, 126, 145, 0.18));
  border-radius: 15px;
  background: color-mix(in srgb, var(--video-accent) 5%, var(--panel, #fff));
}

.video-meeting-recordings > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.video-meeting-recordings > header strong,
.video-meeting-recordings > header small {
  display: block;
}

.video-meeting-recordings > header small {
  margin-top: 3px;
  color: var(--muted, #717887);
  font-size: 11px;
}

.video-meeting-recordings > header > span {
  color: var(--video-accent);
  font-size: 12px;
  font-weight: 700;
}

.video-meeting-recordings > div {
  display: grid;
  gap: 10px;
}

.video-meeting-recordings article {
  display: grid;
  gap: 8px;
  padding: 11px;
  border-radius: 12px;
  background: var(--panel, #fff);
}

.video-meeting-recordings article > strong {
  color: var(--text, #202534);
  font-size: 12px;
}

.video-meeting-recordings video,
.video-meeting-recordings audio {
  width: 100%;
  max-height: 360px;
}

.video-meeting-recordings article .button {
  justify-self: start;
}

.video-meeting-actions-list {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding: 13px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--video-accent) 6%, var(--panel, #fff));
}

.video-meeting-actions-list > strong {
  color: var(--text, #202534);
  font-size: 12px;
}

.video-meeting-actions-list > div {
  display: grid;
  gap: 2px;
  padding: 8px 9px;
  border-radius: 9px;
  background: var(--panel, #fff);
}

.video-meeting-actions-list > div.is-created {
  opacity: 0.65;
}

.video-meeting-actions-list span {
  color: var(--text, #202534);
  font-size: 12px;
}

.video-meeting-actions-list small {
  color: var(--muted, #717887);
  font-size: 10px;
}

.client-meeting-results .section-body {
  display: grid;
  gap: 10px;
}

.client-meeting-results article {
  padding: 15px;
  border: 1px solid var(--border, rgba(117, 126, 145, 0.18));
  border-radius: 15px;
  background: color-mix(in srgb, #1769e0 4%, var(--panel, #fff));
}

.client-meeting-results article header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.client-meeting-results article header strong {
  color: var(--text, #202534);
  font-size: 13px;
}

.client-meeting-results article time {
  color: var(--muted, #717887);
  font-size: 10px;
}

.client-meeting-results article > p {
  margin: 9px 0;
  color: var(--text, #202534);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.client-meeting-results dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.client-meeting-results dl > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
}

.client-meeting-results dt {
  color: var(--muted, #717887);
  font-size: 10px;
}

.client-meeting-results dd {
  margin: 0;
  color: var(--text, #202534);
  font-size: 11px;
  white-space: pre-wrap;
}

@media (prefers-reduced-motion: reduce) {
  .meeting-loader,
  .meeting-waiting-visual::before,
  .meeting-waiting-visual::after,
  .meeting-waiting-pulse i {
    animation: none;
  }

  .meeting-button {
    transition: none;
  }
}

/* CRM meetings workspace */
.video-meetings-page {
  --video-accent: #1769e0;
}

.video-meeting-create {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 34px;
  overflow: hidden;
  margin-bottom: 24px;
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid color-mix(in srgb, var(--video-accent) 18%, var(--border, #dfe4ec));
  border-radius: 30px;
  color: #f8fbff;
  background:
    radial-gradient(circle at 90% 0%, rgba(90, 156, 255, 0.26), transparent 37%),
    linear-gradient(135deg, #0c3472, #0c58c6 58%, #1379e9);
  box-shadow: 0 22px 60px rgba(22, 85, 176, 0.18);
}

.video-meeting-create::after {
  position: absolute;
  right: -90px;
  bottom: -120px;
  width: 310px;
  height: 310px;
  border: 56px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.video-meeting-create-copy,
.video-meeting-create-form {
  position: relative;
  z-index: 1;
}

.video-meeting-kicker {
  display: inline-flex;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.video-meeting-create-copy h2 {
  max-width: 620px;
  margin: 18px 0 12px;
  color: #fff;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.video-meeting-create-copy p {
  max-width: 580px;
  margin: 0;
  color: rgba(239, 246, 255, 0.78);
  line-height: 1.55;
}

.video-meeting-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.video-meeting-benefits span {
  padding: 8px 11px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

.video-meeting-create-form {
  display: grid;
  gap: 13px;
  align-self: center;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 45px rgba(8, 39, 88, 0.18);
  backdrop-filter: blur(22px);
}

.video-meeting-create-form .field {
  margin: 0;
}

.video-meeting-create-form .field > span {
  color: #455064;
}

.video-meeting-create-form .input,
.video-meeting-create-form .select {
  color: #182034;
  background: rgba(245, 247, 251, 0.95);
}

.video-meeting-type-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border-radius: 14px;
  background: #eef2f8;
}

.video-meeting-type-tabs button {
  min-width: 0;
  padding: 10px 8px;
  border: 0;
  border-radius: 10px;
  color: #667085;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 720;
}

.video-meeting-type-tabs button:hover,
.video-meeting-type-tabs button:focus-visible {
  color: #1769e0;
  outline: none;
}

.video-meeting-type-tabs button:focus-visible {
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.18);
}

.video-meeting-type-tabs button.is-active {
  color: #1157ba;
  background: #fff;
  box-shadow: 0 4px 12px rgba(35, 55, 88, 0.09);
}

.video-meeting-staff-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  color: #455064;
}

.video-meeting-staff-field legend {
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 700;
}

.video-meeting-staff-field > small {
  display: block;
  margin-top: 6px;
  color: #7a8496;
  font-size: 11px;
}

.video-meeting-staff-list {
  display: grid;
  gap: 5px;
  max-height: 168px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #dfe5ee;
  border-radius: 13px;
  background: #f7f9fc;
}

.video-meeting-staff-list label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 9px;
  color: #242c3d;
  cursor: pointer;
}

.video-meeting-staff-list label:hover {
  background: #fff;
}

.video-meeting-staff-list input {
  width: 17px;
  height: 17px;
  accent-color: #1769e0;
}

.video-meeting-staff-list span,
.video-meeting-staff-list strong,
.video-meeting-staff-list small {
  display: block;
}

.video-meeting-staff-list strong {
  font-size: 12px;
}

.video-meeting-staff-list small {
  margin-top: 2px;
  color: #7a8496;
  font-size: 10px;
}

.video-meeting-open-note {
  display: grid;
  gap: 3px;
  padding: 12px 13px;
  border: 1px solid rgba(23, 105, 224, 0.16);
  border-radius: 13px;
  color: #344054;
  background: rgba(23, 105, 224, 0.06);
}

.video-meeting-open-note strong {
  font-size: 12px;
}

.video-meeting-open-note span {
  color: #667085;
  font-size: 11px;
  line-height: 1.4;
}

.video-meeting-history {
  overflow: hidden;
}

.video-meeting-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.video-meeting-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border, rgba(117, 126, 145, 0.2));
  border-radius: 20px;
  background: color-mix(in srgb, var(--panel, #fff) 96%, transparent);
  box-shadow: 0 10px 30px rgba(26, 39, 63, 0.06);
}

.video-meeting-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.video-meeting-card h3 {
  margin: 11px 0 3px;
  color: var(--text, #202534);
  font-size: 18px;
}

.video-meeting-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.video-meeting-card-head p,
.video-meeting-card-note {
  margin: 0;
  color: var(--muted, #717887);
  font-size: 13px;
}

.video-meeting-date {
  flex: 0 0 auto;
  color: var(--muted, #717887);
  font-size: 12px;
}

.video-meeting-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 18px;
  padding: 13px 0;
  border-top: 1px solid var(--border, rgba(117, 126, 145, 0.16));
  border-bottom: 1px solid var(--border, rgba(117, 126, 145, 0.16));
  color: var(--muted, #717887);
  font-size: 11px;
}

.video-meeting-facts .is-recording {
  color: #e33b33;
}

.video-meeting-card-note {
  margin-top: 13px;
}

.video-meeting-summary-preview {
  margin-top: 13px;
  padding: 13px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--video-accent) 7%, var(--panel, #fff));
}

.video-meeting-summary-preview strong,
.video-meeting-summary-preview small {
  display: block;
}

.video-meeting-summary-preview p {
  display: -webkit-box;
  overflow: hidden;
  margin: 6px 0;
  color: var(--text, #202534);
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.video-meeting-summary-preview small {
  color: var(--muted, #717887);
}

.video-meeting-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.video-meeting-result {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border, rgba(117, 126, 145, 0.2));
}

.video-meeting-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.video-meeting-result-head strong,
.video-meeting-result-head small {
  display: block;
}

.video-meeting-result-head strong {
  color: var(--text, #202534);
}

.video-meeting-result-head small {
  margin-top: 3px;
  color: var(--muted, #717887);
  font-size: 11px;
}

.video-meeting-result .field {
  margin-top: 12px;
}

.video-meeting-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.video-meeting-transcript {
  margin-top: 16px;
  border: 1px solid var(--border, rgba(117, 126, 145, 0.18));
  border-radius: 14px;
}

.video-meeting-transcript summary {
  padding: 13px 15px;
  color: var(--text, #202534);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.video-meeting-transcript > div {
  max-height: 420px;
  overflow: auto;
  padding: 0 15px 15px;
}

.video-meeting-transcript p {
  display: grid;
  grid-template-columns: 54px minmax(100px, 0.28fr) 1fr;
  gap: 10px;
  margin: 0;
  padding: 9px 0;
  border-top: 1px solid var(--border, rgba(117, 126, 145, 0.14));
  color: var(--text, #202534);
  font-size: 12px;
  line-height: 1.45;
}

.video-meeting-transcript time {
  color: var(--video-accent);
  font-variant-numeric: tabular-nums;
}

.video-meeting-transcript strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .video-meeting-create,
  .video-meeting-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .video-meeting-create {
    gap: 22px;
    padding: 22px 16px;
    border-radius: 22px;
  }

  .video-meeting-create-form {
    padding: 16px;
  }

  .video-meeting-type-tabs {
    grid-template-columns: 1fr;
  }

  .video-meeting-list {
    padding: 12px;
  }

  .video-meeting-card-head {
    display: grid;
  }

  .video-meeting-transcript p {
    grid-template-columns: 48px 1fr;
  }

  .video-meeting-transcript p span {
    grid-column: 1 / -1;
  }
}

/* Meeting quality, layouts and administrator controls */
.meeting-preflight {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
}

.meeting-preflight header,
.meeting-admin-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.meeting-preflight header strong {
  font-size: 12px;
}

.meeting-preflight header button {
  padding: 5px 9px;
  border: 0;
  border-radius: 8px;
  color: #bcd4ff;
  background: rgba(52, 120, 246, 0.14);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
}

.meeting-preflight > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.meeting-preflight-chip {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 8px 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
}

.meeting-preflight-chip i,
.meeting-quality i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8e98aa;
}

.meeting-preflight-chip b,
.meeting-preflight-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meeting-preflight-chip b {
  font-size: 10px;
}

.meeting-preflight-chip small {
  color: var(--meeting-muted);
  font-size: 9px;
}

.meeting-preflight-chip.is-good i,
.meeting-preflight-chip.is-ready i,
.meeting-quality.is-good i,
.meeting-quality.is-excellent i {
  background: var(--meeting-success);
}

.meeting-preflight-chip.is-warning i,
.meeting-quality.is-poor i {
  background: #ffb340;
}

.meeting-preflight-chip.is-error i {
  background: var(--meeting-danger);
}

.meeting-preview-status i {
  transform-origin: left center;
  transition: transform 80ms linear;
}

.meeting-quality {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.meeting-quality b {
  font-size: 10px;
  font-weight: 650;
}

.meeting-toolbar-main {
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.meeting-toolbar-main::-webkit-scrollbar {
  display: none;
}

.meeting-participant-tile > footer {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.meeting-participant-tile > footer > span {
  overflow: hidden;
  padding: 6px 9px;
  border-radius: 9px;
  background: rgba(4, 7, 12, 0.68);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

.meeting-participant-tile > footer > div {
  display: flex;
  gap: 5px;
}

.meeting-tile-pin {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  color: #fff;
  background: rgba(4, 7, 12, 0.58);
  opacity: 0;
  cursor: pointer;
  transition: opacity 140ms ease, background 140ms ease;
}

.meeting-tile-pin svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.meeting-participant-tile:hover .meeting-tile-pin,
.meeting-participant-tile.is-pinned .meeting-tile-pin,
.meeting-tile-pin:focus-visible {
  opacity: 1;
}

.meeting-participant-tile.is-pinned .meeting-tile-pin {
  background: var(--meeting-blue);
}

.meeting-video-grid.meeting-layout-speaker {
  grid-template-columns: minmax(0, 1fr) minmax(136px, 19%);
  grid-template-rows: repeat(6, minmax(0, 1fr));
}

.meeting-video-grid.meeting-layout-speaker .meeting-participant-tile.is-focus {
  grid-row: 1 / -1;
  grid-column: 1;
}

.meeting-video-grid.meeting-layout-speaker .meeting-participant-tile:not(.is-focus) {
  grid-column: 2;
}

.meeting-participant-tile.is-screen .meeting-tile-media video {
  object-fit: contain;
  background: #05070b;
}

.meeting-network-banner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.meeting-network-banner[hidden] {
  display: none;
}

.meeting-network-banner button {
  padding: 5px 8px;
  border: 0;
  border-radius: 7px;
  color: #5c3600;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.meeting-admin-panel {
  position: absolute;
  z-index: 10;
  right: 22px;
  bottom: 22px;
  display: grid;
  width: min(390px, calc(100% - 44px));
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  color: var(--meeting-text);
  background: rgba(22, 27, 38, 0.98);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.meeting-admin-panel[hidden] {
  display: none;
}

.meeting-admin-panel header > div,
.meeting-admin-switch span {
  display: grid;
  gap: 2px;
}

.meeting-admin-panel header small,
.meeting-admin-switch small {
  color: var(--meeting-muted);
  font-size: 10px;
}

.meeting-admin-panel header button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.meeting-admin-panel svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.meeting-admin-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.meeting-admin-switch b {
  font-size: 12px;
}

.meeting-admin-switch input {
  width: 19px;
  height: 19px;
  accent-color: var(--meeting-blue);
}

.meeting-admin-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: rgba(255, 69, 58, 0.75);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.meeting-admin-recording {
  display: grid;
  gap: 6px;
}

.meeting-admin-recording > span {
  color: var(--meeting-muted);
  font-size: 11px;
}

.meeting-admin-recording select {
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  color: #fff;
  background: #202736;
  font: inherit;
}

@media (max-width: 900px) {
  .meeting-video-grid.meeting-layout-speaker {
    grid-template-columns: minmax(0, 1fr) 120px;
  }
}

@media (max-width: 640px) {
  .meeting-preflight > div {
    grid-template-columns: 1fr;
  }

  .meeting-quality {
    display: none !important;
  }

  .meeting-video-grid.meeting-layout-speaker {
    display: flex;
    overflow-x: auto;
  }

  .meeting-video-grid.meeting-layout-speaker .meeting-participant-tile {
    min-width: 116px;
  }

  .meeting-video-grid.meeting-layout-speaker .meeting-participant-tile.is-focus {
    min-width: calc(100% - 124px);
  }

  .meeting-admin-panel {
    right: 10px;
    bottom: 10px;
    width: calc(100% - 20px);
  }
}

/* Mobile video-call polish: phone-safe layout without changing meeting logic. */
@media (max-width: 640px) {
  body.meeting-route-active {
    position: fixed;
    inset: 0;
    width: 100%;
  }

  body.meeting-route-active #app,
  .meeting-room {
    height: 100dvh;
    min-height: 100dvh;
  }

  .meeting-room {
    grid-template-rows:
      var(--meeting-mobile-header)
      minmax(0, 1fr)
      calc(var(--meeting-mobile-toolbar) + env(safe-area-inset-bottom));
  }

  .meeting-room-header {
    gap: 8px;
    padding: 0 max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left));
  }

  .meeting-room-title {
    max-width: calc(100vw - 118px);
  }

  .meeting-room-title strong {
    font-size: 13px;
  }

  .meeting-room-title small,
  .meeting-recording-label {
    display: none;
  }

  .meeting-room-meta {
    flex: 0 0 auto;
    gap: 6px;
  }

  .meeting-room-meta time {
    min-width: 58px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 12px;
  }

  .meeting-room-meta button {
    width: 36px;
    min-height: 36px;
    border-radius: 12px;
  }

  .meeting-room-layout,
  .meeting-stage,
  .meeting-video-grid {
    min-height: 0;
  }

  .meeting-stage {
    padding: 8px;
  }

  .meeting-video-grid {
    gap: 8px;
    overflow: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

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

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

  .meeting-grid-count-3,
  .meeting-grid-count-4,
  .meeting-grid-count-5,
  .meeting-grid-count-6,
  .meeting-grid-count-7,
  .meeting-grid-count-8 {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-rows: minmax(210px, 42dvh);
    overflow-y: auto;
    padding-right: 2px;
  }

  .meeting-participant-tile {
    border-radius: 16px;
  }

  .meeting-participant-tile > footer,
  .meeting-tile-footer {
    right: 8px;
    bottom: 8px;
    left: 8px;
  }

  .meeting-participant-tile > footer > span,
  .meeting-tile-name {
    max-width: calc(100% - 76px);
    padding: 6px 8px;
    font-size: 11px;
  }

  .meeting-tile-avatar {
    width: clamp(54px, 18vw, 76px);
    height: clamp(54px, 18vw, 76px);
    font-size: clamp(19px, 6vw, 26px);
  }

  .meeting-toolbar {
    min-height: calc(var(--meeting-mobile-toolbar) + env(safe-area-inset-bottom));
    align-items: flex-start;
    gap: 8px;
    padding:
      8px max(8px, env(safe-area-inset-right))
      calc(8px + env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
    border-top-color: rgba(255, 255, 255, 0.16);
  }

  .meeting-toolbar-main {
    min-width: 0;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .meeting-control {
    min-width: 50px;
    min-height: 56px;
    flex: 0 0 50px;
    border-radius: 16px;
    scroll-snap-align: start;
    background: rgba(255, 255, 255, 0.055);
  }

  .meeting-control svg {
    width: 22px;
    height: 22px;
  }

  .meeting-toolbar-end {
    flex: 0 0 auto;
  }

  .meeting-end-button,
  .meeting-leave-button {
    width: 50px;
    min-height: 56px;
    border-radius: 16px;
  }

  .meeting-sidepanel {
    position: absolute;
    z-index: 12;
    inset:
      auto 0
      calc(var(--meeting-mobile-toolbar) + env(safe-area-inset-bottom))
      0;
    width: 100%;
    height: min(72dvh, 560px);
    min-width: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    border-left: 0;
    border-radius: 22px 22px 0 0;
    background: rgba(19, 23, 33, 0.98);
    box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.34);
  }

  .meeting-sidepanel > header {
    height: 54px;
    padding: 0 10px 0 12px;
  }

  .meeting-panel-tabs {
    min-width: 0;
  }

  .meeting-panel-tabs button {
    padding: 9px 10px;
    font-size: 13px;
  }

  .meeting-panel-view {
    height: calc(100% - 54px);
  }

  .meeting-chat-form {
    padding:
      10px max(10px, env(safe-area-inset-right))
      12px max(10px, env(safe-area-inset-left));
  }

  .meeting-device-panel,
  .meeting-admin-panel {
    right: max(8px, env(safe-area-inset-right));
    bottom: calc(var(--meeting-mobile-toolbar) + env(safe-area-inset-bottom) + 10px);
    left: max(8px, env(safe-area-inset-left));
    width: auto;
    max-height: calc(100dvh - var(--meeting-mobile-header) - var(--meeting-mobile-toolbar) - 30px);
    overflow: auto;
  }

  .meeting-toast {
    right: max(10px, env(safe-area-inset-right));
    bottom: calc(var(--meeting-mobile-toolbar) + env(safe-area-inset-bottom) + 12px);
    left: max(10px, env(safe-area-inset-left));
    max-width: none;
  }

  .meeting-network-banner,
  .meeting-audio-banner {
    top: 12px;
    width: calc(100% - 24px);
    max-width: 420px;
    box-sizing: border-box;
  }

  .meeting-audio-banner {
    justify-content: space-between;
  }
}

@media (max-width: 420px) {
  .meeting-room-title {
    max-width: calc(100vw - 106px);
  }

  .meeting-room-meta time {
    min-width: 50px;
    font-size: 11px;
  }

  .meeting-control {
    min-width: 46px;
    flex-basis: 46px;
  }

  .meeting-end-button,
  .meeting-leave-button {
    width: 46px;
  }

  .meeting-panel-tabs button {
    padding-inline: 8px;
    font-size: 12px;
  }
}
