:root {
  color-scheme: light;
  --ink: #14233b;
  --muted: #617088;
  --line: #dde5ef;
  --surface: #ffffff;
  --surface-soft: #f4f7fb;
  --navy: #12233f;
  --navy-2: #1a355c;
  --primary: #2457d6;
  --primary-hover: #1948be;
  --primary-soft: #e9efff;
  --teal: #0f8d82;
  --danger: #c63843;
  --danger-dark: #a72530;
  --warning: #a86100;
  --success: #178150;
  --shadow: 0 18px 50px rgba(26, 47, 82, .12);
  --radius: 18px;
  --focus: 0 0 0 3px rgba(36, 87, 214, .28);
  --sidebar-width: 264px;
  --sidebar-icon-size: 40px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--surface-soft); color: var(--ink); font-size: 15px; line-height: 1.45; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: var(--primary); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.55rem, 3vw, 2.05rem); line-height: 1.15; }
h2 { font-size: 1.35rem; line-height: 1.2; }
h3 { font-size: 1rem; }
.skip-link { position: fixed; z-index: 1000; top: 8px; left: 8px; padding: 10px 14px; background: white; border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 5px; color: var(--primary); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow--light { color: #bcd2ff; }

.button, .icon-button, .nav-item, .tool-button, .round-control, .input-action {
  border: 0;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.button:focus-visible, .icon-button:focus-visible, .nav-item:focus-visible, .tool-button:focus-visible, .round-control:focus-visible, .input-action:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 0; box-shadow: var(--focus); }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border: 1px solid transparent; border-radius: 11px; font-weight: 750; text-decoration: none; }
.button:hover { text-decoration: none; }
.button:disabled { cursor: not-allowed; opacity: .52; }
.button--primary { background: var(--primary); color: white; }
.button--primary:hover:not(:disabled) { background: var(--primary-hover); }
.button--secondary { background: white; color: var(--primary); border-color: #bfcdef; }
.button--secondary:hover:not(:disabled) { background: var(--primary-soft); }
.button--quiet { background: #eef2f7; color: var(--ink); }
.button--quiet:hover:not(:disabled) { background: #e2e8f0; }
.button--danger { background: var(--danger); color: white; }
.button--danger:hover:not(:disabled) { background: var(--danger-dark); }
.button--small { min-height: 34px; padding: 6px 11px; border-radius: 9px; font-size: .84rem; }
.button--wide { width: 100%; }
.icon-button { display: inline-grid; width: 42px; height: 42px; place-items: center; flex: 0 0 42px; border: 1px solid var(--line); border-radius: 11px; background: white; font-size: 1.2rem; }
.icon-button:hover { background: var(--surface-soft); }
.icon-button--dark { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: white; }
.icon-button > svg,
.action-glyph > svg,
.storage-icon > svg,
.profile-password-icon > svg,
.empty-state-icon > svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button > svg { width: 22px; height: 22px; }

.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1rem; }
.brand small { color: var(--muted); font-size: .7rem; }
.brand--light { color: white; }
.brand--light small { color: #bcd0ef; }
.brand-mark { display: inline-grid; width: 40px; height: 40px; place-items: center; flex: 0 0 40px; border-radius: 13px; background: linear-gradient(145deg, #386fe9, #153f9d); color: white; font-weight: 900; box-shadow: 0 8px 22px rgba(18, 67, 170, .26); }
.brand-mark--large { width: 60px; height: 60px; border-radius: 18px; font-size: 1.35rem; }

/* Authentication */
.auth-page { background: white; }
.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(360px, 1.08fr) minmax(360px, .92fr); }
.auth-brand { position: relative; display: flex; min-height: 100%; flex-direction: column; justify-content: space-between; overflow: hidden; padding: clamp(28px, 5vw, 66px); background: radial-gradient(circle at 75% 18%, rgba(70, 130, 255, .3), transparent 24%), linear-gradient(145deg, #10213e, #173867 68%, #0a6d70); color: white; }
.auth-intro { position: relative; z-index: 1; max-width: 620px; margin: auto 0; padding: 60px 0; }
.auth-intro h1 { max-width: 590px; margin: 12px 0 20px; font-size: clamp(2.2rem, 5vw, 4.2rem); letter-spacing: -.04em; }
.auth-intro > p { max-width: 580px; color: #d4e2f6; font-size: 1.08rem; }
.auth-benefits { display: grid; gap: 12px; margin: 30px 0 0; padding: 0; list-style: none; }
.auth-benefits li { display: flex; align-items: center; gap: 10px; color: #edf4ff; }
.auth-benefits span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.14); }
.auth-orbits i { position: absolute; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; }
.auth-orbits i:nth-child(1) { width: 420px; height: 420px; right: -190px; bottom: -140px; }
.auth-orbits i:nth-child(2) { width: 260px; height: 260px; right: -85px; bottom: -60px; }
.auth-orbits i:nth-child(3) { width: 90px; height: 90px; right: 45px; bottom: 35px; background: rgba(255,255,255,.04); }
.auth-card-wrap { display: grid; place-items: center; padding: 34px; }
.auth-card { display: grid; width: min(430px, 100%); gap: 20px; }
.auth-card h2 { margin-bottom: 8px; font-size: 1.85rem; }
.auth-help { margin: 0; color: var(--muted); font-size: .84rem; text-align: center; }
.password-field { position: relative; }
.password-field input { padding-right: 92px; }
.input-action { position: absolute; right: 8px; top: 7px; padding: 6px 8px; border-radius: 7px; background: transparent; color: var(--primary); font-size: .78rem; font-weight: 700; }

/* Shared forms */
.form-field { display: grid; align-content: start; gap: 6px; }
.form-field--wide { grid-column: 1 / -1; }
.form-field label, .background-fieldset legend, .record-destination legend { color: #263750; font-size: .84rem; font-weight: 750; }
.form-field input, .form-field textarea, .form-field select, .search-field input, .chat-form textarea, .board-text-form textarea { width: 100%; border: 1px solid #cfd9e6; border-radius: 10px; background: white; color: var(--ink); }
.form-field input, .form-field select, .search-field input { min-height: 42px; padding: 9px 12px; }
.form-field textarea, .chat-form textarea, .board-text-form textarea { resize: vertical; padding: 10px 12px; }
.form-field small { color: var(--muted); font-size: .75rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.label-row { display: flex; justify-content: space-between; }
.check-row { display: flex; align-items: flex-start; gap: 9px; color: #42516a; font-size: .86rem; }
.check-row input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--primary); }
.form-message { min-height: 1.3em; margin: 0; color: var(--danger); font-size: .84rem; }
.form-message.is-success { color: var(--success); }
.invitee-picker { position: relative; }
.directory-results { display: grid; max-height: 190px; overflow-y: auto; border: 1px solid #cfd9e6; border-radius: 10px; background: white; box-shadow: 0 12px 28px rgba(21, 42, 72, .12); }
.directory-option { display: grid; gap: 1px; padding: 9px 11px; border: 0; border-bottom: 1px solid #edf1f5; background: white; color: var(--ink); cursor: pointer; text-align: left; }
.directory-option:last-child { border-bottom: 0; }
.directory-option:hover, .directory-option:focus-visible, .directory-option[aria-selected="true"] { background: var(--primary-soft); outline: 0; }
.directory-option strong, .directory-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.directory-option small { color: var(--muted); }

/* Cabinet */
.app-shell { display: grid; min-height: 100vh; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { position: sticky; z-index: 50; inset-block: 0; display: flex; height: 100vh; height: 100dvh; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 25px 17px 18px; border-right: 1px solid #dce4ef; background: #f9fbfd; }
.sidebar .brand { padding: 0 8px 28px; }
.nav-list { display: grid; gap: 5px; }
.nav-caption { margin: 26px 11px 8px; color: #8a96a9; font-size: .67rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.nav-item { position: relative; display: grid; min-height: 58px; grid-template-columns: var(--sidebar-icon-size) minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 13px; background: transparent; color: #44546e; text-align: left; }
.nav-item:hover { background: #edf2f9; color: #182942; }
.nav-item.is-active { background: #e9efff; color: #173e99; font-weight: 800; box-shadow: inset 3px 0 #2457d6; }
.nav-item:focus-visible { position: relative; z-index: 1; }
.nav-icon { --nav-icon-ink: #2457d6; --nav-icon-bg: #e3ebff; display: inline-grid; width: var(--sidebar-icon-size); height: var(--sidebar-icon-size); place-items: center; border: 1px solid color-mix(in srgb, var(--nav-icon-ink) 24%, transparent); border-radius: 12px; background: var(--nav-icon-bg); color: var(--nav-icon-ink); box-shadow: 0 5px 13px color-mix(in srgb, var(--nav-icon-ink) 12%, transparent); }
.nav-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.nav-icon--meetings { --nav-icon-ink: #2156c7; --nav-icon-bg: #e1eaff; }
.nav-icon--recordings { --nav-icon-ink: #7a3fc0; --nav-icon-bg: #f0e6ff; }
.nav-icon--settings { --nav-icon-ink: #b46a06; --nav-icon-bg: #fff0d2; }
.nav-icon--profile { --nav-icon-ink: #087f79; --nav-icon-bg: #dff6f3; }
.nav-icon--overview { --nav-icon-ink: #a25c00; --nav-icon-bg: #fff0d4; }
.nav-icon--users { --nav-icon-ink: #187248; --nav-icon-bg: #def4e8; }
.nav-icon--integrations { --nav-icon-ink: #b23867; --nav-icon-bg: #fde4ee; }
.nav-item:hover .nav-icon,
.nav-item.is-active .nav-icon { border-color: color-mix(in srgb, var(--nav-icon-ink) 44%, transparent); box-shadow: 0 7px 18px color-mix(in srgb, var(--nav-icon-ink) 18%, transparent); }
.nav-count { min-width: 23px; padding: 2px 6px; border-radius: 20px; background: #e1e7ef; font-size: .7rem; text-align: center; }
.sidebar-foot { display: grid; gap: 10px; margin-top: auto; }
.profile-card { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px; border-top: 1px solid var(--line); }
.profile-card > span:nth-child(2) { min-width: 0; }
.profile-card strong, .profile-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-card small { color: var(--muted); font-size: .72rem; }
.avatar { display: inline-grid; width: 38px; height: 38px; place-items: center; flex: 0 0 38px; border-radius: 12px; background: linear-gradient(145deg, #dae5ff, #bfcef5); color: #214caa; font-weight: 850; }
.avatar--large { width: 70px; height: 70px; flex-basis: 70px; border-radius: 22px; font-size: 1.2rem; }
.workspace { min-width: 0; }
.topbar { position: sticky; z-index: 30; top: 0; display: flex; min-height: 82px; align-items: center; justify-content: space-between; gap: 18px; padding: 16px clamp(18px, 3vw, 38px); border-bottom: 1px solid rgba(215,224,236,.9); background: rgba(255,255,255,.91); backdrop-filter: blur(16px); }
.topbar h1 { margin: 0; font-size: 1.45rem; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.connection-badge { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .76rem; }
.connection-badge i, .connection-state i { width: 8px; height: 8px; border-radius: 50%; background: #8d99aa; }
.connection-badge.is-online i { background: var(--success); box-shadow: 0 0 0 4px rgba(23,129,80,.12); }
.connection-badge.is-error { color: var(--danger); }
.connection-badge.is-error i { background: var(--danger); }
.workspace > main { padding: clamp(20px, 3vw, 38px); }
.page-message { min-height: 1.4em; margin: 0 0 10px; color: var(--danger); }
.page-message.is-success { color: var(--success); }
.page-section { animation: reveal .18s ease; }
@keyframes reveal { from { opacity: .6; transform: translateY(3px); } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-heading h2 { margin-bottom: 6px; font-size: 1.6rem; }
.page-heading p:last-child { margin: 0; color: var(--muted); }
.summary-card { min-width: 130px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.summary-card strong, .summary-card span { display: block; }
.summary-card strong { font-size: 1.55rem; }
.summary-card span { color: var(--muted); font-size: .76rem; }
.toolbar-card, .table-card, .storage-card, .profile-panel, .details-list { border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 7px 24px rgba(29, 49, 79, .04); }
.toolbar-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; padding: 12px; }
.segmented { display: flex; gap: 4px; overflow-x: auto; }
.segmented button { min-height: 36px; padding: 7px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); white-space: nowrap; cursor: pointer; }
.segmented button.is-active { background: var(--primary-soft); color: var(--primary); font-weight: 750; }
.search-field { position: relative; display: flex; min-width: 220px; align-items: center; }
.search-field > span:first-child { position: absolute; left: 11px; color: #7a8799; }
.search-field input { padding-left: 34px; }
.meeting-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 15px; }
.meeting-card { display: grid; gap: 14px; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 7px 24px rgba(29, 49, 79, .04); }
.meeting-card.is-live { border-color: #8bd2c4; box-shadow: inset 0 3px 0 var(--teal), 0 7px 24px rgba(29,49,79,.05); }
.meeting-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.meeting-card h3 { margin: 0; overflow-wrap: anywhere; font-size: 1.08rem; }
.meeting-card-time { display: flex; align-items: center; gap: 8px; color: #526179; font-size: .82rem; }
.meeting-card-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: .76rem; }
.meeting-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 3px; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 4px 9px; border-radius: 20px; background: #eaf0f8; color: #53617a; font-size: .68rem; font-weight: 800; }
.status-chip--live { background: #def6ee; color: #087052; }
.status-chip--scheduled { background: #e9efff; color: #315cb8; }
.status-chip--ended { background: #edf0f4; color: #68758a; }
.status-chip--cancelled { background: #f8e8ea; color: #9c313b; }
.empty-state { display: grid; min-height: 270px; place-items: center; align-content: center; gap: 8px; padding: 32px; border: 1px dashed #c8d3e1; border-radius: var(--radius); color: var(--muted); text-align: center; }
.empty-state > span { font-size: 2rem; }
.empty-state-icon { display: inline-grid; width: 56px; height: 56px; place-items: center; border-radius: 17px; background: #e6edff; color: #2457d6; }
.empty-state-icon > svg { width: 30px; height: 30px; }
.empty-state h3, .empty-state p { margin: 0; }
.empty-state--compact { min-height: 150px; border: 0; }
.storage-card { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 16px; margin-bottom: 20px; padding: 20px; }
.storage-icon { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 14px; background: #fff1dc; color: #a65a00; font-size: 1.4rem; }
.storage-icon > svg { width: 27px; height: 27px; }
.storage-heading { display: flex; justify-content: space-between; gap: 12px; }
.storage-heading h3 { margin: 0 0 4px; }
.storage-heading p { margin: 0; color: var(--muted); font-size: .82rem; }
.storage-progress { height: 9px; margin-top: 13px; overflow: hidden; border-radius: 10px; background: #e8edf3; }
.storage-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #15a6a0); transition: width .25s ease; }
.table-card { overflow: hidden; }
.table-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.table-head h3 { margin: 0 0 3px; }
.table-head p { margin: 0; color: var(--muted); font-size: .78rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 18px; border-bottom: 1px solid #edf1f5; text-align: left; vertical-align: middle; }
th { color: #68768b; font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; }
td { font-size: .84rem; }
td strong, td small { display: block; }
td small { color: var(--muted); }
.table-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.table-actions .icon-button { width: 34px; height: 34px; flex-basis: 34px; font-size: .9rem; }
.integration-note { margin: 0 0 18px; }
.integration-uri { display: block; max-width: 420px; overflow-wrap: anywhere; }
.integration-secret-body { display: grid; gap: 16px; }
.integration-secret-body input, .integration-secret-body textarea { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }
.profile-layout { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr); gap: 18px; }
.profile-panel { display: flex; align-items: center; gap: 18px; padding: 24px; }
.profile-panel h3 { margin: 0 0 5px; font-size: 1.15rem; }
.profile-panel p { margin: 0 0 10px; color: var(--muted); }
.details-list { margin: 0; padding: 8px 22px; }
.details-list > div { display: flex; justify-content: space-between; gap: 20px; padding: 15px 0; border-bottom: 1px solid #edf1f5; }
.details-list > div:last-child { border-bottom: 0; }
.details-list dt { color: var(--muted); }
.details-list dd { margin: 0; font-weight: 700; text-align: right; }
.mobile-only { display: none; }
.sidebar-opener svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sidebar-scrim { position: fixed; z-index: 45; inset: 0; border: 0; background: rgba(5,17,36,.5); }

/* Dialogs */
.dialog { width: min(650px, calc(100vw - 28px)); max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); padding: 0; overflow: hidden; border: 0; border-radius: 18px; box-shadow: 0 28px 80px rgba(11,27,52,.28); }
.dialog::backdrop { background: rgba(10, 23, 44, .58); backdrop-filter: blur(4px); }
.dialog--large,
.device-dialog { width: min(940px, calc(100vw - 28px)); }
.dialog--small { width: min(460px, calc(100vw - 28px)); }
.dialog-shell { display: flex; width: 100%; max-width: 100%; max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); min-width: 0; flex-direction: column; }
.dialog-shell--large,
.dialog-shell--small { width: 100%; }
.dialog header, .dialog footer { display: flex; min-width: 0; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px; }
.dialog header > :first-child { min-width: 0; }
.dialog header .icon-button { flex: 0 0 auto; }
.dialog header { border-bottom: 1px solid var(--line); }
.dialog header h2 { margin: 0; overflow-wrap: anywhere; }
.dialog footer { flex-wrap: wrap; justify-content: flex-end; border-top: 1px solid var(--line); }
.dialog-body { min-width: 0; min-height: 0; flex: 1 1 auto; padding: 20px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.dialog textarea,
.dialog input,
.dialog select { min-width: 0; max-width: 100%; }
.dialog textarea { width: 100%; overflow-wrap: anywhere; }
.dialog .form-message,
.dialog .dialog-subtitle { overflow-wrap: anywhere; }
.dialog.is-mutation-pending .dialog-shell { cursor: progress; }
.dialog.is-mutation-pending .dialog-body { opacity: .86; }
.device-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); gap: 20px; }
.device-preview { position: relative; min-height: 360px; overflow: hidden; border-radius: 15px; background: #101b2d; }
.device-preview video { width: 100%; height: 100%; min-height: 360px; object-fit: cover; transform: scaleX(-1); }
.device-preview.is-full-blur video { filter: blur(9px); transform: scaleX(-1) scale(1.05); }
.video-empty { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; color: #dce8f8; }
.video-empty span { font-size: 2.2rem; }
.preview-label { position: absolute; bottom: 12px; left: 12px; padding: 5px 9px; border-radius: 8px; background: rgba(4,12,25,.68); color: white; font-size: .7rem; }
.device-controls { display: grid; align-content: start; gap: 13px; }
.privacy-note { display: flex; gap: 8px; margin: 0; padding: 11px 12px; border-radius: 10px; background: #edf4ff; color: #3f5575; font-size: .77rem; }
.meter-block { display: grid; gap: 7px; }
.meter-block > div:first-child { display: flex; justify-content: space-between; gap: 10px; font-size: .78rem; }
.meter-block strong { color: var(--muted); }
.meter-block small { color: var(--muted); }
.audio-meter { height: 10px; overflow: hidden; border-radius: 12px; background: #e3e9f0; }
.audio-meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), #70c36b, #e5a634, #d1494d); transition: width .08s linear; }
.background-fieldset, .record-destination { margin: 0; padding: 0; border: 0; }
.background-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 7px; }
.background-choice { position: relative; min-width: 0; }
.background-choice input { position: absolute; opacity: 0; pointer-events: none; }
.background-choice label { display: grid; min-height: 52px; place-items: center; padding: 5px; overflow: hidden; border: 2px solid transparent; border-radius: 9px; background: var(--background, #e9eef5); color: #20324d; cursor: pointer; font-size: .62rem; font-weight: 750; text-align: center; }
.background-choice input:checked + label { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(36,87,214,.13); }
.background-choice input:focus-visible + label { box-shadow: var(--focus); }
.background-choice.is-locked label { cursor: not-allowed; opacity: .58; }
.background-choice em { position: absolute; right: 3px; bottom: 3px; padding: 1px 4px; border-radius: 5px; background: rgba(14,28,50,.8); color: white; font-size: .5rem; font-style: normal; }
.background-explanation { margin: 7px 0 0; color: var(--muted); font-size: .72rem; }

/* Launch */
.launch-shell { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 20%, #edf3ff, #f7f9fc 56%); }
.launch-card { display: grid; width: min(460px, 100%); justify-items: center; padding: 40px; border: 1px solid var(--line); border-radius: 24px; background: white; box-shadow: var(--shadow); text-align: center; }
.launch-card h1 { margin: 10px 0; }
.spinner { width: 34px; height: 34px; margin-top: 12px; border: 3px solid #dbe3f0; border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Room */
.room-page { overflow: hidden; background: #091322; color: #eef4ff; }
.conference { display: grid; height: 100vh; grid-template-rows: 66px minmax(0, 1fr) auto; }
.conference-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,.1); background: #0e1c31; }
.conference-title { display: flex; min-width: 0; align-items: center; gap: 11px; }
.conference-title h1 { margin: 0; overflow: hidden; color: white; font-size: 1.05rem; text-overflow: ellipsis; white-space: nowrap; }
.conference-meta { display: flex; align-items: center; gap: 15px; color: #c5d2e6; font-size: .76rem; }
.connection-state, .room-recording { display: inline-flex; align-items: center; gap: 7px; }
.connection-state[data-state="connected"] i { background: #48d29c; box-shadow: 0 0 0 4px rgba(72,210,156,.12); }
.connection-state[data-state="connecting"] i, .connection-state[data-state="reconnecting"] i { background: #f5b94e; animation: pulse 1s infinite; }
.connection-state[data-state="failed"] i { background: #ff6773; }
.room-recording { padding: 5px 9px; border-radius: 20px; background: rgba(198,56,67,.19); color: #ffadb3; font-weight: 800; }
.room-recording i { width: 8px; height: 8px; border-radius: 50%; background: #ff4858; animation: pulse 1.1s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.conference-workspace { display: grid; min-height: 0; grid-template-columns: minmax(0, 1fr) 330px; }
.conference-main { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: radial-gradient(circle at 50% 40%, #182944, #091321 70%); }
.room-banner { position: absolute; z-index: 8; top: 12px; left: 50%; max-width: min(680px, calc(100% - 26px)); padding: 8px 13px; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; background: rgba(9,20,36,.84); color: #d9e5f5; font-size: .77rem; overflow-wrap: anywhere; transform: translateX(-50%); }
.room-banner.is-error { border-color: rgba(255,100,110,.55); color: #ffb9bf; }
.prejoin-card { position: absolute; z-index: 5; inset: 0; display: grid; place-content: center; justify-items: center; padding: 26px; text-align: center; }
.prejoin-card h2 { margin: 12px 0 8px; color: white; font-size: 1.8rem; }
.prejoin-card p:not(.eyebrow) { max-width: 520px; color: #afbdd1; }
.prejoin-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 13px; }
.stage-panel { position: absolute; inset: 0; min-width: 0; min-height: 0; padding: 45px 14px 14px; overflow: auto; }
.video-grid { display: grid; min-height: 100%; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); grid-auto-rows: minmax(170px, 1fr); gap: 10px; }
.video-tile { position: relative; min-height: 170px; overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; background: #16243a; }
.video-tile.is-speaking { border-color: #52dbad; box-shadow: 0 0 0 2px rgba(82,219,173,.27); }
.video-tile video { width: 100%; height: 100%; object-fit: cover; }
.video-tile.is-local video { transform: scaleX(-1); }
.participant-placeholder { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(145deg, #20324e, #15233a); }
.participant-placeholder span { display: grid; width: 72px; height: 72px; place-items: center; border-radius: 24px; background: #2d4770; color: white; font-size: 1.2rem; font-weight: 850; }
.video-tile footer { position: absolute; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: space-between; padding: 22px 10px 8px; background: linear-gradient(transparent, rgba(5,12,23,.82)); color: white; font-size: .75rem; }
.media-flags { display: flex; gap: 5px; }
.media-flag { display: inline-grid; min-width: 21px; height: 21px; place-items: center; border-radius: 6px; background: rgba(8,18,32,.65); font-size: .62rem; }
.screen-share { position: absolute; z-index: 3; inset: 45px 14px 14px; display: grid; grid-template-rows: auto minmax(0,1fr); overflow: hidden; border: 1px solid rgba(255,255,255,.15); border-radius: 13px; background: #050b14; }
.screen-share-head { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; background: #152640; color: #d5e0ef; font-size: .72rem; }
.screen-share [data-screen-media], .screen-share video { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.conference-side { display: grid; min-height: 0; grid-template-rows: auto minmax(0, 1fr); border-left: 1px solid rgba(255,255,255,.1); background: #101e32; }
.side-tabs { display: grid; grid-template-columns: repeat(3, 1fr); padding: 7px; border-bottom: 1px solid rgba(255,255,255,.09); }
.side-tabs button { min-height: 38px; border: 0; border-radius: 8px; background: transparent; color: #91a3bc; cursor: pointer; font-size: .75rem; }
.side-tabs button[aria-selected="true"] { background: #20334f; color: white; font-weight: 800; }
.side-panel { min-height: 0; overflow-y: auto; }
.side-panel-head { padding: 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.side-panel-head h2 { margin: 0 0 4px; color: white; font-size: 1rem; }
.side-panel-head p { margin: 0; color: #91a2ba; font-size: .72rem; }
.hand-summary { display: flex; gap: 8px; margin: 11px; padding: 9px; border-radius: 9px; background: rgba(243,178,65,.13); color: #f6cd82; font-size: .74rem; }
.participant-list { display: grid; gap: 3px; margin: 0; padding: 8px; list-style: none; }
.participant-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 8px; border-radius: 9px; }
.participant-row.is-speaking { background: rgba(67,205,159,.1); }
.participant-row .avatar { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; }
.participant-row strong, .participant-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.participant-row strong { color: #eef4ff; font-size: .78rem; }
.participant-row small { color: #8fa1b9; font-size: .65rem; }
.participant-state { color: #a4b5ca; font-size: .68rem; }
.chat-panel { display: grid; grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; }
.chat-list { display: flex; min-height: 0; flex-direction: column; gap: 12px; margin: 0; padding: 14px; overflow-y: auto; list-style: none; }
.chat-message { display: grid; gap: 3px; }
.chat-message header { display: flex; justify-content: space-between; gap: 8px; color: #94a5bd; font-size: .65rem; }
.chat-message header strong { color: #dce6f4; }
.chat-message p { margin: 0; padding: 8px 10px; border-radius: 2px 10px 10px; background: #1a2b45; color: #e9f0fa; font-size: .78rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-message.is-self p { background: #234a83; }
.chat-form { display: grid; gap: 6px; padding: 10px; border-top: 1px solid rgba(255,255,255,.09); }
.chat-form textarea { border-color: #354760; background: #15243a; color: white; }
.chat-form > div { display: flex; align-items: center; justify-content: space-between; color: #8295ae; font-size: .65rem; }
.side-callout { display: flex; gap: 11px; margin: 15px; padding: 13px; border-radius: 11px; background: #192c47; }
.side-callout strong { display: block; color: white; font-size: .82rem; }
.side-callout p { margin: 3px 0 0; color: #96a9c0; font-size: .71rem; }
.conference-side .button--wide, .conference-side .privacy-note { width: calc(100% - 30px); margin: 0 15px 12px; }
.board-panel { background: #e9edf2; color: var(--ink); }
.board-toolbar { position: sticky; z-index: 3; top: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 9px; padding: 9px; border: 1px solid #d2dae5; border-radius: 11px; background: rgba(255,255,255,.95); color: var(--ink); }
.tool-group { display: flex; gap: 4px; }
.tool-button { display: inline-flex; min-height: 34px; align-items: center; gap: 5px; padding: 6px 9px; border: 1px solid #d1d9e4; border-radius: 8px; background: white; font-size: .72rem; }
.tool-button.is-active { border-color: #97afea; background: var(--primary-soft); color: var(--primary); }
.tool-label { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: .68rem; }
.tool-label select { min-height: 31px; border: 1px solid #d1d9e4; border-radius: 7px; }
.tool-label input[type="color"] { width: 33px; height: 31px; padding: 2px; border: 1px solid #d1d9e4; border-radius: 7px; }
.board-sync { margin-left: auto; color: var(--muted); font-size: .68rem; }
.board-surface { position: relative; min-width: 700px; height: calc(100% - 53px); min-height: 450px; overflow: hidden; border: 1px solid #cfd7e1; border-radius: 12px; background-color: white; background-image: radial-gradient(#d9e0e9 1px, transparent 1px); background-size: 20px 20px; touch-action: none; }
.board-surface canvas { position: absolute; width: 100%; height: 100%; inset: 0; cursor: crosshair; touch-action: none; }
.board-text-layer { position: absolute; inset: 0; pointer-events: none; }
.board-text-item { position: absolute; max-width: 280px; padding: 4px 7px; border-radius: 5px; background: rgba(255,255,255,.85); color: var(--text-color, #14233b); font-size: clamp(.75rem, 1.2vw, 1rem); overflow-wrap: anywhere; white-space: pre-wrap; }
.board-text-form { position: absolute; z-index: 5; width: min(290px, calc(100% - 20px)); padding: 11px; border: 1px solid #bfcbe0; border-radius: 10px; background: white; box-shadow: var(--shadow); }
.board-text-form label { display: block; margin-bottom: 5px; font-size: .72rem; font-weight: 750; }
.board-text-form > div { display: flex; justify-content: flex-end; gap: 6px; margin-top: 7px; }
.control-dock { display: grid; grid-template-columns: 170px minmax(0,1fr) 170px; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid rgba(255,255,255,.1); background: #0d1a2c; }
.control-status span, .control-status small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.control-status span { font-weight: 750; }
.control-status small { color: #8799b0; font-size: .65rem; }
.control-group { display: flex; justify-content: center; gap: 7px; overflow-x: auto; }
.round-control { display: grid; min-width: 62px; height: 54px; place-items: center; align-content: center; gap: 1px; padding: 4px 7px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: #1a2b44; color: white; }
.round-control:hover:not(:disabled) { background: #263b5a; }
.round-control span { line-height: 1; font-size: 1rem; }
.round-control small { font-size: .58rem; }
.round-control.is-off { background: #3b2734; color: #ffccd0; }
.round-control[aria-pressed="true"] { border-color: #69a0ff; background: #254f89; }
.round-control--leave, .round-control--end { background: #8e2832; }
.round-control:disabled { cursor: not-allowed; opacity: .45; }
.record-warning { display: flex; gap: 12px; padding: 13px; border-radius: 11px; background: #fae9eb; color: #8a2933; }
.record-warning > span { color: #d13240; }
.record-warning strong { display: block; }
.record-warning p { margin: 3px 0 0; font-size: .78rem; }
.plain-list { display: grid; gap: 8px; padding-left: 20px; color: #4f5f75; font-size: .82rem; }
.record-destination { display: grid; gap: 8px; }
.record-destination label { display: flex; align-items: flex-start; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.record-destination input { margin-top: 3px; accent-color: var(--primary); }
.record-destination strong, .record-destination small { display: block; }
.record-destination small { margin-top: 2px; color: var(--muted); font-weight: 400; }

@media (max-width: 1050px) {
  .conference-workspace { grid-template-columns: minmax(0, 1fr) 290px; }
  .control-dock { grid-template-columns: 100px minmax(0,1fr) 20px; }
  .control-status small { display: none; }
}

@media (max-width: 820px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { min-height: 360px; }
  .auth-intro { padding: 50px 0 20px; }
  .auth-intro h1 { font-size: clamp(2rem, 9vw, 3.2rem); }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; width: 100%; height: auto; min-height: 0; transform: none; }
  .app-shell[data-sidebar-ready="true"] .sidebar { position: fixed; inset-block: 0; left: 0; width: min(304px, calc(100vw - 28px)); height: 100vh; height: 100dvh; transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .app-shell[data-sidebar-ready="true"] .sidebar.is-open { transform: none; }
  .app-shell[data-sidebar-ready="true"] .mobile-only { display: inline-grid; }
  .cabinet-page.is-sidebar-open { overflow: hidden; }
  .topbar { justify-content: flex-start; }
  .topbar-actions { margin-left: auto; }
  .connection-badge { display: none; }
  .page-heading { align-items: flex-start; }
  .toolbar-card { align-items: stretch; flex-direction: column; }
  .search-field { min-width: 0; }
  .profile-layout { grid-template-columns: 1fr; }
  .device-layout { grid-template-columns: 1fr; }
  .device-preview, .device-preview video { min-height: 260px; }
  .conference { grid-template-rows: 58px minmax(0,1fr) auto; }
  .conference-workspace { position: relative; display: block; }
  .conference-main { position: absolute; inset: 0; }
  .conference-side { position: absolute; z-index: 20; right: 8px; bottom: 8px; width: min(330px, calc(100% - 16px)); height: min(520px, calc(100% - 16px)); border: 1px solid rgba(255,255,255,.13); border-radius: 13px; box-shadow: 0 16px 50px rgba(0,0,0,.35); }
  .conference-side.is-collapsed { display: none; }
  .control-dock { grid-template-columns: 1fr; padding: 7px; }
  .control-status, .control-spacer { display: none; }
  .control-group { justify-content: flex-start; }
  .round-control { min-width: 57px; }
}

@media (max-width: 600px) {
  .dialog,
  .dialog--large,
  .dialog--small,
  .device-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .dialog-shell { max-height: calc(100dvh - 16px); }
  .dialog header,
  .dialog footer { padding: 14px; }
  .dialog-body { padding: 14px; }
  .dialog footer .button { flex: 1 1 auto; }
  .auth-card-wrap { padding: 26px 20px; }
  .auth-brand { min-height: 0; padding: 25px 22px; }
  .auth-intro { margin: 0; padding: 26px 0 2px; }
  .auth-intro h1 { margin: 8px 0 0; font-size: 1.65rem; }
  .auth-intro > p, .auth-benefits { display: none; }
  .topbar { min-height: 72px; padding: 12px 14px; }
  .topbar .button--primary { width: 42px; padding: 0; font-size: 0; }
  .topbar .button--primary span { font-size: 1.2rem; }
  .workspace > main { padding: 17px 13px; }
  .page-heading { display: grid; }
  .summary-card { display: none; }
  .segmented { width: 100%; }
  .meeting-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .storage-card { grid-template-columns: 1fr; }
  .storage-icon { display: none; }
  .table-head { align-items: stretch; flex-direction: column; }
  th, td { padding: 11px 12px; }
  .background-options { grid-template-columns: repeat(3, 1fr); }
  .conference-meta .connection-state span, .conference-meta time { display: none; }
  .conference-title h1 { max-width: 52vw; }
  .video-grid { grid-template-columns: 1fr; }
  .stage-panel { padding-right: 8px; padding-left: 8px; }
  .conference-side { inset: auto 6px 6px; width: calc(100% - 12px); }
}

@media (max-width: 420px) {
  :root { --sidebar-icon-size: 38px; }
  .app-shell[data-sidebar-ready="true"] .sidebar { width: calc(100vw - 20px); padding-inline: 13px; }
  .nav-item { min-height: 54px; grid-template-columns: var(--sidebar-icon-size) minmax(0, 1fr) auto; padding-inline: 8px; }
  .nav-icon svg { width: 22px; height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@media (forced-colors: active) {
  .nav-item.is-active { outline: 2px solid Highlight; outline-offset: -2px; box-shadow: none; }
  .nav-icon,
  .empty-state-icon,
  .storage-icon { border: 1px solid ButtonText; background: Canvas; color: ButtonText; box-shadow: none; forced-color-adjust: auto; }
  .sidebar-scrim { background: CanvasText; opacity: .55; }
}
