/* Staff login "Crew gate" (Components/Account/Login.razor). The landing's night-crossing scene full-bleed, a short
   welcome on the start side and the sign-in as a boarding pass on the end side. Reuses .hero-scene, .ticket*,
   .night-field and .btn-accent from public.css; scene colours (--hs-*) are shared with .hero-cine there.
   Night surface in both themes (the theme toggle changes the time of day, as on the landing). Logical properties only. */

.login-stage {
  position: relative; isolation: isolate; overflow: clip;
  display: grid; grid-template-rows: auto 1fr auto;
  min-block-size: 100vh; min-block-size: 100svh;
  background: var(--hs-sky-1); color: var(--au-night-ink);
}
/* Legibility shade: darker at the top (bar), on the copy side and at the bottom (footer line). The scene never
   carries text on its own. */
.login-stage::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(3, 17, 18, 0.55), transparent 22%, transparent 70%, rgba(3, 17, 18, 0.7)),
    linear-gradient(to left, rgba(3, 17, 18, 0.5), transparent 55%);
}
[dir="rtl"] .login-stage::before {
  background:
    linear-gradient(to bottom, rgba(3, 17, 18, 0.55), transparent 22%, transparent 70%, rgba(3, 17, 18, 0.7)),
    linear-gradient(to right, rgba(3, 17, 18, 0.5), transparent 55%);
}
/* Phones: public.css pins the scene to the top 72svh; the sea colour continues it below. */
@media (max-width: 767px) { .login-stage { background: var(--au-night-sea); } }
@media (min-width: 768px) and (max-width: 1023px) { .login-stage { background: var(--hs-sky-1); } }

/* Top bar */
.login-top {
  display: flex; align-items: center; justify-content: space-between; gap: var(--au-3);
  padding: 20px clamp(16px, 4vw, 48px);
}
.login-top .tool {
  background: rgba(3, 17, 18, 0.32); color: var(--au-night-ink); border-color: rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: border-color var(--au-dur-fast) var(--au-ease), background-color var(--au-dur-fast) var(--au-ease);
}
@media (hover: hover) { .login-top .tool:hover { border-color: rgba(255, 255, 255, 0.6); background: rgba(3, 17, 18, 0.5); } }
.login-top .tool:focus-visible { outline: 2px solid var(--au-night-focus); outline-offset: 2px; }

/* Main: welcome + pass */
.login-main {
  inline-size: 100%; max-inline-size: 1200px; margin-inline: auto;
  display: grid; align-content: center; justify-items: center; gap: 28px;
  padding: clamp(8px, 3vh, 32px) clamp(16px, 4vw, 48px) clamp(24px, 6vh, 64px);
}
@media (min-width: 960px) {
  .login-main { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); align-items: center; gap: clamp(32px, 6vw, 96px); justify-items: stretch; }
}

.login-copy { position: relative; isolation: isolate; display: grid; gap: 14px; max-inline-size: 34rem; text-align: center; }
/* A soft dark spot behind the words, so the route that crosses the sky behind them never competes with the text. */
.login-copy::before {
  content: ""; position: absolute; inset: -18% -14%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(3, 17, 18, 0.62), rgba(3, 17, 18, 0.3) 60%, transparent);
}
@media (min-width: 960px) { .login-copy { text-align: start; } }
.login-kicker {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-size: var(--au-text-kicker); font-weight: 500; color: var(--au-amber-300);
}
@media (min-width: 960px) { .login-kicker { justify-content: flex-start; } }
:lang(en) .login-kicker { letter-spacing: 0.14em; text-transform: uppercase; }
.login-kicker-dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--au-amber-500); box-shadow: 0 0 0 4px rgba(242, 163, 58, 0.22); }
.login-line {
  font-family: var(--au-font-display); font-weight: 700; line-height: 1.15;
  font-size: clamp(1.75rem, 1.1rem + 2.8vw, 3.5rem); color: var(--au-night-ink); text-wrap: balance;
}
:lang(ar) .login-line { line-height: 1.35; }
.login-lead { color: var(--au-night-ink-2); font-size: var(--au-text-lg); max-inline-size: 40ch; }
/* Phones and tablets: the pass is the point; keep only the kicker and a smaller line above it. */
@media (max-width: 959.98px) {
  .login-lead { display: none; }
  .login-line { font-size: clamp(1.5rem, 1.1rem + 2vw, 2rem); margin-inline: auto; max-inline-size: 22ch; }
}

/* The pass */
.login-pass { justify-self: center; grid-column: auto; } /* undo the landing hero's .ticket placement (column 8) */
@media (min-width: 960px) { .login-pass { justify-self: end; } }
.login-title { font-family: var(--au-font-display); font-weight: 700; font-size: 1.5rem; line-height: 1.3; color: var(--au-night-ink); margin-block-end: 20px; }
.login-pass .ticket-stub .night-field { margin-block-end: 4px; }

