@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700;800&display=swap");

:root {
  --auth-background: #f6f6ff;
  --auth-surface: rgba(255, 255, 255, 0.92);
  --auth-surface-strong: #ffffff;
  --auth-surface-muted: #eef0ff;
  --auth-surface-high: #dfe5ff;
  --auth-ink: #272e42;
  --auth-muted: #535b71;
  --auth-muted-soft: #6f768e;
  --auth-outline: rgba(111, 118, 142, 0.16);
  --auth-outline-strong: rgba(111, 118, 142, 0.3);
  --auth-primary: #4647d3;
  --auth-primary-deep: #0e009d;
  --auth-tertiary: #702ae1;
  --auth-inverse: #06162f;
  --auth-inverse-soft: #0f274a;
  --auth-error: #b41340;
  --auth-shadow: 0 20px 40px rgba(39, 46, 66, 0.06);
  --auth-shadow-strong: 0 24px 70px rgba(39, 46, 66, 0.1);
  --auth-font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --auth-font-body: "Inter", "Segoe UI", sans-serif;
  --auth-content-width: 92rem;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-size: 16px;
  overflow-x: hidden;
}

body.auth-body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: var(--auth-background);
  color: var(--auth-ink);
  font-family: var(--auth-font-body);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.auth-grid-bg,
.auth-grid-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.auth-grid-bg {
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(165, 173, 198, 0.18) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(165, 173, 198, 0.18) 1px, transparent 1px);
  background-size: 40px 40px;
}

.auth-grid-glow {
  z-index: 0;
  filter: blur(70px);
  opacity: 0.45;
}

.auth-grid-glow--primary {
  background: radial-gradient(circle at 18% 24%, rgba(70, 71, 211, 0.28), transparent 28%);
}

.auth-grid-glow--secondary {
  background: radial-gradient(circle at 84% 10%, rgba(112, 42, 225, 0.18), transparent 24%);
}

.auth-main {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 1.5vw, 1rem);
}

.auth-login-page,
.auth-focus-page {
  width: min(100%, var(--auth-content-width));
}

.auth-login-page {
  height: min(calc(100svh - 2rem), 54rem);
  max-height: calc(100svh - 2rem);
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(24rem, 0.96fr);
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  box-shadow: var(--auth-shadow-strong);
  overflow: hidden;
}

.auth-login-visual {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--auth-inverse) 0%, #0a1d39 58%, var(--auth-inverse-soft) 100%);
  padding: clamp(1.75rem, 3vw, 3rem);
  min-height: 100%;
  display: flex;
  align-items: flex-end;
}

.auth-login-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background-image:
    linear-gradient(to right, rgba(165, 173, 198, 0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(165, 173, 198, 0.09) 1px, transparent 1px),
    radial-gradient(circle at 62% 52%, rgba(255, 255, 255, 0.09), transparent 28%);
  background-size: 34px 34px, 34px 34px, 100% 100%;
}

.auth-login-pattern::before,
.auth-login-pattern::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(165, 173, 198, 0.2);
}

.auth-login-pattern::before {
  inset: 14% 24% 22% 10%;
}

.auth-login-pattern::after {
  inset: 22% 14% 12% 18%;
}

.auth-login-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.25rem;
  max-width: 28rem;
}

