:root {
  color-scheme: light;
  --ink: #18212b;
  --muted: #667282;
  --subtle: #8a96a5;
  --line: #d8e0e8;
  --line-strong: #c4ced9;
  --panel: #ffffff;
  --wash: #f5f7fa;
  --wash-strong: #edf2f6;
  --accent: #2456e6;
  --accent-strong: #173da8;
  --accent-soft: #eaf0ff;
  --blue: #2456e6;
  --focus: #d59b2d;
  --danger-soft: #fbf0dc;
  --shadow: 0 18px 48px rgba(31, 44, 58, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--wash);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    linear-gradient(180deg, #eef3ff 0, rgba(245, 247, 250, 0) 280px),
    var(--wash);
}

body.admin-open {
  overflow-x: hidden;
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 8px 0 6px;
}

.topnav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 850;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  display: block;
  width: auto;
  height: 38px;
  object-fit: contain;
}

.brand-logo.large {
  height: 58px;
}

.admin-header-logo {
  height: 48px;
}

.admin-toolbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-toggle {
  display: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 900;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.booking-topnav .nav-links {
  display: none;
}

.nav-links a {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 13px;
  background: rgba(255, 255, 255, 0.82);
}

.nav-links a:hover {
  border-color: var(--line-strong);
  background: #ffffff;
}

.shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.62fr) minmax(620px, 1.38fr);
  gap: 0;
  width: min(1280px, calc(100vw - 32px));
  margin: 8px auto 42px;
}

