:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #07101d;
    color: #edf4ff;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 10%, rgba(49, 113, 255, .18), transparent 34rem),
        radial-gradient(circle at 90% 85%, rgba(38, 203, 155, .11), transparent 30rem),
        #07101d;
    color: #edf4ff;
}
a { color: inherit; }
.shell, .portal {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
}
.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: clamp(28px, 6vw, 80px);
    align-items: center;
    padding: 48px 0;
}
.brand-panel h1, .portal h1 {
    margin: .45rem 0 1rem;
    font-size: clamp(2.45rem, 7vw, 5.4rem);
    line-height: .96;
    letter-spacing: -.045em;
}
.brand-panel > p:not(.eyebrow), .portal-header p, .panel > p, .muted {
    color: #aabbd0;
    line-height: 1.65;
}
.brand-panel ul {
    margin: 30px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
    list-style: none;
    color: #cbd9ea;
}
.brand-panel li::before { content: "✓"; color: #4be2ae; margin-right: 10px; font-weight: 800; }
.eyebrow {
    margin: 0;
    color: #75aaff;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.panel {
    width: min(100%, 460px);
    margin: auto;
    padding: clamp(24px, 5vw, 42px);
    border: 1px solid #223653;
    border-radius: 22px;
    background: rgba(13, 27, 46, .94);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .36);
}
.panel h1, .panel h2 { margin: .45rem 0 .25rem; font-size: 2rem; }
form { margin-top: 24px; }
label { display: block; margin: 18px 0 7px; color: #d7e4f4; font-size: .88rem; font-weight: 700; }
input[type="text"], input[type="password"] {
    width: 100%;
    border: 1px solid #30496c;
    border-radius: 11px;
    padding: 13px 14px;
    background: #081524;
    color: #edf4ff;
    font: inherit;
    outline: none;
}
input:focus { border-color: #75aaff; box-shadow: 0 0 0 3px rgba(117, 170, 255, .14); }
.captcha-wrap { min-height: 78px; margin: 22px 0 18px; overflow: hidden; }
.button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid #78aaff;
    border-radius: 11px;
    padding: 11px 18px;
    background: #6da3ff;
    color: #06101d;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}
.login-panel .button { width: 100%; }
.button:hover { filter: brightness(1.08); }
.button:focus-visible, .user-editor summary:focus-visible { outline: 3px solid rgba(117, 170, 255, .72); outline-offset: 3px; }
.button.secondary { border-color: #30496c; background: #101f34; color: #e9f2ff; }
.alert, .notice {
    margin: 18px 0 0;
    border: 1px solid #743b4a;
    border-radius: 10px;
    padding: 11px 12px;
    background: #2a1420;
    color: #ffc8d3;
    line-height: 1.45;
}
.notice { border-color: #276153; background: #0e2a25; color: #aef4df; }
.privacy-note { margin: 16px 0 0; color: #71849d; font-size: .76rem; line-height: 1.5; }
.privacy-note a { color: #9bbfff; }
.portal { padding: clamp(38px, 7vw, 80px) 0; }
.portal-header { display: flex; gap: 32px; align-items: flex-start; justify-content: space-between; }
.portal-header > div { max-width: 780px; }
.portal-header h1 { font-size: clamp(2.3rem, 7vw, 4.5rem); }
.portal-header form { margin: 0; flex: 0 0 auto; }
.portal-actions { display: flex; gap: 10px; align-items: center; flex: 0 0 auto; }
.portal-actions form { margin: 0; }
.signed-in { margin-top: 10px; font-size: .9rem; }
.site-grid { display: grid; gap: 18px; margin-top: 42px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.site-card {
    display: flex;
    min-height: 220px;
    flex-direction: column;
    border: 1px solid #28405f;
    border-radius: 18px;
    padding: 24px;
    background: rgba(14, 29, 49, .92);
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease;
}
.site-card:hover { transform: translateY(-2px); border-color: #75aaff; }
.site-card strong { margin-top: 28px; font-size: 1.35rem; }
.site-card small { margin-top: 7px; color: #8397b2; line-height: 1.5; }
.status { color: #9fdac8; font-size: .8rem; font-weight: 750; }
.status span { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #48d6a6; box-shadow: 0 0 0 4px rgba(72, 214, 166, .10); }
.open-link { margin-top: auto; color: #8ab5ff; font-size: .88rem; font-weight: 750; }
.empty-state { grid-column: 1 / -1; border: 1px dashed #30496c; border-radius: 18px; padding: 30px; color: #aabbd0; }
.empty-state h2 { margin: 0 0 8px; color: #edf4ff; }
.compact-header h1 { font-size: clamp(2.3rem, 6vw, 3.8rem); }
.admin-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 24px; margin-top: 36px; align-items: start; }
.admin-layout h2 { margin: 0 0 16px; }
.user-list { display: grid; gap: 12px; }
.user-card, .create-user-panel { border: 1px solid #28405f; border-radius: 16px; background: rgba(14, 29, 49, .92); }
.owner-card { padding: 20px; }
.user-editor summary { display: grid; gap: 10px; padding: 20px; cursor: pointer; list-style-position: outside; }
.user-editor[open] summary { border-bottom: 1px solid #28405f; }
.user-summary { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.user-summary > span:first-child, .user-summary > div { display: grid; gap: 3px; }
.user-summary span span, .user-summary div span { color: #8397b2; font-size: .82rem; }
.account-status { border: 1px solid #2d6858; border-radius: 999px; padding: 5px 9px; color: #aef4df; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.account-status.disabled { border-color: #743b4a; color: #ffc8d3; }
.site-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.site-badges > span { border-radius: 999px; padding: 4px 8px; background: #142944; color: #9bbfff; font-size: .72rem; font-weight: 750; }
.site-badges .no-sites { background: #252a34; color: #a8b1bf; }
.small { font-size: .8rem; }
.account-form { margin: 0; padding: 20px; }
.mutation-fields { min-width: 0; margin: 0; border: 0; padding: 0; }
.mutation-fields[disabled] { opacity: .58; }
.reset-form { border-top: 1px solid #28405f; }
.reset-form h3 { margin: 0 0 6px; }
.create-user-panel { position: sticky; top: 20px; padding: 22px; }
.create-user-panel .account-form { padding: 0; }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.toggle-row { display: flex; min-height: 44px; gap: 10px; align-items: center; margin-top: 18px; }
.toggle-row input, .site-option input { width: 18px; height: 18px; accent-color: #6da3ff; }
.site-picker { margin: 20px 0; border: 1px solid #28405f; border-radius: 12px; padding: 14px; }
.site-picker legend { padding: 0 7px; color: #d7e4f4; font-size: .85rem; font-weight: 800; }
.site-option { display: flex; min-height: 48px; gap: 11px; align-items: center; margin: 4px 0; padding: 8px; border-radius: 9px; background: #0b192a; cursor: pointer; }
.site-option span { display: grid; gap: 2px; }
.site-option small { color: #8397b2; }
.site-option:focus-within { box-shadow: 0 0 0 3px rgba(117, 170, 255, .22); }
.account-form > .button { margin-top: 18px; }
@media (max-width: 760px) {
    .login-shell { grid-template-columns: 1fr; padding: 34px 0; }
    .brand-panel { padding: 10px 4px 0; }
    .brand-panel ul { display: none; }
    .panel { width: 100%; }
    .portal-header { display: block; }
    .portal-actions { margin-top: 22px; align-items: stretch; flex-direction: column; }
    .portal-actions .button, .portal-header > .button { width: 100%; }
    .admin-layout, .form-columns { grid-template-columns: 1fr; }
    .admin-layout > div { grid-row: 2; }
    .create-user-panel { position: static; grid-row: 1; }
    .user-summary { align-items: flex-start; }
    .logout { width: 100%; }
}
@media (max-width: 360px) {
    .g-recaptcha { transform: scale(.88); transform-origin: left top; }
    .captcha-wrap { min-height: 70px; }
}