/* ============================================================
   NyayTrack Auth — District Command Gate (premium institutional)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700;9..40,800&display=swap');

:root {
  --nyay-ink: #06101c;
  --nyay-navy: #0a1628;
  --nyay-navy-2: #142f4c;
  --nyay-gold: #c4a035;
  --nyay-gold-bright: #e0c15a;
  --nyay-gold-deep: #8a7020;
  --nyay-muted: #5c6d80;
  --nyay-line: #cfd8e4;
  --nyay-panel: #f3f1eb;
  --nyay-field: #fffcf7;
}

@keyframes nyay-rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}
@keyframes nyay-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes nyay-sheen {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
@keyframes nyay-seal-glow {
  0%, 100% { box-shadow: 0 0 0 5px rgba(196,160,53,0.1), 0 14px 36px rgba(6,16,28,0.14); }
  50% { box-shadow: 0 0 0 8px rgba(196,160,53,0.18), 0 18px 42px rgba(6,16,28,0.18); }
}
@keyframes nyay-vignette-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.85; }
}
@keyframes nyay-slide-left {
  from { opacity: 0; transform: translateX(-18px); }
  to { opacity: 1; transform: none; }
}
@keyframes nyay-gold-shimmer {
  0% { background-position: 0% 50%; filter: brightness(1); }
  50% { filter: brightness(1.12); }
  100% { background-position: 100% 50%; filter: brightness(1); }
}
@keyframes nyay-brand-in {
  from { opacity: 0; transform: translateY(36px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

.nyay-auth {
  min-height: 100vh;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.75fr);
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--nyay-ink);
  background: #04080f;
  position: relative;
  overflow: hidden;
}

/* ——— Force bar ——— */
.nyay-force-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 8;
  padding: 11px 20px;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.28em;
  color: #0a0a08;
  background: linear-gradient(90deg, #5c4a12, #e0c15a 28%, #c4a035 52%, #e0c15a 72%, #5c4a12);
  background-size: 220% 100%;
  animation: nyay-sheen 10s linear infinite;
  border-bottom: 1px solid #1a1408;
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}

/* ——— Hero plane (full-bleed atmosphere) ——— */
.nyay-auth-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 96px 64px 56px;
  color: #fff;
  background:
    linear-gradient(165deg, rgba(4,8,15,0.94) 0%, rgba(10,22,40,0.72) 42%, rgba(8,18,32,0.9) 100%),
    radial-gradient(ellipse 90% 70% at 70% 80%, rgba(196,160,53,0.12), transparent 50%),
    url("../360_F_198247162_JwrVkhqowZb4NJC24156nV6QYRhsV8Qf.jpg") center/cover;
  min-height: 100vh;
  isolation: isolate;
}
.nyay-auth-hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(
      -32deg,
      transparent,
      transparent 28px,
      rgba(196,160,53,0.035) 28px,
      rgba(196,160,53,0.035) 29px
    );
  pointer-events: none;
  z-index: 0;
}
.nyay-auth-hero::after {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(196,160,53,0.22);
  pointer-events: none;
  z-index: 0;
  box-shadow: inset 0 0 80px rgba(0,0,0,0.25);
  animation: nyay-vignette-pulse 7s ease-in-out infinite;
}
.nyay-auth-hero > * { position: relative; z-index: 1; }

.nyay-hero-copy {
  max-width: 34rem;
  padding-top: 8px;
}

.nyay-pill {
  display: inline-block;
  background: rgba(4,8,15,0.35);
  border: 1px solid rgba(224,193,90,0.55);
  color: var(--nyay-gold-bright);
  padding: 9px 16px;
  border-radius: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 32px;
  backdrop-filter: blur(6px);
  animation: nyay-slide-left 0.7s cubic-bezier(.16,1,.3,1) 0.1s both;
}

