@font-face {
  font-family: Urbanist;
  src: url("/fonts/Urbanist.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --deep-blue: #113f67;
  --blue: #2f7192;
  --soft-blue: #87c0cd;
  --pale-blue: #edf7fa;
  --off-white: #f7fbfc;
  --white: #ffffff;
  --ink: #17242b;
  --muted: #5e6b73;
  --line: #d8e9ee;
  --available: #dff2e9;
  --available-ink: #1c6248;
  --busy: #f2e8e8;
  --busy-ink: #7a4040;
  --pending: #fff2cf;
  --pending-ink: #745715;
  --shadow: 0 18px 46px rgba(17, 63, 103, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--off-white);
  color: var(--ink);
  font-family: Urbanist, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  border-radius: var(--radius);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--soft-blue);
  outline-offset: 3px;
}

button {
  cursor: pointer;
}

.beta-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(237, 247, 250, 0.8), rgba(247, 251, 252, 0) 280px),
    var(--off-white);
}

.beta-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(216, 233, 238, 0.9);
  background: rgba(247, 251, 252, 0.95);
  backdrop-filter: blur(14px);
}

.beta-header-inner,
.beta-main,
.beta-footer-inner {
  width: min(1220px, calc(100% - 40px));
  margin-inline: auto;
}

.beta-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 82px;
}

.beta-brand img {
  display: block;
  width: 210px;
  height: auto;
}

.beta-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.beta-nav a {
  padding: 0.55rem 0.75rem;
  color: var(--muted);
  font-weight: 750;
  text-decoration: none;
}

.beta-nav a[aria-current="page"] {
  background: var(--pale-blue);
  color: var(--deep-blue);
}

.beta-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(17, 63, 103, 0.2);
  border-radius: 999px;
  background: var(--white);
  color: var(--deep-blue);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.beta-badge::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--soft-blue);
  content: "";
}

.beta-main {
  padding: 54px 0 84px;
}

.booking-wizard {
  min-height: calc(100vh - 176px);
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(760px, 100%);
  margin: 0 auto 48px;
  padding: 0;
  list-style: none;
}

.progress-steps li {
  position: relative;
  display: grid;
  gap: 7px;
  justify-items: center;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
}

.progress-steps li:not(:last-child)::after {
  position: absolute;
  top: 17px;
  left: calc(50% + 24px);
  z-index: 0;
  width: calc(100% - 48px);
  height: 2px;
  background: var(--line);
  content: "";
}

.progress-steps span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--off-white);
  color: var(--muted);
}

.progress-steps li[aria-current],
.progress-steps li.complete {
  color: var(--deep-blue);
}

.progress-steps li[aria-current] span,
.progress-steps li.complete span {
  border-color: var(--deep-blue);
  background: var(--deep-blue);
  color: var(--white);
}

.wizard-screen[hidden] {
  display: none;
}

.wizard-heading {
  width: min(820px, 100%);
  margin: 0 auto 28px;
  text-align: center;
}

.wizard-heading h1 {
  max-width: none;
  font-size: clamp(2.2rem, 4.5vw, 4rem);
}

.wizard-heading .intro-copy {
  margin-inline: auto;
}

.wizard-panel {
  width: min(980px, 100%);
  margin-inline: auto;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  width: min(980px, 100%);
  min-height: 48px;
  margin: 22px auto 0;
}

.wizard-actions button {
  min-width: 150px;
}

.service-list-large {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-list-large .service-option {
  min-height: 180px;
  align-content: start;
  padding: 1.2rem;
}

.confirmation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(290px, 0.55fr);
  gap: 18px;
  align-items: start;
  width: min(980px, 100%);
  margin-inline: auto;
}

.privacy-note {
  margin: 1rem 0;
  font-size: 0.88rem;
}

.form-error {
  margin: 0.9rem 0 0;
  padding: 0.75rem;
  border-left: 4px solid var(--busy-ink);
  background: var(--busy);
  color: var(--busy-ink);
  font-weight: 750;
}