.shell:has(.admin) {
  width: min(1680px, calc(100vw - 32px));
  min-height: calc(100vh - 40px);
  margin-bottom: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.shell > .panel + .panel {
  border-left: 0;
}

.intro {
  position: sticky;
  top: 18px;
  align-self: start;
  min-height: 760px;
  padding: 34px;
  box-shadow: 0 10px 34px rgba(31, 44, 58, 0.08);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.brand {
  width: fit-content;
  padding: 7px 10px;
  color: var(--accent-strong);
  border: 1px solid rgba(36, 86, 230, 0.22);
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 850;
}

h1 {
  margin: 54px 0 16px;
  font-size: clamp(34px, 4.8vw, 56px);
  line-height: 1.06;
  letter-spacing: 0;
}

h2 {
  margin: 4px 0 0;
  font-size: 24px;
  letter-spacing: 0;
}

h3 {
  letter-spacing: 0;
}

p {
  line-height: 1.75;
}

.intro p {
  color: var(--muted);
  font-size: 15px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.meta span {
  padding: 8px 10px;
  border-radius: 7px;
  color: #23313f;
  background: var(--wash-strong);
  font-size: 12px;
  font-weight: 850;
}

.meeting-summary {
  display: grid;
  gap: 0;
  margin: 34px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.meeting-summary div {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  padding: 14px 16px;
  background: #ffffff;
}

.meeting-summary div + div {
  border-top: 1px solid var(--line);
}

.meeting-summary dt {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 850;
}

.meeting-summary dd {
  margin: 0;
  color: var(--ink);
  font-weight: 850;
}

.booking {
  padding: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  max-height: calc(100vh - 120px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.booking > .toolbar {
  margin: 0;
  padding: 28px 28px 22px;
  border-bottom: 1px solid var(--line);
}

.booking > .status {
  margin: 22px 22px 0;
}

.booking.booking-completed > .toolbar {
  display: none;
}

.booking.booking-completed {
  display: grid;
  align-content: center;
}

.admin {
  grid-column: 1 / -1;
  padding: 0;
  overflow: hidden;
  min-height: calc(100vh - 40px);
}

.admin > .toolbar {
  margin: 0;
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.admin > .status {
  margin: 18px 28px 0;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
}

.toolbar.compact {
  margin-bottom: 12px;
}

.toolbar.compact h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.eyebrow {
  margin: 0;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 850;
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

button.secondary,
#reload,
#reload-admin,
.mobile-menu-toggle {
  color: var(--ink);
  background: var(--wash-strong);
}

button.secondary:hover,
#reload:hover,
#reload-admin:hover,
.mobile-menu-toggle:hover {
  background: #dfe8ef;
}

#reload,
#reload-admin,
.mobile-menu-toggle {
  width: 44px;
  padding: 0;
  font-size: 22px;
}

#export-csv {
  width: auto;
  padding: 0 14px;
  font-size: 13px;
}

.status {
  padding: 14px 16px;
  color: var(--muted);
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.slots {
  display: grid;
  gap: 14px;
}

.calendar-picker {
  margin: 0;
}

.schedule-card {
  display: grid;
  gap: 18px;
  padding: 22px 22px 28px;
  background: #ffffff;
  min-width: 0;
  overflow-x: auto;
}

.schedule-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  background: #ffffff;
}

.schedule-connection {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.schedule-connection span {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  color: #ffffff;
  background: #2f7be8;
  font-size: 12px;
}

.schedule-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.timezone-label {
  margin-right: 8px;
  color: #495665;
  font-size: 13px;
  font-weight: 750;
}

.schedule-nav,
.schedule-today {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 7px;
}

.schedule-nav {
  width: 38px;
  padding: 0;
  font-size: 22px;
}

.schedule-month {
  margin: 0;
  font-size: 20px;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(var(--schedule-days), minmax(104px, 1fr));
  gap: 8px 14px;
  overflow: visible;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.schedule-date {
  position: sticky;
  top: 56px;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 104px;
  padding: 6px 0 18px;
  background: #ffffff;
  color: #555f6c;
  font-weight: 850;
}

.schedule-date strong {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 19px;
}

.schedule-date.active strong {
  color: #ffffff;
  background: #2f7be8;
}

.schedule-date span {
  font-size: 13px;
}

.schedule-slot {
  min-width: 104px;
  min-height: 56px;
  border: 1px solid #1f65ff;
  border-radius: 7px;
  background: #ffffff;
  color: #1061ff;
  font-size: 17px;
  font-weight: 900;
}

.schedule-slot:hover,
.schedule-slot.active {
  background: #eaf1ff;
}

.schedule-slot:disabled {
  border-color: #eceff3;
  background: #eeeeef;
  color: #b9bdc3;
  cursor: default;
  opacity: 1;
}

.schedule-empty {
  padding: 28px;
  color: var(--muted);
  background: #f8fafc;
  border-radius: 8px;
  text-align: center;
  font-weight: 750;
}

.calendar-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.calendar-head {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.calendar-head h3 {
  margin: 0;
  text-align: center;
  font-size: 18px;
}

.calendar-nav {
  width: 44px;
  padding: 0;
  font-size: 24px;
}

.calendar-week,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-week {
  padding: 10px 12px 0;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.calendar-grid {
  gap: 6px;
  padding: 12px;
}

.calendar-day {
  display: grid;
  gap: 3px;
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 4px;
  color: var(--ink);
  background: #ffffff;
  text-align: center;
}

.calendar-day strong {
  font-size: 16px;
}

.calendar-day span {
  min-height: 16px;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
}

.calendar-day:hover,
.calendar-day.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.calendar-day:disabled {
  color: #b6c0ca;
  background: #f8fafb;
  cursor: default;
  opacity: 1;
}

.calendar-day:disabled span {
  color: transparent;
}

.time-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.time-panel-head {
  margin-bottom: 12px;
}

.time-panel-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.day {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.day:first-of-type {
  padding-top: 2px;
}

.day-title {
  position: sticky;
  top: 20px;
  margin: 0;
  color: #334253;
  font-size: 14px;
  font-weight: 900;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 9px;
}

.slot {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--accent-strong);
  background: #ffffff;
  text-align: center;
  font-weight: 900;
}

.slot:hover,
.slot.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.booking > .form {
  margin: 0 22px 28px;
  padding-top: 22px;
}

.selected,
.complete {
  padding: 16px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 900;
}

.booking.booking-completed .complete {
  justify-self: center;
  width: min(520px, calc(100% - 44px));
  padding: 28px;
  text-align: left;
}

.complete h3 {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 20px;
  text-align: center;
}

.complete p {
  margin: 0;
  color: #334253;
  font-weight: 750;
  line-height: 1.65;
  text-align: center;
}

.complete-details {
  display: grid;
  gap: 0;
  margin: 20px 0 0;
  border: 1px solid rgba(36, 86, 230, 0.18);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.complete-details div {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 12px;
  padding: 12px 14px;
}

.complete-details div + div {
  border-top: 1px solid var(--line);
}

.complete-details dt {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 900;
}

.complete-details dd {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.complete-warning {
  margin-top: 14px !important;
  color: #765d24 !important;
}

.complete-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.7;
}

.complete a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 18px;
  border-radius: 7px;
  background: #ffffff;
  color: var(--accent-strong);
  font-weight: 900;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 7px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

.button-link:hover {
  background: var(--accent-strong);
}

.meeting-room {
  grid-column: 1 / -1;
  width: min(1280px, calc(100vw - 32px));
  margin: 0 auto;
  overflow: hidden;
}

.meeting-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
}

.meeting-stage {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(520px, 1fr) minmax(260px, 0.32fr);
  gap: 24px;
  padding: 28px;
}

.meeting-copy {
  display: grid;
  align-content: start;
  gap: 18px;
}

.meeting-copy h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
}

.meeting-copy p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.prejoin-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
}

.prejoin-preview {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border-radius: 8px;
  background: #101820;
}

.prejoin-preview video {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #101820;
}

#preview-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #d7dee8;
  font-weight: 900;
}

.prejoin-preview.has-video #preview-placeholder {
  display: none;
}

.prejoin-grid {
  display: grid;
  gap: 10px;
}

.prejoin-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.prejoin-grid select {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 850;
}

.prejoin-grid input {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 850;
}

.prejoin-actions {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 2;
  display: inline-flex;
  grid-template-columns: none;
  gap: 8px;
  transform: translateX(-50%);
}

.prejoin-actions button {
  min-width: 0;
  padding-inline: 0;
}

.prejoin-icon-button {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.94);
  color: #111827;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

.prejoin-icon-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.prejoin-icon-button.is-active {
  color: #ffffff;
  background: #1f2937;
}

.meeting-room:has(#prejoin-panel:not(.hidden)) {
  width: min(1520px, calc(100vw - 28px));
  min-height: calc(100vh - 28px);
  background: #ffffff;
  box-shadow: none;
}

.meeting-room:has(#prejoin-panel:not(.hidden)) .meeting-header {
  border-bottom: 0;
  padding: 22px 28px 10px;
}

.meeting-room:has(#prejoin-panel:not(.hidden)) .meeting-stage {
  display: grid;
  grid-template-columns: minmax(560px, 740px) minmax(280px, 360px);
  grid-template-rows: 1fr auto auto 1fr;
  gap: clamp(44px, 6vw, 96px);
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 92px);
  padding: 0 48px 42px;
}

.meeting-room:has(#prejoin-panel:not(.hidden)) .meeting-copy {
  display: contents;
}

.meeting-room:has(#prejoin-panel:not(.hidden)) .meeting-copy .eyebrow,
.meeting-room:has(#prejoin-panel:not(.hidden)) #meeting-status {
  display: none;
}

.meeting-room:has(#prejoin-panel:not(.hidden)) #meeting-title {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  margin: 0 0 32px;
  text-align: center;
  color: #202124;
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 500;
  line-height: 1.25;
}

.meeting-room:has(#prejoin-panel:not(.hidden)) #join-meeting {
  grid-column: 2;
  grid-row: 3;
  align-self: start;
  justify-self: center;
  width: min(100%, 300px);
  min-height: 56px;
  border-radius: 999px;
  background: #1a73e8;
  font-size: 15px;
  font-weight: 700;
}

.meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-panel {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: center;
  width: 100%;
  gap: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-preview {
  aspect-ratio: 16 / 9;
  min-height: 0;
  border-radius: 14px;
  background: #111827;
}

.meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-preview video {
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-grid label:first-child {
  grid-column: 1 / -1;
}

.meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-grid label {
  gap: 5px;
  font-size: 11px;
}

.meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-grid select,
.meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-grid input {
  height: 38px;
  border-radius: 999px;
  font-size: 13px;
}

.meeting-room:has(#prejoin-panel:not(.hidden)) .meeting-videos,
.meeting-room:has(#prejoin-panel:not(.hidden)) .meeting-side {
  display: none;
}

.meeting-videos {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 0;
  max-height: min(72vh, 760px);
  border-radius: 10px;
  overflow: hidden;
  background: #101820;
}

.meeting-videos.content-sharing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 300px);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px 12px 82px;
}

.remote-video-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  padding: 10px;
  background: #101820;
}

.meeting-videos.content-sharing .remote-video-grid {
  position: relative;
  inset: auto;
  z-index: 3;
  grid-column: 2;
  grid-row: 1;
  width: auto;
  max-height: none;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 10px;
  padding: 0;
  overflow: auto;
  background: transparent;
  pointer-events: auto;
}

.remote-video-tile {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  background: #101820;
  border-radius: 8px;
  cursor: pointer;
  transition:
    box-shadow 0.16s ease,
    outline-color 0.16s ease;
}

.meeting-videos.content-sharing .remote-video-tile {
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 0;
  border: 2px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

.remote-video-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  color: #d7dee8;
  text-align: center;
  font-weight: 900;
}

.remote-video-off-tile {
  display: grid;
  place-items: center;
  gap: 14px;
  min-height: 180px;
  border-radius: 14px;
  padding: 22px;
  background: linear-gradient(135deg, #7f1d1d, #431407);
  color: #ffffff;
  text-align: center;
  font-weight: 900;
}

.remote-video-off-tile .participant-avatar {
  width: 58px;
  height: 58px;
  background: #dc2626;
  font-size: 20px;
}

.remote-video-off-tile strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remote-video-off-tile span:last-child {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.meeting-videos.content-sharing .remote-video-off-tile {
  aspect-ratio: 16 / 9;
  min-height: 0;
  border: 2px solid rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.meeting-videos.content-sharing .remote-video-off-tile .participant-avatar {
  width: 42px;
  height: 42px;
  font-size: 16px;
}

.remote-video-tile.is-speaking,
#local-video.is-speaking {
  outline: 3px solid #34d399;
  outline-offset: 2px;
  box-shadow:
    0 0 0 7px rgba(52, 211, 153, 0.2),
    0 18px 36px rgba(0, 0, 0, 0.28);
}

.active-speaker-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  max-width: min(420px, calc(100% - 28px));
  overflow: hidden;
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(15, 23, 42, 0.82);
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

#content-share-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  background: #101820;
  cursor: pointer;
}

.meeting-videos.content-sharing #content-share-video {
  position: relative;
  inset: auto;
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: #0f1720;
}

#local-video {
  position: absolute;
  right: 18px;
  bottom: 82px;
  z-index: 2;
  width: 220px;
  height: 132px;
  min-height: 0;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  cursor: pointer;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.meeting-videos.content-sharing #local-video {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 3;
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

#local-video.hidden-self-video {
  display: none;
}

.meeting-videos.main-local #local-video {
  inset: 10px;
  z-index: 1;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  border-color: transparent;
}

.meeting-videos.main-local .remote-video-grid {
  inset: auto 18px 82px auto;
  z-index: 2;
  width: 220px;
  height: 132px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.meeting-videos.main-local .remote-video-tile {
  border-radius: 0;
}

.meeting-controls {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 6;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  margin: 0;
  border-radius: 999px;
  padding: 8px;
  background: rgba(17, 24, 39, 0.94);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

.meeting-control-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 0;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: #2d3748;
  color: #ffffff;
  font-weight: 900;
}

.meeting-control-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.meeting-control-button:hover {
  background: #3c485c;
}

.meeting-control-button.is-active {
  background: #2858e6;
}

.meeting-control-button.is-muted {
  background: #fee2e2;
  color: #7f1d1d;
}

.meeting-control-button.is-muted::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
}

.meeting-control-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.meeting-control-button.is-unsupported {
  opacity: 0.72;
}

.meeting-control-button.is-unsupported::before {
  content: "";
  position: absolute;
  width: 26px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
}

.meeting-control-danger {
  width: 62px;
  background: #ef4444;
}

.meeting-control-danger:hover {
  background: #dc2626;
}

.meeting-quick-actions {
  position: absolute;
  right: 18px;
  bottom: 24px;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 10px;
}

.meeting-quick-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.92);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

.meeting-quick-button:hover,
.meeting-quick-button.is-active {
  background: #3b82f6;
}

.meeting-quick-button::after {
  content: attr(data-label);
  position: absolute;
  right: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(50%) translateY(4px);
  z-index: 2;
  display: block;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.94);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.meeting-quick-button:hover::after,
.meeting-quick-button:focus-visible::after,
.meeting-quick-button.is-active::after {
  opacity: 1;
  transform: translateX(50%) translateY(0);
}

.meeting-quick-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.meeting-quick-button span {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  padding-inline: 6px;
  color: var(--accent-strong);
  background: #dbeafe;
  font-size: 12px;
  font-weight: 900;
}

.meeting-settings-panel {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 86px;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(12px);
}

.meeting-settings-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.meeting-settings-panel select {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-weight: 850;
}

.meeting-side {
  display: grid;
  align-content: start;
  gap: 12px;
}

.meeting-info-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #ffffff;
}

.meeting-room:has(#meeting-controls:not(.hidden)) {
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #101010;
  box-shadow: none;
}

.meeting-room:has(#meeting-controls:not(.hidden)) .meeting-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 8;
  min-height: 64px;
  border: 0;
  padding: 12px 22px;
  background: linear-gradient(180deg, rgba(16, 16, 16, 0.82), rgba(16, 16, 16, 0));
}

.meeting-room:has(#meeting-controls:not(.hidden)) .meeting-header .brand-logo {
  height: 42px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.meeting-room:has(#meeting-controls:not(.hidden)) #leave-meeting {
  display: none;
}

.meeting-room:has(#meeting-controls:not(.hidden)) .meeting-stage {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  min-height: 100vh;
  padding: 70px 18px 18px;
  background: #101010;
}

.meeting-room:has(#meeting-controls:not(.hidden)) .meeting-copy {
  display: none;
}

.meeting-room:has(#meeting-controls:not(.hidden)) .meeting-copy h1 {
  font-size: clamp(28px, 3vw, 46px);
  line-height: 1.08;
}

.meeting-room:has(#meeting-controls:not(.hidden)) .meeting-copy p:not(.eyebrow) {
  font-size: 14px;
}

.meeting-room:has(#meeting-controls:not(.hidden)) .meeting-videos {
  grid-column: 1;
  align-self: stretch;
  width: 100%;
  height: calc(100vh - 88px);
  max-height: none;
  border-radius: 18px;
  background: #111111;
}

.meeting-room:has(#meeting-controls:not(.hidden)) .meeting-videos.has-multiple-participants:not(.content-sharing) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-content: center;
  gap: 14px;
  padding: 14px 14px 94px;
}

.meeting-room:has(#meeting-controls:not(.hidden)) .meeting-videos.has-multiple-participants:not(.content-sharing) .remote-video-grid {
  display: contents;
  position: static;
  inset: auto;
  padding: 0;
  background: transparent;
}

.meeting-room:has(#meeting-controls:not(.hidden)) .meeting-videos.has-multiple-participants:not(.content-sharing) #local-video {
  position: static;
  width: 100%;
  height: 100%;
  min-height: 260px;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
}

.meeting-room:has(#meeting-controls:not(.hidden)) .meeting-videos.has-multiple-participants:not(.content-sharing) .remote-video-tile,
.meeting-room:has(#meeting-controls:not(.hidden)) .meeting-videos.has-multiple-participants:not(.content-sharing) .remote-video-off-tile {
  min-height: 260px;
  border-radius: 16px;
}

.meeting-room:has(#meeting-controls:not(.hidden)) .meeting-videos.content-sharing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px 14px 96px;
}

.meeting-room:has(#meeting-controls:not(.hidden)) .meeting-videos.content-sharing #content-share-video {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
  border-radius: 16px;
}

.meeting-room:has(#meeting-controls:not(.hidden)) .meeting-videos.content-sharing .remote-video-grid {
  position: relative;
  inset: auto;
  width: auto;
  max-height: none;
  overflow: auto;
}

.meeting-room:has(#meeting-controls:not(.hidden)) .meeting-videos.content-sharing #local-video {
  position: relative;
  inset: auto;
  width: 100%;
}

.meeting-room:has(#meeting-controls:not(.hidden)) .meeting-info-card {
  padding: 12px;
}

.meeting-room:has(#meeting-controls:not(.hidden)) .meeting-side {
  position: absolute;
  right: 22px;
  bottom: 86px;
  z-index: 9;
  width: min(360px, calc(100vw - 44px));
  align-content: start;
  max-height: calc(100vh - 146px);
  overflow-y: auto;
  border-radius: 18px;
  padding: 0;
  background: transparent;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.meeting-room:has(#meeting-controls:not(.hidden)) .meeting-side.hidden {
  display: none;
}

.meeting-side[data-panel="participants"] .meeting-info-card:not(.meeting-participants-card),
.meeting-side[data-panel="chat"] .meeting-info-card:not(.meeting-chat-card),
.meeting-side[data-panel="minutes"] .meeting-info-card:not(.meeting-minutes-card),
.meeting-side[data-panel="analysis"] .meeting-info-card:not(.meeting-analysis-card),
.meeting-side[data-panel="booking"] .meeting-info-card:not(.meeting-next-booking-card) {
  display: none;
}

.meeting-room:has(#meeting-controls:not(.hidden)) .chat-card {
  min-height: min(38vh, 360px);
}

.meeting-room:has(#meeting-controls:not(.hidden)) .meeting-minutes-card {
  min-height: min(46vh, 430px);
}

.meeting-auto-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
}

.meeting-minutes-summary {
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--wash-strong);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
  white-space: pre-wrap;
}

.meeting-minutes-summary.is-empty {
  color: var(--muted);
}

.meeting-minutes-list {
  display: grid;
  gap: 8px;
  max-height: min(30vh, 260px);
  overflow: auto;
}

.meeting-minute {
  display: grid;
  gap: 5px;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fafc;
}

.meeting-minute span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.meeting-minute strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.meeting-minutes-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.meeting-minutes-form input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.meeting-minutes-form button,
.meeting-minutes-summary-button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.meeting-minutes-summary-button {
  width: 100%;
  margin-top: 8px;
  background: var(--wash);
  color: var(--accent-strong);
}

.meeting-analysis-output,
.meeting-next-booking-detail {
  border-radius: 10px;
  padding: 12px;
  background: var(--wash-strong);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.meeting-analysis-output.is-empty {
  color: var(--muted);
}

.meeting-analysis-block {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.meeting-analysis-block:last-child {
  margin-bottom: 0;
}

.meeting-analysis-block strong {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.meeting-analysis-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.meeting-next-booking-detail {
  display: grid;
  gap: 6px;
}

.meeting-next-booking-detail strong {
  font-size: 14px;
}

.meeting-next-booking-detail span {
  color: var(--muted);
}

.meeting-action-links {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.meeting-panel-link {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
}

.meeting-panel-link.secondary {
  background: var(--wash);
  color: var(--accent-strong);
}

.meeting-panel-link.is-disabled {
  pointer-events: none;
  opacity: 0.55;
}

.meeting-info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.meeting-info-head strong {
  color: var(--ink);
  font-size: 14px;
}

.meeting-info-head span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--accent-strong);
  background: var(--wash-strong);
  font-size: 12px;
  font-weight: 900;
}

#meeting-quality[data-level="good"] {
  color: #047857;
  background: #dff7ec;
}

#meeting-quality[data-level="warn"] {
  color: #9a5b00;
  background: #fff2cc;
}

#meeting-quality[data-level="bad"] {
  color: #b42318;
  background: #ffe5e5;
}

#meeting-live-status,
.meeting-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

.participant-list {
  display: grid;
  gap: 8px;
}

.participant-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.participant-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--accent);
  font-size: 14px;
  font-weight: 900;
}

.participant-row-share .participant-avatar {
  background: #334155;
}

.participant-row div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.participant-row strong,
.participant-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-row strong {
  color: var(--ink);
  font-size: 14px;
}

.participant-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chat-card {
  min-height: 270px;
}

.chat-messages {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 150px;
  max-height: 230px;
  overflow-y: auto;
}

.chat-message {
  display: grid;
  gap: 3px;
  border-radius: 8px;
  padding: 9px 10px;
  background: #f3f6fb;
}

.chat-message.self {
  background: var(--wash-strong);
}

.chat-message strong {
  color: var(--subtle);
  font-size: 11px;
}

.chat-message span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.chat-form input {
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
}

.chat-form button {
  min-height: 42px;
  padding-inline: 14px;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 40px;
  border-radius: 7px;
  padding: 0 14px;
  color: var(--accent-strong);
  background: var(--wash-strong);
  font-weight: 900;
  text-decoration: none;
}

.booking-list {
  display: grid;
  gap: 12px;
}

.booking-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.booking-table {
  width: 100%;
  min-width: 1240px;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: auto;
}

.booking-table th,
.booking-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.booking-table th {
  color: var(--muted);
  background: #fbfcfd;
  font-size: 12px;
  font-weight: 900;
}

.booking-table tr:last-child td {
  border-bottom: 0;
}

.booking-table td:nth-child(2),
.booking-table td:nth-child(5),
.booking-table td:nth-child(8) {
  white-space: normal;
  overflow-wrap: anywhere;
}

.booking-table .booking-history-cell {
  min-width: 150px;
  white-space: normal;
  overflow-wrap: normal;
}

.booking-history-line {
  display: block;
  white-space: nowrap;
  line-height: 1.55;
}

.booking-history-line + .booking-history-line {
  margin-top: 3px;
}

.booking-table button {
  min-height: 36px;
  padding: 0 12px;
}

.booking-row {
  cursor: pointer;
}

.booking-row td {
  transition: background-color 0.15s ease;
}

.booking-row:hover td,
.booking-row.is-active td {
  background: #f6f8ff;
}

.booking-detail-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.booking-detail-panel.hidden {
  display: none;
}

.booking-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.booking-detail-head h4 {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
}

.booking-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.booking-detail-cell {
  min-width: 0;
  padding: 13px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.booking-detail-cell:nth-child(4n) {
  border-right: 0;
}

.booking-detail-cell:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.booking-detail-cell span,
.booking-detail-list-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.booking-detail-cell span {
  margin-bottom: 6px;
}

.booking-detail-cell strong,
.booking-detail-list-row strong {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.booking-detail-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.booking-detail-section h5 {
  margin: 0;
  font-size: 16px;
}

.booking-detail-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
}

.booking-detail-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.booking-detail-section-head span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--wash-strong);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.booking-detail-list {
  display: grid;
}

.booking-detail-list-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.booking-detail-list-row:first-child {
  border-top: 0;
}

.booking-minutes-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 14px;
}