.nyay-brand-mark {
  font-family: "Cormorant Garamond", "Libre Baskerville", Georgia, serif;
  font-size: clamp(3.6rem, 6.5vw, 5.2rem);
  font-weight: 600;
  line-height: 0.92;
  margin: 0 0 28px;
  letter-spacing: -0.03em;
  text-shadow: 0 16px 48px rgba(0,0,0,0.45);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
}
.nyay-brand-nyay {
  color: #fff;
  font-style: normal;
  font-weight: 600;
  animation: nyay-brand-in 0.85s cubic-bezier(.16,1,.3,1) 0.22s both;
}
.nyay-brand-track {
  color: var(--nyay-gold-bright);
  font-style: italic;
  font-weight: 700;
  background: linear-gradient(105deg, #a88628 0%, #e0c15a 35%, #fff3c4 50%, #e0c15a 65%, #a88628 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation:
    nyay-brand-in 0.85s cubic-bezier(.16,1,.3,1) 0.4s both,
    nyay-gold-shimmer 4.5s ease-in-out 1.2s infinite;
}
/* fallback if clip unsupported */
@supports not (-webkit-background-clip: text) {
  .nyay-brand-track {
    color: var(--nyay-gold-bright);
    -webkit-text-fill-color: unset;
    background: none;
  }
}

.nyay-tag {
  font-size: 1.12rem;
  line-height: 1.65;
  max-width: 28rem;
  font-weight: 450;
  margin: 0;
  color: rgba(232,237,243,0.9);
  border-left: 3px solid var(--nyay-gold);
  padding-left: 18px;
  animation: nyay-slide-left 0.75s cubic-bezier(.16,1,.3,1) 0.55s both;
}

.nyay-meta {
  font-size: 0.82rem;
  color: rgba(220,228,238,0.7);
  border-top: 1px solid rgba(196,160,53,0.28);
  padding-top: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.55;
  max-width: 26rem;
  font-weight: 600;
  animation: nyay-fade 0.8s ease 0.75s both;
}

/* ——— Sign-in panel (dossier) ——— */
.nyay-auth-panel {
  background:
    linear-gradient(180deg, #faf8f3 0%, var(--nyay-panel) 55%, #ebe6dc 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 44px 48px;
  position: relative;
  min-height: 100vh;
  animation: nyay-rise 0.75s cubic-bezier(.16,1,.3,1) .12s both;
  box-shadow: -24px 0 64px rgba(0,0,0,0.35);
}
.nyay-auth-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--nyay-navy) 0%, var(--nyay-gold) 45%, var(--nyay-navy) 100%);
}
.nyay-auth-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.7;
  mix-blend-mode: multiply;
}

.nyay-portal-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: 14px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--nyay-ink);
  border-radius: 0;
  position: relative;
  z-index: 1;
  animation: nyay-rise 0.65s cubic-bezier(.16,1,.3,1) 0.15s both;
}
.nyay-portal-switch a {
  text-align: center;
  padding: 13px 4px;
  border-radius: 0;
  text-decoration: none;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nyay-muted);
  border-right: 1px solid rgba(6,16,28,0.15);
  transition: background .18s, color .18s;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  line-height: 1.15;
  background: rgba(255,255,255,0.45);
}
.nyay-portal-switch a:last-child { border-right: 0; }
.nyay-portal-switch a:hover { color: var(--nyay-ink); background: #fff; }
.nyay-portal-switch a.active {
  background: var(--nyay-ink);
  color: #fff;
  box-shadow: none;
}
.nyay-portal-switch a.active span { color: var(--nyay-gold-bright); }
.nyay-portal-switch a:focus-visible {
  outline: 2px solid var(--nyay-gold);
  outline-offset: -2px;
  z-index: 2;
}

.nyay-connect-line {
  font-size: 12px;
  color: var(--nyay-muted);
  margin: 0 0 28px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  position: relative;
  z-index: 1;
  letter-spacing: 0.01em;
  animation: nyay-fade 0.6s ease 0.28s both;
}

.nyay-auth-panel .nyay-auth-brand {
  text-align: center;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
  animation: nyay-rise 0.7s cubic-bezier(.16,1,.3,1) 0.32s both;
}
.nyay-auth-panel .logo {
  width: 96px; height: 96px; object-fit: contain;
  border-radius: 50%; background: #fff;
  border: 2px solid var(--nyay-gold);
  padding: 7px; margin: 0 auto 4px;
  display: block;
  animation: nyay-seal-glow 4.5s ease-in-out 1s infinite;
}
.nyay-auth-panel h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.15rem; font-weight: 600; margin: 6px 0 6px;
  color: var(--nyay-navy);
  letter-spacing: -0.02em;
  text-align: center;
  position: relative;
  z-index: 1;
  animation: nyay-rise 0.65s cubic-bezier(.16,1,.3,1) 0.42s both;
}
.nyay-auth-panel .sub {
  color: var(--nyay-muted); font-size: 0.9rem; margin: 0 auto 26px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  max-width: 22rem;
  position: relative;
  z-index: 1;
  animation: nyay-fade 0.6s ease 0.5s both;
}

.nyay-auth-panel form {
  position: relative;
  z-index: 1;
  max-width: 100%;
  animation: nyay-rise 0.7s cubic-bezier(.16,1,.3,1) 0.55s both;
}