.completion-card {
  width: min(720px, 100%);
  margin-inline: auto;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  text-align: center;
}

.completion-card h1,
.completion-card .intro-copy {
  margin-inline: auto;
}

.completion-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--available);
  color: var(--available-ink);
  font-size: 1.7rem;
  font-weight: 900;
}

.completion-summary {
  width: min(480px, 100%);
  margin: 1.5rem auto;
  text-align: left;
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.55fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 38px;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 0.75rem;
  color: var(--deep-blue);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.02;
}

h2 {
  margin-bottom: 0.9rem;
  color: var(--deep-blue);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.12;
}

h3 {
  margin-bottom: 0.5rem;
  color: var(--deep-blue);
  font-size: 1.18rem;
  line-height: 1.25;
}

.intro-copy,
.muted {
  color: var(--muted);
}

.intro-copy {
  max-width: 700px;
  font-size: 1.15rem;
}

.beta-notice {
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--soft-blue);
  background: var(--white);
  box-shadow: 0 10px 30px rgba(17, 63, 103, 0.08);
  color: #344952;
}

.beta-notice strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--deep-blue);
}

.panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 1.35rem 1.45rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.panel-header h2,
.panel-header h3,
.panel-header p {
  margin-bottom: 0;
}

.panel-body {
  padding: 1.4rem;
}

.booking-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.55fr) minmax(0, 1.25fr) minmax(250px, 0.55fr);
  gap: 18px;
  align-items: start;
}

.stack {
  display: grid;
  gap: 18px;
}

.service-list,
.slot-list,
.appointment-type-list,
.template-list {
  display: grid;
  gap: 10px;
}

.service-option,
.slot-button,
.type-row,
.template-button {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--off-white);
  color: var(--ink);
  text-align: left;
}

.service-option,
.type-row {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem;
}

.service-option strong,
.type-row strong {
  color: var(--deep-blue);
}

.service-option span,
.type-row span {
  color: var(--muted);
  font-size: 0.9rem;
}

.service-option[aria-pressed="true"],
.slot-button[aria-pressed="true"],
.template-button[aria-pressed="true"] {
  border-color: var(--deep-blue);
  background: var(--pale-blue);
  box-shadow: inset 4px 0 0 var(--deep-blue);
}

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

.calendar-toolbar strong {
  color: var(--deep-blue);
}

.icon-button,
.secondary-button,
.primary-button,
.danger-button {
  min-height: 42px;
  border: 1px solid var(--deep-blue);
  padding: 0.65rem 0.9rem;
  font-weight: 800;
}

.icon-button,
.secondary-button {
  background: var(--white);
  color: var(--deep-blue);
}

.primary-button {
  background: var(--deep-blue);
  color: var(--white);
}

.danger-button {
  border-color: #8e4d4d;
  background: #fff8f8;
  color: #7a4040;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.week-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(86px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.day-column {
  min-width: 86px;
}

.day-heading {
  display: grid;
  place-items: center;
  min-height: 62px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
}

.day-heading strong {
  color: var(--deep-blue);
  font-size: 1.15rem;
}

.slot-list {
  align-content: start;
}

.slot-button {
  min-height: 44px;
  padding: 0.55rem 0.35rem;
  color: var(--deep-blue);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
}

.empty-day {
  padding: 0.8rem 0.25rem;
  color: #87969d;
  font-size: 0.82rem;
  text-align: center;
}

.summary-list {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.2rem;
}

.summary-list div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}

.summary-list dt {
  color: var(--muted);
}

.summary-list dd {
  margin: 0;
  color: var(--deep-blue);
  font-weight: 850;
  text-align: right;
}

.full-width {
  width: 100%;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
}

.status-pill.available {
  background: var(--available);
  color: var(--available-ink);
}

.status-pill.busy {
  background: var(--busy);
  color: var(--busy-ink);
}

.status-pill.pending {
  background: var(--pending);
  color: var(--pending-ink);
}

.admin-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 20px;
  padding-bottom: 4px;
}