.booking-minutes-stack {
  display: grid;
  gap: 12px;
  align-content: start;
}

.booking-summary-box,
.booking-transcript-list {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.booking-summary-box p {
  margin: 8px 0 0;
  color: var(--text);
  line-height: 1.7;
}

.booking-detail-meta {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.booking-analysis-block {
  margin-top: 12px;
}

.booking-analysis-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.booking-transcript-list {
  display: grid;
  gap: 10px;
  align-content: start;
  max-height: 420px;
  overflow: auto;
}

.booking-transcript-entry {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.booking-transcript-entry:first-of-type {
  border-top: 0;
}

.booking-transcript-entry span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.booking-transcript-entry p {
  margin: 0;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.booking-item {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1.4fr) auto;
  gap: 14px;
  align-items: center;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.booking-time {
  font-weight: 900;
}

.booking-person {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.booking-person strong {
  color: var(--ink);
  font-size: 15px;
}

.booking-person span {
  overflow-wrap: anywhere;
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.guest-detail {
  display: grid;
  gap: 14px;
  padding: 24px;
}

#guest-booking-panel {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(720px, 100%);
  max-height: none;
  overflow: hidden;
  border-radius: 10px;
}

#guest-booking-panel > .toolbar {
  padding: 28px 28px 24px;
  border-bottom: 1px solid var(--line);
}

#guest-booking-panel > .status {
  margin: 18px 24px 0;
}

.guest-summary-card {
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--accent-soft);
}

.guest-summary-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
}

.guest-summary-card strong {
  color: var(--accent-strong);
  font-size: 18px;
  line-height: 1.5;
}

.guest-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.guest-actions button {
  width: 100%;
}

.detail-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.detail-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-value {
  font-weight: 850;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 900;
}

.badge.cancelled {
  color: #765d24;
  background: var(--danger-soft);
}

.admin-workspace {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: calc(100vh - 152px);
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: #f9fbfd;
}

.side-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 14px;
  border-bottom: 1px solid var(--line);
}

