/* ==========================================================================
   Sign-in and sign-out pages (login.php, logout.php). Ported from the approved mockup
   (dev/design-preview/assets/screens.css, "login"). The hero is the one place the swoosh is
   used large; it is dark in both themes, so its colours are fixed values scoped to the hero
   (not theme tokens). Headline copy is a draft pending from OMi (DESIGN-NOTES question 9).
   ========================================================================== */
.op-login {
  min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(400px, 1fr);
}

/* ---- hero: always dark ---- */
.op-login-hero {
  --hero-ink: #111936; --hero-text: #FFFFFF; --hero-sub: #C3CADA; --hero-chip: #E7EBF3; --hero-chip-line: rgba(255, 255, 255, .2);
  position: relative; overflow: hidden; background: var(--hero-ink); color: var(--hero-text);
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 56px; isolation: isolate;
}
.op-hero-pool {
  position: absolute; inset: 0; z-index: -1; background:
    radial-gradient(ellipse 60% 32% at 52% 74%, rgba(74, 134, 197, .55), transparent 70%),
    radial-gradient(ellipse 34% 18% at 40% 70%, rgba(14, 154, 200, .45), transparent 70%),
    radial-gradient(ellipse 22% 12% at 64% 80%, rgba(141, 185, 46, .28), transparent 70%),
    linear-gradient(180deg, #0D1430 0%, #141E42 60%, #1A2550 100%);
}
.op-hero-pool::after {
  content: ""; position: absolute; left: 50%; top: -10%; width: 260px; height: 70%; opacity: .6; filter: blur(30px);
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .08)); transform: translateX(-50%) rotate(14deg); transform-origin: top;
}
/* The real logo (white letters: the hero is dark in both themes), with a soft glow behind it */
.op-hero-logo { position: relative; width: min(340px, 70%); }
.op-hero-logo::before { content: ""; position: absolute; inset: -30% -20%; z-index: -1; background: radial-gradient(closest-side, rgba(74, 134, 197, .28), transparent); filter: blur(8px); }
.op-hero-logo .op-logo { width: 100%; height: auto; animation: op-fade 900ms var(--ease-out) both; }
.op-hero-copy { max-width: 560px; }
.op-hero-title { margin: 0; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; letter-spacing: -0.022em; font-weight: var(--fw-bold); color: var(--hero-text); }
.op-hero-sub { margin: 18px 0 0; font-size: var(--fs-lg); line-height: 1.55; color: var(--hero-sub); max-width: 46ch; }
.op-hero-products { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.op-hero-products li { padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--hero-chip-line); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--hero-chip); }

/* ---- form panel ---- */
.op-login-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px 32px 24px; background: var(--bg); outline: none; }
.op-login-card { width: 100%; max-width: 400px; display: grid; gap: 18px; }
.op-login-logo .op-logo { height: 36px; width: auto; }
.op-login-card h1 { font-size: var(--fs-2xl); letter-spacing: var(--tracking-tight); margin: 8px 0 0; }
.op-login-card p { margin: 0; }
.op-login-card .op-field .invalid-feedback { display: block; margin: 0; }
.op-login-card .btn-lg { width: 100%; }
.op-pw-wrap { position: relative; }
.op-pw-wrap .form-control { padding-right: 48px; }
.op-pw-wrap .form-control.is-invalid { background-image: none; }
.op-pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.op-login-help { font-size: 14px; color: var(--text-muted); text-align: center; }
.op-login-foot { margin: auto 0 0; padding-top: 32px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; font-size: var(--fs-sm); color: var(--text-muted); }
.op-login-foot a { color: var(--text-muted); }
.op-login-foot a:hover { color: var(--text); }
.op-login-actions { display: grid; gap: 10px; }

@media (max-width: 700px) {
  .op-login { grid-template-columns: 1fr; }
  .op-login-hero { min-height: 0; padding: max(24px, env(safe-area-inset-top, 0px)) 20px 28px; gap: 20px; justify-content: flex-start; }
  .op-hero-logo { width: 168px; }
  .op-hero-sub, .op-hero-products { display: none; }
  .op-hero-title { font-size: 24px; }
  .op-login-panel { padding: 28px 16px 20px; justify-content: flex-start; }
  .op-login-logo { display: none; }
  .op-login-card h1 { margin-top: 0; font-size: 22px; }
}