.login-alert {
  display: flex; align-items: flex-start; gap: 10px; margin-block-end: 18px; padding: 12px 14px;
  border-radius: 12px; border: 1px solid rgba(240, 138, 128, 0.55); background: rgba(240, 138, 128, 0.14);
  color: #FFD9D4; font-size: var(--au-text-sm); line-height: 1.55;
}
.login-alert .icon { font-size: 18px; flex: none; margin-block-start: 2px; color: #F7A39A; }

/* Password field with the show/hide button (shown only with JavaScript). */
.login-secret { padding-inline-end: 6px; }
.login-reveal {
  flex: none; inline-size: 44px; block-size: 44px; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: transparent; color: var(--au-night-ink-2); cursor: pointer;
  transition: color var(--au-dur-fast) var(--au-ease), background-color var(--au-dur-fast) var(--au-ease);
}
.login-reveal .icon { font-size: 20px; }
@media (hover: hover) { .login-reveal:hover { color: var(--au-night-ink); background: rgba(255, 255, 255, 0.08); } }
.login-reveal:focus-visible { outline: 2px solid var(--au-night-focus); outline-offset: 0; }
.login-reveal .i-eye-off, .login-reveal[aria-pressed="true"] .i-eye { display: none; }
.login-reveal[aria-pressed="true"] .i-eye-off { display: inline; }

/* Remember me: a switch (a real checkbox, so it posts and works without JavaScript). */
.login-remember {
  display: inline-flex; align-items: center; gap: 12px; min-block-size: 44px; margin-block-start: 14px;
  color: var(--au-night-ink-2); font-size: var(--au-text-sm); cursor: pointer; user-select: none;
}
.login-switch {
  -webkit-appearance: none; appearance: none; margin: 0; flex: none; cursor: pointer;
  position: relative; inline-size: 42px; block-size: 24px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.5);
  transition: background-color var(--au-dur) var(--au-ease), border-color var(--au-dur) var(--au-ease);
}
.login-switch::before {
  content: ""; position: absolute; inset-block-start: 2px; inset-inline-start: 2px;
  inline-size: 18px; block-size: 18px; border-radius: 50%; background: var(--au-night-ink);
  transition: inset-inline-start var(--au-dur) var(--au-ease), background-color var(--au-dur) var(--au-ease);
}
.login-switch:checked { background: var(--au-amber-500); border-color: var(--au-amber-500); }
.login-switch:checked::before { inset-inline-start: calc(100% - 20px); background: var(--au-amber-ink); }
.login-switch:focus-visible { outline: 2px solid var(--au-night-focus); outline-offset: 3px; }
.login-remember:hover .login-switch:not(:checked) { border-color: rgba(255, 255, 255, 0.75); }

/* Change-password extras */
.login-title:has(+ .login-help) { margin-block-end: 6px; }
.login-help { color: var(--au-night-ink-2); font-size: var(--au-text-sm); margin-block-end: 20px; }
.login-hint { color: var(--au-night-ink-2); font-size: var(--au-text-xs); margin-block-start: 8px; }
.login-gap { margin-block-start: 18px; }
.login-cancel {
  display: flex; align-items: center; justify-content: center; min-block-size: 48px; margin-block-start: 8px;
  border-radius: 999px; color: var(--au-night-ink-2); font-weight: 500; text-decoration: none;
  transition: color var(--au-dur-fast) var(--au-ease), background-color var(--au-dur-fast) var(--au-ease);
}
@media (hover: hover) { .login-cancel:hover { color: var(--au-night-ink); background: rgba(255, 255, 255, 0.06); } }
.login-cancel:focus-visible { outline: 2px solid var(--au-night-focus); outline-offset: 2px; }

.login-pass .ticket-submit { margin-block-start: 16px; }
.login-pass .ticket-submit .icon { transition: transform var(--au-dur) var(--au-ease); }
[dir="rtl"] .login-pass .dir-icon { transform: scaleX(-1); }
@media (hover: hover) {
  .login-pass .ticket-submit:hover .dir-icon { transform: translateX(3px); }
  [dir="rtl"] .login-pass .ticket-submit:hover .dir-icon { transform: scaleX(-1) translateX(3px); }
}

/* Footer line */
.login-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
  padding: 16px clamp(16px, 4vw, 48px) 20px; font-size: var(--au-text-xs); color: var(--au-night-ink-2);
}
.login-secure { display: inline-flex; align-items: center; gap: 8px; }
.login-secure .icon { font-size: 16px; color: var(--au-amber-300); }
@media (max-width: 559.98px) { .login-foot { justify-content: center; text-align: center; } }

/* Entrance: copy rises, then the pass (sooner than on the landing). Reduced motion: public.css stops everything. */
@media (prefers-reduced-motion: no-preference) {
  .login-copy > * { animation: au-rise 700ms var(--au-ease-out) both; }
  .login-copy > :nth-child(2) { animation-delay: 80ms; }
  .login-copy > :nth-child(3) { animation-delay: 160ms; }
  .login-pass .ticket-stub, .login-pass::before { animation-delay: 250ms; }
  .login-pass .ticket-main { animation-delay: 330ms; }
}
