:root {
  --auth-bg: var(--bg-body);
  --auth-bg-2: var(--bg-page);
  --auth-panel: var(--login-panel-bg);
  --auth-panel-strong: var(--bg-surface-raised);
  --auth-surface: var(--bg-surface-muted);
  --auth-surface-2: var(--bg-surface-inset);
  --auth-border: var(--login-panel-border);
  --auth-border-strong: var(--glass-border);
  --auth-text: var(--text-primary);
  --auth-muted: var(--text-muted);
  --auth-subtle: var(--text-secondary);
  --auth-accent: var(--color-brand-highlight);
  --auth-accent-2: var(--color-brand-accent);
  --auth-accent-dark: var(--text-link-hover);
  --auth-danger: var(--alert-danger-text);
  --auth-danger-bg: var(--alert-danger-bg);
  --auth-success: var(--alert-success-text);
  --auth-success-bg: var(--alert-success-bg);
  --auth-info: var(--alert-info-text);
  --auth-info-bg: var(--alert-info-bg);
  --auth-shadow: var(--login-panel-shadow, var(--shadow-xl));
}

html,
body {
  min-height: 100%;
}

body.auth-page.login-page {
  position: relative;
  margin: 0;
  min-height: 100vh;
  color: var(--auth-text);
  background-color: var(--bg-body);
  background-image: url("/img/background2026.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: var(--font-family-primary);
}

body.auth-page.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--login-bg);
  opacity: var(--login-overlay-opacity, 0.32);
  pointer-events: none;
}

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 60%) minmax(320px, 40%);
  overflow: hidden;
}

.auth-panel {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vw, 5.5rem);
  background: var(--login-panel-zone-bg, transparent);
}

.auth-panel::before {
  content: "";
  position: absolute;
  inset: 7% auto auto 9%;
  width: 11rem;
  height: 11rem;
  border: var(--border-width-normal) solid var(--glass-border);
  border-radius: var(--radius-pill);
  filter: blur(0.2px);
  opacity: 0.24;
  pointer-events: none;
}

.auth-card {
  width: min(100%, 470px);
  padding: clamp(1.8rem, 4vw, 2.8rem);
  border: var(--border-width-normal) solid var(--auth-border);
  border-radius: var(--radius-2xl);
  background: var(--auth-panel);
  box-shadow: var(--auth-shadow);
  backdrop-filter: blur(var(--glass-blur));
}

.auth-card-login {
  width: min(100%, 500px);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--auth-text);
  text-decoration: none;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.auth-brand:hover,
.auth-brand:focus {
  color: var(--auth-text);
}

.auth-brand-mark {
  width: 2.55rem;
  height: 2.55rem;
  display: inline-grid;
  place-items: center;
  border: var(--border-width-normal) solid var(--btn-gold-border);
  border-radius: var(--radius-lg);
  color: var(--btn-gold-text);
  background: var(--btn-gold-bg);
  font-weight: 900;
  box-shadow: var(--glow-gold);
}

.auth-brand-text {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 780;
  line-height: 1.1;
}

