/* Standalone manager login — locked R5 brand, no dashboard chrome.
   This shell intentionally does NOT load the R5 CSS payload (see
   docs/LIVE_R5_SHELL_LOCK.md); these custom properties are local mirrors
   of the canonical values in dashboard/static/vnext/r5/css/tokens.css,
   snapped to the nearest exact R5 token so brand color stays a single
   source of truth without adding the R5 stack's weight to /auth/login. */
:root {
  --auth-ink: #10211A;        /* = --r5-neutral-950 */
  --auth-muted: #5D6D65;      /* = --r5-neutral-600 */
  --auth-green: #0A2E25;      /* = --r5-brand-950 */
  --auth-mid: #14654E;        /* = --r5-brand-700 */
  --auth-bright: #18785C;     /* = --r5-brand-600 */
  --auth-line: #C9D3CE;       /* = --r5-neutral-300 */
  --auth-field: #F1FAF6;      /* = --r5-brand-50 */
  --auth-gold: #D7A433;       /* = --r5-gold-500 */
  --auth-gold-deep: #9B6A08;  /* = --r5-gold-700 */
  font-family: Vazirmatn, Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body.nf-auth {
  min-height: 100dvh;
  color: var(--auth-ink);
  background: #071f19;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.nf-auth__stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 100% 0%, rgba(212, 180, 90, 0.18), transparent 52%),
    radial-gradient(ellipse 70% 55% at 0% 100%, rgba(27, 134, 96, 0.4), transparent 48%),
    linear-gradient(155deg, #051611 0%, #0a2a21 42%, #114536 78%, #0c3328 100%);
}
.nf-auth__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    repeating-linear-gradient(-22deg, transparent 0 18px, rgba(255, 255, 255, 0.035) 18px 19px);
}
.nf-auth__fronds {
  position: absolute;
  width: min(78vw, 640px);
  height: min(78vw, 640px);
  border-radius: 50%;
  right: -18%;
  bottom: -22%;
  background:
    radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.1), transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(212, 180, 90, 0.12), transparent 45%);
  animation: auth-glow 10s ease-in-out infinite alternate;
}
@keyframes auth-glow {
  from { transform: translate(0, 0) scale(1); opacity: 0.75; }
  to { transform: translate(-5%, -4%) scale(1.1); opacity: 1; }
}

.nf-auth__shell {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100dvh;
  grid-template-columns: 1fr;
}

.nf-auth__hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 28px 22px 18px;
  color: #eef8f3;
  animation: auth-rise 0.5s ease-out both;
}
@keyframes auth-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.nf-auth__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  width: fit-content;
  margin-bottom: 6px;
}
.nf-auth__mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: linear-gradient(145deg, #edd07a, var(--auth-gold-deep));
  color: #12352c;
  font-weight: 950;
  font-size: 15px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}
.nf-auth__brand-text strong {
  display: block;
  font-size: 1.12rem;
  font-weight: 900;
  line-height: 1.2;
}
.nf-auth__brand-text small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  opacity: 0.62;
}

.nf-auth__kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(237, 208, 122, 0.92);
}
.nf-auth__hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  line-height: 1.2;
  font-weight: 950;
  letter-spacing: -0.04em;
  max-width: 10ch;
}
.nf-auth__lede {
  margin: 0;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.85;
  color: rgba(238, 248, 243, 0.78);
  font-weight: 500;
}

.nf-auth__rail {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-width: 320px;
}
.nf-auth__rail li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
}
.nf-auth__rail b {
  font-size: 13px;
  font-weight: 850;
}
.nf-auth__rail span {
  font-size: 11px;
  font-weight: 650;
  color: rgba(238, 248, 243, 0.62);
}

