:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #152236;
    background: #f3f6fa;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: #1768d2; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
[hidden] { display: none !important; }

.brand { color: #1559b7; font-size: 1.3rem; font-weight: 800; letter-spacing: -.04em; }
.muted { color: #68778b; }
.topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100% - 1100px) / 2)); background: #fff; border-bottom: 1px solid #e6ebf1; }
.account, .account form, .person-info, .person-actions, .section-heading, .call-heading { display: flex; align-items: center; }
.account { gap: 18px; color: #506076; }
.dashboard { max-width: 1100px; margin: 36px auto; padding: 0 22px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.people-panel, .call-panel, .auth-card { background: #fff; border: 1px solid #e6ebf1; border-radius: 18px; box-shadow: 0 14px 45px rgba(30, 55, 90, .06); }
.people-panel { padding: 26px; }
.section-heading { justify-content: space-between; margin-bottom: 20px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: 1.65rem; }
.section-heading .muted { margin: 0; }
.status-dot { color: #17834c; font-size: .85rem; }
.status-dot::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #25ad69; }
.people-list { list-style: none; padding: 0; margin: 0; }
.person { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid #edf0f4; }
.person-info { gap: 12px; }
.person-info strong, .person-info small { display: block; }
.person-info small { margin-top: 4px; color: #7a8798; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #1559b7; background: #e8f1ff; font-weight: 700; }
.person-actions { gap: 8px; }
.button { min-height: 40px; padding: 0 15px; border: 1px solid #dce3ec; border-radius: 10px; color: #34455c; background: #fff; cursor: pointer; font-weight: 650; }
.button:hover { filter: brightness(.97); }
.button:disabled { opacity: .55; cursor: not-allowed; }
.button.primary { color: #fff; background: #1768d2; border-color: #1768d2; }
.button.success { color: #fff; background: #16894f; border-color: #16894f; }
.button.danger { color: #fff; background: #d53c4b; border-color: #d53c4b; }
.button.subtle { min-height: 34px; padding: 0 12px; background: #f7f9fc; }
.button.full { width: 100%; margin-top: 20px; }
.empty { padding: 22px 0; color: #68778b; }
.notice { padding: 12px 14px; margin-bottom: 16px; border-radius: 10px; color: #7a4b00; background: #fff3d5; }
.call-panel { padding: 24px; }
.call-heading { justify-content: space-between; gap: 12px; }
.call-heading h2 { margin-bottom: 5px; }
.call-heading .muted { margin-bottom: 0; }
.eyebrow { margin-bottom: 6px; color: #1768d2; text-transform: uppercase; letter-spacing: .09em; font-size: .72rem; font-weight: 750; }
.video-stage { position: relative; min-height: 320px; margin-top: 18px; overflow: hidden; display: grid; place-items: center; border-radius: 14px; background: #111d2d; }
#remote-video { display: block; width: 100%; max-height: 62vh; object-fit: contain; }
#local-video { position: absolute; right: 14px; bottom: 14px; width: min(25%, 180px); aspect-ratio: 4/3; object-fit: cover; border: 2px solid rgba(255,255,255,.8); border-radius: 10px; background: #283447; }
#remote-audio { display: none; }
.video-placeholder { color: #d6e1ef; }
.incoming-call { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: rgba(12, 24, 40, .62); }
.incoming-card { width: min(100%, 380px); padding: 30px; text-align: center; border-radius: 20px; background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.25); }
.incoming-card h2 { margin-bottom: 5px; }
.incoming-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 18px; color: #fff; background: #1768d2; border-radius: 50%; font-size: 1.6rem; }
.incoming-actions { display: flex; justify-content: center; gap: 12px; margin-top: 22px; }
.auth-page { display: grid; place-items: center; padding: 24px; background: linear-gradient(140deg, #eaf2ff, #f5f7fb 50%, #eaf7f1); }
.auth-card { width: min(100%, 420px); padding: 34px; }
.auth-card h1 { margin: 26px 0 8px; }
.auth-card .muted { margin-bottom: 24px; }
.auth-card form > label:not(.check) { display: block; margin: 16px 0 7px; color: #35455b; font-weight: 650; font-size: .92rem; }
.auth-card input:not([type=checkbox]) { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #d8e0ea; border-radius: 9px; }
.auth-card input:focus { outline: 3px solid #d8e8ff; border-color: #1768d2; }
.check { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: #5a6a80; font-size: .9rem; }
.auth-footer { margin: 22px 0 0; text-align: center; color: #68778b; }
.alert { padding: 12px; border-radius: 9px; color: #9b2634; background: #ffedf0; }
.admin-page { max-width: 1000px; margin: 36px auto; padding: 0 22px; display: grid; gap: 22px; }
.admin-create-form { max-width: 560px; display: grid; gap: 9px; }
.admin-create-form h2 { margin: 0 0 8px; }
.admin-create-form label { margin-top: 8px; color: #35455b; font-weight: 650; font-size: .92rem; }
.admin-create-form input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #d8e0ea; border-radius: 9px; }
.admin-create-form input:focus { outline: 3px solid #d8e8ff; border-color: #1768d2; }
.admin-create-form .button { justify-self: start; margin-top: 10px; }
.form-help { color: #68778b; }
.user-actions { display: flex; align-items: center; gap: 8px; }
.user-actions form { margin: 0; }
.user-actions .button { min-height: 34px; padding: 0 11px; font-size: .85rem; }
.pagination { margin-top: 18px; }
.pagination nav > div:first-child { color: #68778b; }

@media (max-width: 600px) {
    .topbar { padding: 0 16px; }
    .account { gap: 10px; font-size: .88rem; }
    .dashboard { margin: 18px auto; padding: 0 12px; }
    .people-panel, .call-panel { padding: 18px; }
    .person { align-items: flex-start; padding: 14px 0; flex-direction: column; }
    .person-actions { width: 100%; }
    .person-actions .button { flex: 1; }
    .video-stage { min-height: 250px; }
    .auth-card { padding: 26px; }
}