.admin-tabs button {
  flex: 0 0 auto;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 0.65rem 0.9rem;
  color: var(--muted);
  font-weight: 800;
}

.admin-tabs button[aria-selected="true"] {
  border-color: var(--deep-blue);
  background: var(--deep-blue);
  color: var(--white);
}

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

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: 18px;
  align-items: start;
}

.schedule-grid {
  display: grid;
  grid-template-columns: 74px repeat(7, minmax(92px, 1fr));
  min-width: 840px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.schedule-scroller {
  overflow-x: auto;
}

.schedule-cell,
.schedule-heading,
.time-label {
  min-height: 48px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.schedule-heading,
.time-label {
  display: grid;
  place-items: center;
  background: var(--off-white);
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 800;
  text-align: center;
}

.schedule-cell {
  position: relative;
  border-top: 0;
  border-left: 0;
  border-radius: 0;
  background: #ffffff;
}

.schedule-cell:hover {
  background: var(--pale-blue);
}

.schedule-cell.available {
  background: var(--available);
}

.schedule-cell.busy {
  background: var(--busy);
}

.schedule-cell.booked {
  background: #dfeaf5;
}

.schedule-cell span {
  display: block;
  overflow: hidden;
  padding: 0.3rem;
  color: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.84rem;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 14px;
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.legend .available-key {
  background: var(--available);
}

.legend .busy-key {
  background: var(--busy);
}

.legend .booked-key {
  background: #dfeaf5;
}

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

.field {
  display: grid;
  gap: 0.35rem;
  color: var(--deep-blue);
  font-size: 0.9rem;
  font-weight: 800;
}

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

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #bfd8df;
  padding: 0.72rem 0.8rem;
  background: var(--off-white);
  color: var(--ink);
}

.field textarea {
  min-height: 160px;
  resize: vertical;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.type-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.type-row > div:first-child {
  display: grid;
}

.type-row button {
  border: 0;
  background: transparent;
  color: var(--deep-blue);
  font-weight: 850;
}

.template-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.38fr) minmax(0, 1fr);
  gap: 18px;
}

.template-button {
  padding: 0.8rem;
  font-weight: 800;
}

.email-preview {
  min-height: 420px;
  border: 1px solid var(--line);
  background: #f0f3f4;
  padding: 24px;
}

.email-card {
  width: min(640px, 100%);
  margin-inline: auto;
  border: 1px solid #dce5e8;
  background: var(--white);
  box-shadow: 0 12px 36px rgba(17, 63, 103, 0.1);
}

.email-brand {
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
}

.email-brand img {
  display: block;
  width: 180px;
}

.email-content {
  padding: 26px;
  color: #33464e;
}

.email-content h3 {
  font-size: 1.45rem;
}

.email-content a {
  color: var(--deep-blue);
  font-weight: 800;
}

.email-meta {
  padding: 14px 26px;
  background: var(--pale-blue);
  color: var(--muted);
  font-size: 0.85rem;
}

.token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.token-list code {
  padding: 0.25rem 0.45rem;
  border-radius: 4px;
  background: var(--pale-blue);
  color: var(--deep-blue);
  font-size: 0.78rem;
}

.video-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.video-console {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(17, 63, 103, 0.16);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.video-console:fullscreen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: #091820;
}

.video-console:fullscreen .camera-preview {
  width: 100%;
  max-height: calc(100vh - 120px);
}

.video-console:fullscreen .video-controls,
.video-console:fullscreen .session-tools {
  background: var(--white);
}

body.has-app-video-fullscreen {
  overflow: hidden;
}

.video-console.is-app-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100dvh;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  border: 0;
  border-radius: 0;
  background: #091820;
  box-shadow: none;
}

.video-console.is-app-fullscreen .camera-preview {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  aspect-ratio: auto;
}

.video-console.is-app-fullscreen .video-controls,
.video-console.is-app-fullscreen .session-tools {
  flex: 0 0 auto;
  background: var(--white);
}