.auth-rule-row {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.auth-rule-row::before {
  content: "";
  width: 3rem;
  height: 2px;
  background: var(--auth-primary);
}

.auth-kicker,
.auth-label,
.auth-meta-label,
.auth-caption,
.auth-shell-label {
  font-family: var(--auth-font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.auth-kicker,
.auth-shell-label {
  color: #c8d1f7;
}

.auth-eyebrow {
  margin: 0 0 0.8rem;
  font-family: var(--auth-font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--auth-primary);
}

.auth-display {
  margin: 0;
  font-family: var(--auth-font-display);
  font-size: clamp(3rem, 6.3vw, 5.35rem);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.08em;
  text-transform: uppercase;
}

.auth-login-visual .auth-display {
  color: #ffffff;
}

.auth-display--card {
  font-size: clamp(2.75rem, 6vw, 4.4rem);
  color: var(--auth-ink);
}

.auth-copy {
  margin: 0;
  max-width: 34rem;
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--auth-muted);
}

.auth-login-visual .auth-copy {
  color: rgba(226, 232, 255, 0.82);
}

.auth-copy--tight {
  max-width: 28rem;
}

.auth-stat-row,
.auth-confirmation-meta,
.auth-metric-strip {
  display: grid;
  gap: 1rem;
}

.auth-stat-row {
  grid-template-columns: repeat(2, minmax(0, max-content));
  margin-top: 0.15rem;
}

.auth-stat-card {
  display: grid;
  gap: 0.2rem;
}

.auth-stat-value {
  font-family: var(--auth-font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: #ffffff;
}

.auth-login-watermark {
  position: absolute;
  left: clamp(2rem, 5vw, 4rem);
  bottom: 1rem;
  font-family: var(--auth-font-display);
  font-size: clamp(4.2rem, 11vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.08em;
  color: rgba(255, 255, 255, 0.05);
  text-transform: uppercase;
  pointer-events: none;
}

.auth-login-panel {
  position: relative;
  background: rgba(246, 246, 255, 0.92);
  padding: clamp(1.25rem, 2.4vw, 2.35rem);
  display: flex;
  align-items: center;
}

.auth-login-panel::before,
.auth-focus-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--auth-primary) 0%, var(--auth-tertiary) 100%);
}

.auth-login-shell,
.auth-focus-card {
  position: relative;
  width: 100%;
}

.auth-login-shell {
  max-width: 31rem;
  margin: 0 auto;
  display: grid;
  gap: 1.1rem;
}

.auth-brand-line,
.auth-focus-header,
.auth-page-footer,
.auth-login-footer,
.auth-field-row,
.auth-session-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.auth-brand-line {
  margin-bottom: 0.5rem;
}

.auth-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.auth-brand-chip {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  background: var(--auth-primary);
  color: #ffffff;
  font-family: var(--auth-font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.auth-brand-name {
  font-family: var(--auth-font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.auth-form-header,
.auth-focus-intro,
.auth-confirmation {
  display: grid;
  gap: 0.85rem;
}

.auth-form-title,
.auth-panel-title,
.auth-confirmation-title {
  margin: 0;
  font-family: var(--auth-font-display);
  font-weight: 800;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  color: var(--auth-ink);
}

.auth-form-title {
  font-size: clamp(2.15rem, 4.3vw, 3.4rem);
  line-height: 0.95;
}

.auth-panel-title,
.auth-confirmation-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 0.94;
}

.auth-form,
.auth-action-stack,
.auth-focus-body,
.auth-transaction-stack {
  display: grid;
  gap: 0.85rem;
}

.auth-field {
  display: grid;
  gap: 0.45rem;
}

.auth-field label {
  font-family: var(--auth-font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--auth-muted);
}

.auth-input-wrap {
  position: relative;
  background: var(--auth-surface-muted);
  transition: background 160ms ease, box-shadow 160ms ease;
}

.auth-input-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--auth-primary);
  transition: right 180ms ease;
}

.auth-input-wrap:focus-within {
  background: #e5e9ff;
  box-shadow: 0 0 0 4px rgba(70, 71, 211, 0.08);
}

.auth-input-wrap:focus-within::after {
  right: 0;
}

.auth-input {
  width: 100%;
  min-height: 52px;
  border: 0;
  background: transparent;
  padding: 0.92rem 1rem 0.88rem;
  color: var(--auth-ink);
}

.auth-input::placeholder {
  color: rgba(111, 118, 142, 0.7);
}

.auth-input:focus {
  outline: none;
}

.auth-primary-action,
.auth-primary-link,
.auth-secondary-action,
.auth-return-link,
.auth-inline-action {
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.auth-primary-action,
.auth-primary-link {
  display: inline-flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border: 0;
  padding: 0.9rem 1.25rem;
  background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-tertiary) 100%);
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(70, 71, 211, 0.18);
  cursor: pointer;
  font-family: var(--auth-font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.auth-primary-action:hover,
.auth-primary-link:hover {
  transform: translateY(-1px);
}

.auth-secondary-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1rem;
  border: 1px solid var(--auth-outline-strong);
  background: transparent;
  color: var(--auth-muted);
  cursor: pointer;
  font-family: var(--auth-font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-secondary-action:hover {
  border-color: var(--auth-primary);
  color: var(--auth-primary);
}

.auth-inline-action,
.auth-return-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--auth-primary);
  cursor: pointer;
  font-family: var(--auth-font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-inline-action:hover,
.auth-return-link:hover {
  color: var(--auth-primary-deep);
}

.auth-divider-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.auth-divider-row::before,
.auth-divider-row::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: rgba(111, 118, 142, 0.18);
}

.auth-divider-copy,
.auth-helper-copy,
.auth-footer-copy,
.auth-page-footer,
.auth-login-footer {
  color: var(--auth-muted-soft);
}

.auth-helper-copy,
.auth-footer-copy {
  font-size: 0.82rem;
}

.auth-helper-link,
.auth-page-footer a,
.auth-login-footer a {
  color: var(--auth-primary);
  font-weight: 700;
}

.auth-helper-link:hover,
.auth-page-footer a:hover,
.auth-login-footer a:hover {
  color: var(--auth-primary-deep);
}

.auth-note-panel,
.auth-body .message,
.auth-session-panel,
.auth-summary-grid div,
.auth-session-grid div,
.auth-metric-card {
  background: var(--auth-surface-muted);
}

.auth-note-panel,
.auth-body .message {
  min-height: 1.25rem;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--auth-primary);
  line-height: 1.6;
}

.auth-note-panel {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--auth-muted);
}

.auth-body .message {
  color: var(--auth-muted);
}

.auth-body .message.success {
  background: linear-gradient(135deg, rgba(70, 71, 211, 0.12), rgba(112, 42, 225, 0.1));
  color: var(--auth-ink);
}

.auth-body .message.error {
  border-left-color: var(--auth-error);
  background: rgba(180, 19, 64, 0.1);
  color: #7a1831;
}

.auth-session-panel {
  padding: 1.1rem;
  box-shadow: var(--auth-shadow);
  display: grid;
  gap: 0.85rem;
}

.auth-summary-grid,
.auth-session-grid,
.auth-confirmation-meta,
.auth-metric-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-summary-grid,
.auth-session-grid {
  display: grid;
  gap: 0.9rem;
}

.auth-summary-grid div,
.auth-session-grid div,
.auth-metric-card {
  padding: 0.95rem 1rem;
}

.auth-summary-grid dt,
.auth-session-grid dt,
.auth-meta-label {
  margin: 0 0 0.35rem;
  font-family: var(--auth-font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--auth-muted-soft);
}

.auth-summary-grid dd,
.auth-session-grid dd,
.auth-meta-value,
.auth-metric-card strong {
  margin: 0;
  font-family: var(--auth-font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--auth-ink);
}

.auth-focus-page {
  min-height: calc(100vh - 2rem);
  display: grid;
  align-content: center;
  gap: 0.9rem;
  padding: 0.25rem 0;
}

.auth-focus-header {
  padding: 0.25rem 0.15rem 0;
}

.auth-focus-frame {
  width: min(100%, 31rem);
  margin: 0 auto;
  display: grid;
  gap: 0.75rem;
}

.auth-focus-card {
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 2.6rem);
  background: var(--auth-surface-strong);
  box-shadow: var(--auth-shadow);
}

