
/* v35: sane auth/reset message colors. Loaded last. */

/* Login, forgot-password and reset-password alerts: no orange/rose or blue/blue. */
.auth-card .alert,
.auth-modal-card .alert,
.login-modal .alert,
.alert[role="alert"] {
  margin: 14px 0 16px !important;
  padding: 12px 14px !important;
  border-radius: 10px !important;
  font-size: .92rem !important;
  line-height: 1.45 !important;
  font-weight: 750 !important;
  text-shadow: none !important;
}

/* Error: readable red text on a very light red surface in light mode. */
html[data-theme="light"] .auth-card .alert:not(.alert-success),
html[data-theme="light"] .auth-modal-card .alert:not(.alert-success),
html[data-theme="light"] .login-modal .alert:not(.alert-success),
html[data-theme="light"] .alert[role="alert"]:not(.alert-success) {
  color: #7f1d1d !important;
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
}

/* Error in dark mode: light text on dark red/brown surface. */
html[data-theme="dark"] .auth-card .alert:not(.alert-success),
html[data-theme="dark"] .auth-modal-card .alert:not(.alert-success),
html[data-theme="dark"] .login-modal .alert:not(.alert-success),
html[data-theme="dark"] .alert[role="alert"]:not(.alert-success) {
  color: #fee2e2 !important;
  background: #451a1a !important;
  border: 1px solid #7f1d1d !important;
}

/* Success / info: readable green surface, not blue on blue. */
html[data-theme="light"] .auth-card .alert-success,
html[data-theme="light"] .auth-modal-card .alert-success,
html[data-theme="light"] .login-modal .alert-success,
html[data-theme="light"] .alert-success[role="status"] {
  color: #064e3b !important;
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
}

html[data-theme="dark"] .auth-card .alert-success,
html[data-theme="dark"] .auth-modal-card .alert-success,
html[data-theme="dark"] .login-modal .alert-success,
html[data-theme="dark"] .alert-success[role="status"] {
  color: #d1fae5 !important;
  background: #063a2b !important;
  border: 1px solid #047857 !important;
}

/* Forgot-password link and muted auth links must remain readable. */
html[data-theme="light"] .auth-muted-link,
html[data-theme="light"] .auth-card a:not(.button),
html[data-theme="light"] .auth-modal-card a:not(.button) {
  color: #115fca !important;
  text-shadow: none !important;
}

html[data-theme="dark"] .auth-muted-link,
html[data-theme="dark"] .auth-card a:not(.button),
html[data-theme="dark"] .auth-modal-card a:not(.button) {
  color: #67ddff !important;
  text-shadow: none !important;
}

.auth-muted-link:hover,
.auth-card a:not(.button):hover,
.auth-modal-card a:not(.button):hover {
  text-decoration: underline !important;
  text-underline-offset: 4px !important;
}

/* Auth form labels/inputs: explicit contrast in both modes. */
html[data-theme="light"] .auth-card label,
html[data-theme="light"] .auth-modal-card label,
html[data-theme="light"] .auth-card label span,
html[data-theme="light"] .auth-modal-card label span {
  color: #061427 !important;
}

html[data-theme="dark"] .auth-card label,
html[data-theme="dark"] .auth-modal-card label,
html[data-theme="dark"] .auth-card label span,
html[data-theme="dark"] .auth-modal-card label span {
  color: #f8fbff !important;
}

html[data-theme="light"] .auth-card input,
html[data-theme="light"] .auth-modal-card input {
  color: #061427 !important;
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, .18) !important;
}

html[data-theme="dark"] .auth-card input,
html[data-theme="dark"] .auth-modal-card input {
  color: #f8fbff !important;
  background: #091525 !important;
  border-color: rgba(180, 210, 255, .22) !important;
}

html[data-theme="light"] .auth-card input::placeholder,
html[data-theme="light"] .auth-modal-card input::placeholder {
  color: #64748b !important;
}

html[data-theme="dark"] .auth-card input::placeholder,
html[data-theme="dark"] .auth-modal-card input::placeholder {
  color: #94a3b8 !important;
}

/* Keep team portraits in original color. */
.team-card img,
.team-card-v18 img,
.team-card-v20 img,
.team-modal-card-v18 img,
[data-team-modal-img] {
  filter: none !important;
  -webkit-filter: none !important;
}

/* Home hero full Alf-Space logo. */
.home-hero-logo-wrap {
  width: min(460px, 92vw);
  margin: 30px auto 30px auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-hero-logo-full {
  display: block;
  width: 90%;
  height: auto;
  object-fit: contain;
}

/* Move the ecosystem decorative line away from the card border. */
.ecosystem-v18 {
  margin-top: 110px !important;
  padding-top: 80px !important;
}

.ecosystem-v18::before {
  top: -64px !important;
}

/* Dark mobile hamburger menu: restore a real readable panel. */
@media (max-width: 760px) {
  html[data-theme="dark"] .site-header .site-nav-v24,
  html[data-theme="dark"] .site-header .site-nav-v24.is-open {
    background: linear-gradient(180deg, rgba(8, 18, 36, .98), rgba(4, 10, 23, .98)) !important;
    border: 1px solid rgba(180, 210, 255, .24) !important;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .62) !important;
    backdrop-filter: blur(22px) saturate(125%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(125%) !important;
  }

  html[data-theme="dark"] .site-header .site-nav-v24 > a {
    color: #f8fbff !important;
    background: rgba(255, 255, 255, .075) !important;
    border: 1px solid rgba(180, 210, 255, .16) !important;
    text-shadow: none !important;
  }

  html[data-theme="dark"] .site-header .site-nav-v24 > a:hover,
  html[data-theme="dark"] .site-header .site-nav-v24 > a:focus-visible {
    color: #67ddff !important;
    background: rgba(103, 221, 255, .11) !important;
  }

  html[data-theme="dark"] .site-header .site-nav-v24 .nav-cta {
    color: #ffffff !important;
    background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
    border: 0 !important;
  }

  html[data-theme="dark"] .site-header .site-nav-v24 .mobile-nav-controls-v28 {
    background: rgba(255, 255, 255, .06) !important;
    border: 1px solid rgba(180, 210, 255, .14) !important;
    border-radius: 14px !important;
    padding: 8px !important;
  }
}
