:root {
  color-scheme: dark;
  --auth-page: #101116;
  --auth-panel: #181920;
  --auth-panel-soft: #202128;
  --auth-line: rgb(255 255 255 / 9%);
  --auth-text: #f3f1f5;
  --auth-muted: #a4a3ae;
  --auth-accent: #c4f36b;
  font-family: var(--font-body), sans-serif;
}

* { box-sizing: border-box; }

body.auth-body {
  display: block;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 75% 10%, rgb(101 76 162 / 12%), transparent 32rem),
    var(--auth-page);
  color: var(--auth-text);
}

.auth-main {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.auth-page { width: min(1200px, calc(100% - 64px)); min-height: 100vh; margin: 0 auto; }
.auth-topbar { display: flex; min-height: 88px; align-items: center; justify-content: space-between; gap: 20px; }
.auth-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--auth-text); font-family: var(--font-display), sans-serif; font-size: 19px; font-weight: 800; letter-spacing: -.7px; text-decoration: none; }
.auth-brand-name { color: var(--auth-accent); }
.auth-brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid color-mix(in srgb, var(--auth-accent) 32%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--auth-accent) 9%, transparent); color: var(--auth-accent); }
.auth-brand-mark svg { width: 21px; height: 21px; }
.auth-home-link { display: inline-flex; align-items: center; gap: 8px; color: var(--auth-muted); font-size: 12px; font-weight: 600; text-decoration: none; transition: color .18s ease; }
.auth-home-link:hover { color: var(--auth-accent); }