.auth-focus-card::after {
  content: "";
  position: absolute;
  top: -3.5rem;
  right: -3.5rem;
  width: 7rem;
  height: 7rem;
  background: var(--auth-surface-muted);
  transform: rotate(45deg);
}

.auth-accent-bar {
  width: 5rem;
  height: 0.22rem;
  background: var(--auth-primary);
}

.auth-confirmation {
  align-items: center;
  text-align: center;
}

.auth-confirmation-badge {
  position: relative;
  width: 6.5rem;
  height: 6.5rem;
  margin: 0 auto;
  display: grid;
  place-items: center;
  background: var(--auth-surface-muted);
}

.auth-confirmation-badge::before,
.auth-confirmation-badge::after {
  content: "";
  position: absolute;
  width: 1rem;
  height: 1rem;
  border-color: rgba(111, 118, 142, 0.5);
  border-style: solid;
}

.auth-confirmation-badge::before {
  top: -0.3rem;
  left: -0.3rem;
  border-width: 1px 0 0 1px;
}

.auth-confirmation-badge::after {
  right: -0.3rem;
  bottom: -0.3rem;
  border-width: 0 1px 1px 0;
}

.auth-confirmation-mark {
  width: 2.6rem;
  height: 2.6rem;
  background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-tertiary) 100%);
  clip-path: polygon(50% 0%, 68% 10%, 86% 0%, 100% 18%, 90% 36%, 100% 54%, 86% 72%, 68% 62%, 50% 100%, 32% 62%, 14% 72%, 0% 54%, 10% 36%, 0% 18%, 14% 0%, 32% 10%);
}

