:root {
    color-scheme: light;
    --bg: #f5f7fb;
    --bg-elevated: #eef1f7;
    --surface: #ffffff;
    --surface-soft: #f8f9fc;
    --surface-strong: #111827;
    --text: #111827;
    --text-soft: #5f6b7a;
    --text-faint: #8b95a5;
    --border: #dfe4ec;
    --border-strong: #cbd3df;
    --primary: #5b5cf0;
    --primary-hover: #4748d8;
    --primary-soft: #eeeeff;
    --cyan: #0ea5b7;
    --success: #14815d;
    --success-soft: #e7f7f0;
    --danger: #dc3f56;
    --danger-soft: #fff0f2;
    --warning: #a26008;
    --warning-soft: #fff7df;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 14px rgba(16, 24, 40, .04);
    --shadow-md: 0 18px 55px rgba(25, 35, 58, .1);
    --shadow-lg: 0 30px 90px rgba(21, 29, 50, .16);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #090d16;
    --bg-elevated: #0d1320;
    --surface: #121927;
    --surface-soft: #171f2e;
    --surface-strong: #f6f7fb;
    --text: #f3f5f8;
    --text-soft: #a6b0c0;
    --text-faint: #778297;
    --border: #273143;
    --border-strong: #39465b;
    --primary: #8586ff;
    --primary-hover: #9b9cff;
    --primary-soft: #252650;
    --cyan: #35c5d5;
    --success: #53d39c;
    --success-soft: #12372e;
    --danger: #ff7185;
    --danger-soft: #3b1c25;
    --warning: #ffc45e;
    --warning-soft: #392b14;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .2), 0 5px 18px rgba(0, 0, 0, .18);
    --shadow-md: 0 22px 65px rgba(0, 0, 0, .3);
    --shadow-lg: 0 35px 100px rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
    margin: 0;
    min-width: 320px;
    color: var(--text);
    background: var(--bg);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
body, .sidebar, .app-header, .panel, .public-header, input, select, textarea, .button, .theme-toggle {
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.icon {
    width: 1.25em;
    height: 1.25em;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.035em; line-height: 1.08; }
h1 em, h2 em { color: var(--primary); font-style: normal; font-weight: inherit; }
.muted { color: var(--text-soft); }
.eyebrow {
    margin: 0 0 9px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.eyebrow > span {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--cyan) 14%, transparent);
}

/* Shared controls */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 11px 19px;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 750;
    line-height: 1.2;
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.button:active { transform: translateY(0); }
.button-primary { color: #fff; background: var(--primary); }
.button-primary:hover { background: var(--primary-hover); }
.button-dark { color: var(--bg); background: var(--surface-strong); }
.button-light { color: var(--text); border-color: var(--border); background: var(--surface); }
.button-light:hover { border-color: var(--border-strong); background: var(--surface-soft); }
.button-small { min-height: 38px; padding: 8px 13px; border-radius: 10px; font-size: 13px; }
.button-wide { width: 100%; }
.text-link, .auth-switch a {
    color: var(--primary);
    font-weight: 750;
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--primary) 35%, transparent);
    text-underline-offset: 4px;
}
.text-button {
    padding: 10px;
    color: var(--text-soft);
    background: transparent;
    cursor: pointer;
    font-weight: 700;
}
.text-button:hover { color: var(--text); }
.theme-toggle {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-soft);
    background: var(--surface);
    cursor: pointer;
}
.theme-toggle:hover { color: var(--primary); border-color: var(--border-strong); background: var(--surface-soft); }
.theme-glyph {
    position: relative;
    width: 17px;
    height: 17px;
    border: 2px solid currentColor;
    border-radius: 50%;
    box-shadow: 0 0 0 3px transparent;
}
.theme-glyph::before {
    content: "";
    position: absolute;
    inset: -6px;
    background: repeating-conic-gradient(currentColor 0 8deg, transparent 8deg 45deg);
    -webkit-mask: radial-gradient(circle, transparent 0 5px, #000 5.5px);
    mask: radial-gradient(circle, transparent 0 5px, #000 5.5px);
}
html[data-theme="dark"] .theme-glyph {
    border: 0;
    background: currentColor;
    box-shadow: inset 6px -4px 0 0 var(--surface);
}
html[data-theme="dark"] .theme-glyph::before { display: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 38%, transparent); outline-offset: 2px; }

.alert {
    padding: 13px 15px;
    border: 1px solid;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: opacity .3s, transform .3s;
}
.alert-error { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); background: var(--danger-soft); }
.alert-success { color: var(--success); border-color: color-mix(in srgb, var(--success) 30%, transparent); background: var(--success-soft); }
.alert-info { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 30%, transparent); background: var(--primary-soft); }
.fade-out { opacity: 0; transform: translateY(-5px); }
.public-flash, .floating-flash {
    position: fixed;
    z-index: 90;
    top: 84px;
    left: 50%;
    width: min(520px, calc(100% - 32px));
    transform: translateX(-50%);
    box-shadow: var(--shadow-md);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-size: 19px;
    font-weight: 850;
    letter-spacing: -.03em;
}
.brand-mark {
    position: relative;
    display: inline-flex;
    align-items: flex-end;
    gap: 3px;
    width: 31px;
    height: 31px;
    padding: 7px 6px;
    border-radius: 10px;
    background: linear-gradient(145deg, var(--primary), #8b5cf6);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 30%, transparent);
}
.brand-mark i { display: block; width: 4px; border-radius: 3px; background: #fff; }
.brand-mark i:nth-child(1) { height: 8px; }
.brand-mark i:nth-child(2) { height: 17px; }
.brand-mark i:nth-child(3) { height: 12px; }

label { display: grid; gap: 7px; color: var(--text); font-size: 13px; font-weight: 750; }
label small { color: var(--text-faint); font-weight: 550; }
input, select, textarea {
    width: 100%;
    min-height: 45px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: none;
    color: var(--text);
    background: var(--surface-soft);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent);
}
.stack-form { display: grid; gap: 17px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid.compact { gap: 12px; }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; z-index: 1; top: 13px; left: 13px; color: var(--text-faint); }
.input-icon input { padding-left: 42px; }
.input-icon button {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--text-soft);
    background: transparent;
    cursor: pointer;
}
.toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    cursor: pointer;
}
.toggle-row > input, .mini-toggle > input { position: absolute; opacity: 0; pointer-events: none; }
.toggle {
    position: relative;
    width: 42px;
    height: 24px;
    flex: 0 0 auto;
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    background: var(--bg-elevated);
}
.toggle::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-faint);
    transition: .2s ease;
}
.toggle-row input:checked + .toggle { border-color: var(--primary); background: var(--primary); }
.toggle-row input:checked + .toggle::after { left: 21px; background: #fff; }
.toggle-row > span:last-child { display: grid; gap: 1px; }
.toggle-row strong { font-size: 13px; }
.toggle-row small { color: var(--text-soft); font-size: 12px; font-weight: 500; }

/* Public navigation and landing */
.public-header {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 48px));
    height: 78px;
    margin: 0 auto;
}
.public-header nav { display: flex; align-items: center; gap: 12px; }
.public-header nav > a:not(.button) { padding: 9px 11px; color: var(--text-soft); font-weight: 700; }
.public-header nav > a:not(.button):hover { color: var(--text); }
.landing { overflow: hidden; }
.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, .9fr);
    align-items: center;
    gap: 70px;
    width: min(1180px, calc(100% - 48px));
    min-height: calc(100vh - 78px);
    margin: 0 auto;
    padding: 70px 0 100px;
}
.hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 3%;
    right: -24%;
    width: 680px;
    height: 680px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--primary) 14%, transparent), transparent 68%);
    pointer-events: none;
}
.hero-copy h1 { max-width: 730px; margin-bottom: 25px; font-size: clamp(54px, 6.2vw, 88px); font-weight: 800; }
.hero-lead { max-width: 610px; margin-bottom: 30px; color: var(--text-soft); font-size: 18px; line-height: 1.7; }
.hero-actions { display: flex; align-items: center; gap: 22px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 19px; margin-top: 38px; color: var(--text-soft); font-size: 13px; font-weight: 650; }
.trust-row span { display: flex; align-items: center; gap: 6px; }
.trust-row .icon { color: var(--success); }
.hero-visual {
    position: relative;
    min-height: 510px;
    border: 1px solid var(--border);
    border-radius: 32px;
    background:
        linear-gradient(150deg, color-mix(in srgb, var(--primary) 10%, var(--surface)), var(--surface) 48%, color-mix(in srgb, var(--cyan) 9%, var(--surface)));
    box-shadow: var(--shadow-lg);
    isolation: isolate;
}
.visual-orbit { position: absolute; z-index: -1; border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent); border-radius: 50%; }
.orbit-one { inset: 8% -15% -8% 13%; }
.orbit-two { inset: -16% 15% 28% -20%; }
.video-mock { position: absolute; overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 19px; background: #192033; box-shadow: 0 22px 60px rgba(6, 10, 20, .28); }
.main-person { inset: 42px 42px 128px 42px; }
.small-person { right: 23px; bottom: 63px; width: 39%; height: 39%; border: 4px solid var(--surface); }
.portrait { position: absolute; inset: 0; background: linear-gradient(145deg, #273450, #111827); }
.portrait::before {
    content: "";
    position: absolute;
    top: 21%;
    left: 50%;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f0ba96, #bf765c);
    transform: translateX(-50%);
}
.portrait::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -18%;
    width: 58%;
    height: 62%;
    border-radius: 50% 50% 20px 20px;
    background: var(--primary);
    transform: translateX(-50%);
}
.portrait span {
    position: absolute;
    z-index: 1;
    top: 17%;
    left: 50%;
    width: 91px;
    height: 47px;
    border-radius: 52px 52px 18px 18px;
    background: #342a29;
    transform: translateX(-50%);
}
.portrait-two::before { width: 53px; height: 53px; }
.portrait-two span { width: 60px; height: 31px; }
.portrait-two::after { background: var(--cyan); }
.person-label {
    position: absolute;
    z-index: 2;
    left: 14px;
    bottom: 13px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border-radius: 8px;
    color: #fff;
    background: rgba(5, 8, 15, .64);
    backdrop-filter: blur(12px);
    font-size: 11px;
    font-weight: 700;
}
.person-label i { width: 6px; height: 6px; border-radius: 50%; background: #54e2a7; }
.mock-controls {
    position: absolute;
    left: 42px;
    bottom: 48px;
    display: flex;
    gap: 9px;
}
.mock-controls span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #fff; background: #202a3e; }
.mock-controls .hangup { background: var(--danger); }
.secure-note {
    position: absolute;
    top: 25px;
    right: -25px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
}
.secure-note > .icon { color: var(--success); }
.secure-note span { display: grid; }
.secure-note strong { font-size: 12px; }
.secure-note small { color: var(--text-soft); font-size: 10px; }
.principles { padding: 110px max(24px, calc((100% - 1180px) / 2)); background: var(--surface); }
.principles > h2 { max-width: 850px; margin-bottom: 55px; font-size: clamp(38px, 5vw, 62px); }
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.principle-grid article {
    position: relative;
    min-height: 260px;
    padding: 29px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-soft);
}
.principle-grid article > b { position: absolute; top: 25px; right: 25px; color: var(--text-faint); font-size: 11px; }
.principle-grid article > .icon { width: 28px; height: 28px; margin-bottom: 55px; color: var(--primary); }
.principle-grid h3 { margin-bottom: 10px; font-size: 22px; }
.principle-grid p { margin-bottom: 0; color: var(--text-soft); }

/* Authentication, invitations, errors */
.auth-shell { display: grid; grid-template-columns: minmax(360px, .95fr) minmax(480px, 1.05fr); min-height: 100vh; }
.auth-story {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(45px, 7vw, 100px);
    color: #fff;
    background:
        radial-gradient(circle at 80% 10%, rgba(105, 167, 255, .25), transparent 35%),
        linear-gradient(145deg, #171b3b, #24215b 55%, #164c66);
}
.auth-story h1 { max-width: 590px; margin-top: 25px; font-size: clamp(44px, 5vw, 72px); }
.auth-story h1 em, .auth-story .eyebrow { color: #aeb5ff; }
.auth-story p { max-width: 550px; color: #c7cce0; font-size: 17px; }
.auth-story blockquote { max-width: 530px; margin: 70px 0 0; color: #aeb7ce; font-size: 13px; line-height: 1.7; }
.auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(520px, calc(100% - 64px));
    margin: auto;
    padding: 60px 0;
}
.auth-card > .brand { position: absolute; top: 30px; }
.auth-card > .eyebrow { margin-top: 45px; }
.auth-card h2 { margin-bottom: 8px; font-size: 39px; }
.auth-card > .muted { margin-bottom: 28px; }
.auth-card label > span { display: flex; justify-content: space-between; }
.auth-card label a { color: var(--primary); font-size: 12px; }
.auth-switch { margin: 25px 0 0; color: var(--text-soft); text-align: center; }
.join-shell, .error-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 30px;
    background:
        radial-gradient(circle at 50% 0, color-mix(in srgb, var(--primary) 14%, transparent), transparent 40%),
        var(--bg);
}
.join-card, .error-shell > section {
    width: min(520px, 100%);
    padding: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}
.join-card > .brand { margin-bottom: 45px; }
.invite-icon, .permission-symbol {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 22px;
    border-radius: 17px;
    color: var(--primary);
    background: var(--primary-soft);
}
.invite-icon .icon, .permission-symbol .icon { width: 27px; height: 27px; }
.join-card h1 { margin-bottom: 12px; font-size: 36px; }
.join-card > p:not(.eyebrow):not(.privacy-copy) { color: var(--text-soft); }
.join-card .stack-form { margin-top: 30px; }
.privacy-copy { display: flex; gap: 8px; margin: 25px 0 0; color: var(--text-faint); font-size: 12px; }
.privacy-copy .icon { color: var(--success); }
.error-shell > section { text-align: center; }
.error-shell .brand { margin-bottom: 45px; }
.error-code { display: block; margin-bottom: 4px; color: var(--primary); font-size: 80px; font-weight: 900; letter-spacing: -.08em; }
.error-shell h1 { font-size: 38px; }
.error-shell section > p:not(.eyebrow) { margin-bottom: 28px; color: var(--text-soft); }

/* Signed-in application */
.app-page { background: var(--bg); }
.sidebar {
    position: fixed;
    z-index: 50;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    width: 252px;
    padding: 24px 17px 18px;
    border-right: 1px solid var(--border);
    background: var(--surface);
}
.sidebar > .brand { padding: 0 10px 26px; }
.main-nav { display: grid; gap: 4px; }
.main-nav > p { margin: 23px 12px 7px; color: var(--text-faint); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.main-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 11px;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
}
.main-nav a:hover { color: var(--text); background: var(--surface-soft); }
.main-nav a.active { color: var(--primary); background: var(--primary-soft); }
.sidebar-profile {
    display: grid;
    grid-template-columns: 36px 1fr 30px;
    align-items: center;
    gap: 9px;
    margin-top: auto;
    padding: 13px 8px 2px;
    border-top: 1px solid var(--border);
}
.sidebar-profile > span:nth-child(2) { display: grid; min-width: 0; }
.sidebar-profile strong, .sidebar-profile small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-profile strong { font-size: 12px; }
.sidebar-profile small { color: var(--text-faint); font-size: 10px; }
.sidebar-profile button { width: 30px; height: 30px; border-radius: 8px; color: var(--text-faint); background: transparent; cursor: pointer; }
.sidebar-profile button:hover { color: var(--danger); background: var(--danger-soft); }
.avatar {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border-radius: 11px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}
.app-shell { min-height: 100vh; margin-left: 252px; }
.app-header {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
    padding: 13px clamp(24px, 4vw, 58px);
    border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(18px);
}
.app-header .eyebrow { margin-bottom: 3px; font-size: 9px; }
.app-header h1 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.privacy-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-soft);
    background: var(--surface);
    font-size: 11px;
    font-weight: 700;
}
.privacy-pill .icon { color: var(--success); }
.mobile-menu { display: none; width: 40px; height: 40px; border-radius: 10px; background: var(--surface); cursor: pointer; }
.app-content { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 48px 0 80px; }
.app-content > .alert { margin-bottom: 20px; }
.panel {
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.dashboard-intro, .admin-lead {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 60px;
    margin-bottom: 36px;
}
.dashboard-intro h2, .admin-lead h2 { margin-bottom: 15px; font-size: clamp(38px, 4.4vw, 60px); }
.dashboard-intro > div:first-child > p:last-child, .admin-lead > p { max-width: 500px; margin-bottom: 0; color: var(--text-soft); }
.dashboard-signal {
    display: grid;
    grid-template-columns: 10px auto;
    min-width: 290px;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.dashboard-signal .pulse-dot { grid-row: 1 / 3; align-self: center; width: 9px; height: 9px; margin-right: 10px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px var(--success-soft); }
.dashboard-signal strong { font-size: 12px; }
.dashboard-signal small { color: var(--text-faint); font-size: 10px; }
.create-room-card {
    position: relative;
    display: grid;
    grid-template-columns: .9fr 1.2fr;
    gap: 55px;
    margin-bottom: 48px;
    padding: 34px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}
.card-number { position: absolute; top: 18px; right: 24px; color: var(--text-faint); font-size: 11px; font-weight: 800; }
.create-copy { display: flex; align-items: flex-start; gap: 18px; padding: 15px 0; }
.create-copy > .icon { width: 38px; height: 38px; padding: 9px; border-radius: 11px; color: #fff; background: var(--primary); box-sizing: content-box; }
.create-copy h3 { margin-bottom: 8px; font-size: 27px; }
.create-copy p:last-child { color: var(--text-soft); }
.create-room-form { display: grid; gap: 15px; padding: 22px; border-radius: 17px; background: var(--surface-soft); }
.section-block { margin-top: 15px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.section-heading .eyebrow { margin-bottom: 4px; }
.section-heading h3 { margin: 0; font-size: 22px; }
.section-heading > span, .section-heading a { color: var(--text-soft); font-size: 12px; font-weight: 700; }
.empty-state { padding: 65px 25px; border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--text-soft); text-align: center; }
.empty-state > .icon { width: 34px; height: 34px; margin: 0 auto 15px; color: var(--primary); }
.empty-state h4 { margin-bottom: 7px; color: var(--text); font-size: 18px; }
.empty-state p { margin: 0; }
.meeting-list { display: grid; gap: 9px; }
.meeting-list article {
    display: grid;
    grid-template-columns: 54px 1fr auto auto;
    align-items: center;
    gap: 16px;
    padding: 14px 15px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.meeting-date { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 11px; color: var(--text-soft); background: var(--surface-soft); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.meeting-date b { color: var(--text); font-size: 18px; line-height: 1; letter-spacing: 0; }
.meeting-meta h4 { margin-bottom: 4px; font-size: 15px; }
.meeting-meta p { display: flex; align-items: center; gap: 5px; margin: 0; color: var(--text-faint); font-size: 11px; }
.meeting-meta .icon { width: 13px; height: 13px; }
.status { padding: 5px 9px; border-radius: 20px; font-size: 10px; font-weight: 800; }
.status-live { color: var(--success); background: var(--success-soft); }
.status-ended { color: var(--text-faint); background: var(--surface-soft); }
.status-ready { color: var(--primary); background: var(--primary-soft); }
.meeting-actions { display: flex; gap: 8px; }
.icon-button { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 10px; color: var(--text-soft); background: var(--surface); cursor: pointer; }
.icon-button:hover, .icon-button.copied { color: var(--primary); border-color: var(--primary); }

/* Administration */
.compact-lead { align-items: center; }
.compact-lead h2 { margin-bottom: 0; font-size: clamp(34px, 3.7vw, 50px); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 23px; }
.stats-grid article {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.stats-grid article > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--primary); background: var(--primary-soft); }
.stats-grid article > div { display: grid; }
.stats-grid small { color: var(--text-soft); font-size: 10px; font-weight: 700; }
.stats-grid strong { font-size: 26px; line-height: 1.1; }
.stats-grid article > i { position: absolute; top: 13px; right: 14px; color: var(--text-faint); font-size: 9px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.stats-grid article.accent { border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); background: var(--primary-soft); }
.admin-grid { display: grid; grid-template-columns: 1.35fr .75fr; gap: 18px; }
.people-list { display: grid; }
.people-list > div, .participant-list > div {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-top: 1px solid var(--border);
}
.people-list > div:first-child { border-top: 0; }
.people-list span:nth-child(2), .participant-list span:nth-child(2) { display: grid; min-width: 0; }
.people-list strong, .participant-list strong { font-size: 12px; }
.people-list small, .participant-list small { overflow: hidden; color: var(--text-faint); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.people-list em { padding: 4px 8px; border-radius: 8px; color: var(--primary); background: var(--primary-soft); font-size: 9px; font-style: normal; font-weight: 800; }
.quick-panel > h3 { font-size: 23px; }
.quick-panel > a {
    display: grid;
    grid-template-columns: 35px 1fr 16px;
    align-items: center;
    gap: 10px;
    padding: 13px 0;
    border-top: 1px solid var(--border);
}
.quick-panel > a > .icon:first-child { width: 35px; height: 35px; padding: 8px; border-radius: 10px; color: var(--primary); background: var(--primary-soft); box-sizing: border-box; }
.quick-panel > a span { display: grid; }
.quick-panel > a strong { font-size: 12px; }
.quick-panel > a small { color: var(--text-faint); font-size: 10px; }
.role-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.role-strip article {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: 11px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}
.role-strip article > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; color: var(--primary); background: var(--primary-soft); }
.role-strip article > div { display: grid; }
.role-strip strong { font-size: 12px; }
.role-strip small { color: var(--text-faint); font-size: 10px; }
.role-strip b { color: var(--text-faint); font-size: 9px; text-transform: uppercase; }
.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 12px; color: var(--text-faint); font-size: 9px; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
td { padding: 13px 12px; border-top: 1px solid var(--border); }
.table-person { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.table-person > span:last-child { display: grid; }
.table-person strong { font-size: 12px; }
.table-person small { color: var(--text-faint); font-size: 10px; }
.user-edit-form { display: grid; grid-template-columns: minmax(130px, .7fr) minmax(120px, .7fr) 1fr auto; align-items: center; gap: 10px; }
.user-edit-form select { min-height: 38px; padding: 7px 9px; font-size: 12px; }
.user-edit-form > span { color: var(--text-soft); font-size: 11px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.settings-panel { display: grid; align-content: start; gap: 13px; }
.panel-title { display: flex; align-items: center; gap: 13px; margin-bottom: 5px; }
.panel-title > .icon { width: 40px; height: 40px; padding: 10px; border-radius: 11px; color: var(--primary); background: var(--primary-soft); box-sizing: border-box; }
.panel-title .eyebrow { margin-bottom: 2px; }
.panel-title h3 { margin: 0; font-size: 21px; }
.span-all { grid-column: 1 / -1; }
.field-help, .form-note { margin-bottom: 2px; color: var(--text-soft); font-size: 12px; }
.form-note { padding: 11px 13px; border-radius: 10px; background: var(--surface-soft); }
.settings-actions { display: flex; justify-content: flex-end; gap: 10px; }
.template-layout { display: grid; grid-template-columns: 250px 1fr; gap: 18px; }
.template-list {
    align-self: start;
    display: grid;
    gap: 4px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}
.template-list > .eyebrow { padding: 0 8px 8px; }
.template-list a {
    display: grid;
    grid-template-columns: 30px 1fr 8px;
    align-items: center;
    gap: 9px;
    padding: 10px;
    border-radius: 10px;
    color: var(--text-soft);
}
.template-list a:hover, .template-list a.active { color: var(--primary); background: var(--primary-soft); }
.template-list a > .icon { width: 30px; height: 30px; padding: 7px; border-radius: 9px; background: var(--surface-soft); box-sizing: border-box; }
.template-list a span { display: grid; }
.template-list strong { font-size: 11px; }
.template-list small { color: var(--text-faint); font-size: 9px; }
.template-list a > i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); }
.template-list a > i.on { background: var(--success); }
.template-editor { display: grid; gap: 16px; }
.mini-toggle { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.mini-toggle > span { width: 9px; height: 9px; border-radius: 50%; background: var(--text-faint); }
.mini-toggle input:checked + span { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.placeholder-help { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--text-soft); font-size: 11px; }
.placeholder-help strong { margin-right: 5px; }
.placeholder-help code { padding: 4px 7px; border-radius: 6px; color: var(--primary); background: var(--primary-soft); }

/* Conference */
.meeting-page { overflow: hidden; background: #070a11; }
.conference { min-height: 100vh; color: #f5f7fb; background: #070a11; }
.conference-header {
    position: fixed;
    z-index: 30;
    top: 0;
    right: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 72px;
    padding: 12px 20px;
    border-bottom: 1px solid #222a38;
    background: rgba(7, 10, 17, .88);
    backdrop-filter: blur(16px);
}
.brand-light { color: #fff; }
.room-identity { display: flex; align-items: center; gap: 10px; text-align: center; }
.room-identity > div { display: grid; }
.room-identity strong { font-size: 13px; }
.room-identity small { color: #8590a4; font-size: 10px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #54d69b; box-shadow: 0 0 0 5px rgba(84, 214, 155, .12); }
.conference-status { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.conference-status > span { color: #8d98aa; font-size: 10px; }
.conference-status button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 42px;
    height: 40px;
    border: 1px solid #2b3444;
    border-radius: 11px;
    color: #d9deea;
    background: #151b27;
    cursor: pointer;
}
.conference-status .theme-toggle { min-width: 40px; width: 40px; }
.conference-status button b { font-size: 11px; }
.stage { min-height: 100vh; padding: 88px 18px 100px; }
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(220px, calc((100vh - 215px) / 2));
    gap: 10px;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
}
.video-grid[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
.video-grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: center; }
.video-grid[data-count="3"], .video-grid[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.video-tile {
    position: relative;
    min-height: 0;
    overflow: hidden;
    border: 1px solid #252e3e;
    border-radius: 16px;
    background: #111722;
}
.video-tile video { width: 100%; height: 100%; object-fit: cover; }
.video-placeholder { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, #222c40, #10151f); }
.video-placeholder[hidden] { display: none; }
.video-placeholder span { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 28px; color: #c8caff; background: #292b60; font-size: 30px; font-weight: 800; }
.tile-label {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border-radius: 8px;
    background: rgba(5, 7, 12, .7);
    backdrop-filter: blur(8px);
    font-size: 11px;
    font-weight: 700;
}
.tile-label small { color: #9aa5b8; }
.audio-indicator { width: 5px; height: 5px; border-radius: 50%; background: #54d69b; }
.participant-panel {
    position: fixed;
    z-index: 40;
    top: 80px;
    right: 12px;
    bottom: 90px;
    width: 320px;
    padding: 20px;
    border: 1px solid #293244;
    border-radius: 17px;
    background: #121823;
    box-shadow: 0 25px 70px rgba(0,0,0,.45);
    transform: translateX(calc(100% + 25px));
    transition: transform .25s ease;
}
.participant-panel.open { transform: translateX(0); }
.panel-heading { display: flex; justify-content: space-between; align-items: start; }
.panel-heading h2 { margin: 0; font-size: 22px; }
.panel-heading button { width: 32px; height: 32px; border-radius: 9px; color: #a8b0bf; background: #202837; cursor: pointer; }
.participant-list { margin-top: 15px; }
.participant-list > div { border-color: #293244; }
.invite-box { position: absolute; right: 20px; bottom: 60px; left: 20px; padding: 16px; border-radius: 13px; background: #1b2230; }
.invite-box h3 { margin-bottom: 6px; }
.invite-box p:not(.eyebrow) { color: #96a0b3; font-size: 11px; }
.invite-box .button-light { color: #e9edf5; border-color: #313b4e; background: #252e3e; }
.end-meeting-link { position: absolute; right: 20px; bottom: 17px; left: 20px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px; color: #ff7789; background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; }
.conference-controls {
    position: fixed;
    z-index: 35;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 82px;
    padding: 11px 20px;
    border-top: 1px solid #222a38;
    background: rgba(7, 10, 17, .9);
    backdrop-filter: blur(16px);
}
.meeting-clock { display: flex; align-items: center; gap: 7px; color: #8d98aa; font-size: 11px; }
.control-cluster { display: flex; gap: 8px; }
.control-button {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 7px;
    min-width: 88px;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #2a3445;
    border-radius: 13px;
    color: #e7eaf1;
    background: #171e2b;
    cursor: pointer;
}
.control-button span { font-size: 10px; font-weight: 700; }
.control-button:hover, .control-button.active { background: #263048; }
.control-button.off, .control-button.danger { color: #fff; border-color: transparent; background: #d93b52; }
.encryption-badge { justify-self: end; display: flex; align-items: center; gap: 8px; color: #7f8a9d; }
.encryption-badge > .icon { color: #4fd59b; }
.encryption-badge span { display: grid; }
.encryption-badge strong { color: #bfc6d3; font-size: 10px; }
.encryption-badge small { font-size: 9px; }
.permission-overlay { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(5, 7, 12, .78); backdrop-filter: blur(18px); }
.permission-overlay.hidden { display: none; }
.permission-card { width: min(440px, 100%); padding: 33px; border: 1px solid #2a3445; border-radius: 22px; background: #131a26; box-shadow: 0 30px 100px #000; text-align: center; }
.permission-symbol { margin: 0 auto 21px; color: #b7b9ff; background: #292b5d; }
.permission-card h2 { font-size: 29px; }
.permission-card > p:not(.eyebrow) { color: #9ca6b9; }
.permission-card .text-button { margin-top: 8px; color: #9ca6b9; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 98px; padding: 11px 15px; border: 1px solid #303a4c; border-radius: 10px; color: #fff; background: #1b2230; box-shadow: 0 15px 45px #000; opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

html[data-theme="light"] .meeting-page,
html[data-theme="light"] .conference { color: var(--text); background: var(--bg-elevated); }
html[data-theme="light"] .conference-header,
html[data-theme="light"] .conference-controls {
    border-color: var(--border);
    background: color-mix(in srgb, var(--surface) 90%, transparent);
}
html[data-theme="light"] .brand-light { color: var(--text); }
html[data-theme="light"] .room-identity small,
html[data-theme="light"] .conference-status > span,
html[data-theme="light"] .meeting-clock { color: var(--text-soft); }
html[data-theme="light"] .conference-status button,
html[data-theme="light"] .control-button {
    color: var(--text);
    border-color: var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
html[data-theme="light"] .conference-status button:hover,
html[data-theme="light"] .control-button:hover,
html[data-theme="light"] .control-button.active { background: var(--surface-soft); }
html[data-theme="light"] .control-button.off,
html[data-theme="light"] .control-button.danger { color: #fff; border-color: transparent; background: var(--danger); }
html[data-theme="light"] .participant-panel,
html[data-theme="light"] .permission-card {
    color: var(--text);
    border-color: var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}
html[data-theme="light"] .participant-list > div { border-color: var(--border); }
html[data-theme="light"] .panel-heading button { color: var(--text-soft); background: var(--surface-soft); }
html[data-theme="light"] .invite-box { background: var(--surface-soft); }
html[data-theme="light"] .invite-box p:not(.eyebrow),
html[data-theme="light"] .permission-card > p:not(.eyebrow),
html[data-theme="light"] .permission-card .text-button { color: var(--text-soft); }
html[data-theme="light"] .invite-box .button-light { color: var(--text); border-color: var(--border); background: var(--surface); }
html[data-theme="light"] .encryption-badge { color: var(--text-faint); }
html[data-theme="light"] .encryption-badge strong { color: var(--text-soft); }
html[data-theme="light"] .permission-overlay { background: rgba(225, 230, 240, .72); }
html[data-theme="light"] .permission-symbol { color: var(--primary); background: var(--primary-soft); }
html[data-theme="light"] .toast { color: var(--text); border-color: var(--border); background: var(--surface); box-shadow: var(--shadow-md); }

@media (max-width: 1050px) {
    .hero { grid-template-columns: 1fr 420px; gap: 35px; }
    .hero-copy h1 { font-size: 58px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-intro, .admin-lead { align-items: start; flex-direction: column; gap: 18px; }
    .dashboard-signal { min-width: 0; width: 100%; }
    .create-room-card { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 820px) {
    .public-header { width: calc(100% - 32px); }
    .public-header nav > a:not(.button) { display: none; }
    .hero { grid-template-columns: 1fr; width: calc(100% - 32px); padding: 55px 0 85px; }
    .hero-copy h1 { font-size: clamp(48px, 12vw, 70px); }
    .hero-visual { min-height: 470px; }
    .principle-grid { grid-template-columns: 1fr; }
    .principle-grid article { min-height: 220px; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-story { display: none; }
    .auth-card { min-height: 100vh; }
    .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
    .sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-open::after { content: ""; position: fixed; z-index: 40; inset: 0; background: rgba(5, 9, 17, .55); }
    .app-shell { margin-left: 0; }
    .mobile-menu { display: inline-grid; place-items: center; }
    .app-header { justify-content: start; gap: 13px; }
    .header-actions { margin-left: auto; }
    .privacy-pill { display: none; }
    .admin-grid, .settings-grid, .template-layout { grid-template-columns: 1fr; }
    .template-list { grid-template-columns: repeat(3, 1fr); }
    .template-list > .eyebrow { grid-column: 1 / -1; }
    .conference-header { grid-template-columns: 1fr auto; }
    .room-identity { display: none; }
    .conference-controls { grid-template-columns: 1fr; }
    .meeting-clock, .encryption-badge { display: none; }
    .video-grid, .video-grid[data-count] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .public-header .brand + nav { gap: 7px; }
    .public-header .button-small { display: none; }
    .hero { padding-top: 35px; }
    .hero-copy h1 { font-size: 47px; }
    .hero-lead { font-size: 16px; }
    .hero-actions { align-items: stretch; flex-direction: column; }
    .hero-actions .text-link { text-align: center; }
    .trust-row { gap: 10px 15px; }
    .hero-visual { min-height: 390px; }
    .main-person { inset: 30px 22px 105px; }
    .small-person { right: 12px; bottom: 50px; }
    .secure-note { display: none; }
    .mock-controls { left: 22px; bottom: 35px; }
    .principles { padding-top: 75px; padding-bottom: 75px; }
    .join-shell, .error-shell { padding: 16px; }
    .join-card, .error-shell > section { padding: 27px 21px; }
    .auth-card { width: calc(100% - 36px); }
    .app-header { padding: 11px 16px; }
    .app-header h1 { font-size: 18px; }
    .app-content { width: calc(100% - 28px); padding-top: 30px; }
    .form-grid { grid-template-columns: 1fr; }
    .dashboard-intro h2, .admin-lead h2 { font-size: 38px; }
    .create-room-card { padding: 20px; }
    .create-room-form { padding: 16px; }
    .meeting-list article { grid-template-columns: 48px 1fr auto; }
    .meeting-list .status { display: none; }
    .meeting-actions { grid-column: 2 / -1; justify-content: flex-end; }
    .stats-grid, .role-strip { grid-template-columns: 1fr; }
    .template-list { grid-template-columns: 1fr; }
    .user-edit-form { grid-template-columns: 1fr 1fr; }
    .user-edit-form > span { display: none; }
    .settings-actions { align-items: stretch; flex-direction: column; }
    .settings-actions .button { width: 100%; }
    .conference-header { padding: 10px 12px; }
    .conference-header .brand > span:last-child, .conference-status > span { display: none; }
    .stage { padding: 76px 8px 82px; }
    .video-grid, .video-grid[data-count] { grid-template-columns: 1fr; grid-auto-rows: minmax(180px, calc((100vh - 180px) / 2)); }
    .control-cluster { width: 100%; justify-content: center; }
    .control-button { min-width: 52px; width: 58px; padding: 0; grid-template-columns: 1fr; justify-items: center; }
    .control-button span { display: none; }
    .participant-panel { top: 72px; right: 8px; bottom: 79px; width: calc(100% - 16px); }
}

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