.side-title strong {
  font-size: 15px;
}

.admin-main {
  padding: 24px 28px 28px;
  background: var(--wash);
  min-width: 0;
}

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

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-head h3 {
  margin: 4px 0 0;
  font-size: 22px;
}

.section-head.embedded {
  margin: 2px 0 0;
}

.section-head.embedded h3 {
  font-size: 18px;
}

.tab-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 42px;
  border-radius: 7px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.tab-button:hover,
.tab-button.active {
  color: var(--accent-strong);
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

.side-logout {
  margin-top: auto;
  width: 100%;
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.active {
  display: block;
}

.page-card-list {
  display: grid;
  gap: 12px;
}

.page-scope-tabs {
  display: flex;
  width: fit-content;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.scope-button {
  min-height: 34px;
  border-radius: 6px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
}

.scope-button.active {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.page-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #ffffff;
  min-width: 0;
}

.page-card h4 {
  margin: 8px 0 6px;
  font-size: 18px;
}

.page-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.page-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 900;
}

.page-status.paused {
  color: #765d24;
  background: var(--danger-soft);
}

.page-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.page-card-meta span {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  overflow-wrap: anywhere;
  white-space: normal;
}

.page-card-actions {
  display: flex;
  gap: 8px;
}

.settings-form {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.login-only {
  display: grid;
  place-items: center;
  min-height: 420px;
  margin: 0;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}

.availability-grid {
  grid-template-columns: minmax(360px, 1.25fr) minmax(220px, 0.75fr);
  align-items: end;
}

.page-header-controls {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 92px auto;
  gap: 12px;
  align-items: end;
  min-width: min(560px, 100%);
}

.page-header-controls .readonly-field strong,
.page-header-controls .icon-link {
  min-height: 44px;
}

.page-header-controls .check-row {
  min-height: 44px;
  padding: 0 10px;
  white-space: nowrap;
}

.event-edit-content {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.setting-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  scroll-margin-top: 18px;
}

.setting-section-head {
  display: grid;
  gap: 2px;
}

.setting-section-head h3 {
  margin: 0;
  font-size: 18px;
}

.readonly-field {
  display: grid;
  gap: 7px;
  color: #334253;
  font-size: 14px;
  font-weight: 850;
}

.readonly-field strong,
.icon-link {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 13px;
  background: #ffffff;
}

.readonly-field strong {
  display: flex;
  align-items: center;
  overflow-wrap: anywhere;
}

.readonly-field.compact {
  max-width: 92px;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  text-decoration: none;
}

.icon-link:hover {
  border-color: var(--focus);
  color: var(--focus);
}

.member-picker {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 0;
  border-radius: 10px;
  background: #ffffff;
}

.member-head {
  display: grid;
  gap: 10px;
}

.member-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.required-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #df2f6d;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.optional-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #8f98a3;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.condition-box {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.radio-stack {
  display: grid;
  gap: 12px;
}

.radio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
}

.radio-row input {
  width: auto;
}

.assignment-setting {
  display: grid;
  gap: 8px;
  max-width: 260px;
}

.assignment-setting small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.6;
}

.member-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.member-row {
  display: grid;
  grid-template-columns: 64px 40px minmax(0, 1fr) minmax(320px, 1.2fr) 78px 42px;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  cursor: grab;
  transition:
    background 0.15s ease,
    opacity 0.15s ease,
    transform 0.15s ease;
}

.member-row:hover {
  background: #fbfcff;
}

.member-row.dragging {
  cursor: grabbing;
  opacity: 0.45;
  transform: scale(0.995);
}

.member-row button {
  cursor: pointer;
}

.member-priority {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  background: #eef3fb;
  color: #234669;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.member-order-actions {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.member-order-actions button {
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.member-order-actions button:last-child {
  border-right: 0;
}

.member-order-actions button:disabled {
  cursor: not-allowed;
  color: #b7c0cb;
  background: #f6f8fb;
}

.member-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #c83812;
  color: #ffffff;
  font-weight: 900;
}

.member-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.member-main strong,
.member-main small {
  overflow-wrap: anywhere;
}

.member-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.member-working-settings {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.member-business-hours {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-width: 0;
}

.member-business-hours label {
  gap: 5px;
  font-size: 12px;
}

.member-business-hours select {
  min-height: 38px;
  padding: 8px 10px;
}

.member-business-days {
  display: grid;
  gap: 6px;
}

.member-business-days small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.day-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.day-chip {
  position: relative;
  display: inline-flex;
}

.day-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.day-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #536273;
  font-size: 12px;
  font-weight: 900;
}

.day-chip input:checked + span {
  border-color: #2458ee;
  background: #e8efff;
  color: #0b3fb8;
}

.icon-danger {
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #66707d;
  font-size: 24px;
  line-height: 1;
}

.icon-danger:hover {
  color: #c83812;
  background: #f6f8fb;
}

.settings-form.admin-tab-panel {
  display: none;
}

.settings-form.admin-tab-panel.active {
  display: grid;
}

.check-row,
.mini-check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input,
.mini-check input {
  width: auto;
}

.field-builder {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.field-list {
  display: grid;
  gap: 10px;
}

.field-row {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) 140px 88px auto;
  gap: 10px;
  align-items: center;
  border-radius: 8px;
  transition:
    background 0.15s ease,
    opacity 0.15s ease,
    transform 0.15s ease;
}

.field-row:hover {
  background: #fbfcff;
}

.field-row.dragging {
  opacity: 0.5;
  transform: scale(0.995);
}

.field-order-controls {
  display: inline-grid;
  grid-template-columns: 28px 34px 34px;
  gap: 6px;
  align-items: center;
}

.drag-handle {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 34px;
  color: var(--subtle);
  cursor: grab;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.field-order-controls button {
  min-width: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--ink);
  background: var(--wash-strong);
}

.field-order-controls button:hover {
  background: #dfe8ef;
}

.field-order-controls button:disabled {
  cursor: default;
}

.field-row button {
  min-width: 72px;
}

.field-row .field-order-controls button {
  min-width: 0;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.location-detail-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.location-detail-note {
  line-height: 1.45;
}

.integration-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.sync-status-row {
  margin-top: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.status-pill.success {
  color: #047857;
  background: #d1fae5;
}

.settings-advanced {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.settings-advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
  font-weight: 900;
  color: var(--ink);
  list-style: none;
}

.settings-advanced summary::-webkit-details-marker {
  display: none;
}

.settings-advanced summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.settings-advanced[open] summary::after {
  transform: rotate(-135deg);
}

.settings-advanced-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--line);
}

.settings-advanced .calendar-sync-row {
  margin-top: 14px;
}

.calendar-sync-row {
  margin-top: 12px;
}

.operation-log-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.operation-log-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.operation-log-list {
  display: grid;
  gap: 10px;
}

.operation-log-item {
  border: 1px solid var(--line);
  border-left: 4px solid #94a3b8;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.operation-log-item.error {
  border-left-color: #ef4444;
  background: #fff7f7;
}

