:root {
  --auth-bg: #eff4ff;
  --auth-surface: rgba(255, 255, 255, 0.9);
  --auth-border: #d6e2fb;
  --auth-text: #142238;
  --auth-muted: #64748b;
  --auth-primary: #1d4ed8;
  --auth-primary-2: #4338ca;
  --auth-danger-bg: #fef2f2;
  --auth-danger-text: #b91c1c;
  --auth-success-bg: #ecfdf3;
  --auth-success-text: #166534;
}

/* Shared auth page base */
body.user-auth,
body.admin-auth {
  background:
    radial-gradient(circle at 10% 8%, rgba(79, 70, 229, 0.25), transparent 34%),
    radial-gradient(circle at 92% 16%, rgba(37, 99, 235, 0.2), transparent 35%),
    radial-gradient(circle at 50% 100%, rgba(147, 197, 253, 0.2), transparent 30%),
    linear-gradient(145deg, #f9fbff, var(--auth-bg));
  color: var(--auth-text);
}

/* User split layout */
body.user-auth .login-left,
body.user-auth .register-left {
  background:
    linear-gradient(160deg, rgba(29, 78, 216, 0.95), rgba(67, 56, 202, 0.9)),
    url("images/noise.png");
  border-radius: 0 34px 34px 0;
  box-shadow: inset -24px 0 44px rgba(15, 23, 42, 0.2);
}

body.user-auth .login-right,
body.user-auth .register-right {
  background: transparent;
}

body.user-auth .login-box,
body.user-auth .register-box,
body.admin-auth .form-container {
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  border-radius: 24px;
  box-shadow:
    0 26px 56px rgba(30, 64, 175, 0.16),
    0 8px 20px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
  padding: 38px 34px;
  position: relative;
}

body.user-auth .login-box::before,
body.user-auth .register-box::before,
body.admin-auth .form-container::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.85), rgba(191, 219, 254, 0.5));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Titles and text */
body.user-auth h2,
body.admin-auth .form-container h2 {
  color: var(--auth-text);
  letter-spacing: 0.3px;
  font-size: clamp(1.35rem, 2.8vw, 1.9rem);
  margin-bottom: 8px;
}

body.user-auth .subtitle,
body.user-auth .register-text,
body.user-auth .login-text,
body.admin-auth .info-message,
body.admin-auth .blocked,
body.admin-auth p {
  color: var(--auth-muted);
}

/* Inputs */
body.user-auth input,
body.admin-auth .form-container input {
  background: #fcfdff;
  border: 1px solid #d5e2fb;
  border-radius: 13px;
  color: var(--auth-text);
  padding: 14px 14px;
}

body.user-auth input:focus,
body.admin-auth .form-container input:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.14);
  transform: none;
}

/* Buttons */
body.user-auth .login-btn,
body.user-auth .register-btn,
body.user-auth .login-btn-left,
body.user-auth .register-btn,
body.admin-auth .form-container button {
  border: none;
  border-radius: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

body.user-auth .login-btn,
body.user-auth .register-btn,
body.admin-auth .form-container button {
  background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-2));
  color: #fff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.26);
}

body.user-auth .login-btn:hover,
body.user-auth .register-btn:hover,
body.admin-auth .form-container button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(37, 99, 235, 0.32);
}

body.user-auth .login-btn-left,
body.user-auth .register-btn {
  background: #fff;
  color: #1d4ed8;
}

body.user-auth .portal-link {
  letter-spacing: 0.8px;
  font-weight: 500;
  opacity: 0.9;
}

body.user-auth .left-content h1 {
  text-wrap: balance;
  text-shadow: 0 8px 26px rgba(2, 6, 23, 0.28);
}

/* Alerts */
body.user-auth .error,
body.user-auth .error-message,
body.admin-auth .error-message,
body.admin-auth .alert {
  background: var(--auth-danger-bg);
  color: var(--auth-danger-text);
  border: 1px solid #fecaca;
  border-radius: 10px;
}

body.user-auth .success,
body.admin-auth .success {
  background: var(--auth-success-bg);
  color: var(--auth-success-text);
  border: 1px solid #bbf7d0;
  border-radius: 10px;
}

/* Link accents */
body.user-auth a,
body.admin-auth .form-container a {
  color: #1d4ed8;
}

body.user-auth a:hover,
body.admin-auth .form-container a:hover {
  color: #1e40af;
}

/* Mobile */
@media (max-width: 900px) {
  body.user-auth .login-left,
  body.user-auth .register-left {
    border-radius: 0 0 28px 28px;
  }
}
