/* NextGen Plasma — Login (light · energetic · high-tech) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500&display=swap');

:root {
  --ng-blue: #1e6fff;
  --ng-blue-dark: #1558d6;
  --ng-blue-bright: #3b82f6;
  --ng-cyan: #06b6d4;
  --ng-cyan-bright: #22d3ee;
  --ng-bg: #f0f7ff;
  --ng-bg-alt: #ffffff;
  --ng-text: #0f172a;
  --ng-text-2: #334155;
  --ng-muted: #64748b;
  --ng-border: #e2e8f0;
  --ng-green: #059669;
  --ng-green-bg: #ecfdf5;
  --ng-red: #dc2626;
  --ng-red-bg: #fff1f2;
  --ng-radius: 12px;
  --ng-radius-lg: 20px;
  --ng-font: 'Inter', system-ui, sans-serif;
  --ng-mono: 'JetBrains Mono', monospace;
  --ng-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ng-glow: 0 8px 32px rgba(30, 111, 255, 0.18);
  --ng-glow-strong: 0 12px 40px rgba(30, 111, 255, 0.28);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body { height: 100%; }

body.ng-login {
  font-family: var(--ng-font);
  min-height: 100vh;
  color: var(--ng-text);
  background: var(--ng-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Light energetic background ── */
.ng-login__bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 70% at 10% 0%, rgba(34, 211, 238, 0.2), transparent 55%),
    radial-gradient(ellipse 80% 60% at 95% 15%, rgba(30, 111, 255, 0.18), transparent 50%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(59, 130, 246, 0.1), transparent 45%),
    linear-gradient(165deg, #ffffff 0%, #f0f7ff 40%, #e8f4ff 100%);
}

.ng-login__bg::before,
.ng-login__bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: ng-orb 10s ease-in-out infinite alternate;
}

.ng-login__bg::before {
  width: 420px;
  height: 420px;
  top: -80px;
  right: 5%;
  background: rgba(30, 111, 255, 0.15);
}

.ng-login__bg::after {
  width: 360px;
  height: 360px;
  bottom: -60px;
  left: -40px;
  background: rgba(34, 211, 238, 0.18);
  animation-delay: -5s;
}

@keyframes ng-orb {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(24px, 16px) scale(1.08); }
}

.ng-login__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(30, 111, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 111, 255, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, #000 15%, transparent 72%);
}

.ng-login__bg-beam {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--ng-cyan) 25%,
    var(--ng-blue) 50%,
    var(--ng-cyan-bright) 75%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: ng-energy-line 4s linear infinite;
  opacity: 0.85;
}

@keyframes ng-energy-line {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ── Shell ── */
.ng-login__shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.ng-login__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  width: 100%;
  max-width: 1060px;
  align-items: center;
}

/* ── Brand column ── */
.ng-login__brand {
  padding-right: 0.5rem;
}

.ng-login__logo-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.ng-login__logo-row img {
  width: 58px;
  height: auto;
  filter: drop-shadow(0 4px 16px rgba(30, 111, 255, 0.35));
}

.ng-login__logo-text h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ng-text);
  line-height: 1.15;
}

.ng-login__logo-text span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ng-blue);
}

.ng-login__headline {
  font-size: clamp(1.7rem, 3.5vw, 2.35rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  color: var(--ng-text);
}

.ng-login__headline em {
  font-style: normal;
  background: linear-gradient(105deg, var(--ng-blue) 0%, var(--ng-cyan) 50%, var(--ng-blue-bright) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: ng-shimmer 5s ease-in-out infinite;
}

@keyframes ng-shimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.ng-login__tagline {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ng-text-2);
  max-width: 400px;
  margin-bottom: 1.75rem;
}

.ng-login__modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.ng-login__module {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  background: var(--ng-bg-alt);
  border: 1px solid var(--ng-border);
  border-radius: var(--ng-radius);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s var(--ng-ease), box-shadow 0.2s, border-color 0.2s;
}

.ng-login__module:hover {
  transform: translateY(-2px);
  border-color: rgba(30, 111, 255, 0.35);
  box-shadow: var(--ng-glow);
}

.ng-login__module i {
  margin-top: 2px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--ng-blue);
  background: linear-gradient(135deg, rgba(30, 111, 255, 0.12), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(30, 111, 255, 0.15);
}

.ng-login__module strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ng-text);
  margin-bottom: 0.12rem;
}

.ng-login__module small {
  font-size: 0.68rem;
  color: var(--ng-muted);
  line-height: 1.35;
}

.ng-login__live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.5rem;
  padding: 0.4rem 1rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ng-green);
  background: var(--ng-green-bg);
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.12);
}

.ng-login__live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ng-green);
  box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.5);
  animation: ng-pulse 1.8s ease-in-out infinite;
}

@keyframes ng-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
}