.auth-layout { display: grid; width: 100%; max-width: none; min-height: 690px; grid-template-columns: minmax(0, 1fr) minmax(430px, .92fr); margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--auth-line); border-radius: 25px; background: var(--auth-panel); box-shadow: 0 28px 80px rgb(0 0 0 / 28%); }
.auth-layout-register { min-height: 760px; grid-template-columns: minmax(0, 1fr) minmax(470px, .96fr); }
.auth-story-panel { position: relative; display: flex; min-height: 100%; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: 58px; background: #1b1b25; }
.auth-story-art { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(15 16 22 / 5%) 0%, rgb(15 16 22 / 28%) 36%, rgb(15 16 22 / 96%) 100%), linear-gradient(90deg, rgb(14 15 21 / 30%), rgb(14 15 21 / 10%)), url("https://images.unsplash.com/photo-1518709268805-4e9042af9f23?auto=format&fit=crop&w=1400&q=85") center / cover; transform: scale(1.02); }
.auth-story-panel::after { position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 38%, transparent 0, rgb(13 14 20 / 12%) 60%, rgb(13 14 20 / 58%) 100%); content: ""; pointer-events: none; }
.auth-story-content { position: relative; z-index: 1; width: min(100%, 490px); }
.auth-eyebrow { display: inline-flex; align-items: center; gap: 9px; color: #e0d8c6; font-size: 10px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; }
.auth-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--auth-accent); box-shadow: 0 0 14px color-mix(in srgb, var(--auth-accent) 70%, transparent); }
.auth-story-content h1 { margin: 23px 0 17px; color: #fff; font-family: var(--font-display), sans-serif; font-size: clamp(42px, 5vw, 64px); font-weight: 800; letter-spacing: -3px; line-height: 1.03; }
.auth-story-content h1 em { color: var(--auth-accent); font-style: normal; }
.auth-story-content > p { max-width: 420px; margin: 0; color: #d0ced3; font-size: 13px; line-height: 1.8; }
.auth-story-note { display: flex; align-items: center; gap: 12px; margin-top: 30px; padding: 14px 16px; border: 1px solid rgb(255 255 255 / 13%); border-radius: 13px; background: rgb(15 16 20 / 48%); backdrop-filter: blur(12px); }
.auth-note-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 11px; background: color-mix(in srgb, var(--auth-accent) 14%, transparent); color: var(--auth-accent); font-size: 20px; }
.auth-story-note strong, .auth-story-note small { display: block; }
.auth-story-note strong { color: #fff; font-size: 11px; }
.auth-story-note small { margin-top: 4px; color: #c0bdc4; font-size: 10px; }
.auth-story-caption { position: absolute; top: 28px; left: 28px; z-index: 1; color: rgb(255 255 255 / 72%); font-size: 9px; font-weight: 700; letter-spacing: 2px; }

.auth-form-panel { display: flex; align-items: center; justify-content: center; padding: 50px clamp(32px, 5vw, 70px); background: var(--auth-panel); }
.auth-layout-register .auth-form-panel { padding-top: 38px; padding-bottom: 38px; }
.auth-form-inner { width: min(100%, 410px); }
.auth-mobile-eyebrow { display: none; margin-bottom: 9px; color: var(--auth-accent); font-size: 9px; font-weight: 800; letter-spacing: 1.6px; }
.auth-form-inner h2 { margin: 0; color: var(--auth-text); font-family: var(--font-display), sans-serif; font-size: clamp(27px, 3vw, 34px); font-weight: 800; letter-spacing: -1.2px; }
.auth-subtitle { margin: 9px 0 25px; color: var(--auth-muted); font-size: 12px; line-height: 1.6; }
.auth-form { display: grid; gap: 17px; }
.auth-field { display: grid; gap: 8px; }
.auth-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.auth-label { color: #e8e6eb; font-size: 11px; font-weight: 700; }
.auth-hint { color: #81818e; font-size: 9px; }
.auth-input { width: 100%; min-height: 47px; padding: 0 14px; border: 1px solid rgb(255 255 255 / 11%); border-radius: 11px; outline: none; background: #121319; color: #f2f0f4; font: inherit; font-size: 12px; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.auth-input::placeholder { color: #747480; }
.auth-input:hover { border-color: rgb(255 255 255 / 20%); }
.auth-input:focus { border-color: color-mix(in srgb, var(--auth-accent) 72%, transparent); background: #15161d; box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-accent) 10%, transparent); }
.auth-input[aria-invalid="true"] { border-color: #e98484; }
.auth-password-wrap { position: relative; }
.auth-password-wrap .auth-input { padding-right: 67px; }
.auth-password-toggle { position: absolute; top: 50%; right: 12px; padding: 5px 3px; transform: translateY(-50%); border: 0; background: transparent; color: var(--auth-muted); cursor: pointer; font-size: 10px; font-weight: 700; }
.auth-password-toggle:hover { color: var(--auth-accent); }
.auth-field-error { color: #f09292; font-size: 10px; line-height: 1.45; }
.auth-field-error:empty { display: none; }
.auth-alert { margin: 0 0 16px; padding: 11px 13px; border: 1px solid rgb(255 255 255 / 10%); border-radius: 10px; font-size: 11px; line-height: 1.5; }
.auth-alert-error { border-color: rgb(237 111 111 / 28%); background: rgb(237 111 111 / 9%); color: #ffb1b1; }
.auth-alert-success { border-color: rgb(124 214 153 / 27%); background: rgb(124 214 153 / 9%); color: #a3edb7; }
.auth-submit { display: flex; min-height: 48px; align-items: center; justify-content: center; gap: 12px; margin-top: 3px; border: 0; border-radius: 11px; background: var(--auth-accent); color: #171a13; cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; transition: filter .18s ease, transform .18s ease; }
.auth-submit:hover { transform: translateY(-1px); filter: brightness(1.08); }
.auth-submit span { font-size: 17px; font-weight: 500; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 15px; color: #85848f; font-size: 10px; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: var(--auth-line); content: ""; }
.auth-google { display: flex; min-height: 45px; align-items: center; justify-content: center; gap: 10px; border: 1px solid rgb(255 255 255 / 12%); border-radius: 11px; background: transparent; color: #e8e6eb; font-size: 11px; font-weight: 700; text-decoration: none; transition: border-color .18s ease, background .18s ease; }
.auth-google:hover { border-color: rgb(255 255 255 / 24%); background: rgb(255 255 255 / 4%); }
.auth-google svg { width: 17px; height: 17px; }
.auth-switch { margin: 22px 0 0; color: #a7a5af; font-size: 11px; text-align: center; }
.auth-switch a { color: var(--auth-accent); font-weight: 700; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.auth-privacy { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 19px 0 0; color: #777682; font-size: 9px; text-align: center; }
.auth-privacy span { color: var(--auth-accent); font-size: 8px; }
.auth-perks { display: grid; gap: 13px; margin-top: 29px; }
.auth-perk { display: flex; align-items: center; gap: 12px; }
.auth-perk > span:first-child { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid rgb(255 255 255 / 14%); border-radius: 10px; background: rgb(255 255 255 / 7%); color: var(--auth-accent); font-size: 15px; }
.auth-perk strong, .auth-perk small { display: block; }
.auth-perk strong { color: #fff; font-size: 11px; }
.auth-perk small { margin-top: 3px; color: #c0bdc4; font-size: 10px; }
.auth-footer { display: flex; min-height: 65px; align-items: center; justify-content: space-between; gap: 16px; color: #777681; font-size: 10px; }

html[data-theme="ivory"] { --auth-accent: #d8aa50; }
html[data-theme="warm"] { --auth-accent: #c69a50; }
html[data-theme="emerald"] { --auth-accent: #17b899; }
html[data-theme="amber"] { --auth-accent: #d19a43; }
html[data-theme="mist"] { --auth-accent: #8ab3dc; }
html[data-theme="rosewood"] { --auth-accent: #e59a9c; }
html[data-theme="lavender"] { --auth-accent: #b5a0f4; }
html[data-theme="slate"] { --auth-accent: #90b8cc; }

html[data-display-mode="light"] {
  color-scheme: light;
  --auth-page: #f3f0e9;
  --auth-panel: #fffdf8;
  --auth-panel-soft: #f6f1e8;
  --auth-line: rgb(51 43 32 / 12%);
  --auth-text: #302b23;
  --auth-muted: #756f65;
}

html[data-display-mode="light"][data-theme="ivory"] { --auth-accent: #c99a43; --auth-page: #f6f3ed; --auth-panel: #fffdf8; --auth-panel-soft: #eee9df; }
html[data-display-mode="light"][data-theme="warm"] { --auth-accent: #9e6d32; --auth-page: #f2ece2; --auth-panel: #fbf6ed; --auth-panel-soft: #e9decd; }
html[data-display-mode="light"][data-theme="emerald"] { --auth-accent: #0aa887; --auth-page: #eef6f2; --auth-panel: #f9fcfa; --auth-panel-soft: #dfede7; }
html[data-display-mode="light"][data-theme="amber"] { --auth-accent: #ae772a; --auth-page: #f6f0e5; --auth-panel: #fffaf0; --auth-panel-soft: #eee2cc; }
html[data-display-mode="light"][data-theme="mist"] { --auth-accent: #477fa8; --auth-page: #edf3f8; --auth-panel: #f9fbfd; --auth-panel-soft: #dce7f0; }
html[data-display-mode="light"][data-theme="rosewood"] { --auth-accent: #b85f68; --auth-page: #f7eff0; --auth-panel: #fffafb; --auth-panel-soft: #eedfe2; }
html[data-display-mode="light"][data-theme="lavender"] { --auth-accent: #7862bd; --auth-page: #f2f0f8; --auth-panel: #fcfbff; --auth-panel-soft: #e5e0f1; }
html[data-display-mode="light"][data-theme="slate"] { --auth-accent: #4d788d; --auth-page: #eef3f5; --auth-panel: #fafcfd; --auth-panel-soft: #dfe8ec; }

html[data-display-mode="light"] body.auth-body { background: radial-gradient(ellipse at 75% 10%, color-mix(in srgb, var(--auth-accent) 10%, transparent), transparent 32rem), var(--auth-page); }
html[data-display-mode="light"] .auth-brand,
html[data-display-mode="light"] .auth-form-inner h2 { color: var(--auth-text); }
html[data-display-mode="light"] .auth-layout { border-color: var(--auth-line); background: var(--auth-panel); box-shadow: 0 24px 70px rgb(40 34 25 / 10%); }
html[data-display-mode="light"] .auth-form-panel { background: var(--auth-panel); }
html[data-display-mode="light"] .auth-label { color: #484239; }
html[data-display-mode="light"] .auth-input { border-color: var(--auth-line); background: var(--auth-panel-soft); color: var(--auth-text); }
html[data-display-mode="light"] .auth-input::placeholder { color: #898174; }
html[data-display-mode="light"] .auth-input:focus { background: var(--auth-panel); }
html[data-display-mode="light"] .auth-google { border-color: var(--auth-line); color: var(--auth-text); }
html[data-display-mode="light"] .auth-google:hover { background: color-mix(in srgb, var(--auth-accent) 6%, transparent); }
html[data-display-mode="light"] .auth-submit { color: #fff; }
html[data-display-mode="light"] .auth-switch { color: var(--auth-muted); }
html[data-display-mode="light"] .auth-footer { color: var(--auth-muted); }
html[data-display-mode="light"] .auth-home-link { color: var(--auth-muted); }

@media (max-width: 900px) {
  .auth-page { width: min(720px, calc(100% - 40px)); }
  .auth-layout, .auth-layout-register { min-height: auto; grid-template-columns: 1fr; }
  .auth-story-panel { min-height: 280px; padding: 34px 38px; }
  .auth-story-panel::after { background: linear-gradient(90deg, rgb(13 14 20 / 75%), rgb(13 14 20 / 24%)), linear-gradient(0deg, rgb(13 14 20 / 74%), transparent 85%); }
  .auth-story-content { max-width: 520px; }
  .auth-story-content h1 { margin: 15px 0 10px; font-size: clamp(38px, 7vw, 52px); }
  .auth-story-content > p { max-width: 480px; }
  .auth-story-note, .auth-perks { display: none; }
  .auth-story-caption { top: 19px; left: 20px; }
  .auth-form-panel, .auth-layout-register .auth-form-panel { padding: 36px 40px 42px; }
  .auth-form-inner { max-width: 480px; }
}

@media (max-width: 520px) {
  .auth-page { width: calc(100% - 24px); }
  .auth-topbar { min-height: 68px; }
  .auth-brand { gap: 8px; font-size: 17px; }
  .auth-brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .auth-home-link { font-size: 10px; }
  .auth-layout, .auth-layout-register { border-radius: 17px; }
  .auth-story-panel { min-height: 205px; padding: 23px 23px 25px; }
  .auth-story-caption { top: 14px; left: 16px; font-size: 8px; }
  .auth-eyebrow { font-size: 8px; letter-spacing: 1.2px; }
  .auth-story-content h1 { margin: 12px 0 8px; font-size: 36px; letter-spacing: -1.8px; }
  .auth-story-content > p { max-width: 350px; font-size: 11px; line-height: 1.6; }
  .auth-form-panel, .auth-layout-register .auth-form-panel { padding: 27px 21px 30px; }
  .auth-mobile-eyebrow { display: block; }
  .auth-form-inner h2 { font-size: 27px; }
  .auth-subtitle { margin: 7px 0 20px; font-size: 11px; }
  .auth-form { gap: 14px; }
  .auth-input { min-height: 45px; font-size: 12px; }
  .auth-footer { min-height: 58px; font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