.video-console.is-app-fullscreen .session-tools {
  max-height: min(28dvh, 180px);
  overflow-y: auto;
}

.video-header-title {
  justify-self: center;
  color: var(--deep-blue);
  font-weight: 800;
}

.camera-preview {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  min-height: 0;
  border-radius: 6px;
  background: #0c1d25;
}

.camera-preview .local-video,
.remote-participant-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-preview .local-video {
  transform: scaleX(-1);
}

.camera-preview .local-video.preview-background-soften {
  filter: none;
  box-shadow: inset 0 0 0 3px rgba(135, 192, 205, 0.46);
}

.camera-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: linear-gradient(145deg, #0c1d25, #173949);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.camera-placeholder-content {
  width: min(390px, 90%);
}

.camera-placeholder h2 {
  margin-bottom: 0.4rem;
  color: var(--white);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.camera-placeholder p {
  margin-bottom: 0;
}

.camera-mark {
  display: block;
  width: 58px;
  height: 42px;
  margin: 0 auto 1.2rem;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
}

.camera-mark::after {
  display: block;
  width: 13px;
  height: 13px;
  margin: 12px auto;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  content: "";
}

.camera-preview.has-stream .camera-placeholder {
  display: none;
}

.video-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px 4px 2px;
}

.video-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 142px;
  min-height: 48px;
  border: 1px solid var(--line);
  background: var(--off-white);
  color: var(--deep-blue);
  font-weight: 800;
}

.video-controls button[hidden],
.in-call-label[hidden] {
  display: none;
}

.video-controls button.is-off {
  border-color: #e0c2c2;
  background: #fff7f7;
  color: var(--busy-ink);
}

.video-controls .leave-control {
  border-color: #8e4d4d;
  background: #8e4d4d;
  color: var(--white);
}

.session-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 4px 4px;
}

.session-tools button {
  min-height: 42px;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--deep-blue);
  font-size: 0.84rem;
  font-weight: 800;
}

.session-tools button[aria-pressed="true"] {
  border-color: var(--soft-blue);
  background: var(--pale-blue);
  box-shadow: inset 0 0 0 1px var(--soft-blue);
}

.session-tools button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.session-tool-note {
  grid-column: 1 / -1;
  margin: 2px 2px 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
}

.scribe-explainer {
  margin: 0;
  line-height: 1.6;
}

.scribe-state {
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--off-white);
  color: var(--deep-blue);
  font-weight: 800;
}

.recording-banner {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 0.7rem 0.9rem;
  border: 1px solid #7b3030;
  border-radius: 6px;
  background: #8e3f3f;
  box-shadow: 0 14px 40px rgba(46, 10, 10, 0.28);
  color: var(--white);
  transform: translateX(-50%);
}

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

.recording-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.18);
  animation: recording-pulse 1.4s ease-in-out infinite;
}

.recording-banner button {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: transparent;
  color: var(--white);
  font-weight: 800;
}

.recording-telemetry {
  position: fixed;
  z-index: 89;
  left: 18px;
  bottom: 18px;
  width: min(360px, calc(100% - 36px));
  overflow: hidden;
  border: 1px solid rgba(17, 63, 103, 0.18);
  border-radius: 12px;
  background: rgba(247, 251, 252, 0.97);
  box-shadow: 0 18px 50px rgba(17, 63, 103, 0.22);
  color: var(--ink);
  backdrop-filter: blur(10px);
}

.recording-telemetry[hidden] {
  display: none;
}

.recording-telemetry-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-bottom: 1px solid rgba(17, 63, 103, 0.12);
  background: linear-gradient(180deg, rgba(237, 247, 250, 0.9), rgba(247, 251, 252, 0));
}

.reel-icon {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--deep-blue);
}

.reel-icon .reel {
  transform-box: fill-box;
  transform-origin: center;
}

.recording-telemetry.is-recording .reel-icon .reel {
  animation: reel-spin 1.4s linear infinite;
}

.recording-telemetry.is-recording .reel-icon .reel-right {
  animation-direction: reverse;
}