.auth-confirmation-title {
  text-align: center;
}

.auth-confirmation-meta {
  width: 100%;
}

.auth-confirmation-actions {
  display: grid;
  gap: 0.75rem;
  width: 100%;
}

.auth-metric-strip {
  gap: 0.75rem;
}

.auth-page-footer,
.auth-login-footer {
  flex-wrap: wrap;
  font-size: 0.76rem;
  line-height: 1.6;
}

.auth-page-footer {
  padding: 0 0.15rem 0.25rem;
}

.auth-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.auth-focus-header .auth-shell-label {
  color: var(--auth-muted-soft);
}

.hidden {
  display: none !important;
}

:focus-visible {
  outline: 2px solid rgba(70, 71, 211, 0.55);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1100px) {
  .auth-login-page {
    height: auto;
    max-height: none;
    grid-template-columns: 1fr;
  }

  .auth-login-visual {
    min-height: 16rem;
    align-items: flex-start;
  }

  .auth-login-watermark {
    bottom: 1rem;
  }
}

@media (max-width: 980px) {
  .auth-main {
    align-items: stretch;
  }

  .auth-login-page {
    min-height: calc(100svh - 1.5rem);
    box-shadow: var(--auth-shadow);
  }

  .auth-login-visual {
    display: none;
  }

  .auth-login-panel {
    padding: 1.25rem;
  }

  .auth-login-shell {
    max-width: 34rem;
  }
}

@media (max-width: 820px) {
  .auth-main {
    padding: 0.75rem;
  }

  .auth-login-page,
  .auth-focus-page {
    width: 100%;
  }

  .auth-focus-page {
    min-height: auto;
    align-content: start;
  }

  .auth-summary-grid,
  .auth-session-grid,
  .auth-confirmation-meta,
  .auth-metric-strip {
    grid-template-columns: 1fr;
  }

  .auth-focus-header,
  .auth-page-footer,
  .auth-login-footer,
  .auth-brand-line,
  .auth-field-row,
  .auth-session-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-field-row {
    gap: 0.55rem;
  }

  .auth-confirmation-actions {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .auth-main {
    align-items: stretch;
    padding: 0.5rem;
  }

  .auth-login-page {
    min-height: calc(100svh - 1rem);
    box-shadow: none;
    background: transparent;
  }

  .auth-login-panel,
  .auth-focus-card {
    padding: 1rem;
  }

  .auth-display {
    font-size: clamp(2.4rem, 13vw, 3.4rem);
  }

  .auth-form-title,
  .auth-panel-title,
  .auth-confirmation-title {
    font-size: clamp(1.9rem, 11vw, 2.6rem);
  }

  .auth-primary-action,
  .auth-primary-link,
  .auth-secondary-action {
    width: 100%;
  }

  .auth-footer-links {
    flex-direction: column;
    gap: 0.35rem;
  }
}

@media (max-height: 860px) and (min-width: 981px) {
  .auth-main {
    padding: 0.65rem;
  }

  .auth-login-page {
    height: calc(100svh - 1.3rem);
    max-height: calc(100svh - 1.3rem);
  }

  .auth-login-visual,
  .auth-login-panel {
    padding-top: 1.4rem;
    padding-bottom: 1.4rem;
  }

  .auth-login-shell {
    gap: 0.8rem;
  }

  .auth-display {
    font-size: clamp(2.7rem, 5.4vw, 4.5rem);
  }

  .auth-copy {
    font-size: 0.9rem;
  }

  .auth-form-title {
    font-size: clamp(2rem, 3.7vw, 2.9rem);
  }

  .auth-input,
  .auth-primary-action,
  .auth-primary-link {
    min-height: 48px;
  }
}