:root {
  --bg: #060b23;
  --bg-soft: #0e1635;
  --bg-card: rgba(14, 22, 53, 0.72);
  --text: #f4f6ff;
  --text-muted: rgba(244, 246, 255, 0.72);
  --accent: #ff9354;
  --accent-strong: #ff6a3c;
  --surface: #ffffff;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 25px 65px rgba(5, 9, 20, 0.65);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 45%),
    radial-gradient(circle at 20% 20%, rgba(255, 147, 84, 0.18), transparent 40%),
    var(--bg);
  color: var(--text);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('https://www.transparenttextures.com/patterns/asfalt-dark.png');
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

.auth-body {
  position: relative;
  overflow: hidden;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  position: relative;
  z-index: 1;
}

.auth-card {
  width: min(1100px, 100%);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* =========================================================
   NEW NEO AUTH LAYOUT
   Applied when <body class="neo-auth"> is present
   ========================================================= */

body.neo-auth {
  --neo-gradient-start: #ff8c3a;
  --neo-gradient-end: #ff5f39;
  --neo-bg: #fff7f0;
  --neo-card: #ffffff;
  --neo-text: #11152a;
  --neo-muted: #6c738f;
  --neo-border: rgba(15, 23, 42, 0.08);
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(255, 140, 58, 0.15), transparent 45%),
    radial-gradient(circle at 20% 40%, rgba(255, 95, 57, 0.12), transparent 50%),
    var(--neo-bg);
  color: var(--neo-text);
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  position: relative;
}

body.neo-auth::before,
body.neo-auth::after {
  content: '';
  position: fixed;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(255, 140, 58, 0.18), transparent 65%);
  filter: blur(40px);
  z-index: 0;
}

body.neo-auth::before {
  top: -120px;
  right: -60px;
}

body.neo-auth::after {
  bottom: -140px;
  left: -80px;
}

.neo-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  position: relative;
  z-index: 1;
}

.neo-grid {
  width: min(440px, 100%);
  display: grid;
  grid-template-columns: 1fr;
  border-radius: 28px;
  overflow: hidden;
  background: var(--neo-card);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 45px 80px rgba(10, 9, 19, 0.15);
}

.neo-form {
  background: #fff;
  color: var(--neo-text);
  padding: clamp(1.2rem, 3vw, 1.8rem);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.neo-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.neo-nav a {
  color: var(--neo-muted);
  text-decoration: none;
  font-weight: 600;
}

.neo-nav a:hover {
  color: var(--neo-gradient-end);
}

.neo-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.neo-logo i {
  color: var(--neo-gradient-end);
  font-size: 1.4rem;
}

.neo-pill {
  align-self: flex-start;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 140, 58, 0.18);
  color: var(--neo-gradient-end);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.neo-form-head {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.neo-form-head h1,
.neo-form-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 1.7rem);
}

.neo-form-head p {
  margin: 0;
  color: var(--neo-muted);
  line-height: 1.6;
}

.neo-tabs {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 999px;
  padding: 0.25rem;
  gap: 0.2rem;
}

.neo-tabs a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.55rem 1.5rem;
  border-radius: 999px;
  color: var(--neo-muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.neo-tabs a.active {
  background: #fff;
  color: var(--neo-text);
  box-shadow: 0 8px 20px rgba(15, 18, 40, 0.08);
}

.neo-form form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.neo-input {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.neo-input label {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--neo-text);
}

.neo-input input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(9, 14, 36, 0.1);
  padding: 0.6rem 0.85rem;
  font-size: 0.88rem;
  background: #f9fafc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.neo-input input:focus {
  outline: none;
  border-color: rgba(255, 95, 57, 0.6);
  box-shadow: 0 0 0 4px rgba(255, 95, 57, 0.2);
  background: #fff;
}

.password-field {
  position: relative;
  width: 100%;
}

.password-field input {
  width: 100%;
  padding-right: 2.8rem;
}

.password-field button {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: var(--neo-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  line-height: 1;
  z-index: 2;
}

.neo-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.85rem;
  color: var(--neo-muted);
}

.neo-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.neo-checkbox input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--neo-gradient-end);
}

.neo-meta a,
.neo-support a,
.neo-checkbox a {
  color: var(--neo-gradient-end);
  font-weight: 600;
  text-decoration: none;
}