/* ── Sign-in card (bright glass-white) ── */
.ng-login__card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--ng-radius-lg);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow:
    0 0 0 1px rgba(30, 111, 255, 0.06),
    var(--ng-glow-strong),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
  animation: ng-rise 0.5s var(--ng-ease) both;
  position: relative;
  overflow: hidden;
}

.ng-login__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--ng-blue), var(--ng-cyan), var(--ng-blue-bright));
  border-radius: var(--ng-radius-lg) var(--ng-radius-lg) 0 0;
}

@keyframes ng-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.ng-login__card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--ng-border);
}

.ng-login__card-top h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ng-text);
}

.ng-login__card-top p {
  font-size: 0.8rem;
  color: var(--ng-muted);
  margin-top: 0.2rem;
}

.ng-login__lock-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
  border: 1px solid rgba(30, 111, 255, 0.2);
  color: var(--ng-blue);
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(30, 111, 255, 0.15);
}

.ng-login__alert {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.8rem 1rem;
  margin-bottom: 1.15rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #9f1239;
  background: var(--ng-red-bg);
  border: 1px solid #fecdd3;
  border-left: 3px solid var(--ng-red);
  border-radius: var(--ng-radius);
}

.ng-login__field {
  margin-bottom: 1rem;
}

.ng-login__label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ng-text-2);
}

.ng-login__input-group {
  position: relative;
}

.ng-login__input-group > i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ng-muted);
  font-size: 0.85rem;
  pointer-events: none;
  transition: color 0.2s;
}

.ng-login__input-group:focus-within > i {
  color: var(--ng-blue);
}

.ng-login__input {
  width: 100%;
  padding: 0.85rem 2.6rem;
  font-family: var(--ng-font);
  font-size: 0.9rem;
  color: var(--ng-text);
  background: #f8fafc;
  border: 1.5px solid var(--ng-border);
  border-radius: var(--ng-radius);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.ng-login__input::placeholder {
  color: #94a3b8;
}

.ng-login__input:hover {
  border-color: #cbd5e1;
}

.ng-login__input:focus {
  background: #fff;
  border-color: var(--ng-blue);
  box-shadow: 0 0 0 3px rgba(30, 111, 255, 0.14);
}

.ng-login__toggle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--ng-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.ng-login__toggle:hover {
  color: var(--ng-blue);
}

.ng-login__caps {
  display: none;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #d97706;
}

.ng-login__caps.is-on {
  display: flex;
}

.ng-login__submit {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--ng-font);
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  border: none;
  border-radius: var(--ng-radius);
  cursor: pointer;
  background: linear-gradient(135deg, var(--ng-blue) 0%, var(--ng-blue-dark) 55%, #0d4fcc 100%);
  background-size: 200% 200%;
  box-shadow: 0 4px 18px rgba(30, 111, 255, 0.4);
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s, background-position 0.35s;
}

.ng-login__submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(30, 111, 255, 0.45);
  background-position: 100% 50%;
}

.ng-login__submit:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.ng-login__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ng-spin 0.6s linear infinite;
}

.ng-login__submit.is-busy .ng-login__spinner {
  display: block;
}

.ng-login__submit.is-busy .ng-login__btn-label {
  visibility: hidden;
  position: absolute;
}

@keyframes ng-spin {
  to { transform: rotate(360deg); }
}

.ng-login__secure-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.2rem;
}

.ng-login__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ng-text-2);
  background: #f1f5f9;
  border: 1px solid var(--ng-border);
  border-radius: 999px;
}

.ng-login__chip--accent {
  color: var(--ng-blue-dark);
  background: linear-gradient(135deg, #eff6ff, #e0f2fe);
  border-color: rgba(30, 111, 255, 0.25);
}

.ng-login__notice {
  margin-top: 1.1rem;
  padding: 0.8rem 1rem;
  font-size: 0.74rem;
  line-height: 1.55;
  color: #0369a1;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-left: 3px solid var(--ng-blue);
  border-radius: var(--ng-radius);
}

.ng-login__notice strong {
  color: #0c4a6e;
  font-weight: 600;
}

.ng-login__ip {
  font-family: var(--ng-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--ng-blue-dark);
}

.ng-login__help {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--ng-muted);
}

.ng-login__footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1rem;
  font-size: 0.68rem;
  color: var(--ng-muted);
}

.ng-login__brand-mobile {
  display: none;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ng-border);
}

.ng-login__brand-mobile img {
  width: 40px;
  filter: drop-shadow(0 2px 8px rgba(30, 111, 255, 0.25));
}

.ng-login__brand-mobile span {
  font-weight: 800;
  font-size: 1rem;
  color: var(--ng-text);
}

@media (max-width: 860px) {
  .ng-login__layout {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .ng-login__brand {
    display: none;
  }

  .ng-login__brand-mobile {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ng-login__bg::before,
  .ng-login__bg::after,
  .ng-login__bg-beam,
  .ng-login__headline em,
  .ng-login__live-dot,
  .ng-login__card {
    animation: none;
  }
}