.operation-log-item.warning {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.operation-log-item.info {
  border-left-color: #2563eb;
  background: #f8fbff;
}

.operation-log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.operation-log-message {
  margin: 0;
  font-weight: 900;
  color: var(--ink);
}

.operation-log-detail {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

.analytics-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.analytics-card,
.analytics-panel,
.analytics-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.analytics-card {
  padding: 16px;
}

.analytics-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.analytics-card strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 26px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.analytics-panel {
  padding: 16px;
}

.analytics-panel h4 {
  margin: 0 0 12px;
  font-size: 16px;
}

.analytics-list {
  display: grid;
  gap: 10px;
}

.analytics-row {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.analytics-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 900;
}

.analytics-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.analytics-section-title {
  margin-top: 16px;
}

.analytics-section-title:first-child {
  margin-top: 0;
}

.analytics-section-title h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.analytics-section-title p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.analytics-note {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
  font-weight: 800;
}

.analytics-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.analytics-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.analytics-table th,
.analytics-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.analytics-table tr:last-child td {
  border-bottom: 0;
}

.analytics-table th {
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  font-weight: 900;
}

.analytics-table td {
  font-size: 14px;
  font-weight: 800;
}

.calendar-agenda {
  display: grid;
  gap: 12px;
}

.agenda-head {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.calendar-event-list {
  display: grid;
  gap: 10px;
}

.admin-calendar {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.admin-calendar-toolbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 980px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.admin-calendar-title {
  display: grid;
  gap: 3px;
}

.admin-calendar-title strong {
  font-size: 20px;
}

.admin-calendar-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.admin-calendar-controls {
  display: flex;
  gap: 8px;
}

.admin-calendar-controls button {
  min-width: 44px;
  min-height: 36px;
  padding: 0 12px;
}

.admin-calendar-grid {
  display: grid;
  grid-template-columns: 64px repeat(7, minmax(128px, 1fr));
  min-width: 980px;
}

.calendar-corner,
.calendar-date-head {
  position: sticky;
  top: 69px;
  z-index: 3;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.calendar-corner {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.calendar-date-head {
  display: grid;
  place-items: center;
  gap: 2px;
  border-left: 1px solid var(--line);
  color: var(--muted);
}

.calendar-date-head strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 20px;
}

.calendar-date-head span {
  font-size: 12px;
  font-weight: 900;
}

.calendar-date-head.today strong {
  color: #ffffff;
  background: var(--accent);
}

.calendar-time-axis,
.calendar-day-column {
  height: calc((23 - 8) * var(--calendar-hour-height));
}

.calendar-time-axis {
  color: var(--muted);
  background: #fbfcfd;
  font-size: 12px;
  font-weight: 850;
}

.calendar-time-axis div {
  height: var(--calendar-hour-height);
  border-bottom: 1px solid var(--line);
  padding: 8px 8px 0 0;
  text-align: right;
}

.calendar-day-column {
  position: relative;
  border-left: 1px solid var(--line);
  background: #ffffff;
}

.calendar-hour-line {
  height: var(--calendar-hour-height);
  border-bottom: 1px solid var(--line);
  background-image: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(214, 224, 235, 0.55) 50%,
    rgba(214, 224, 235, 0.55) calc(50% + 1px),
    transparent calc(50% + 1px)
  );
}

.calendar-block {
  position: absolute;
  right: 7px;
  left: 7px;
  z-index: 2;
  display: grid;
  align-content: start;
  gap: 2px;
  overflow: hidden;
  border-left: 4px solid #f27f58;
  border-radius: 6px;
  padding: 7px 8px;
  color: #793616;
  background: #ffe0d2;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  text-decoration: none;
}

.calendar-block span {
  overflow: hidden;
  text-overflow: ellipsis;
}

label {
  display: grid;
  gap: 7px;
  color: #334253;
  font-size: 14px;
  font-weight: 850;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 13px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
  outline: none;
}

input:disabled,
textarea:disabled,
select:disabled {
  background: #f4f7fb;
  color: #7a8797;
  cursor: not-allowed;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(213, 155, 45, 0.18);
}

.unit-input {
  display: grid;
  grid-template-columns: minmax(96px, 1fr) max-content;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.notice-control {
  display: grid;
  grid-template-columns: minmax(170px, 0.9fr) minmax(180px, 1fr);
  gap: 10px;
  min-width: 0;
}

.unit-input span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.actions .danger-secondary {
  margin-right: auto;
}

.danger-secondary {
  color: #b42318;
  background: #fff2f0;
}

.danger-secondary:hover {
  color: #ffffff;
  background: #b42318;
}

.align-end {
  align-self: end;
}

.hidden {
  display: none;
}

.locked #settings-form,
.locked #booking-list,
.locked .admin-workspace,
.locked .admin-only {
  display: none;
}

.locked .login-only {
  display: grid;
}

.locked.pending .admin-only#admin-status {
  display: block;
}

.locked.pending .login-only {
  display: none;
}

.locked {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px 24px;
  border: 0;
  box-shadow: none;
  background:
    linear-gradient(180deg, rgba(239, 245, 255, 0.95), rgba(248, 250, 252, 0.98));
}

.locked .login-only {
  width: min(1080px, calc(100vw - 48px));
  min-height: auto;
  padding: 0;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(320px, 0.84fr);
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(31, 44, 58, 0.12);
}

.login-hero {
  display: grid;
  align-content: space-between;
  gap: 32px;
  min-height: 560px;
  padding: 44px;
  border-right: 1px solid var(--line);
  background: #f7fbff;
}

.login-hero-brand {
  display: flex;
  align-items: center;
}

.login-hero-copy {
  display: grid;
  gap: 14px;
  max-width: 520px;
}

.login-kicker {
  margin: 0;
  color: #174ea6;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-hero-copy h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.08;
}

.login-hero-copy p {
  margin: 0;
  max-width: 460px;
  color: #596777;
  font-size: 15px;
  line-height: 1.8;
}

.login-preview {
  overflow: hidden;
  border: 1px solid #d7e0eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(30, 58, 95, 0.08);
}

.login-preview-header {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid #e3e9f2;
  background: #fbfdff;
}

.login-preview-header span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c7d1df;
}

.login-preview-body {
  display: grid;
  grid-template-columns: 116px 1fr;
  min-height: 214px;
}

.login-preview-sidebar {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px 16px;
  border-right: 1px solid #e3e9f2;
  background: #f5f8fc;
}

.login-preview-sidebar span,
.login-preview-row,
.login-preview-cards span,
.login-preview-table span {
  display: block;
  border-radius: 7px;
  background: #e7edf5;
}

.login-preview-sidebar span {
  height: 12px;
}

.login-preview-sidebar span:first-child {
  background: #2f5bea;
}

.login-preview-main {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 20px;
}

.login-preview-row {
  width: 58%;
  height: 15px;
}

.login-preview-row.strong {
  width: 38%;
  height: 20px;
  background: #172033;
}

.login-preview-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.login-preview-cards span {
  height: 58px;
  background: #eef4ff;
  border: 1px solid #d7e4ff;
}

.login-preview-table {
  display: grid;
  gap: 8px;
}

.login-preview-table span {
  height: 12px;
}

.login-card {
  display: grid;
  align-content: center;
  gap: 22px;
  justify-items: center;
  width: 100%;
  min-height: 560px;
  padding: 56px 42px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  text-align: center;
}

.login-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.login-logo strong {
  font-size: 15px;
}

.login-card-copy {
  display: grid;
  gap: 8px;
}

.login-card h1 {
  margin: 0;
  color: #111827;
  font-size: 28px;
  line-height: 1.18;
}

.login-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.login-hero-copy .login-kicker,
.login-card-copy .login-kicker {
  color: #174ea6;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.login-footnote {
  max-width: 280px;
}

.locked #google-login {
  width: min(100%, 320px);
  min-height: 50px;
  border-radius: 4px;
}

.locked .google-login-button,
.google-login-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 48px;
  border: 1px solid #dadce0;
  border-radius: 3px;
  padding: 0 18px;
  color: #3c4043;
  background: #ffffff;
  box-shadow: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
}

.locked .google-login-button:hover,
.google-login-button:hover {
  border-color: #d2d8df;
  color: #202124;
  background: #f8fafd;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.16);
}

.locked .google-login-button:active,
.google-login-button:active {
  background: #f1f3f4;
}

.google-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.login-only {
  display: none;
}

@media (max-width: 820px) {
  .locked {
    align-items: start;
    padding: 16px;
  }

  .locked .login-only {
    width: 100%;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-hero {
    min-height: auto;
    gap: 22px;
    padding: 28px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .login-hero-copy h1 {
    font-size: 32px;
  }

  .login-preview {
    display: none;
  }

  .login-card {
    min-height: auto;
    padding: 30px 24px 32px;
  }

  .locked #google-login {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .meeting-room {
    width: min(100vw - 16px, 100%);
    margin: 8px auto 24px;
  }

  .meeting-header {
    padding: 16px;
  }

  .meeting-stage {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) {
    width: min(100vw - 12px, 100%);
    min-height: auto;
    margin: 6px auto 18px;
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) .meeting-header {
    padding: 16px;
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) .meeting-stage {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: auto;
    padding: 6px 14px calc(24px + env(safe-area-inset-bottom));
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) .meeting-copy {
    display: grid;
    gap: 16px;
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-panel,
  .meeting-room:has(#prejoin-panel:not(.hidden)) #meeting-title,
  .meeting-room:has(#prejoin-panel:not(.hidden)) #join-meeting {
    grid-column: auto;
    grid-row: auto;
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) #meeting-title {
    order: 1;
    margin: 0;
    text-align: center;
    font-size: clamp(24px, 7.4vw, 32px);
    line-height: 1.18;
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-panel {
    order: 2;
    gap: 12px;
    padding: 0;
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) #join-meeting {
    order: 3;
    width: 100%;
    min-height: 50px;
    margin-bottom: 0;
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-grid label:first-child {
    grid-column: 1 / -1;
  }

  .prejoin-icon-button {
    width: 46px;
    height: 46px;
  }

  .meeting-videos {
    width: 100%;
    max-height: none;
  }

  .meeting-room:has(#meeting-controls:not(.hidden)) {
    width: 100vw;
    min-height: 100dvh;
    margin: 0;
  }

  .meeting-room:has(#meeting-controls:not(.hidden)) .meeting-header {
    min-height: 58px;
    padding: 10px 14px;
  }

  .meeting-room:has(#meeting-controls:not(.hidden)) .meeting-stage {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 100dvh;
    padding: 58px 8px calc(118px + env(safe-area-inset-bottom));
  }

  .meeting-room:has(#meeting-controls:not(.hidden)) .meeting-videos {
    grid-column: auto;
    height: calc(100dvh - 164px);
    min-height: 320px;
    max-height: none;
    border-radius: 16px;
  }

  .meeting-room:has(#meeting-controls:not(.hidden)) .meeting-side {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(166px + env(safe-area-inset-bottom));
    z-index: 9;
    width: auto;
    max-height: min(48dvh, 400px);
    overflow-y: auto;
  }

  .meeting-room:has(#meeting-controls:not(.hidden)) .chat-card {
    min-height: 240px;
  }

  .meeting-room:has(#meeting-controls:not(.hidden)) .meeting-videos.content-sharing {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    padding: 10px 10px calc(112px + env(safe-area-inset-bottom));
  }

  .meeting-room:has(#meeting-controls:not(.hidden)) .meeting-videos.content-sharing #content-share-video {
    position: relative;
    inset: auto;
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 100%;
    border-radius: 14px;
  }

  .meeting-room:has(#meeting-controls:not(.hidden)) .meeting-videos.content-sharing .remote-video-grid,
  .meeting-room:has(#meeting-controls:not(.hidden)) .meeting-videos.content-sharing #local-video {
    display: none;
  }

  .meeting-room:has(#meeting-controls:not(.hidden)) .meeting-quick-actions {
    right: 14px;
    bottom: calc(108px + env(safe-area-inset-bottom));
    z-index: 10;
    display: grid;
    gap: 10px;
  }

  .meeting-room:has(#meeting-controls:not(.hidden)) .meeting-videos.has-multiple-participants:not(.content-sharing) {
    grid-template-columns: 1fr;
    align-content: start;
    overflow-y: auto;
  }

  .meeting-room:has(#meeting-controls:not(.hidden)) .meeting-videos.has-multiple-participants:not(.content-sharing) #local-video,
  .meeting-room:has(#meeting-controls:not(.hidden)) .meeting-videos.has-multiple-participants:not(.content-sharing) .remote-video-tile,
  .meeting-room:has(#meeting-controls:not(.hidden)) .meeting-videos.has-multiple-participants:not(.content-sharing) .remote-video-off-tile {
    min-height: 210px;
  }

  .remote-video-tile,
  #content-share-video {
    min-height: 0;
  }

  .remote-video-grid {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .meeting-videos.content-sharing {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    padding: 8px 8px 86px;
  }

  .meeting-videos.content-sharing #content-share-video {
    position: relative;
    inset: auto;
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 100%;
  }

  .meeting-videos.content-sharing .remote-video-grid,
  .meeting-videos.content-sharing #local-video {
    display: none;
  }

  .prejoin-panel {
    padding: 12px;
  }

  .prejoin-preview,
  .prejoin-preview video {
    min-height: 220px;
    height: 220px;
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-preview {
    aspect-ratio: 16 / 10;
    min-height: 0;
    height: auto;
    max-height: min(34vh, 260px);
    border-radius: 14px;
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-preview video {
    min-height: 0;
    height: 100%;
    object-fit: contain;
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-actions {
    bottom: 12px;
    display: inline-flex;
    gap: 10px;
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-grid label {
    gap: 5px;
    font-size: 11px;
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-grid select,
  .meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-grid input {
    height: 40px;
    border-radius: 999px;
    font-size: 13px;
  }

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

  #local-video {
    right: 12px;
    bottom: 76px;
    width: 118px;
    height: 66px;
  }

  .meeting-videos.main-local .remote-video-grid {
    right: 12px;
    bottom: 76px;
    width: 118px;
    height: 66px;
  }

  .meeting-controls {
    display: flex;
    left: 50%;
    right: auto;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 12;
    width: max-content;
    max-width: calc(100vw - 20px);
    margin: 0;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .meeting-control-button {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
  }

  .meeting-settings-panel {
    grid-template-columns: 1fr;
    left: 12px;
    right: 12px;
    bottom: calc(104px + env(safe-area-inset-bottom));
    z-index: 11;
    max-height: min(48dvh, 400px);
    overflow-y: auto;
    margin: 0;
  }

  .meeting-room.is-in-call {
    width: 100vw;
    min-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #101010;
    box-shadow: none;
  }

  .meeting-room.is-in-call .meeting-header {
    position: absolute;
    inset: 0 0 auto;
    z-index: 8;
    min-height: 58px;
    border: 0;
    padding: 10px 14px;
    background: linear-gradient(180deg, rgba(16, 16, 16, 0.82), rgba(16, 16, 16, 0));
  }

  .meeting-room.is-in-call #leave-meeting {
    display: none;
  }

  .meeting-room.is-in-call .meeting-stage {
    position: relative;
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 100dvh;
    padding: 58px 8px calc(118px + env(safe-area-inset-bottom));
    background: #101010;
  }

  .meeting-room.is-in-call .meeting-copy {
    display: none;
  }

  .meeting-room.is-in-call .meeting-videos {
    grid-column: auto;
    align-self: stretch;
    width: 100%;
    height: calc(100dvh - 164px);
    min-height: 320px;
    max-height: none;
    border-radius: 16px;
    background: #111111;
  }

  .meeting-room.is-in-call .meeting-side {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(166px + env(safe-area-inset-bottom));
    z-index: 9;
    width: auto;
    max-height: min(48dvh, 400px);
    overflow-y: auto;
    border-radius: 18px;
    padding: 0;
    background: transparent;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  }

  .meeting-room.is-in-call .meeting-side.hidden {
    display: none;
  }

  .meeting-room.is-in-call .meeting-quick-actions {
    right: 14px;
    bottom: calc(108px + env(safe-area-inset-bottom));
    z-index: 10;
    display: grid;
    gap: 10px;
  }

  .meeting-room.is-in-call .meeting-videos.content-sharing {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    padding: 10px 10px calc(118px + env(safe-area-inset-bottom));
  }

  .meeting-room.is-in-call .meeting-videos.content-sharing #content-share-video {
    position: relative;
    inset: auto;
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 100%;
    border-radius: 14px;
  }

  .meeting-room.is-in-call .meeting-videos.content-sharing .remote-video-grid,
  .meeting-room.is-in-call .meeting-videos.content-sharing #local-video {
    display: none;
  }

  .meeting-room.is-in-call .meeting-videos.has-multiple-participants:not(.content-sharing) {
    grid-template-columns: 1fr;
    align-content: start;
    overflow-y: auto;
  }

  .meeting-room.is-in-call .meeting-videos.has-multiple-participants:not(.content-sharing) #local-video,
  .meeting-room.is-in-call .meeting-videos.has-multiple-participants:not(.content-sharing) .remote-video-tile,
  .meeting-room.is-in-call .meeting-videos.has-multiple-participants:not(.content-sharing) .remote-video-off-tile {
    min-height: 210px;
  }

  .meeting-room.is-in-call .meeting-settings-panel {
    grid-template-columns: 1fr;
    left: 12px;
    right: 12px;
    bottom: calc(104px + env(safe-area-inset-bottom));
    z-index: 11;
    max-height: min(48dvh, 400px);
    overflow-y: auto;
    margin: 0;
  }

  .meeting-side {
    order: 3;
  }

  .meeting-info-card {
    padding: 12px;
  }

  .chat-card {
    min-height: 220px;
  }

  .chat-messages {
    max-height: 180px;
  }

  .shell {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 16px auto 30px;
  }

  .shell > .panel + .panel {
    border-left: 1px solid var(--line);
  }

  .intro {
    position: static;
    min-height: auto;
    padding: 26px;
    border-radius: 8px;
  }

  .booking {
    border-radius: 8px;
    max-height: none;
    overflow: visible;
  }

  .schedule-card {
    padding: 18px;
  }

  .schedule-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .schedule-tools {
    width: 100%;
    justify-content: flex-end;
  }

  .schedule-grid {
    grid-template-columns: repeat(7, minmax(96px, 1fr));
  }

  .schedule-date,
  .schedule-slot {
    min-width: 96px;
  }

  h1 {
    margin-top: 38px;
  }

  .day {
    grid-template-columns: 1fr;
  }

  .day-title {
    position: static;
  }

  .booking-item,
  .detail-row {
    grid-template-columns: 1fr;
  }

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

  .availability-grid {
    grid-template-columns: 1fr;
  }

  .notice-control {
    grid-template-columns: 1fr;
  }

  .page-header-controls {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .readonly-field.compact {
    max-width: none;
  }

  .member-list {
    grid-template-columns: 1fr;
  }

  .member-row {
    grid-template-columns: 64px 40px minmax(0, 1fr);
  }

  .member-order-actions {
    grid-column: 1 / 3;
    width: max-content;
  }

  .member-row .icon-danger {
    grid-column: 3;
    width: 100%;
  }

  .member-business-hours {
    grid-column: 1 / -1;
  }

  .member-working-settings {
    grid-column: 1 / -1;
  }

  .admin-workspace {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
  }

  .admin-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .tab-button {
    flex: 0 0 auto;
    min-width: 104px;
    justify-content: center;
    background: #ffffff;
    border: 1px solid var(--line);
  }

  .tab-button:hover,
  .tab-button.active {
    box-shadow: inset 0 -3px 0 var(--accent);
  }

  .side-title {
    padding-bottom: 10px;
  }

  .side-logout {
    margin-top: 0;
  }

  .page-card {
    grid-template-columns: 1fr;
  }

  .page-card-actions {
    justify-content: flex-start;
  }

  .integration-row {
    align-items: stretch;
    flex-direction: column;
  }

  .status-pill {
    align-self: flex-start;
  }

  .settings-advanced .calendar-sync-row .secondary {
    width: 100%;
  }

  .operation-log-head {
    flex-direction: column;
  }

  .operation-log-head .secondary {
    width: 100%;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .field-order-controls {
    grid-template-columns: 28px 34px 34px;
    width: max-content;
  }

  .analytics-summary,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-calendar-toolbar,
  .admin-calendar-grid {
    min-width: 860px;
  }
}

@media (max-width: 560px) {
  body:not(.admin-open) {
    overflow-x: hidden;
  }

  body {
    background:
      linear-gradient(180deg, #eef3ff 0, rgba(245, 247, 250, 0) 220px),
      var(--wash);
  }

  .topnav {
    align-items: center;
    flex-direction: row;
    width: calc(100vw - 24px);
    margin-top: 0;
    padding: 6px 0 4px;
  }

  .brand-logo {
    height: 30px;
  }

  .nav-links {
    display: none;
  }

  .shell {
    width: calc(100vw - 16px);
    gap: 8px;
    margin: 4px auto 20px;
  }

  .panel {
    border-radius: 8px;
    box-shadow: 0 12px 34px rgba(31, 44, 58, 0.08);
  }

  .intro {
    padding: 20px 16px;
  }

  .brand {
    padding: 6px 9px;
    font-size: 11px;
  }

  h1 {
    margin: 30px 0 12px;
    font-size: clamp(30px, 9vw, 36px);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .intro p {
    font-size: 14px;
    line-height: 1.7;
  }

  .meta {
    gap: 7px;
    margin-top: 18px;
  }

  .meta span {
    padding: 7px 9px;
    font-size: 11px;
  }

  .meeting-summary {
    margin-top: 22px;
  }

  .meeting-summary div {
    grid-template-columns: 72px 1fr;
    gap: 10px;
    padding: 12px 14px;
  }

  .meeting-summary dd {
    overflow-wrap: anywhere;
  }

  .booking > .toolbar {
    align-items: center;
    padding: 18px 16px 14px;
  }

  .booking > .toolbar h2 {
    font-size: 21px;
  }

  #reload {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
  }

  .booking > .status {
    margin: 16px 16px 0;
  }

  .schedule-card {
    gap: 12px;
    padding: 16px 12px 18px;
    overflow-x: hidden;
  }

  .schedule-head {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .schedule-connection {
    font-size: 12px;
  }

  .schedule-tools {
    display: grid;
    grid-template-columns: 1fr 38px 54px 38px;
    gap: 6px;
    width: 100%;
  }

  .timezone-label {
    display: flex;
    align-items: center;
    margin-right: 0;
    font-size: 12px;
  }

  .schedule-month {
    font-size: 20px;
  }

  .schedule-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px 4px;
    width: 100%;
    min-width: 0;
  }

  .schedule-date {
    position: static;
    min-width: 0;
    padding: 4px 0 8px;
  }

  .schedule-date strong {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }

  .schedule-date span {
    font-size: 12px;
  }

  .schedule-slot {
    min-width: 0;
    min-height: 44px;
    padding: 0 2px;
    border-radius: 7px;
    font-size: 12px;
  }

  .booking > .form {
    margin: 0 16px 22px;
    padding-top: 18px;
  }

  .form input,
  .form textarea,
  .form select {
    min-height: 46px;
    font-size: 16px;
  }

  .selected,
  .complete {
    padding: 14px;
    font-size: 14px;
  }

  .booking.booking-completed {
    min-height: 280px;
  }

  .booking.booking-completed .complete {
    width: calc(100% - 32px);
    padding: 22px 16px;
  }

  .complete h3 {
    font-size: 19px;
  }

  .complete-details div {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 12px;
  }

  .admin > .toolbar {
    padding: 18px;
  }

  .admin > .toolbar h2 {
    font-size: 22px;
  }

  .admin > .status {
    margin: 14px 16px 0;
  }

  .admin-main {
    padding: 14px 12px 18px;
    overflow-x: hidden;
  }

  .admin-sidebar {
    gap: 10px;
    padding: 12px;
  }

  .side-title {
    gap: 8px;
  }

  .tab-button {
    min-width: 96px;
    min-height: 40px;
    padding: 0 10px;
    font-size: 13px;
  }

  .admin-tab-panel {
    min-width: 0;
  }

  .page-scope-tabs {
    width: 100%;
  }

  .scope-button {
    flex: 1;
  }

  .page-card {
    padding: 16px;
    min-width: 0;
    overflow: hidden;
  }

  .page-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .page-card-actions .secondary-link,
  .page-card-actions button {
    width: 100%;
    justify-content: center;
  }

  .settings-form {
    padding: 14px;
  }

  .setting-section,
  .member-picker,
  .condition-box {
    padding: 14px;
  }

  .member-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 0;
  }

  .member-priority,
  .member-avatar,
  .member-order-actions,
  .member-row .icon-danger {
    grid-column: auto;
  }

  .member-row .icon-danger {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 7px;
  }

  .unit-input {
    grid-template-columns: 1fr;
  }

  .booking-table {
    min-width: 920px;
    font-size: 13px;
  }

  .booking-table th,
  .booking-table td {
    padding: 11px 12px;
  }

  #guest-booking-panel {
    width: 100%;
  }

  #guest-booking-panel > .toolbar {
    padding: 20px 18px 16px;
  }

  #guest-booking-panel > .status {
    margin: 16px 16px 0;
  }

  .guest-detail {
    padding: 16px;
  }

  .guest-summary-card {
    padding: 18px;
  }

  .guest-summary-card h2 {
    font-size: 24px;
  }

  .guest-summary-card strong {
    font-size: 16px;
  }

  .guest-actions {
    grid-template-columns: 1fr;
  }

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

  .calendar-grid {
    gap: 4px;
    padding: 10px;
  }

  .calendar-day {
    min-height: 56px;
    padding: 6px 2px;
  }

  .actions {
    flex-direction: column-reverse;
  }

  .actions button {
    width: 100%;
  }
}

@media (max-width: 390px) {
  h1 {
    font-size: 31px;
  }

  .schedule-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .schedule-date,
  .schedule-slot {
    min-width: 0;
  }

  .schedule-slot {
    min-height: 42px;
    font-size: 11px;
  }
}

@media (max-width: 560px) {
  body.admin-open {
    width: 100%;
    overflow-x: hidden;
  }

  .shell:has(.admin) {
    width: calc(100vw - 16px);
    min-height: auto;
    margin: 6px auto 18px;
  }

  .admin {
    min-height: auto;
  }

  .admin > .toolbar {
    padding: 14px 16px;
  }

  .admin-toolbar-brand {
    gap: 10px;
  }

  .mobile-menu-toggle {
    display: inline-grid;
    place-items: center;
    flex: 0 0 44px;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid var(--line);
    font-size: 22px;
  }

  .admin-header-logo {
    height: 46px;
    max-width: 132px;
  }

  .admin-workspace {
    display: block;
    min-height: auto;
  }

  .admin-sidebar {
    display: none;
    gap: 10px;
    padding: 12px;
    overflow: hidden;
  }

  .admin.mobile-menu-open .admin-sidebar {
    display: flex;
    position: static;
    border-top: 1px solid var(--line);
  }

  .admin-main {
    min-width: 0;
    padding: 14px 12px 18px;
    overflow-x: hidden;
  }

  .admin-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }

  .tab-button {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    justify-content: center;
    padding: 0 8px;
    font-size: 13px;
  }

  .side-logout {
    min-height: 42px;
  }

  .admin-tab-panel {
    min-width: 0;
  }

  .section-head button {
    width: 100%;
  }

  .page-card {
    min-width: 0;
    overflow: hidden;
  }

  .page-card h4,
  .page-card p {
    overflow-wrap: anywhere;
  }

  .page-card-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .page-card-meta span {
    width: 100%;
    border-radius: 8px;
  }

  .page-card-actions {
    grid-template-columns: 1fr;
  }
}

/* Stable in-call layout: keep the meeting room close to Google Meet behavior. */
body.meeting-active {
  overflow: hidden;
  background: #101010;
}

body.meeting-active .shell {
  width: 100vw;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
}

body.meeting-active .meeting-room.is-in-call {
  width: 100vw;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  border: 0;
  border-radius: 0;
  color: #ffffff;
  background: #101010;
  box-shadow: none;
}

body.meeting-active .meeting-room.is-in-call .meeting-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  border: 0;
  padding: 10px 24px;
  background: linear-gradient(180deg, rgba(16, 16, 16, 0.88), rgba(16, 16, 16, 0));
}

body.meeting-active .meeting-room.is-in-call .meeting-header .brand-logo {
  height: 42px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.38));
}

body.meeting-active .meeting-room.is-in-call #leave-meeting {
  display: none;
}

body.meeting-active .meeting-room.is-in-call .meeting-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100dvh;
  gap: 0;
  padding: 72px 16px 96px;
  background: #101010;
}