.neo-support {
  font-size: 0.88rem;
  color: var(--neo-muted);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.neo-support a:hover,
.neo-meta a:hover,
.neo-checkbox a:hover {
  text-decoration: underline;
}

/* Toast notifications - position on auth pages */
body.neo-auth #toastContainer {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  left: auto;
  transform: none;
  max-width: 340px;
  z-index: 10000;
}

body.neo-auth .notification-toast {
  font-size: 13px !important;
  padding: 10px 14px !important;
  min-width: 220px !important;
  max-width: 340px !important;
  border-radius: 10px !important;
}

.neo-form .btn {
  align-self: stretch;
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.2rem;
  border: none;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  position: relative;
  overflow: hidden;
  min-height: 44px;
}

.neo-form .btn:focus-visible {
  outline: 2px solid rgba(255, 95, 57, 0.5);
  outline-offset: 3px;
}

body.neo-auth .btn-primary {
  background: linear-gradient(135deg, var(--neo-gradient-start), var(--neo-gradient-end));
  color: #fff;
  border: none;
  box-shadow: 0 20px 40px rgba(255, 95, 57, 0.35);
}

body.neo-auth .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 50px rgba(255, 95, 57, 0.45);
}

.neo-form .btn-primary:disabled,
.neo-form .btn-primary.loading {
  opacity: 0.9;
  transform: none;
}

.neo-showcase {
  background: linear-gradient(160deg, var(--neo-gradient-start), var(--neo-gradient-end));
  padding: clamp(1.2rem, 3vw, 1.8rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: #fff;
}

.neo-badge {
  align-self: flex-start;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.neo-headline {
  margin: 0;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  line-height: 1.2;
}

.neo-description {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.65;
}

.neo-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.neo-metric {
  padding: 0.75rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.neo-metric strong {
  display: block;
  font-size: 1.3rem;
  margin-bottom: 0.1rem;
}

.neo-metric span {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
}

.neo-highlights {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.neo-highlights li {
  display: flex;
  gap: 0.7rem;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.9);
}

.neo-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  color: #fff7f0;
  font-size: 1rem;
}

.neo-testimonial {
  margin-top: auto;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.92);
}

.neo-testimonial span {
  display: block;
  margin-top: 0.55rem;
  font-weight: 600;
  color: #fff;
}

.neo-tabs + #formAlert {
  margin-top: 0.4rem;
}

.neo-form .alert {
  margin: 0;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
}

.neo-form .alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.neo-form .alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

@media (max-width: 980px) {
  .neo-grid {
    grid-template-columns: 1fr;
  }

  .neo-showcase {
    order: -1;
  }
}

@media (max-width: 640px) {
  .neo-shell {
    padding: 1.2rem;
  }

  .neo-form {
    padding: 1.5rem;
  }

  .neo-tabs {
    width: 100%;
    justify-content: space-between;
  }
}

.alert-error {
  background: rgba(220, 53, 69, 0.12);
  border-color: rgba(220, 53, 69, 0.2);
  color: #a61b2c;
}

.validation-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
}

.form-group {
  position: relative;
}

.form-group.valid input,
.form-group.valid textarea,
.form-group.valid select {
  border-color: rgba(13, 171, 117, 0.5);
}

.form-group.invalid input,
.form-group.invalid textarea,
.form-group.invalid select {
  border-color: rgba(220, 53, 69, 0.6);
}

.error-message {
  display: none;
  font-size: 0.78rem;
  color: #c62828;
}

.form-group.invalid .error-message {
  display: block;
}

.screen-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.screen-loading-overlay.active {
  display: flex;
}

.screen-loading-overlay .loading-content {
  text-align: center;
  color: #0d1e3c;
}

.screen-loading-overlay .loading-spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 4px solid rgba(255, 106, 60, 0.25);
  border-top-color: var(--accent-strong);
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.theme-toggle {
  width: 52px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  cursor: pointer;
}

.theme-toggle::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  transition: transform 0.25s ease;
}

[data-theme='dark'] .theme-toggle::after {
  transform: translate(21px, -50%);
}

.btn .ripple-effect {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.6s ease-out;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.fade-in {
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .auth-card {
    grid-template-columns: 1fr;
  }

  .auth-side {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 640px) {
  .auth-shell {
    padding: 1rem;
  }

  .auth-card {
    border-radius: 24px;
  }

  .form-grid,
  .form-grid.single {
    grid-template-columns: 1fr;
  }

  .switch-tabs {
    width: 100%;
    justify-content: space-between;
  }
}
