:root {
    color-scheme: light;
    --auth-bg: #faf9f6;
    --auth-surface: #fff;
    --auth-text: #221b38;
    --auth-muted: #696273;
    --auth-border: #e5e0ed;
    --auth-accent: #7357f5;
    --auth-accent-ink: #5d3fce;
    --auth-control-border: #93889f;
    --auth-accent-soft: #f0ecff;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--auth-text);
    background: var(--auth-bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; }
a { color: var(--auth-accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--auth-accent); outline-offset: 3px; }
h1, h2, p { margin: 0; }
.skip-link { position: absolute; top: -100px; left: 20px; padding: 12px 16px; border-radius: 8px; background: var(--auth-surface); z-index: 2; }
.skip-link:focus { top: 12px; }
.auth-header { width: min(1120px, 100%); margin: 0 auto; padding: 32px 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--auth-text); font-size: 22px; font-weight: 650; letter-spacing: -.8px; }
.auth-brand:hover { text-decoration: none; }
.auth-brand img { display: block; }
.header-note { color: var(--auth-muted); font-size: 12px; }
.auth-layout { width: min(1060px, 100%); margin: auto; padding: 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 90px; align-items: center; }
.intro-eyebrow { color: var(--auth-accent-ink); font-size: 10px; font-weight: 600; letter-spacing: 1.25px; }
.auth-intro h2 { font-size: clamp(34px, 4vw, 44px); line-height: 1.18; letter-spacing: -1.8px; font-weight: 600; margin: 20px 0 18px; }
.auth-intro > p { font-size: 14px; line-height: 1.85; color: var(--auth-muted); }
.intro-visual { width: 285px; max-width: 100%; margin-top: 36px; border: 1px solid var(--auth-border); border-radius: 12px; overflow: hidden; background: var(--auth-surface); transform: rotate(-2deg); box-shadow: 0 14px 40px rgb(37 39 51 / .035); }
.visual-toolbar { display: flex; gap: 5px; align-items: center; height: 35px; border-bottom: 1px solid var(--auth-border); padding: 0 14px; }
.visual-toolbar > span { width: 60px; height: 5px; background: var(--auth-border); border-radius: 3px; margin-right: auto; }
.visual-toolbar > i { width: 17px; height: 16px; background: var(--auth-bg); border-radius: 4px; }
.visual-toolbar > i:last-child { background: var(--auth-accent-soft); }
.visual-row { display: flex; align-items: center; gap: 11px; padding: 13px 14px; border-bottom: 1px solid var(--auth-border); }
.visual-row:last-child { border-bottom: 0; }
.visual-row > b { width: 28px; height: 32px; border-radius: 5px; background: #e6e0d7; }
.visual-row:nth-child(3) > b { background: #dce5e0; }
.visual-row:nth-child(4) > b { background: #e1dded; }
.visual-row > div { display: grid; gap: 7px; }
.visual-row > div span { width: 106px; height: 5px; background: var(--auth-border); border-radius: 3px; }
.visual-row > div i { width: 54px; height: 5px; background: var(--auth-bg); border-radius: 3px; }
.visual-row > em { width: 38px; height: 13px; background: #eaf5ee; border-radius: 4px; margin-left: auto; }
.visual-row:nth-child(3) > em { background: var(--auth-accent-soft); }
.visual-row:nth-child(4) > em { background: #fff3df; }
.auth-card { padding: 34px; border: 1px solid var(--auth-border); border-radius: 16px; background: var(--auth-surface); min-width: 0; box-shadow: 0 6px 24px rgb(37 39 51 / .025); }
.auth-card:focus { outline: none; }
.account-eyebrow { display: flex; align-items: center; gap: 7px; color: var(--auth-muted); font-size: 9px; letter-spacing: 1.1px; margin-bottom: 16px; }
.account-eyebrow svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.auth-card h1 { font-size: 27px; font-weight: 600; letter-spacing: -.8px; line-height: 1.25; overflow-wrap: anywhere; }
.auth-description { margin-top: 12px; font-size: 12px; line-height: 1.8; color: var(--auth-muted); }
.auth-description strong { color: var(--auth-text); font-weight: 550; overflow-wrap: anywhere; }
.auth-form { display: grid; gap: 19px; margin-top: 26px; }
.form-field { min-width: 0; }
.form-field label { display: block; font-size: 12px; font-weight: 500; }
.field-heading { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.field-heading a { font-size: 11px; }
.form-field input, .form-field select { display: block; width: 100%; min-height: 44px; margin-top: 8px; padding: 11px 12px; border: 1px solid var(--auth-control-border); border-radius: 8px; background: var(--auth-bg); color: var(--auth-text); }
.form-field input::placeholder { color: var(--auth-muted); font-size: 12px; }
.form-field input:hover, .form-field select:hover { border-color: var(--auth-accent-ink); }
.form-field input[aria-invalid="true"] { border-color: #bc6161; }
.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .8px; }
.auth-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 44px; padding: 11px 14px; border: 1px solid var(--auth-accent); border-radius: 8px; background: var(--auth-accent); color: #fff; font-size: 12px; font-weight: 550; cursor: pointer; text-align: center; }
.auth-button:hover { background: #5d3fce; border-color: #5d3fce; text-decoration: none; }
.auth-button span { font-size: 16px; line-height: 1; }
.auth-button.secondary { color: var(--auth-text); background: var(--auth-surface); border-color: var(--auth-border); }
.auth-button.secondary:hover { background: var(--auth-bg); }
.auth-message { padding: 12px 14px; border: 1px solid transparent; border-radius: 8px; margin-top: 22px; font-size: 12px; line-height: 1.7; }
.auth-message.error { color: #a03333; background: #fdf0f0; border-color: #f4dede; }
.auth-message.success { color: #28745a; background: #eaf5ee; border-color: #d8eadd; }
.auth-message.neutral { color: var(--auth-muted); background: var(--auth-bg); border-color: var(--auth-border); }
.auth-form > .auth-message { margin: 0; }
.auth-links { display: grid; gap: 15px; margin-top: 25px; padding-top: 22px; border-top: 1px solid var(--auth-border); text-align: center; font-size: 11px; }
.auth-links a:last-child { color: var(--auth-muted); }
.remember-device-option { min-width: 0; }
.auth-checkbox { display: flex; min-height: 44px; align-items: center; gap: 11px; padding: 9px 0; font-size: 12px; font-weight: 500; cursor: pointer; }
.auth-checkbox input { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; accent-color: var(--auth-accent-ink); cursor: pointer; }
.auth-checkbox span { min-width: 0; overflow-wrap: anywhere; }
.remember-device-option .field-help { margin-top: 2px; }
.remembered-device-list { display: grid; gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.remembered-device-card { min-width: 0; padding: 16px; border: 1px solid var(--auth-border); border-radius: 10px; background: var(--auth-bg); }
.remembered-device-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; }
.remembered-device-heading h2 { min-width: 0; font-size: 13px; font-weight: 550; overflow-wrap: anywhere; }
.current-device-badge { padding: 3px 7px; border: 1px solid #ded5ff; border-radius: 5px; background: var(--auth-accent-soft); color: var(--auth-accent-ink); font-size: 10px; white-space: nowrap; }
.remembered-device-details { display: grid; gap: 8px; margin: 14px 0 0; font-size: 11px; }
.remembered-device-details > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px 12px; }
.remembered-device-details dt { color: var(--auth-muted); }
.remembered-device-details dd { margin: 0; overflow-wrap: anywhere; text-align: right; }
.auth-card form.device-revoke-form { display: block; margin-top: 15px; }
.auth-card form.device-revoke-form .auth-button.secondary { width: 100%; color: var(--auth-text); background: var(--auth-surface); border-color: var(--auth-border); }
.auth-card form.device-revoke-form .auth-button.secondary:hover { background: var(--auth-accent-soft); border-color: #c9bafc; }
.auth-card form.device-revoke-all { margin-top: 18px; }
.device-security-note { margin-top: 18px; }
.device-verify-note { margin-top: 20px; }
.field-help { margin-top: 8px; color: var(--auth-muted); font-size: 11px; line-height: 1.7; }
.password-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.password-actions[hidden] { display: none; }
.auth-card .password-actions .password-action { min-height: 36px; border: 1px solid var(--auth-border); border-radius: 7px; background: var(--auth-surface); color: var(--auth-accent-ink); padding: 8px 10px; font-size: 11px; cursor: pointer; }
.auth-card .password-actions .password-action:hover { background: var(--auth-accent-soft); border-color: #c9bafc; }
.password-status:empty { display: none; }
.auth-details { background: var(--auth-bg); border: 1px solid var(--auth-border); border-radius: 10px; padding: 17px; margin-top: 23px; }
.auth-details h2 { font-size: 12px; font-weight: 550; }
.auth-details > p { font-size: 11px; color: var(--auth-muted); margin-top: 8px; line-height: 1.7; }
.enrollment-secret { display: block; margin-top: 13px; border: 1px solid var(--auth-border); border-radius: 7px; background: var(--auth-surface); padding: 11px; font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .3px; overflow-wrap: anywhere; user-select: all; }
.enrollment-qr { display: block; width: min(100%, 264px); height: auto; margin: 18px auto 0; background: #fff; border-radius: 4px; image-rendering: pixelated; }
.enrollment-manual { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--auth-border); font-size: 11px; }
.enrollment-manual summary { color: var(--auth-accent-ink); font-weight: 550; cursor: pointer; }
.enrollment-manual summary:focus-visible { outline: 3px solid var(--auth-accent); outline-offset: 3px; }
.enrollment-manual p { margin-top: 11px; color: var(--auth-muted); line-height: 1.7; }
.auth-details > .enrollment-expiry { margin-top: 16px; font-size: 10px; }
.enrollment-info { display: grid; gap: 9px; margin: 15px 0 0; font-size: 10px; }
.enrollment-info > div { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; }
.enrollment-info dt { color: var(--auth-muted); }
.enrollment-info dd { margin: 0; overflow-wrap: anywhere; text-align: right; }
.recovery-code-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 24px; }
.recovery-code-list code { border: 1px solid var(--auth-border); border-radius: 7px; padding: 11px 8px; background: var(--auth-bg); font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; overflow-wrap: anywhere; user-select: all; }
.recovery-note { margin: 13px 0 24px; }
.auth-card > .auth-message + .auth-button { margin-top: 24px; }
.scope-list { padding: 0; margin: 22px 0 0; list-style: none; border: 1px solid var(--auth-border); border-radius: 9px; overflow: hidden; }
.scope-list li { padding: 11px 14px; border-bottom: 1px solid var(--auth-border); font-size: 12px; background: var(--auth-bg); }
.scope-list li:last-child { border-bottom: 0; }
.scope-list small { display: block; color: var(--auth-muted); font-size: 10px; margin-top: 3px; overflow-wrap: anywhere; }
.consent-note { text-align: center; margin-top: 17px; }
.auth-footer { color: var(--auth-muted); text-align: center; font-size: 10px; padding: 28px 20px; }

/* Keep the operator setup screen readable while it shares the account shell. */
.auth-card > p:not([class]) { margin-top: 14px; color: var(--auth-muted); font-size: 12px; line-height: 1.8; }
.auth-card > code { display: block; margin-top: 13px; border: 1px solid var(--auth-border); border-radius: 7px; background: var(--auth-bg); padding: 11px; font-size: 12px; overflow-wrap: anywhere; }
.auth-card > .error:not(.auth-message) { padding: 12px 14px; color: #a03333; background: #fdf0f0; border: 1px solid #f4dede; border-radius: 8px; }
.auth-card form:not(.auth-form) { display: grid; gap: 18px; margin-top: 24px; }
.auth-card form:not(.auth-form) label { display: block; font-size: 12px; font-weight: 500; }
.auth-card form:not(.auth-form) label input { display: block; width: 100%; min-height: 44px; margin-top: 8px; padding: 11px 12px; border: 1px solid var(--auth-control-border); border-radius: 8px; background: var(--auth-bg); color: var(--auth-text); }
.auth-card form:not(.auth-form) button { min-height: 44px; padding: 11px 14px; border: 1px solid var(--auth-accent); border-radius: 8px; background: var(--auth-accent); color: #fff; font-size: 12px; font-weight: 550; cursor: pointer; }
.auth-card > a:not([class]) { display: block; text-align: center; margin-top: 24px; font-size: 12px; }

@media (max-width: 900px) {
    .auth-layout { gap: 45px; padding: 32px; grid-template-columns: minmax(0, 1fr) minmax(0, 405px); }
    .auth-header { padding: 28px 32px; }
    .auth-intro h2 { font-size: 35px; }
    .auth-intro > p { font-size: 12px; }
    .intro-eyebrow { font-size: 8px; }
    .intro-visual { width: 235px; }
    .visual-row > div span { width: 79px; }
    .auth-card { padding: 28px; }
}

@media (max-width: 720px) {
    .auth-layout { display: block; width: min(490px, 100%); padding: 20px 24px; }
    .auth-intro { display: none; }
    .auth-header { padding: 24px; }
    .auth-brand { font-size: 20px; }
    .auth-card { padding: 30px; }
    .auth-footer { padding-top: 22px; }
}

@media (max-width: 400px) {
    .auth-layout { padding: 16px; }
    .auth-header { padding: 22px 20px; }
    .header-note { font-size: 10px; }
    .auth-card { padding: 24px 21px; }
    .auth-card h1 { font-size: 25px; }
    .recovery-code-list { gap: 7px; }
    .recovery-code-list code { font-size: 11px; padding: 11px 6px; }
}

@media (pointer: coarse) {
    .form-field input, .form-field select, .auth-card form:not(.auth-form) label input { font-size: 16px; }
    .auth-links a { display: flex; min-height: 44px; align-items: center; justify-content: center; }
    .auth-links { gap: 4px; }
    .field-heading a { display: inline-flex; align-items: center; min-height: 44px; }
    .field-heading { margin-bottom: -8px; }
}

@media (max-width: 360px) {
    .recovery-code-list { grid-template-columns: minmax(0, 1fr); }
}

.auth-brand .brand-wordmark { width: 156px; height: auto; max-width: 100%; object-fit: contain; }
@media (max-width: 580px) { .auth-brand .brand-wordmark { width: 144px; } }

.social-signin{display:grid;gap:10px;margin:18px 0}.auth-divider{text-align:center;color:var(--muted);font-size:12px;margin:18px 0}.social-signin form{margin:0}.social-signin button{width:100%}
