/* =============================================================
 * Velocity Talent — Auth pages (login, register, forgot, reset, verify)
 * Scoped under .vt-auth
 * Reuses tokens from velocity-talent.css
 * ============================================================= */

/* Force dark body so the glass nav doesn't bleed white,
   and there's no white flash between sections on first paint.
   This mirrors what `.vt-companies` does for the /companies page. */
html, body { background: #0b1326 !important; }
body { color: #dae2fd; }

/* =============================================================
 * Page wrapper — mirrors `.vt-search` / `.vt-companies` so the
 * shared nav + footer get the same cascading context.
 * Wraps header + main + footer in every auth view.
 * ============================================================= */
.vt-auth-page {
  --vt-bg: #0b1326;
  --vt-surface-dim: #0b1326;
  --vt-surface-bright: #31394d;
  --vt-surface-lowest: #060e20;
  --vt-surface-low: #131b2e;
  --vt-surface-container: #171f33;
  --vt-surface-high: #222a3d;
  --vt-surface-highest: #2d3449;
  --vt-on-surface: #dae2fd;
  --vt-on-surface-variant: #c2c6d6;
  --vt-outline: #8c909f;
  --vt-outline-variant: #424754;
  --vt-primary: #adc6ff;
  --vt-primary-container: #4d8eff;
  --vt-on-primary: #000000;
  --vt-on-primary-container: #000000;
  --vt-secondary: #4cd7f6;
  --vt-tertiary: #4cd7f6;
  --vt-radius: 0.5rem;
  --vt-radius-md: 0.75rem;
  --vt-radius-lg: 1rem;
  --vt-radius-full: 9999px;
  --vt-container-max: 1280px;
  --vt-margin-mobile: 16px;
  --vt-margin-desktop: 32px;
  --vt-font-display: 'Plus Jakarta Sans', 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
  --vt-font-body: 'Inter', 'Noto Sans Arabic', system-ui, -apple-system, sans-serif;

  background: var(--vt-bg);
  color: var(--vt-on-surface);
  font-family: var(--vt-font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: block;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

.vt-auth {
  min-height: calc(100vh - 80px);
  position: relative;
  background: #0b1326;
  color: #dae2fd;
  font-family: 'Inter', 'Noto Sans Arabic', system-ui, -apple-system, sans-serif;
  padding: 60px 16px 80px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}

/* Background mesh — soft radial gradients */
.vt-auth::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60% 50% at 20% 10%, rgba(77, 142, 255, 0.18), transparent 60%),
    radial-gradient(45% 40% at 85% 25%, rgba(76, 215, 246, 0.10), transparent 60%),
    radial-gradient(55% 45% at 75% 90%, rgba(76, 215, 246, 0.08), transparent 60%);
  animation: vtAuthMesh 26s ease-in-out infinite alternate;
}
@keyframes vtAuthMesh {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(20px, -10px, 0) scale(1.04); }
}

.vt-auth__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.vt-auth--wide .vt-auth__inner { max-width: 560px; }

/* Card */
.vt-auth__card {
  position: relative;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(77, 142, 255, 0.10), transparent 60%),
    linear-gradient(180deg, rgba(23, 31, 51, 0.86) 0%, rgba(19, 27, 46, 0.86) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(173, 198, 255, 0.04) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.vt-auth__card-head {
  text-align: center;
  margin-bottom: 22px;
}

.vt-auth__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(77, 142, 255, 0.22), rgba(76, 215, 246, 0.16));
  border: 1px solid rgba(173, 198, 255, 0.18);
  box-shadow: 0 8px 24px rgba(77, 142, 255, 0.18);
}
.vt-auth__icon .material-symbols-outlined {
  font-size: 28px;
  color: #adc6ff;
}

/* Warning / error variant — used on dead-link / verification-error pages */
.vt-auth__icon--warn {
  background: linear-gradient(135deg, rgba(255, 142, 142, 0.22), rgba(255, 99, 99, 0.14));
  border-color: rgba(255, 180, 180, 0.22);
  box-shadow: 0 8px 24px rgba(255, 99, 99, 0.18);
}
.vt-auth__icon--warn .material-symbols-outlined { color: #ffb4b4; }

/* Secondary / ghost variant of the submit button — for "Register again",
   "Cancel", etc. when paired with the primary blue CTA. */
.vt-auth__submit--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: #dae2fd;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: none;
}
.vt-auth__submit--ghost:hover {
  background: rgba(173, 198, 255, 0.08);
  border-color: rgba(173, 198, 255, 0.25);
  color: #f1f4ff;
  box-shadow: none;
}