.recording-telemetry-head .recording-dot {
  background: #8e3f3f;
  box-shadow: 0 0 0 4px rgba(142, 63, 63, 0.16);
}

.recording-telemetry-title {
  display: grid;
  gap: 1px;
  min-width: 0;
  flex: 1 1 auto;
}

.recording-telemetry-title strong {
  font-size: 0.92rem;
  font-weight: 850;
  color: var(--deep-blue);
}

.recording-telemetry-title span {
  font-size: 0.74rem;
  font-weight: 750;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.recording-telemetry-title span.is-live {
  color: var(--available-ink);
}

.recording-telemetry-title span.is-error {
  color: var(--busy-ink);
}

.recording-timer {
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
  font-weight: 850;
  color: var(--ink);
}

.recording-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  background: rgba(17, 63, 103, 0.08);
}

.recording-stat {
  display: grid;
  gap: 2px;
  padding: 9px 11px;
  background: rgba(247, 251, 252, 0.97);
}

.recording-stat dt {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.recording-stat dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  color: var(--deep-blue);
}

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

@media (prefers-reduced-motion: reduce) {
  .recording-telemetry.is-recording .reel-icon .reel { animation: none; }
}

@media (max-width: 640px) {
  .recording-telemetry { left: 50%; bottom: 74px; transform: translateX(-50%); }
}

.call-ended-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.call-ended-actions a {
  text-decoration: none;
}

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

@media (prefers-reduced-motion: reduce) {
  .recording-dot { animation: none; }
}

.device-settings-dialog {
  width: min(560px, calc(100% - 28px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 28px 80px rgba(7, 34, 50, 0.28);
  color: var(--ink);
}

.device-settings-dialog::backdrop {
  background: rgba(7, 29, 39, 0.58);
  backdrop-filter: blur(4px);
}

.device-settings-panel {
  margin: 0;
}

.device-settings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 1.25rem 1.35rem;
  border-bottom: 1px solid var(--line);
  background: var(--pale-blue);
}

.device-settings-header h2,
.device-settings-header p {
  margin: 0;
}

.device-settings-header h2 {
  font-size: 1.55rem;
}

.dialog-close {
  min-width: 64px;
  min-height: 40px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--deep-blue);
  font-weight: 800;
}

.device-settings-body {
  display: grid;
  gap: 14px;
  padding: 1.35rem;
}

.device-settings-body .field {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.device-settings-body select {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  background: var(--off-white);
  color: var(--ink);
}

.device-settings-note {
  margin: 0;
  font-size: 0.88rem;
}

.device-settings-body .is-unsupported {
  opacity: 0.62;
}

.remote-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  background: #091820;
}

.camera-preview.has-remote .remote-stage {
  display: block;
}

.remote-participant-video {
  position: absolute;
  inset: 0;
}

.remote-participant-video.shared-content {
  z-index: 2;
  background: #101820;
}

.remote-participant-video.shared-content video {
  object-fit: contain;
}

.shared-whiteboard {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  grid-template-rows: auto 1fr;
  background: #fafdfe;
  color: var(--ink);
}

.shared-whiteboard[hidden] {
  display: none;
}

.whiteboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 7px 10px 7px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.whiteboard-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.whiteboard-tools button {
  min-width: 38px;
  min-height: 36px;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--white);
  color: var(--deep-blue);
  font-size: 0.75rem;
  font-weight: 800;
}

.whiteboard-tools .colour-tool {
  padding: 0;
}

.colour-tool span {
  display: block;
  width: 18px;
  height: 18px;
  margin: auto;
  border-radius: 50%;
  background: var(--ink);
}

.whiteboard-tools button.is-selected {
  border-color: var(--soft-blue);
  box-shadow: inset 0 0 0 2px var(--pale-blue);
}

.shared-whiteboard canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.chat-panel {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 10;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(380px, 100%);
  border-left: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  box-shadow: -16px 0 40px rgba(7, 34, 50, 0.18);
}

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

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 8px 10px 8px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--deep-blue);
}

