/*
 * ORION Admin auth pages (Login, Denied).
 *
 * Same visual language as the Bluestreak portal login: full-screen looping
 * video background with a translucent panel pinned to the right edge. Auth
 * pages stay server-rendered Razor to keep the JavaScript attack surface for
 * credential entry minimal. No inline styles/scripts — the CSP is
 * script-src 'self', so behaviour lives in /js/login.js.
 */

:root {
  --login-navy: #0f172a;
  --login-navy-dark: #020617;
  --login-accent: #0ea5e9;
  --login-accent-dark: #0284c7;
  --login-text: #0f172a;
  --login-muted: #64748b;
  --login-error-bg: #fef2f2;
  --login-error-border: #fca5a5;
  --login-error-text: #991b1b;
  --login-info-bg: #ecfdf5;
  --login-info-border: #6ee7b7;
  --login-info-text: #065f46;
}

* {
  box-sizing: border-box;
}

.login-body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--login-text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #020617 url("/images/login-bg.jpg") center / cover no-repeat;
  overflow: hidden;
}

.login-bg video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.login-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .login-bg video {
    display: none;
  }
}

.login-panel {
  position: relative;
  z-index: 1;
  width: 420px;
  min-width: 300px;
  max-width: 100vw;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 36px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
}

.login-logo {
  margin-bottom: 28px;
  text-align: center;
}

.login-logo img {
  display: block;
  width: 280px;
  max-width: 100%;
  height: auto;
}

.login-form {
  width: 100%;
  max-width: 320px;
}

.login-error {
  background: var(--login-error-bg);
  border: 1px solid var(--login-error-border);
  color: var(--login-error-text);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

.login-info {
  background: var(--login-info-bg);
  border: 1px solid var(--login-info-border);
  color: var(--login-info-text);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

.login-field {
  margin-bottom: 16px;
}

.login-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--login-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.login-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--login-text);
  transition: border-color 0.15s;
}

.login-field input:focus {
  outline: none;
  border-color: var(--login-accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: var(--login-navy);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  font-family: inherit;
  margin-top: 8px;
  transition: background 0.15s;
}

.login-submit-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: login-spin 0.7s linear infinite;
  flex-shrink: 0;
}

.login-submit.is-loading .login-submit-spinner {
  display: block;
}

@keyframes login-spin {
  to {
    transform: rotate(360deg);
  }
}

.login-submit:hover:not(:disabled) {
  background: var(--login-navy-dark);
}

.login-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.welcome-content {
  width: 100%;
  max-width: 320px;
  text-align: center;
  margin-bottom: 8px;
}

.welcome-heading {
  font-size: 24px;
  font-weight: 700;
  color: var(--login-navy);
  margin: 0 0 8px;
}

.welcome-subtext {
  font-size: 14px;
  color: var(--login-muted);
  margin: 0 0 24px;
  line-height: 1.5;
}

.login-forgot {
  display: block;
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--login-accent-dark);
  text-decoration: none;
  font-weight: 500;
}

.login-forgot:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .login-panel {
    width: 100vw;
    min-height: auto;
  }
}