.vt-auth__title {
  font-family: 'Plus Jakarta Sans', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.01em;
  color: #f1f4ff;
  margin: 0 0 6px;
  line-height: 1.25;
}

.vt-auth__sub {
  font-size: 14px;
  color: #c2c6d6;
  margin: 0;
}

.vt-auth__sub strong { color: #adc6ff; font-weight: 600; }

/* Brand name inlined in subtitle (e.g. "Sign in to your Wazefeh account") */
.vt-auth__brand {
  color: #adc6ff;
  font-weight: 600;
}
.vt-auth__brand:hover { color: #adc6ff; }

/* Flash message wrapper */
.vt-auth__flash { margin-bottom: 16px; }
.vt-auth__flash .alert {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: #dae2fd;
}
.vt-auth__flash .alert-success {
  background: rgba(0, 204, 153, 0.12);
  border-color: rgba(0, 204, 153, 0.35);
  color: #6bf3c8;
}
.vt-auth__flash .alert-danger,
.vt-auth__flash .alert-error {
  background: rgba(255, 99, 99, 0.10);
  border-color: rgba(255, 99, 99, 0.30);
  color: #ffb4b4;
}

/* Social login row */
.vt-auth__social {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.vt-auth__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #dae2fd;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.vt-auth__social a:hover {
  background: rgba(173, 198, 255, 0.08);
  border-color: rgba(173, 198, 255, 0.25);
  color: #f1f4ff;
  transform: translateY(-1px);
}
.vt-auth__social a i,
.vt-auth__social a svg {
  font-size: 18px;
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.vt-auth__social a.gp i { color: #ea4335; }
.vt-auth__social a.fb i { color: #1877f2; }
.vt-auth__social a.tw svg { fill: #f1f4ff; }
.vt-auth__social a:hover.gp i,
.vt-auth__social a:hover.fb i,
.vt-auth__social a:hover.tw svg { filter: brightness(1.15); }

/* Solo (Google-only) social row — branded Google Sign-In button */
.vt-auth__social.vt-auth__social--solo {
  display: grid !important;
  grid-template-columns: 1fr !important;
  width: 100%;
}
.vt-auth__social.vt-auth__social--solo a.gp {
  display: flex !important;
  width: 100% !important;
  box-sizing: border-box;
  justify-self: stretch;
  height: 48px;
  padding: 0 16px;
  gap: 12px;
  background: #263958;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e8eaed;
  font-family: 'Roboto', 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.25px;
  border-radius: 12px;
}
.vt-auth__social.vt-auth__social--solo a.gp:hover {
  background: #314869;
  border-color: rgba(173, 198, 255, 0.28);
  color: #f1f4ff;
  box-shadow: 0 6px 18px rgba(77, 142, 255, 0.18);
}
.vt-auth__social--solo a.gp .vt-google-g {
  width: 18px;
  height: 18px;
  flex: none;
}
.vt-auth__social--solo a.gp span { line-height: 1; }

/* Divider */
.vt-auth__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 18px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8c909f;
}
.vt-auth__divider::before,
.vt-auth__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.10), transparent);
}

/* Form */
.vt-auth__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vt-auth__field { position: relative; }

.vt-auth__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: #dae2fd;
  margin-bottom: 6px;
}
.vt-auth__label-link {
  font-size: 12px;
  font-weight: 500;
  color: #adc6ff;
  text-decoration: none;
  transition: color 180ms ease;
}
.vt-auth__label-link:hover { color: #4cd7f6; }

.vt-auth__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.vt-auth__input-icon {
  position: absolute;
  inset-inline-start: 14px;
  color: #8c909f;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
}
.vt-auth__input-icon .material-symbols-outlined {
  font-size: 18px;
}
.vt-auth__input {
  width: 100%;
  height: 48px;
  background: rgba(11, 19, 38, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  padding: 0 16px 0 44px;
  color: #f1f4ff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
[dir="rtl"] .vt-auth__input { padding: 0 44px 0 16px; }
[dir="rtl"] .vt-auth__input--has-trail { padding: 0 44px 0 44px; }
.vt-auth__input::placeholder { color: #6b7184; }
.vt-auth__input:focus {
  border-color: #4d8eff;
  background: rgba(11, 19, 38, 0.85);
  box-shadow: 0 0 0 3px rgba(77, 142, 255, 0.18);
}
.vt-auth__input--has-trail { padding-inline-end: 44px; }

.vt-auth__input-toggle {
  position: absolute;
  inset-inline-end: 12px;
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #8c909f;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}
.vt-auth__input-toggle:hover { background: rgba(255, 255, 255, 0.06); color: #f1f4ff; }
.vt-auth__input-toggle .material-symbols-outlined { font-size: 18px; }

/* Validation error */
.vt-auth__error {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #ff8a8a;
}
.vt-auth__field.has-error .vt-auth__input { border-color: rgba(255, 99, 99, 0.55); }
.vt-auth__field.has-error .vt-auth__input:focus { box-shadow: 0 0 0 3px rgba(255, 99, 99, 0.20); }

/* Checkbox + radio */
.vt-auth__check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #c2c6d6;
  cursor: pointer;
  line-height: 1.5;
}
.vt-auth__check input[type="checkbox"],
.vt-auth__check input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  background: rgba(11, 19, 38, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease;
  position: relative;
}
.vt-auth__check input[type="radio"] { border-radius: 50%; }
.vt-auth__check input[type="checkbox"]:checked {
  background: #4d8eff;
  border-color: #4d8eff;
}
.vt-auth__check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3e%3cpath d='M3.5 8.5l3 3 6-6' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
}
.vt-auth__check input[type="radio"]:checked {
  border-color: #4d8eff;
  background: radial-gradient(circle, #4d8eff 0%, #4d8eff 40%, transparent 45%);
}
.vt-auth__check a { color: #adc6ff; text-decoration: none; }
.vt-auth__check a:hover { color: #4cd7f6; }

.vt-auth__radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 6px 0 10px;
}

/* Referral toggle group */
.vt-auth__group-label {
  font-size: 13px;
  font-weight: 600;
  color: #dae2fd;
  margin-bottom: 6px;
}

/* Primary submit button */
.vt-auth__submit {
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #4d8eff 0%, #2f6fff 100%);
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  width: 100%;
  margin-top: 4px;
  box-shadow: 0 8px 24px rgba(77, 142, 255, 0.28);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.vt-auth__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(77, 142, 255, 0.4);
  color: #ffffff;
}
.vt-auth__submit:active { transform: translateY(0); }
.vt-auth__submit .material-symbols-outlined { font-size: 18px; }

/* reCAPTCHA wrapper centered */
.vt-auth__captcha {
  display: flex;
  justify-content: center;
  margin: 4px 0 2px;
  filter: invert(0.92) hue-rotate(180deg);
  border-radius: 4px;
  overflow: hidden;
}
.vt-auth__captcha > div { transform-origin: center; }
@media (max-width: 360px) {
  .vt-auth__captcha > div { transform: scale(0.86); }
}

/* Bottom switch link row */
.vt-auth__switch {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 13px;
  color: #c2c6d6;
}
.vt-auth__switch a {
  color: #adc6ff;
  font-weight: 600;
  text-decoration: none;
  transition: color 180ms ease;
}
.vt-auth__switch a:hover { color: #4cd7f6; }

/* Role-tab pills above the card — show this is candidate vs employer */
.vt-auth__roletabs {
  display: inline-flex;
  margin: 0 auto 22px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  gap: 4px;
}
.vt-auth__roletabs-wrap { text-align: center; }
.vt-auth__roletab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 10px;
  font-family: 'Plus Jakarta Sans', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: #c2c6d6;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}
.vt-auth__roletab:hover { color: #f1f4ff; }
.vt-auth__roletab.is-active {
  background: linear-gradient(135deg, rgba(77, 142, 255, 0.20), rgba(76, 215, 246, 0.14));
  color: #f1f4ff;
  box-shadow: 0 4px 12px rgba(77, 142, 255, 0.15);
}
.vt-auth__roletab .material-symbols-outlined { font-size: 16px; }

/* Inline helper text under card head */
.vt-auth__hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #8c909f;
  margin-top: 8px;
}
.vt-auth__hint .material-symbols-outlined { font-size: 14px; color: #adc6ff; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .vt-auth::before,
  .vt-auth__submit,
  .vt-auth__social a,
  .vt-auth__input,
  .vt-auth__input-toggle { animation: none; transition: none; }
  .vt-auth__submit:hover,
  .vt-auth__social a:hover { transform: none; }
}

/* Small screens */
@media (max-width: 480px) {
  .vt-auth { padding: 32px 12px 60px; }
  .vt-auth__card { padding: 28px 22px; }
  .vt-auth__title { font-size: 22px; }
  .vt-auth__social { grid-template-columns: repeat(3, 1fr); }
  .vt-auth__social--solo { grid-template-columns: 1fr; }
}
