:root {
  color-scheme: light;
  --app-background: #f7f8fc;
  --surface: #ffffff;
  --surface-subtle: #fbfbfd;
  --text-primary: #181a23;
  --text-secondary: #666d7c;
  --text-muted: #8b91a0;
  --border: #e7e9f1;
  --border-strong: #d9dce6;
  --primary: #6254e7;
  --primary-hover: #5547d5;
  --primary-active: #493cc2;
  --primary-soft: #f0eeff;
  --danger: #e55353;
  --coral-soft: #fff0ee;
  --radius-card: 14px;
  --radius-control: 10px;
  --shadow-sm: 0 6px 18px rgb(16 24 40 / 7%);
  font-family: Roboto, Arial, "Helvetica Neue", Helvetica, ui-sans-serif, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--app-background); color: var(--text-primary); font-family: inherit; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid rgb(98 84 231 / 24%); outline-offset: 2px; }

.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(420px, .9fr) minmax(440px, 1.1fr); }
.auth-intro { position: relative; display: flex; overflow: hidden; flex-direction: column; justify-content: center; padding: clamp(48px, 7vw, 104px); background: var(--primary); color: #fff; }
.auth-intro::before, .auth-intro::after { position: absolute; border: 1px solid rgb(255 255 255 / 12%); border-radius: 50%; content: ""; pointer-events: none; }
.auth-intro::before { top: -18vw; left: -20vw; width: 52vw; height: 52vw; }
.auth-intro::after { right: -11vw; bottom: -15vw; width: 36vw; height: 36vw; background: rgb(255 255 255 / 4%); }
.auth-mark { position: relative; z-index: 1; display: grid; width: 48px; height: 48px; place-items: center; border-radius: 12px; background: #fff; color: var(--primary); font-size: 13px; font-weight: 900; box-shadow: var(--shadow-sm); }
.auth-intro > p:first-of-type { position: relative; z-index: 1; margin: 16px 0 40px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.auth-intro h1 { position: relative; z-index: 1; max-width: 600px; margin: 0 0 18px; font-size: clamp(34px, 4vw, 54px); line-height: 1.08; letter-spacing: -.045em; }
.auth-intro > p:last-child { position: relative; z-index: 1; max-width: 520px; margin: 0; color: rgb(255 255 255 / 78%); font-size: 15px; }
.auth-intro code { padding: 2px 5px; border-radius: 5px; background: rgb(255 255 255 / 14%); color: #fff; }

.auth-panel { display: flex; width: min(480px, calc(100% - 40px)); align-self: center; justify-self: center; flex-direction: column; padding: 36px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-sm); }
.eyebrow { margin: 0 0 8px; color: var(--primary); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.auth-panel h2 { margin: 0 0 10px; font-size: 28px; line-height: 1.2; letter-spacing: -.03em; }
.auth-panel > p:not(.eyebrow) { margin: 0 0 24px; color: var(--text-secondary); font-size: 13px; }
.auth-panel form { display: grid; gap: 16px; }
.auth-panel label { display: grid; gap: 7px; color: var(--text-secondary); font-size: 12px; font-weight: 650; }
.auth-panel input { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-control); background: var(--surface); color: var(--text-primary); }
.auth-panel input:hover { border-color: #bfc3d0; }
.auth-panel input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgb(98 84 231 / 12%); outline: 0; }
.auth-panel button { min-height: 44px; margin-top: 4px; border: 0; border-radius: var(--radius-control); background: var(--primary); color: #fff; font-weight: 750; cursor: pointer; transition: background 180ms ease-out, box-shadow 180ms ease-out, transform 180ms ease-out; }
.auth-panel button:hover { background: var(--primary-hover); box-shadow: 0 6px 14px rgb(98 84 231 / 18%); transform: translateY(-1px); }
.auth-panel button:active { background: var(--primary-active); box-shadow: none; transform: none; }
.auth-error { margin: 0 0 18px; padding: 12px 14px; border: 1px solid #f4c5c2; border-radius: 10px; background: var(--coral-soft); color: #a33934; font-size: 12px; font-weight: 650; }
.auth-panel > small { margin-top: 16px; color: var(--text-muted); font-size: 11px; }

@media (max-width: 820px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-intro { min-height: 300px; justify-content: flex-end; padding: 42px 28px; }
  .auth-intro > p:first-of-type { margin-bottom: 24px; }
  .auth-intro h1 { font-size: clamp(31px, 8vw, 44px); }
  .auth-panel { margin: 28px auto; }
}

@media (max-width: 480px) {
  .auth-intro { min-height: 260px; padding: 30px 20px; }
  .auth-intro > p:first-of-type { margin-bottom: 20px; }
  .auth-intro > p:last-child { font-size: 13px; }
  .auth-panel { width: calc(100% - 28px); margin: 14px auto 28px; padding: 24px 18px; }
  .auth-panel h2 { font-size: 24px; }
}

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