body.meeting-active .meeting-room.is-in-call .meeting-copy {
  display: none;
}

body.meeting-active .meeting-room.is-in-call .meeting-videos {
  position: relative;
  display: grid;
  grid-column: 1;
  width: 100%;
  height: calc(100dvh - 168px);
  max-height: none;
  min-height: 420px;
  border-radius: 18px;
  overflow: hidden;
  background: #0f151d;
}

body.meeting-active .meeting-room.is-in-call .remote-video-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 14px;
  background: #101010;
}

body.meeting-active .meeting-room.is-in-call .remote-video-placeholder {
  z-index: 1;
  color: #eef2f7;
}

body.meeting-active .meeting-room.is-in-call .meeting-videos.has-multiple-participants:not(.content-sharing) .remote-video-grid {
  position: relative;
  inset: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  align-content: center;
  overflow: auto;
  padding: 14px;
  background: #101010;
}

body.meeting-active .meeting-room.is-in-call .meeting-videos.has-multiple-participants:not(.content-sharing) #local-video,
body.meeting-active .meeting-room.is-in-call .meeting-videos.has-multiple-participants:not(.content-sharing) .remote-video-tile,
body.meeting-active .meeting-room.is-in-call .meeting-videos.has-multiple-participants:not(.content-sharing) .remote-video-off-tile {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
  min-height: 260px;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  object-fit: cover;
}