.nf-auth__panel {
  display: flex;
  align-items: stretch;
  padding: 0 16px calc(24px + env(safe-area-inset-bottom, 0px));
  animation: auth-rise 0.6s ease-out 0.06s both;
}
.nf-auth__panel-inner {
  width: min(100%, 420px);
  margin: 0 auto;
  padding: 28px 22px 22px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 28px 64px rgba(4, 28, 22, 0.32);
}

.nf-auth__badge {
  display: inline-flex;
  margin: 0 0 10px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--auth-field); /* = --r5-brand-50 */
  color: var(--auth-mid);
  font-size: 11px;
  font-weight: 850;
}
.nf-auth__header h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.nf-auth__header p {
  margin: 0;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.75;
  font-weight: 500;
}

.nf-auth__flashes { display: grid; gap: 8px; margin-top: 16px; }
.nf-auth__flash {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}
.nf-auth__flash--success { background: #DDF5E8; color: #11633E; } /* = --r5-success-100 / --r5-success-700 */
.nf-auth__flash--danger { background: #FCE3E3; color: #A92D2D; } /* = --r5-danger-100 / --r5-danger-700 */
.nf-auth__flash--info { background: #E1F0FD; color: #155FA0; } /* = --r5-info-100 / --r5-info-700 */

.nf-auth__form { display: grid; gap: 8px; margin-top: 22px; }
.nf-auth__form label {
  font-size: 12px;
  font-weight: 850;
  color: var(--auth-ink);
}
.nf-auth__field {
  position: relative;
  display: flex;
  align-items: center;
}
.nf-auth__field input {
  width: 100%;
  min-height: 54px;
  padding: 0 76px 0 14px;
  border: 1.5px solid var(--auth-line);
  border-radius: 14px;
  background: var(--auth-field);
  font: inherit;
  font-size: 15px;
  outline: none;
  color: var(--auth-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.nf-auth__field input:focus {
  border-color: var(--auth-mid);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 96, 71, 0.14);
}
.nf-auth__reveal {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--auth-mid);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.nf-auth__reveal:hover { background: rgba(20, 96, 71, 0.08); }

.nf-auth__submit {
  margin-top: 10px;
  min-height: 58px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  font: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  gap: 2px;
  background: linear-gradient(135deg, var(--auth-green) 0%, var(--auth-mid) 55%, var(--auth-bright) 100%);
  box-shadow: 0 16px 32px rgba(10, 52, 41, 0.3);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.nf-auth__submit span { font-size: 16px; font-weight: 900; }
.nf-auth__submit small { font-size: 11px; font-weight: 700; opacity: 0.88; }
.nf-auth__submit:hover {
  filter: brightness(1.06);
  box-shadow: 0 18px 36px rgba(10, 52, 41, 0.36);
}
.nf-auth__submit:active { transform: translateY(1px); }

.nf-auth__hint {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid #e4eee9;
  color: var(--auth-muted);
  font-size: 12px;
  line-height: 1.7;
  font-weight: 600;
}
.nf-auth__footer {
  margin-top: 16px;
  text-align: center;
  color: #8a9a93;
  font-size: 11px;
  font-weight: 700;
}

@media (min-width: 900px) {
  .nf-auth__shell {
    grid-template-columns: minmax(0, 1.1fr) minmax(400px, 0.9fr);
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 36px;
    gap: 36px;
  }
  .nf-auth__hero {
    justify-content: center;
    padding: 40px 12px 40px 0;
    min-height: min(70dvh, 620px);
  }
  .nf-auth__hero h1 {
    font-size: clamp(2.8rem, 4vw, 3.6rem);
  }
  .nf-auth__lede { font-size: 15px; }
  .nf-auth__panel { padding: 0; align-items: center; }
  .nf-auth__panel-inner {
    margin: 0;
    width: 100%;
    max-width: 440px;
    padding: 36px 32px 28px;
    border-radius: 28px;
  }
  .nf-auth__rail { max-width: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  .nf-auth__hero,
  .nf-auth__panel,
  .nf-auth__fronds { animation: none !important; }
}