.auth-kicker {
  color: var(--auth-accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  margin: 0 0 0.6rem;
  text-transform: uppercase;
}

.auth-title {
  color: var(--auth-text);
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0 0 0.75rem;
}

.auth-copy {
  color: var(--auth-muted);
  font-size: 1rem;
  line-height: 1.55;
  margin: 0 0 1.45rem;
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.auth-field {
  display: grid;
  gap: 0.45rem;
}

.auth-field label {
  color: var(--label-text);
  font-size: 0.92rem;
  font-weight: 700;
}

.auth-field-hint {
  color: var(--auth-subtle);
  font-size: 0.82rem;
}

.auth-field .form-control,
.auth-password-control .form-control {
  min-height: 3.35rem;
  border: var(--border-width-normal) solid var(--input-border);
  border-radius: var(--radius-lg);
  background: var(--input-bg);
  color: var(--input-text);
  font-size: 1rem;
  transition: var(--transition-default);
}

.auth-field .form-control::placeholder {
  color: var(--input-placeholder);
}

.auth-field .form-control:focus,
.auth-password-control .form-control:focus {
  border-color: var(--input-border-focus);
  background: var(--input-bg);
  color: var(--input-text);
  box-shadow: var(--input-focus-shadow);
  transform: translateY(-1px);
}

.auth-password-control {
  position: relative;
}

.auth-password-control .form-control {
  padding-right: 3.3rem;
}

.auth-password-toggle {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  width: 2.45rem;
  height: 2.45rem;
  border: 0;
  border-radius: var(--radius-md);
  display: inline-grid;
  place-items: center;
  color: var(--auth-muted);
  background: transparent;
  transform: translateY(-50%);
  transition: var(--transition-default);
}

.auth-password-toggle:hover,
.auth-password-toggle:focus {
  color: var(--auth-text);
  background: var(--btn-ghost-hover-bg);
}

.auth-icon-eye {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid currentColor;
  border-radius: var(--radius-pill);
  position: relative;
}

.auth-icon-eye::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 0.32rem;
  height: 0.32rem;
  border-radius: var(--radius-pill);
  background: currentColor;
  transform: translate(-50%, -50%);
}

.auth-password-toggle[aria-pressed="true"] .auth-icon-eye::after {
  content: "";
  position: absolute;
  left: -0.25rem;
  top: 50%;
  width: 1.55rem;
  height: 2px;
  border-radius: var(--radius-pill);
  background: currentColor;
  transform: rotate(-35deg);
}

.auth-form-options,
.auth-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.auth-action-row {
  margin-top: 0.35rem;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--auth-muted);
  font-weight: 650;
  cursor: pointer;
}

.auth-check input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--color-brand-primary);
}

.auth-button {
  min-height: 3rem;
  padding: 0.78rem 1.25rem;
  border: var(--border-width-normal) solid var(--btn-gold-border);
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: var(--btn-gold-bg);
  color: var(--btn-gold-text);
  font-weight: 850;
  text-decoration: none;
  box-shadow: var(--glow-gold);
  transition: var(--transition-default);
}

.auth-button:hover,
.auth-button:focus {
  color: var(--btn-gold-text);
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: var(--glow-hover);
}

.auth-button-primary {
  width: 100%;
}

.auth-button-secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  border: var(--border-width-normal) solid var(--btn-secondary-border);
  box-shadow: none;
}

.auth-button-secondary:hover,
.auth-button-secondary:focus {
  color: var(--btn-secondary-hover-text);
  background: var(--btn-secondary-hover-bg);
  box-shadow: none;
}

.auth-button-link {
  width: fit-content;
}

.auth-button-loader {
  display: none;
  width: 1rem;
  height: 1rem;
  border: var(--focus-ring-width) solid var(--loader-secondary);
  border-top-color: var(--loader-primary);
  border-radius: var(--radius-pill);
  animation: auth-spin var(--motion-duration-hero) linear infinite;
}

.auth-form.is-loading .auth-button-loader {
  display: inline-block;
}

.auth-form.is-loading .auth-button-label {
  opacity: 0.72;
}

.auth-form.is-loading [data-auth-submit] {
  pointer-events: none;
}

.auth-link {
  color: var(--text-link);
  font-weight: 650;
  text-decoration: none;
}

.auth-link:hover,
.auth-link:focus {
  color: var(--text-link-hover);
  text-decoration: underline;
}

.auth-alert {
  border-radius: var(--radius-lg);
  padding: 0.95rem 1rem;
  margin-bottom: 1.15rem;
  border: var(--border-width-normal) solid transparent;
  color: var(--auth-text);
}

.auth-alert-danger {
  color: var(--alert-danger-text);
  background: var(--auth-danger-bg);
  border-color: var(--alert-danger-border);
}

.auth-alert-info {
  color: var(--auth-info);
  background: var(--auth-info-bg);
  border-color: var(--alert-info-border);
}

.auth-alert-success {
  color: var(--auth-success);
  background: var(--auth-success-bg);
  border-color: var(--alert-success-border);
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  color: var(--auth-subtle);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--auth-border);
}

.auth-provider-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.auth-provider {
  min-height: 3rem;
  border: var(--border-width-normal) solid var(--auth-border);
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: var(--auth-muted);
  background: var(--btn-ghost-bg);
}

.auth-provider:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.auth-provider-mark {
  width: 1.3rem;
  height: 1.3rem;
  border-radius: var(--radius-sm);
  display: inline-grid;
  place-items: center;
  color: var(--btn-gold-text);
  background: var(--btn-gold-bg);
  font-size: 0.78rem;
  font-weight: 900;
}

