.auth-page {
    --auth-surface: #fff;
    --auth-soft: #f7f9fc;
    --auth-page: #f3f6fc;
    --auth-line: #d5dce5;
    --auth-ink: #172033;
    --auth-muted: #48566d;
    --auth-link: #2455e8;
    --auth-blue: #2455e8;
    --auth-error: #b42318;
    --auth-success: #15803d;
    --auth-warning: #92400e;
    margin: 0;
    background: var(--auth-page);
    color: var(--auth-ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: .9375rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    color-scheme: light;
}
html.dark .auth-page {
    --auth-surface: #192234;
    --auth-soft: #222e43;
    --auth-page: #101827;
    --auth-line: #43536d;
    --auth-ink: #edf2fa;
    --auth-muted: #c0cbdd;
    --auth-link: #aac1ff;
    --auth-error: #fca5a5;
    --auth-success: #86efac;
    --auth-warning: #fcd38d;
    color-scheme: dark;
}
.auth-page * { box-sizing: border-box; }
.auth-page [x-cloak], .auth-page [hidden] { display: none !important; }
.auth-page a { color: var(--auth-link); text-decoration: none; }
.auth-page a:hover { text-decoration: underline; }
.auth-page :is(a, button, input, select):focus-visible { outline: 2px solid var(--auth-link); outline-offset: 3px; }
.auth-page :is(button, input, select) { font-family: inherit; }
.auth-page :is(.font-bold, .font-extrabold) { font-weight: 600; }
.auth-page :is(.nb-shadow, .nb-shadow-sm, .nb-shadow-lg) { box-shadow: none !important; }
.auth-page :is(.nb-hover:hover, .nb-active:active) { transform: none !important; }
.auth-page :is(.text-gray-500, .text-gray-600, .text-gray-700) { color: var(--auth-muted); }
.auth-page :is(.text-gray-800, .text-gray-900) { color: var(--auth-ink); }
.auth-page .text-red-600 { color: var(--auth-error); }
.auth-page .text-green-700 { color: var(--auth-success); }
.auth-page .text-yellow-700 { color: var(--auth-warning); }
.auth-page .text-blue-600 { color: var(--auth-link); }
.auth-shell { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.auth-skip { position: fixed; top: -100px; left: 16px; z-index: 1000; padding: 10px 16px; background: var(--auth-surface); border: 1px solid var(--auth-line); border-radius: 6px; }
.auth-skip:focus { top: 12px; }
.auth-header, .auth-footer { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }
.auth-header { min-height: 88px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-block: 20px; }
.auth-page .auth-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--auth-ink); font-size: 1.25rem; font-weight: 600; letter-spacing: -.025em; text-decoration: none; }
.auth-brand img { width: 40px; height: auto; flex-shrink: 0; }
.auth-page .auth-support { display: inline-flex; align-items: center; min-height: 44px; color: var(--auth-muted); font-size: .875rem; }
.auth-main { width: min(1100px, calc(100% - 64px)); margin: 24px auto 64px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); align-items: center; gap: 80px; flex: 1; }
.auth-story { min-width: 0; padding-block: 24px; }
.auth-story h2 { margin: 0; color: var(--auth-ink); font-size: clamp(2.25rem, 3.8vw, 3rem); font-weight: 600; line-height: 1.15; letter-spacing: -.035em; }
.auth-story > p { margin: 20px 0 0; color: var(--auth-muted); font-size: 1rem; line-height: 1.7; }
.auth-preview { margin: 32px 0 20px; }
.auth-preview img { display: block; width: 100%; height: auto; border: 1px solid var(--auth-line); border-radius: 10px; }
.auth-preview figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-top: 10px; color: var(--auth-muted); font-size: .75rem; }
.auth-home-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; font-weight: 500; }
.auth-card { min-width: 0; padding: 32px; background: var(--auth-surface); border: 1px solid var(--auth-line); border-radius: 12px; }
.auth-card:focus-visible { outline: 2px solid var(--auth-link); outline-offset: 4px; }
.auth-card-head { margin-bottom: 28px; }
.auth-card-head h1 { margin: 0; color: var(--auth-ink); font-size: 1.875rem; font-weight: 600; line-height: 1.25; letter-spacing: -.025em; }
.auth-card-head p { margin: 8px 0 0; color: var(--auth-muted); font-size: .875rem; line-height: 1.6; }
.auth-page .auth-google { min-height: 48px; padding: 11px 16px; border: 1px solid var(--auth-line); border-radius: 6px; background: var(--auth-surface); color: var(--auth-ink); font-size: .875rem; font-weight: 500; box-shadow: none; text-decoration: none; }
.auth-page .auth-google:hover { background: var(--auth-soft); transform: none; box-shadow: none; }
.auth-divider { margin: 20px 0; }
.auth-divider > div { background: var(--auth-line); }
.auth-divider span { color: var(--auth-muted); font-size: .8125rem; font-weight: 400; text-transform: none; letter-spacing: 0; }
.auth-form > div > label { margin-bottom: 7px; color: var(--auth-ink); font-size: .875rem; font-weight: 500; }
.auth-page .auth-form input:not([type=checkbox]):not([type=hidden]), .auth-page .auth-form select { min-width: 0; min-height: 48px; border: 1px solid var(--auth-line); border-radius: 6px; background: var(--auth-surface); color: var(--auth-ink); font-size: 1rem; font-weight: 400; line-height: 1.5; box-shadow: none; }
.auth-page .auth-form input::placeholder { color: var(--auth-muted); opacity: 1; font-weight: 400; }
.auth-page .auth-form input:focus, .auth-page .auth-form select:focus { border-color: var(--auth-link); outline: 2px solid var(--auth-link); outline-offset: 2px; box-shadow: none; }
.auth-page .auth-form input.border-red-500 { border-color: var(--auth-error); }
.auth-page .auth-form input.border-red-500:focus { outline-color: var(--auth-error); }
.auth-form .pointer-events-none svg { width: 18px; height: 18px; color: var(--auth-muted); }
.auth-page .auth-form select { width: 6.25rem; padding: 10px 6px 10px 10px; flex-shrink: 0; }
.auth-form div:has(> select[name=country_code]) { flex-wrap: wrap; }
.auth-page .auth-form input[type=tel] { flex-basis: 8rem; }
.auth-field-help { margin-top: 6px; color: var(--auth-muted); font-size: .75rem; line-height: 1.5; }
.auth-page .auth-form input[type=checkbox] { width: 18px; height: 18px; border: 1px solid var(--auth-line); border-radius: 4px; accent-color: var(--auth-blue); flex-shrink: 0; }
.auth-form label:has(input[type=checkbox]) { min-height: 44px; }
.auth-form label > span, .auth-form a { font-size: .8125rem; line-height: 1.6; }
.auth-form a, .auth-switch a { font-weight: 500; }
.auth-form button[type=button] { min-width: 44px; justify-content: center; padding: 0 10px; border-radius: 6px; color: var(--auth-muted); }
.auth-form button[type=button]:hover { color: var(--auth-ink); }
.auth-page .auth-form button[type=button]:focus-visible { outline-offset: -4px; }
.auth-options { flex-wrap: wrap; gap: 4px 12px; }
.auth-options > a { display: inline-flex; align-items: center; min-height: 44px; }
.auth-page .auth-submit { min-height: 48px; border: 1px solid var(--auth-blue); border-radius: 6px; background: var(--auth-blue); color: #fff; font-size: .9375rem; font-weight: 600; box-shadow: none; transition: background-color .15s; }
.auth-page .auth-submit:not(:disabled):hover { background: #1c43bf; border-color: #1c43bf; transform: none; box-shadow: none; }
.auth-page .auth-submit:disabled { cursor: not-allowed; opacity: .65; }
.auth-page .auth-action { display: flex; align-items: center; justify-content: center; width: 100%; padding: 12px 16px; text-align: center; text-decoration: none; }
.auth-note { padding: 16px; margin: 0 0 24px; border: 1px solid var(--auth-line); border-radius: 8px; background: var(--auth-soft); color: var(--auth-muted); font-size: .875rem; }
.auth-switch > a { display: inline-flex; align-items: center; min-height: 44px; }
.auth-switch { padding-top: 22px; margin: 24px 0 0; border-top: 1px solid var(--auth-line); color: var(--auth-muted); font-size: .875rem; line-height: 1.7; }
.auth-alert { padding: 13px 15px; margin-bottom: 24px; border: 1px solid; border-radius: 8px; font-size: .875rem; line-height: 1.6; overflow-wrap: anywhere; }
.auth-alert p { margin: 0; }
.auth-alert-success { background: #effcf5; border-color: #9fd6b8; color: #17603d; }
.auth-alert-error { background: #fff2f2; border-color: #eeb9b9; color: #a22b32; }
.auth-alert-warning { background: #fffbeb; border-color: #e8d7a0; color: #92400e; }
html.dark .auth-alert-success { background: #18372c; border-color: #38755a; color: #a7e9c6; }
html.dark .auth-alert-error { background: #3c2329; border-color: #9d5660; color: #ffc3c3; }
html.dark .auth-alert-warning { background: #392f1b; border-color: #8d733f; color: #fcd38d; }
.auth-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-top: auto; padding: 16px 0 20px; border-top: 1px solid var(--auth-line); color: var(--auth-muted); font-size: .75rem; line-height: 1.7; }
.auth-footer > div { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.auth-page .auth-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--auth-muted); }
.auth-register .auth-main { align-items: start; }
.auth-register .auth-story { position: sticky; top: 40px; padding-top: 48px; }
.auth-card-head strong, .auth-masked-email { color: var(--auth-ink); font-weight: 600; overflow-wrap: anywhere; }
.auth-masked-email { display: block; margin-top: 4px; }
.auth-page .auth-form input.auth-otp[type=text] { min-height: 64px; font-size: 1.875rem; font-weight: 500; letter-spacing: .36em; padding: 12px 10px 12px calc(10px + .36em); background: var(--auth-soft); }
.auth-page .auth-form input.auth-otp.auth-backup-code[type=text] { font-size: 1.125rem; letter-spacing: .06em; padding-inline: 10px; }
.auth-code-help { margin-top: 11px; line-height: 1.7; }
.auth-page .auth-resend button { min-height: 44px; border-radius: 6px; color: var(--auth-link); font-size: .875rem; font-weight: 500; }
.auth-resend button:disabled { opacity: .65; }
.auth-resend button:not(:disabled):hover { background: var(--auth-soft); }
@media (max-width: 1100px) {
    .auth-main { gap: 40px; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); }
}
@media (max-width: 900px) {
    .auth-story { display: none; }
    .auth-main, .auth-register .auth-main { display: block; flex: 0; width: min(440px, calc(100% - 32px)); margin: 24px auto 48px; }
    .auth-company { display: none; }
}
@media (max-width: 500px) {
    .auth-header, .auth-footer { width: calc(100% - 32px); }
    .auth-header { min-height: 76px; gap: 12px; padding-block: 16px; }
    .auth-page .auth-brand { font-size: 1.125rem; gap: 8px; }
    .auth-brand img { width: 34px; }
    .auth-page .auth-support { font-size: .8125rem; }
    .auth-main, .auth-register .auth-main { margin-top: 12px; }
    .auth-card { padding: 26px 22px; }
    .auth-card-head h1 { font-size: 1.625rem; }
    .auth-page .auth-form select { width: 5.75rem; }
    .auth-footer { flex-direction: column; align-items: flex-start; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-page *, .auth-page *::before, .auth-page *::after { transition: none !important; }
}