body.meeting-active .meeting-room.is-in-call .meeting-videos.content-sharing {
  grid-template-columns: minmax(0, 1fr) clamp(220px, 22vw, 360px);
  grid-template-rows: 1fr;
  gap: 12px;
  padding: 14px;
}

body.meeting-active .meeting-room.is-in-call .meeting-videos.content-sharing #content-share-video {
  position: relative;
  inset: auto;
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  object-fit: contain;
  background: #050505;
}

body.meeting-active .meeting-room.is-in-call .meeting-videos.content-sharing .remote-video-grid {
  position: relative;
  inset: auto;
  grid-column: 2;
  grid-row: 1;
  grid-template-columns: 1fr;
  align-content: start;
  align-self: stretch;
  gap: 10px;
  min-width: 0;
  max-height: 100%;
  overflow-y: auto;
  padding: 0;
  background: transparent;
}

body.meeting-active .meeting-room.is-in-call .meeting-videos.content-sharing #local-video {
  position: relative;
  inset: auto;
  grid-column: 2;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
}

body.meeting-active .meeting-room.is-in-call .meeting-videos.content-sharing .remote-video-tile,
body.meeting-active .meeting-room.is-in-call .meeting-videos.content-sharing .remote-video-off-tile {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  object-fit: cover;
}