.nyay-auth-panel .form-control,
.nyay-auth-panel .form-floating > .form-control {
  border-radius: 0;
  border: none;
  border-bottom: 2px solid #b8c2d0;
  background: transparent;
  min-height: 50px;
  color: var(--nyay-ink); font-weight: 600;
  font-size: 1.02rem;
  padding: 10px 2px 12px;
  transition: border-color .18s, background .18s;
}
.nyay-auth-panel .form-control:hover {
  border-bottom-color: #8a97a8;
}
.nyay-auth-panel .form-control:focus {
  border-bottom-color: var(--nyay-gold);
  box-shadow: none;
  background: linear-gradient(180deg, transparent 60%, rgba(196,160,53,0.08));
  outline: none;
}
.nyay-auth-panel .form-label {
  color: var(--nyay-navy); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 4px;
}
.nyay-auth-panel .mb-3 { margin-bottom: 1.15rem !important; }

.nyay-btn {
  width: 100%; border-radius: 0; padding: 16px;
  background:
    linear-gradient(180deg, #e8c960 0%, #c4a035 48%, #9a7a22 100%);
  color: #0a0a08; font-weight: 800;
  border: 1px solid #6e5818;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 12px 28px rgba(154,122,34,0.35);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.82rem;
  min-height: 54px;
  margin-top: 10px;
  transition: filter .15s, transform .15s, box-shadow .15s;
  position: relative;
  z-index: 1;
}
.nyay-btn:hover {
  filter: brightness(1.06);
  color: #0a0a08;
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.4),
    0 16px 32px rgba(154,122,34,0.42);
}
.nyay-btn:focus-visible {
  outline: 3px solid rgba(196,160,53,0.55);
  outline-offset: 3px;
}
.nyay-btn-dark {
  background: linear-gradient(180deg, #1e3a5c, #06101c);
  color: #fff; border-color: #02060c;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 12px 28px rgba(6,16,28,0.35);
}
.nyay-btn-dark:hover { color: #fff; filter: brightness(1.1); }

.nyay-otp-show {
  background: rgba(196,160,53,0.1);
  border: 1px solid rgba(196,160,53,0.45);
  border-left: 3px solid var(--nyay-gold);
  color: #5c4710;
  padding: 12px 14px; border-radius: 0; margin-bottom: 16px;
  font-size: 0.88rem; font-weight: 600; line-height: 1.45;
  position: relative; z-index: 1;
}
.nyay-otp-show.warn {
  background: rgba(155,40,40,0.06);
  border-color: rgba(155,40,40,0.35);
  border-left-color: #9b2828;
  color: #7b241c;
}

.nyay-links {
  margin-top: 22px; text-align: center; font-size: 0.82rem; color: var(--nyay-muted);
  position: relative; z-index: 1;
}
.nyay-links a {
  color: var(--nyay-navy); font-weight: 700; text-decoration: none;
  border-bottom: 1px solid transparent;
}
.nyay-links a:hover { color: var(--nyay-gold-deep); border-bottom-color: var(--nyay-gold); }

.nyay-auth-foot {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid rgba(6,16,28,0.12);
  font-size: 11px;
  color: var(--nyay-muted);
  letter-spacing: 0.06em;
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  animation: nyay-fade 0.7s ease 0.7s both;
}
.nyay-auth-foot a {
  color: var(--nyay-navy);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.nyay-auth-foot a:hover {
  color: var(--nyay-gold-deep);
  border-bottom-color: var(--nyay-gold);
}

/* Legacy bridges */
.nyay-shell, .nyay-hero, .nyay-panel { display: contents; }
.nyay-demo { display: none !important; }

@media (max-width: 960px) {
  .nyay-auth { grid-template-columns: 1fr; }
  .nyay-auth-hero {
    min-height: 42vh;
    padding: 72px 28px 36px;
  }
  .nyay-auth-hero::after { inset: 14px; }
  .nyay-auth-panel {
    min-height: auto;
    padding: 36px 24px 52px;
    box-shadow: none;
  }
  .nyay-auth-panel::before {
    width: 100%; height: 4px; bottom: auto;
    background: linear-gradient(90deg, var(--nyay-navy), var(--nyay-gold), var(--nyay-navy));
  }
  .nyay-brand-mark { font-size: 2.75rem; }
  .nyay-force-bar { font-size: 8px; letter-spacing: 0.14em; padding: 9px 10px; }
  .nyay-portal-switch a { font-size: 9px; letter-spacing: 0.04em; padding: 11px 2px; }
}