.guest-invitation-card {
  align-items: center;
  background: var(--glass-bg);
  border: var(--border-width-normal) solid var(--auth-border);
  border-radius: var(--radius-xl);
  display: grid;
  gap: 0.45rem;
  justify-items: center;
  margin: 1rem 0 1.25rem;
  padding: 1.35rem;
  text-align: center;
}

.guest-invitation-logo {
  height: 78px;
  object-fit: contain;
  width: 78px;
}

.guest-invitation-community {
  color: var(--auth-muted);
}

.auth-bg {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(2rem, 5vw, 4rem);
  overflow: hidden;
  background: var(--login-art-zone-bg, transparent);
}

.auth-bg::before {
  display: none;
}

.auth-visual-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  min-height: 360px;
  border: var(--border-width-normal) solid var(--glass-border);
  border-radius: var(--radius-2xl);
  display: grid;
  align-content: end;
  gap: 1rem;
  padding: 2rem;
  background: var(--glass-bg);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(var(--glass-blur));
}

.auth-visual-kicker {
  color: var(--auth-accent);
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
}

.auth-visual-card strong {
  max-width: 18rem;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.05;
}

.auth-orbit {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 9rem;
  height: 9rem;
  border: var(--border-width-normal) solid var(--glass-border);
  border-radius: var(--radius-pill);
}

.auth-orbit span {
  position: absolute;
  width: 1rem;
  height: 1rem;
  border-radius: var(--radius-pill);
  background: var(--auth-accent);
  box-shadow: var(--glow-gold);
}

.auth-orbit span:nth-child(1) {
  top: -0.5rem;
  left: 50%;
}

.auth-orbit span:nth-child(2) {
  right: 0.4rem;
  bottom: 1rem;
  background: var(--auth-accent-2);
}

.auth-orbit span:nth-child(3) {
  left: 0.6rem;
  bottom: 1.5rem;
  width: 0.65rem;
  height: 0.65rem;
}

.auth-footer {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 2;
  width: 60%;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.82rem;
  pointer-events: none;
}

.field-validation-error,
.validation-summary-errors {
  color: var(--validation-error-text);
  font-size: 0.88rem;
}

.validation-summary-errors ul {
  padding-left: 1.1rem;
  margin-bottom: 0;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 991.98px) {
  body.auth-page.login-page {
    background-image: url("/img/background2026.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll;
  }

  body.auth-page.login-page::before {
    background: var(--login-bg);
    opacity: var(--login-mobile-overlay-opacity, 0.48);
  }

  .auth-shell {
    position: relative;
    z-index: 1;
    grid-template-columns: 1fr;
    min-height: 100svh;
  }

  .auth-panel {
    align-items: center;
    justify-content: center;
    min-height: 100svh;
    padding: 1.25rem;
    padding-top: max(1.25rem, env(safe-area-inset-top));
  }

  .auth-panel::before {
    display: none;
  }

  .auth-card {
    width: min(100%, 560px);
    margin: 0 auto;
  }

  .auth-bg {
    display: none;
  }

  .auth-footer {
    width: 100%;
    color: var(--text-muted);
  }
}

@media (max-width: 575.98px) {
  body.auth-page.login-page {
    background-image: url("/img/background2026.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
  }

  .auth-panel {
    padding: 0.85rem;
    padding-bottom: max(3rem, env(safe-area-inset-bottom));
  }

  .auth-card {
    min-height: 0;
    border-radius: var(--radius-xl);
    padding: 1.35rem;
  }

  .auth-card-login {
    min-height: 0;
  }

  .auth-brand {
    margin-bottom: 1.55rem;
  }

  .auth-title {
    font-size: 1.65rem;
  }

  .auth-form-options {
    align-items: flex-start;
  }

  .auth-provider-grid {
    grid-template-columns: 1fr;
  }

  .auth-action-row {
    align-items: stretch;
  }

  .auth-action-row .auth-button,
  .auth-action-row .auth-button-link {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .auth-card {
    padding: 1.1rem;
  }

  .auth-field .form-control,
  .auth-password-control .form-control {
    min-height: 3.1rem;
  }
}
