.conference-app {
  overflow: hidden;
  border: 1px solid #d5e2ec;
  border-radius: 22px;
  background: #071321;
  box-shadow: 0 22px 60px #0a1d3024;
  color: #fff;
  text-align: left;
}

.conference-header {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  border-bottom: 1px solid #ffffff12;
  background: #0c1b2d;
}

.conference-identity,.conference-meta,.toolbar-group,.tile-label,.panel-heading {
  display: flex;
  align-items: center;
}

.conference-identity { gap: 11px; min-width: 0; }
.conference-identity div { min-width: 0; }
.conference-identity strong,.conference-identity span { display: block; }
.conference-identity strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.conference-identity span { margin-top: 3px; color: #8fa4b9; font-size: 11px; }
.live-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: #25b87a; box-shadow: 0 0 0 5px #25b87a1f; }
.conference-meta { gap: 8px; color: #b7c7d6; font-size: 11px; }
.conference-meta > span { padding: 7px 9px; border: 1px solid #ffffff12; border-radius: 9px; background: #ffffff08; }
.conference-meta .secure-badge { color: #8ee0bb; }
.connection-badge.connected { color: #8ee0bb; }
.connection-badge.failed { color: #ff9ca1; }

.conference-body { position: relative; display: flex; min-height: 390px; background: #06101c; }
.video-grid { position: relative; flex: 1; min-width: 0; min-height: 390px; border-radius: 0; background: radial-gradient(circle at 50% 40%,#16324f,#071321 64%); }
.video-grid.layout-grid .remote-tile { inset: 12px; border: 1px solid #ffffff18; border-radius: 16px; }
.remote-tile { position: absolute; inset: 0; overflow: hidden; }
.remote-tile > video { width: 100%; height: 100%; min-height: 0; object-fit: contain; background: #071321; }
.video-placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; padding: 30px; color: #d8e4ef; text-align: center; }
.video-placeholder[hidden] { display: none; }
.video-placeholder .avatar { display: grid; width: 82px; height: 82px; margin-bottom: 18px; place-items: center; border: 1px solid #8bc8ff4a; border-radius: 26px; background: linear-gradient(145deg,#157cc8,#28a7d8); box-shadow: 0 18px 45px #07101c99; color: white; font-size: 30px; font-weight: 800; }
.video-placeholder strong { font-size: 16px; }
.video-placeholder small { max-width: 390px; margin-top: 7px; color: #849bb0; line-height: 1.5; }
.tile-label { position: absolute; left: 14px; bottom: 14px; gap: 7px; padding: 7px 10px; border: 1px solid #ffffff18; border-radius: 9px; background: #071321cc; backdrop-filter: blur(8px); font-size: 11px; }
.audio-pulse { width: 7px; height: 7px; border-radius: 50%; background: #3dce8d; }

.local-tile { position: absolute; z-index: 4; right: 16px; bottom: 16px; overflow: hidden; width: 190px; aspect-ratio: 16/10; border: 1px solid #ffffff40; border-radius: 14px; background: #12263c; box-shadow: 0 14px 35px #0009; }
.local-tile video { width: 100%; height: 100%; min-height: 0; object-fit: cover; transform: scaleX(-1); }
.local-placeholder { padding: 10px; background: #11263b; }
.local-placeholder .avatar { width: 48px; height: 48px; margin: 0; border-radius: 16px; font-size: 17px; }
.local-tile .tile-label { right: 7px; bottom: 7px; left: 7px; justify-content: space-between; padding: 5px 7px; font-size: 9px; }

.meeting-panel { z-index: 8; width: 310px; flex: 0 0 310px; padding: 18px; border-left: 1px solid #ffffff12; background: #0d1c2e; color: #dfe9f2; }
.panel-heading { justify-content: space-between; margin-bottom: 20px; }
.panel-heading strong,.panel-heading span { display: block; }
.panel-heading span { margin-top: 3px; color: #8298ad; font-size: 11px; }
.panel-heading button { width: 32px; min-height: 32px; padding: 0; border-radius: 9px; background: #ffffff0b; box-shadow: none; font-size: 22px; }
.meeting-panel label { display: block; margin-top: 16px; color: #9eb0c1; font-size: 11px; font-weight: 700; }
.meeting-panel select { width: 100%; height: 42px; margin-top: 7px; padding: 0 10px; border: 1px solid #ffffff17; border-radius: 10px; background: #13283e; color: #e8f0f6; }
.panel-note { color: #71889e; font-size: 10px; line-height: 1.5; }
.participant-list { display: grid; gap: 9px; }
.participant-row { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid #ffffff0d; border-radius: 11px; background: #ffffff06; }
.participant-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; background: #157cc8; font-size: 12px; font-weight: 800; }
.participant-row strong,.participant-row small { display: block; }
.participant-row strong { font-size: 12px; }
.participant-row small { margin-top: 2px; color: #7f95aa; font-size: 9px; }

.prejoin-actions { display: flex; align-items: center; gap: 14px; padding: 14px; background: #0c1b2d; }
.prejoin-actions button { width: auto; min-width: 170px; min-height: 44px; padding: 0 20px; border-radius: 11px; }
.prejoin-actions span { color: #8499ad; font-size: 11px; }

.meeting-toolbar { display: flex; min-height: 82px; align-items: center; justify-content: center; gap: 18px; padding: 10px 18px; border-top: 1px solid #ffffff12; background: #0c1b2d; }
.toolbar-group { gap: 8px; }
.control-button { display: grid; width: 64px; min-height: 58px; padding: 6px; place-items: center; border-radius: 12px; background: transparent; box-shadow: none; color: #c4d2df; font-size: 9px; font-weight: 700; }
.control-button:hover,.control-button.active { background: #ffffff10; color: #fff; }
.control-button.off { background: #a93843; color: #fff; }
.control-button:disabled { opacity: .4; background: transparent; color: #8291a0; }
.control-icon { display: grid; min-width: 36px; height: 30px; padding: 0 7px; place-items: center; border: 1px solid #ffffff17; border-radius: 9px; background: #ffffff08; font-size: 9px; letter-spacing: .02em; }
.leave-control { margin-left: 10px; background: #da4650; color: white; }
.leave-control:hover { background: #ee515b; }

.in-meeting { overflow: hidden; background: #06101c; }
.in-meeting .shell { display: block; min-height: 100vh; padding: 0; }
.in-meeting .brand { display: none; }
.in-meeting .meeting-card { width: 100%; height: 100vh; max-width: none; padding: 0; border: 0; border-radius: 0; background: #06101c; box-shadow: none; }
.in-meeting .meeting-card > * { display: none !important; }
.in-meeting .meeting-card > .meeting-stage { display: block !important; height: 100vh; margin: 0; }
.in-meeting .conference-app { display: grid; height: 100vh; grid-template-rows:auto 1fr auto; border: 0; border-radius: 0; }
.in-meeting .conference-body,.in-meeting .video-grid { min-height: 0; }
.in-meeting .prejoin-actions { display: none; }
.in-meeting #meeting-status { position: fixed; z-index: 12; top: 78px; left: 50%; margin: 0; padding: 8px 12px; border: 1px solid #ffffff13; border-radius: 9px; background: #071321d9; color: #a9bac9; transform: translateX(-50%); backdrop-filter: blur(8px); }

@media (max-width: 760px) {
  .conference-header { min-height: 62px; padding: 10px 12px; }
  .conference-identity span,.secure-badge,.secondary-tools { display: none; }
  .conference-meta { gap: 4px; }
  .conference-meta > span { padding: 6px; }
  .conference-body,.video-grid { min-height: 340px; }
  .local-tile { right: 10px; bottom: 10px; width: 120px; }
  .meeting-panel { position: absolute; inset: 0 0 0 auto; width: min(86vw,320px); }
  .meeting-toolbar { min-height: 72px; gap: 5px; padding: 7px; }
  .toolbar-group { gap: 2px; }
  .control-button { width: 55px; min-height: 52px; }
  .leave-control { margin-left: 2px; }
  .prejoin-actions { display: grid; }
  .prejoin-actions button { width: 100%; }
}
