:root {
  color-scheme: dark;
  --auth-bg: var(--brand-bg, #0b1020);
  --auth-panel: var(--brand-panel, #121a2e);
  --auth-raised: var(--brand-raised, #18233b);
  --auth-line: var(--brand-border, #293754);
  --auth-text: var(--brand-text, #f2f5ff);
  --auth-muted: var(--brand-muted, #a7b4d0);
  --auth-accent: var(--brand-violet, #ad8aff);
  --auth-green: var(--brand-cyan, #26dbe5);
  --auth-error: #f2a1ae;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--auth-bg);
  color: var(--auth-text);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--auth-accent); outline-offset: 4px; }
svg { display: block; width: 20px; height: 20px; flex: none; }
.auth-shell { display: grid; grid-template-columns: minmax(390px, 46%) minmax(0, 1fr); min-height: 100dvh; }
.auth-brand-pane { position: relative; display: flex; flex-direction: column; padding: 38px 48px 28px; border-right: 1px solid #293754; background: #0e1528; overflow: hidden; }
.auth-brand-pane::before { content: ''; position: absolute; width: 550px; height: 550px; right: -260px; top: 90px; background: radial-gradient(circle, #ad8aff1c, transparent 65%); pointer-events: none; }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; font-size: 27px; font-weight: 650; letter-spacing: -1.2px; line-height: 1; }
.auth-brand > svg, .auth-brand > img { width: 35px; height: 35px; flex: none; }
.brand-dot { color: var(--auth-accent); }
.brand-story { position: relative; width: 100%; max-width: 470px; margin: auto; padding: 90px 0 80px; }
.eyebrow { display: flex; align-items: center; gap: 11px; color: #a7b4d0; font: 9px/1.5 'JetBrains Mono', monospace; letter-spacing: 1.7px; }
.eyebrow > span { width: 22px; height: 1px; background: var(--auth-accent); }
.brand-story h2 { margin: 25px 0 21px; font-size: clamp(36px, 3.5vw, 52px); line-height: 1.12; letter-spacing: -2.4px; font-weight: 600; }
.brand-story h2 > span { color: #a7b4d0; }
.brand-story > p { color: var(--auth-muted); font-size: 14px; line-height: 1.85; margin: 0; }
.workspace-card { margin-top: 44px; background: linear-gradient(150deg, #18233b, #121a2e); border: 1px solid #293754; border-radius: 14px; box-shadow: 0 20px 55px #0002; }
.workspace-heading { display: flex; align-items: center; gap: 12px; padding: 19px 20px; border-bottom: 1px solid #293754; }
.workspace-mark { display: grid; place-items: center; width: 35px; height: 35px; background: #211c3e; color: #ad8aff; border: 1px solid #513f7d; border-radius: 9px; flex: none; }
.workspace-mark svg { width: 18px; height: 18px; }
.workspace-heading strong { display: block; font-size: 11px; font-weight: 550; }
.workspace-heading div > span { display: block; color: #8394b5; font-size: 9px; margin-top: 5px; }
.workspace-corner { margin-left: auto; color: #8394b5; font-size: 19px; }
.workspace-features { padding: 21px 21px 24px; display: grid; gap: 25px; }
.workspace-feature { display: flex; align-items: center; gap: 15px; }
.feature-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 9px; border: 1px solid #293754; color: #a7b4d0; background: #18233b; }
.feature-icon svg { width: 16px; height: 16px; }
.workspace-feature:nth-child(1) .feature-icon { color: var(--auth-accent); background: #211c3e; border-color: #513f7d; }
.workspace-feature:nth-child(2) .feature-icon { color: var(--brand-coral, #ff746e); background: #302035; border-color: #633b52; }
.workspace-feature:nth-child(3) .feature-icon { color: var(--auth-green); background: #102d39; border-color: #215465; }
.workspace-feature strong { display: block; font-size: 11px; font-weight: 500; }
.workspace-feature div > span { display: block; font-size: 10px; color: #a7b4d0; line-height: 1.65; margin-top: 5px; }
.workspace-foot { padding: 15px 20px; background: #102d39; border-top: 1px solid #215465; border-radius: 0 0 14px 14px; display: flex; align-items: center; gap: 9px; color: #8ce9ef; font-size: 9px; line-height: 1.6; }
.workspace-foot svg { width: 13px; height: 13px; }
.brand-pane-footer { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 9px; color: #8394b5; }
.brand-pane-footer a { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.brand-pane-footer a:hover { color: var(--auth-text); }
.brand-pane-footer svg { width: 12px; height: 12px; }
.auth-content { display: flex; flex-direction: column; min-width: 0; }
.auth-topbar { min-height: 111px; display: flex; align-items: center; justify-content: flex-end; padding: 28px 45px; }
.mobile-brand { display: none; }
.back-link { display: inline-flex; align-items: center; gap: 9px; color: #a7b4d0; font-size: 11px; border: 0; padding: 0; background: none; }
.back-link svg { width: 15px; height: 15px; }
.back-link:hover { color: var(--auth-text); }
.auth-form-area { display: flex; align-items: center; justify-content: center; flex: 1; padding: 24px 40px 55px; }
.auth-form-wrap { width: 100%; max-width: 405px; }
.mode-switch { display: flex; gap: 4px; border: 1px solid #293754; padding: 4px; border-radius: 10px; background: #0e1528; margin-bottom: 34px; }
.mode-switch button { width: 50%; padding: 10px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #a7b4d0; font-size: 11px; font-weight: 500; }
.mode-switch button[aria-pressed=true] { background: #202d48; border-color: #3b5076; color: #f2f5ff; box-shadow: 0 2px 5px #0003; }
.mode-switch button:hover:not([aria-pressed=true]):not(:disabled) { color: var(--auth-text); background: #18233b; }
.form-symbol { display: none; }
.auth-form-wrap h1 { font-size: 31px; line-height: 1.25; letter-spacing: -1px; font-weight: 600; margin: 0 0 11px; }
.form-intro { margin: 0 0 28px; font-size: 13px; color: var(--auth-muted); line-height: 1.7; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 12px 16px; font-size: 12px; font-weight: 550; line-height: 1.5; border: 1px solid transparent; border-radius: 8px; transition: color .15s, background .15s, border-color .15s; }
.button svg { width: 17px; height: 17px; }
.button.primary { color: #fff; background: var(--brand-action, linear-gradient(120deg, #7148e8, #425eeb)); border-color: var(--brand-primary, #7148e8); }
.button.primary:hover:not(:disabled) { background: linear-gradient(120deg, #7950e8, #425eeb); border-color: var(--brand-primary-hover, #7950e8); }
.button.full { width: 100%; }
.provider-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.button.provider { color: var(--auth-text); background: #121a2e; border-color: #293754; gap: 11px; font-size: 12px; }
.button.provider:hover:not(:disabled) { background: #202d48; border-color: #64799f; }
.button.provider svg { width: 17px; height: 17px; }
.button.provider:last-child svg { color: #9fa9fd; }
.form-divider { display: flex; align-items: center; gap: 14px; margin: 26px 0; color: #8394b5; font-size: 10px; }
.form-divider::before, .form-divider::after { content: ''; height: 1px; background: #293754; flex: 1; }
.field { margin: 0 0 20px; }
.field label { display: block; font-size: 11px; font-weight: 500; color: #dbe4fa; margin-bottom: 9px; line-height: 1.5; }
.field-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.field-heading label { margin: 0; }
.input { display: block; width: 100%; height: 47px; padding: 12px 14px; border: 1px solid #293754; border-radius: 8px; background: #0e1528; color: var(--auth-text); font-size: 13px; line-height: 1.5; transition: border-color .15s, background .15s; }
.input::placeholder { color: #8394b5; }
.input:hover:not(:disabled) { border-color: #3b5076; }
.input:focus { border-color: #ad8aff; background: #121a2e; }
.input:disabled { opacity: .65; }
.input[aria-invalid=true] { border-color: #ab6877; }
.input:-webkit-autofill { -webkit-text-fill-color: var(--auth-text); box-shadow: inset 0 0 0 1000px #18233b; caret-color: var(--auth-text); }
.password-field { position: relative; }
.password-field .input { padding-right: 48px; }
.password-toggle { display: grid; place-items: center; position: absolute; top: 2px; right: 2px; width: 43px; height: 43px; border: 0; border-radius: 6px; background: transparent; color: #8394b5; }
.password-toggle svg { width: 18px; height: 18px; }
.password-toggle:hover:not(:disabled) { color: var(--auth-text); background: #202d48; }
.field-hint { color: #8394b5; font-size: 10px; line-height: 1.6; margin: 8px 0 0; }
.field-error { color: var(--auth-error); font-size: 11px; line-height: 1.6; margin: 8px 0 0; }
.text-button { background: none; border: 0; color: #dbe4fa; font-size: 10px; padding: 0; }
.text-button:hover:not(:disabled) { color: var(--auth-accent); }
.auth-message { padding: 13px 14px; margin: 0 0 19px; border: 1px solid #4c333c; border-radius: 8px; background: #261b21; color: var(--auth-error); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.auth-message.success { border-color: #215465; background: #102d39; color: #8ce9ef; }
.submit-button { margin-top: 4px; justify-content: space-between; padding-left: 18px; padding-right: 16px; }
.form-note { text-align: center; color: #8394b5; font-size: 10px; line-height: 1.8; margin: 16px 8px 0; }
.form-note + .policy-note { margin-top: 4px; }
.policy-note a { color: #a7b4d0; }
.policy-note a:hover { color: var(--auth-text); }
.account-switch { display: flex; align-items: center; justify-content: center; gap: 6px; color: #a7b4d0; font-size: 11px; line-height: 1.7; margin: 26px 0 0; }
.account-switch button { background: none; border: 0; padding: 0; color: #ad8aff; font-size: inherit; font-weight: 500; }
.account-switch button:hover:not(:disabled) { color: var(--auth-accent); }
.form-support { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px; border-top: 1px solid #293754; padding-top: 24px; margin-top: 29px; color: #8394b5; font-size: 10px; line-height: 1.7; }
.form-support a { display: inline-flex; align-items: center; gap: 4px; color: #a7b4d0; }
.form-support a:hover { color: var(--auth-text); }
.form-support svg { width: 12px; height: 12px; }
.auth-footer { text-align: center; color: #8394b5; font-size: 9px; padding: 0 30px 27px; display: flex; align-items: center; justify-content: center; gap: 11px; line-height: 1.7; }
.auth-footer span { color: #8394b5; }
.recovery-back { margin-bottom: 29px; }
.form-symbol.recovery-symbol { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; color: #ad8aff; border: 1px solid #513f7d; background: #211c3e; margin-bottom: 24px; }
.recovery-symbol svg { width: 23px; height: 23px; }
.recovery-success > p { color: var(--auth-muted); font-size: 12px; line-height: 1.8; margin: 20px 0 25px; }
.sent-email { display: flex; align-items: center; gap: 10px; background: #102d39; border: 1px solid #215465; border-radius: 9px; padding: 14px 16px; color: #8ce9ef; font-size: 12px; }
.sent-email svg { width: 17px; height: 17px; }
.sent-email strong { font-weight: 500; overflow-wrap: anywhere; min-width: 0; }
.resend-reset { display: block; margin: 19px auto 0; font-size: 11px; }
.spinner { width: 16px; height: 16px; border: 2px solid #ffffff44; border-top-color: #fff; border-radius: 50%; animation: spin .65s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.noscript { max-width: 460px; margin: 15vh auto; padding: 25px; line-height: 1.7; }
.noscript a { color: var(--auth-accent); }
/* The emailed password-reset link uses the same form system. */
.reset-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.reset-header { display: flex; justify-content: space-between; align-items: center; padding: 32px 42px; gap: 20px; }
.reset-content { flex: 1; display: flex; align-items: center; justify-content: center; padding: 35px 24px 70px; }
.reset-card { max-width: 440px; padding: 32px; border: 1px solid var(--auth-line); border-radius: 14px; background: #121a2e; }
.reset-card .recovery-symbol { margin-bottom: 23px; }
.reset-card h1 { font-size: 28px; }
.reset-card .form-intro { margin-bottom: 25px; }
.reset-back { display: flex; justify-content: center; margin-top: 24px; font-size: 11px; }
@media (min-width: 1700px) {
  .auth-brand-pane { padding-left: 65px; padding-right: 65px; }
  .auth-form-wrap { max-width: 430px; }
}
@media (max-width: 1050px) {
  .auth-shell { grid-template-columns: minmax(340px, 44%) minmax(0,1fr); }
  .auth-brand-pane { padding: 30px 28px 24px; }
  .brand-story h2 { font-size: 37px; letter-spacing: -1.6px; }
  .brand-story > p { font-size: 12px; }
  .workspace-feature { gap: 10px; }
  .workspace-features { padding: 20px 15px; }
  .workspace-heading { padding: 17px 15px; gap: 9px; }
  .workspace-heading strong { font-size: 10px; }
  .workspace-heading div > span { font-size: 8px; }
  .workspace-foot { padding: 14px; font-size: 8px; }
  .brand-pane-footer { flex-direction: column; align-items: flex-start; gap: 11px; }
  .auth-topbar { padding: 25px 32px; min-height: 95px; }
  .auth-form-area { padding: 22px 30px 45px; }
  .auth-form-wrap h1 { font-size: 28px; }
}
@media (max-width: 780px) {
  .auth-shell { display: block; }
  .auth-brand-pane { display: none; }
  .auth-content { min-height: 100dvh; }
  .auth-topbar { justify-content: space-between; padding: 24px 30px; min-height: 83px; }
  .mobile-brand { display: block; }
  .auth-brand { font-size: 25px; }
  .auth-brand > svg, .auth-brand > img { width: 32px; height: 32px; }
  .auth-form-area { padding: 35px 30px 60px; }
  .auth-form-wrap { max-width: 420px; }
  .input { font-size: 16px; }
  .auth-form-wrap h1 { font-size: 31px; }
  .auth-footer { padding-bottom: 25px; }
}
@media (max-width: 450px) {
  .auth-topbar { padding: 23px 21px; gap: 14px; }
  .auth-brand { font-size: 23px; gap: 7px; }
  .auth-brand > svg, .auth-brand > img { width: 29px; height: 29px; }
  .auth-topbar .back-link { font-size: 10px; gap: 5px; }
  .auth-topbar .back-link svg { width: 13px; }
  .auth-form-area { padding: 25px 23px 44px; align-items: flex-start; }
  .mode-switch { margin-bottom: 28px; }
  .auth-form-wrap h1 { font-size: 28px; letter-spacing: -.9px; }
  .form-intro { font-size: 12px; margin-bottom: 25px; }
  .field label { font-size: 12px; }
  .input { height: 49px; }
  .password-toggle { top: 3px; }
  .button { min-height: 47px; }
  .field-heading .text-button { font-size: 11px; }
  .account-switch { flex-wrap: wrap; }
  .auth-footer { flex-direction: column; gap: 2px; }
  .reset-header { padding: 25px 21px; }
  .reset-header .back-link { font-size: 10px; }
  .reset-content { padding: 27px 21px 50px; align-items: flex-start; }
  .reset-card { padding: 0; border: 0; background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