.chat-header button {
  min-height: 36px;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--deep-blue);
  font-size: 0.82rem;
  font-weight: 800;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 16px;
  overflow-y: auto;
  background: var(--off-white);
}

.chat-empty {
  margin: auto;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.chat-message {
  align-self: flex-start;
  max-width: 88%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  overflow-wrap: anywhere;
}

.chat-message.is-local {
  align-self: flex-end;
  border-color: #bddce4;
  background: var(--pale-blue);
}

.chat-message strong,
.chat-message time {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.chat-message p {
  margin: 3px 0 0;
  line-height: 1.42;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--white);
}

.chat-form input {
  min-width: 0;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  border: 1px solid #bfd8df;
  background: var(--off-white);
}

.chat-form button {
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--deep-blue);
  background: var(--deep-blue);
  color: var(--white);
  font-weight: 800;
}

.participant-name,
.in-call-label {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(7, 22, 29, 0.74);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.participant-name {
  bottom: 16px;
  left: 16px;
}

.in-call-label {
  top: 16px;
  left: 16px;
  gap: 7px;
}

.in-call-label span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #73d2a7;
}

.video-stage.is-connected .camera-preview.has-remote .local-video {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  width: min(25%, 210px);
  height: auto;
  aspect-ratio: 4 / 3;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.video-stage.is-connected .camera-placeholder {
  display: none;
}

.beta-footer {
  padding: 26px 0;
  background: var(--deep-blue);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.beta-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.beta-footer a {
  color: var(--white);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  max-width: 360px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  background: var(--deep-blue);
  box-shadow: var(--shadow);
  color: var(--white);
  font-weight: 750;
}

.toast[hidden] {
  display: none;
}

@media (max-width: 1040px) {
  .booking-layout,
  .admin-grid,
  .video-stage {
    grid-template-columns: 1fr;
  }

  .booking-layout > .stack:last-child {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .beta-header-inner {
    grid-template-columns: 1fr auto;
    min-height: 74px;
  }

  .beta-brand img {
    width: 180px;
  }

  .beta-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .intro-band,
  .template-layout,
  .confirmation-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .booking-layout > .stack:last-child,
  .form-grid,
  .service-list-large {
    grid-template-columns: 1fr;
  }

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

  .panel-header,
  .beta-footer-inner {
    display: grid;
  }

  .camera-preview,
  .camera-preview video {
    min-height: 0;
  }

  .video-room-shell .beta-header-inner {
    grid-template-columns: 1fr auto;
    min-height: 70px;
  }

  .video-room-shell .beta-brand img {
    width: 170px;
  }

  .video-room-shell .beta-nav {
    display: none;
  }

  .video-header-title {
    display: none;
  }

  .video-room-shell .beta-badge {
    font-size: 0;
  }

  .video-room-shell .beta-badge::after {
    font-size: 0.72rem;
    content: "Secure video";
  }

  .video-intro-band {
    margin-bottom: 26px;
  }

  .video-intro-band h1 {
    font-size: clamp(2.25rem, 11vw, 3.2rem);
  }

  .video-controls button {
    flex: 1 1 0;
    min-width: 0;
  }

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

  .whiteboard-header {
    align-items: flex-start;
    padding: 7px;
  }

  .whiteboard-header > strong {
    display: none;
  }

  .whiteboard-tools {
    width: 100%;
    justify-content: space-between;
  }

  .video-stage.is-connected .camera-preview.has-remote .local-video {
    right: 10px;
    bottom: 10px;
    width: 30%;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  .beta-header-inner,
  .beta-main,
  .beta-footer-inner {
    width: min(100% - 28px, 1220px);
  }

  .beta-main {
    padding-top: 38px;
  }

  .video-room-shell .beta-main {
    padding-top: 28px;
  }

  .video-room-shell .beta-header-inner {
    width: calc(100% - 28px);
  }

  .video-room-shell .beta-badge {
    padding: 0.42rem 0.55rem;
  }

  .video-console {
    padding: 7px;
  }

  .video-controls {
    gap: 6px;
    padding-top: 9px;
  }

  .video-controls button {
    min-height: 50px;
    padding: 0.45rem;
    font-size: 0.77rem;
  }

  .session-tools button {
    min-height: 46px;
    font-size: 0.78rem;
  }

  .whiteboard-tools button {
    min-width: 34px;
    padding-inline: 0.35rem;
    font-size: 0.68rem;
  }

  .video-stage.is-connected {
    grid-template-columns: 1fr;
  }

  .beta-badge {
    font-size: 0.72rem;
  }

  .panel-body,
  .panel-header {
    padding: 1rem;
  }

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

  .email-preview {
    padding: 10px;
  }

  .email-content,
  .email-brand,
  .email-meta {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* Client video lobby */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.encryption-badge,
.private-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.4rem 0.65rem;
  border: 1px solid rgba(17, 63, 103, 0.2);
  border-radius: 999px;
  background: var(--white);
  color: var(--deep-blue);
  font-size: 0.78rem;
  font-weight: 800;
}

.video-lobby-main {
  min-height: calc(100vh - 168px);
  padding-top: clamp(28px, 5vw, 64px);
}

.video-lobby-main .video-stage {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.46fr);
  gap: clamp(18px, 3vw, 34px);
}

.setup-panel {
  min-width: 0;
  padding: clamp(22px, 2.4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.setup-panel h1 {
  margin: 0.25rem 0 0.7rem;
  color: var(--deep-blue);
  font-size: clamp(2rem, 3vw, 2.65rem);
  line-height: 1.08;
}

.setup-intro {
  margin: 0 0 1.45rem;
  color: var(--muted);
}

.setup-fields {
  display: grid;
  gap: 12px;
}

.setup-fields[hidden],
.session-tools[hidden],
.lobby-status[hidden],
.form-error[hidden],
.empty-waiting[hidden],
.video-stage[hidden],
.call-ended-card[hidden] {
  display: none;
}

.setup-fields .field {
  gap: 5px;
}

.setup-fields input,
.setup-fields select {
  display: block;
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  border: 1px solid #bfd8df;
  background: var(--off-white);
}

.scribe-consent {
  min-width: 0;
  margin: 4px 0 0;
  padding: 14px;
  border: 1px solid #bfd8df;
  border-radius: 8px;
  background: var(--pale-blue);
}

.scribe-consent legend {
  padding: 0 5px;
  color: var(--deep-blue);
  font-weight: 800;
}

.scribe-consent p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.scribe-consent label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 8px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
}

.scribe-consent input {
  min-height: 0;
  width: 17px;
  height: 17px;
  margin-top: 1px;
}

.scribe-consent-saved {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--deep-blue);
  font-size: 0.88rem;
  font-weight: 800;
}

.scribe-consent-saved[hidden] { display: none; }
.setup-fields [data-reflecta-client-field][hidden] { display: none; }
.scribe-consent-saved button { min-height: 34px; padding: 5px 9px; border: 1px solid var(--soft-blue); background: var(--white); color: var(--deep-blue); font: inherit; font-size: 0.76rem; }
.field-help { color: var(--muted); font-size: 0.76rem; font-weight: 650; }

.setup-fields select {
  padding-right: 42px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setup-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.lobby-status {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid #bddce4;
  border-radius: 8px;
  background: var(--pale-blue);
  color: var(--deep-blue);
}

.lobby-status strong,
.lobby-status p {
  display: block;
  margin: 0;
}

.lobby-status p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.92rem;
}

.waiting-pulse {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--soft-blue);
  box-shadow: 0 0 0 5px rgba(135, 192, 205, 0.2);
}

.setup-panel .form-error {
  min-height: 0;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.setup-panel .form-error.is-error {
  color: var(--busy-ink);
}

.camera-placeholder-content > img {
  display: block;
  width: 54px;
  height: 54px;
  margin: 0 auto 1rem;
  filter: invert(1);
  opacity: 0.85;
}

.video-controls .icon-control {
  flex: 0 0 52px;
  width: 52px;
  min-width: 52px;
  height: 52px;
  min-height: 52px;
  padding: 0;
  border-radius: 50%;
}

.icon-control img,
.tool-control img {
  display: block;
  width: 24px;
  height: 24px;
}

.icon-control.is-off img {
  filter: invert(32%) sepia(20%) saturate(1276%) hue-rotate(314deg);
}

.video-controls .leave-control {
  border-color: #8e4d4d;
  background: #8e4d4d;
}

.video-controls .leave-control img {
  filter: invert(1);
}

.video-console .session-tools {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 8px;
}

.session-tools .tool-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.session-tools .tool-control.is-active {
  border-color: var(--soft-blue);
  background: var(--pale-blue);
}

.session-tools .tool-control.has-unread {
  box-shadow: inset 0 0 0 2px var(--soft-blue);
}

.setup-actions .secondary-button.is-stop-preview {
  border-color: #8e4d4d;
  color: #7a4040;
  background: #fff7f7;
}

.session-tools .end-session-control {
  grid-column: 1 / -1;
  border-color: #8e4d4d;
  background: #8e4d4d;
  color: var(--white);
}

.session-tools .end-session-control img {
  filter: invert(1);
}

.video-lobby-main.has-ended-call {
  display: grid;
  align-items: center;
}

.call-ended-card {
  width: min(680px, 100%);
  margin-inline: auto;
  padding: clamp(32px, 7vw, 72px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
  text-align: center;
}

.call-ended-card > img {
  width: min(220px, 70%);
  margin: 0 auto 34px;
}

.call-ended-card h1 {
  margin: 0.25rem 0 0.75rem;
  color: var(--deep-blue);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  line-height: 1;
}

.call-ended-card p:not(.eyebrow) {
  margin: 0 auto 28px;
  color: var(--muted);
}

.call-ended-card .primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.clinician-main {
  width: min(900px, calc(100% - 40px));
}

.clinician-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.clinician-heading h1 {
  margin: 0.2rem 0 0.35rem;
  color: var(--deep-blue);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
}

.clinician-heading p:last-child {
  margin: 0;
  color: var(--muted);
}

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

.waiting-client {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(17, 63, 103, 0.08);
}

.waiting-client-details {
  display: grid;
}

.waiting-client-details strong {
  color: var(--deep-blue);
  font-size: 1.08rem;
}

.waiting-client-details span {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.waiting-client-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.empty-waiting {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 52px 20px;
  border: 1px dashed #bfd8df;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-waiting strong {
  color: var(--deep-blue);
  font-size: 1.15rem;
}

@media (max-width: 1080px) {
  .video-lobby-main .video-stage {
    grid-template-columns: 1fr;
  }

  .setup-panel {
    width: min(680px, 100%);
    margin-inline: auto;
  }
}

@media (max-width: 620px) {
  .encryption-badge {
    max-width: 105px;
    text-align: center;
    line-height: 1.15;
  }

  .video-console .session-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chat-panel {
    width: 100%;
    border-left: 0;
  }

  .camera-placeholder-content > img {
    width: 42px;
    height: 42px;
    margin-bottom: 0.65rem;
  }

  .camera-placeholder h2 {
    margin: 0;
    font-size: 1.7rem;
  }

  .camera-placeholder p {
    display: none;
  }

  .clinician-heading,
  .waiting-client {
    align-items: stretch;
    flex-direction: column;
  }

  .waiting-client-actions > * {
    flex: 1;
  }
}
.booking-next {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--soft-blue);
  border-radius: 8px;
  background: var(--pale-blue);
  color: var(--ink);
}

.booking-next strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--deep-blue);
}

.booking-next p { margin: 0; }
.header-home-link {
  grid-column: 3;
  justify-self: end;
  width: auto;
  text-decoration: none;
}

@media (max-width: 760px) {
  .header-home-link { grid-column: 2; }
}