body.meeting-active .meeting-room.is-in-call .active-speaker-badge {
  top: 18px;
  right: 18px;
  z-index: 24;
}

body.meeting-active .meeting-room.is-in-call .meeting-controls {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 90;
  transform: translateX(-50%);
}

body.meeting-active .meeting-room.is-in-call .meeting-quick-actions {
  position: fixed;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 92;
}

body.meeting-active .meeting-room.is-in-call .meeting-side {
  position: fixed;
  top: auto;
  right: 24px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  left: auto;
  z-index: 95;
  width: min(360px, calc(100vw - 48px));
  max-height: calc(100dvh - 136px);
  overflow-y: auto;
  border-radius: 18px;
  background: transparent;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

body.meeting-active .meeting-room.is-in-call .meeting-side.hidden {
  display: none;
}

body.meeting-active .meeting-room.is-in-call .meeting-settings-panel {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 96;
  width: min(780px, calc(100vw - 32px));
  transform: translateX(-50%);
}

@media (max-width: 900px) {
  body.meeting-active .meeting-room.is-in-call .meeting-stage {
    padding: 64px 10px calc(94px + env(safe-area-inset-bottom));
  }

  body.meeting-active .meeting-room.is-in-call .meeting-videos {
    height: calc(100dvh - 158px - env(safe-area-inset-bottom));
    min-height: 0;
    border-radius: 12px;
  }

  body.meeting-active .meeting-room.is-in-call .meeting-videos.has-multiple-participants:not(.content-sharing) .remote-video-grid {
    grid-template-columns: 1fr;
    align-content: start;
    overflow-y: auto;
  }

  body.meeting-active .meeting-room.is-in-call .meeting-videos.has-multiple-participants:not(.content-sharing) #local-video,
  body.meeting-active .meeting-room.is-in-call .meeting-videos.has-multiple-participants:not(.content-sharing) .remote-video-tile,
  body.meeting-active .meeting-room.is-in-call .meeting-videos.has-multiple-participants:not(.content-sharing) .remote-video-off-tile {
    min-height: 210px;
  }

  body.meeting-active .meeting-room.is-in-call .meeting-videos.content-sharing {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    align-content: start;
    overflow-y: auto;
    padding: 8px;
  }

  body.meeting-active .meeting-room.is-in-call .meeting-videos.content-sharing #content-share-video {
    grid-column: 1;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  body.meeting-active .meeting-room.is-in-call .meeting-videos.content-sharing .remote-video-grid,
  body.meeting-active .meeting-room.is-in-call .meeting-videos.content-sharing #local-video {
    display: none;
  }

  body.meeting-active .meeting-room.is-in-call .meeting-controls {
    right: 10px;
    left: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    justify-content: center;
    gap: 8px;
    overflow-x: auto;
    padding: 8px;
    transform: none;
  }

  body.meeting-active .meeting-room.is-in-call .meeting-control-button {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
  }

  body.meeting-active .meeting-room.is-in-call .meeting-control-danger {
    flex-basis: 56px;
    width: 56px;
  }

  body.meeting-active .meeting-room.is-in-call .meeting-quick-actions {
    right: 10px;
    left: 10px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    gap: 8px;
    max-width: calc(100vw - 20px);
    overflow-x: auto;
    display: flex;
    justify-content: center;
    padding: 0 2px 4px;
  }

  body.meeting-active .meeting-room.is-in-call .meeting-side {
    right: 10px;
    bottom: calc(134px + env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    max-height: min(42dvh, 360px);
  }

  body.meeting-active .meeting-room.is-in-call .meeting-settings-panel {
    right: 10px;
    bottom: calc(128px + env(safe-area-inset-bottom));
    left: 10px;
    grid-template-columns: 1fr;
    width: auto;
    max-height: 42dvh;
    overflow-y: auto;
    transform: none;
  }
}

@media (max-width: 560px) {
  .meeting-room:has(#prejoin-panel:not(.hidden)) {
    margin: 4px auto 10px;
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) .meeting-header {
    padding: 14px 14px 6px;
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) .meeting-stage {
    gap: 8px;
    padding: 4px 12px calc(16px + env(safe-area-inset-bottom));
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) #meeting-title {
    font-size: clamp(22px, 8vw, 30px);
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-panel {
    gap: 8px;
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-preview {
    max-height: min(30vh, 230px);
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-grid {
    gap: 7px;
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-grid select,
  .meeting-room:has(#prejoin-panel:not(.hidden)) .prejoin-grid input {
    height: 38px;
  }

  .meeting-room:has(#prejoin-panel:not(.hidden)) #join-meeting {
    min-height: 48px;
  }

  body.meeting-active .meeting-room.is-in-call .meeting-header {
    min-height: 54px;
    padding: 8px 12px;
  }

  body.meeting-active .meeting-room.is-in-call .meeting-header .brand-logo {
    height: 32px;
  }

  body.meeting-active .meeting-room.is-in-call .meeting-stage {
    padding-top: 54px;
    padding-bottom: calc(142px + env(safe-area-inset-bottom));
  }

  body.meeting-active .meeting-room.is-in-call .meeting-videos {
    height: calc(100dvh - 156px - env(safe-area-inset-bottom));
    border-radius: 0;
  }

  body.meeting-active .meeting-room.is-in-call .meeting-quick-button {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
  }

  body.meeting-active .meeting-room.is-in-call .meeting-quick-button::after {
    display: none;
  }

  body.meeting-active .meeting-room.is-in-call .meeting-quick-actions {
    right: 8px;
    left: 8px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    justify-content: center;
  }

  body.meeting-active .meeting-room.is-in-call .meeting-side {
    bottom: calc(132px + env(safe-area-inset-bottom));
    max-height: min(45dvh, 360px);
  }
}

@media (max-width: 900px) {
  .meeting-room.is-in-call .meeting-quick-actions,
  body.meeting-active .meeting-room.is-in-call .meeting-quick-actions {
    position: fixed;
    top: auto;
    right: 8px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    left: 8px;
    z-index: 92;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    max-width: none;
    overflow-x: auto;
    padding: 0 2px 4px;
  }

  .meeting-room.is-in-call .meeting-quick-button,
  body.meeting-active .meeting-room.is-in-call .meeting-quick-button {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
  }

  .meeting-room.is-in-call .meeting-side,
  body.meeting-active .meeting-room.is-in-call .meeting-side {
    right: 10px;
    bottom: calc(132px + env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
  }
}

@media (max-width: 960px) {
  .booking-detail-head {
    display: grid;
  }

  .booking-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booking-detail-cell:nth-child(4n) {
    border-right: 1px solid var(--line);
  }

  .booking-detail-cell:nth-child(2n) {
    border-right: 0;
  }

  .booking-detail-cell:nth-last-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }

  .booking-detail-cell:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .booking-minutes-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .booking-detail-panel {
    padding: 14px;
  }

  .booking-detail-grid {
    grid-template-columns: 1fr;
  }

  .booking-detail-cell,
  .booking-detail-cell:nth-child(2n),
  .booking-detail-cell:nth-child(4n),
  .booking-detail-cell:nth-last-child(-n + 2),
  .booking-detail-cell:nth-last-child(-n + 4) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .booking-detail-cell:last-child {
    border-bottom: 0;
  }

  .booking-detail-list-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .booking-transcript-list {
    max-height: 340px;
  }
}
