/* Autofill readability fix across the app (WebKit-based browsers) */
input[type="text"]:-webkit-autofill,
input[type="email"]:-webkit-autofill,
input[type="password"]:-webkit-autofill,
input[type="search"]:-webkit-autofill,
input[type="tel"]:-webkit-autofill,
input[type="url"]:-webkit-autofill,
input[type="number"]:-webkit-autofill,
input[type="date"]:-webkit-autofill,
input[type="time"]:-webkit-autofill,
.auth-input:-webkit-autofill,
input[type="text"]:-webkit-autofill:hover,
input[type="email"]:-webkit-autofill:hover,
input[type="password"]:-webkit-autofill:hover,
input[type="search"]:-webkit-autofill:hover,
input[type="tel"]:-webkit-autofill:hover,
input[type="url"]:-webkit-autofill:hover,
input[type="number"]:-webkit-autofill:hover,
input[type="date"]:-webkit-autofill:hover,
input[type="time"]:-webkit-autofill:hover,
.auth-input:-webkit-autofill:hover,
input[type="text"]:-webkit-autofill:focus,
input[type="email"]:-webkit-autofill:focus,
input[type="password"]:-webkit-autofill:focus,
input[type="search"]:-webkit-autofill:focus,
input[type="tel"]:-webkit-autofill:focus,
input[type="url"]:-webkit-autofill:focus,
input[type="number"]:-webkit-autofill:focus,
input[type="date"]:-webkit-autofill:focus,
input[type="time"]:-webkit-autofill:focus,
.auth-input:-webkit-autofill:focus,
input[type="text"]:-webkit-autofill:active,
input[type="email"]:-webkit-autofill:active,
input[type="password"]:-webkit-autofill:active,
input[type="search"]:-webkit-autofill:active,
input[type="tel"]:-webkit-autofill:active,
input[type="url"]:-webkit-autofill:active,
input[type="number"]:-webkit-autofill:active,
input[type="date"]:-webkit-autofill:active,
input[type="time"]:-webkit-autofill:active,
.auth-input:-webkit-autofill:active {
  -webkit-text-fill-color: #111111 !important;
  caret-color: #111111 !important;
  transition: background-color 9999s ease-out 0s;
  -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.85) inset !important;
  box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.85) inset !important;
}

/* Dark theme variant */
.dark input[type="text"]:-webkit-autofill,
.dark input[type="email"]:-webkit-autofill,
.dark input[type="password"]:-webkit-autofill,
.dark input[type="search"]:-webkit-autofill,
.dark input[type="tel"]:-webkit-autofill,
.dark input[type="url"]:-webkit-autofill,
.dark input[type="number"]:-webkit-autofill,
.dark input[type="date"]:-webkit-autofill,
.dark input[type="time"]:-webkit-autofill,
.dark .auth-input:-webkit-autofill,
.dark input[type="text"]:-webkit-autofill:hover,
.dark input[type="email"]:-webkit-autofill:hover,
.dark input[type="password"]:-webkit-autofill:hover,
.dark input[type="search"]:-webkit-autofill:hover,
.dark input[type="tel"]:-webkit-autofill:hover,
.dark input[type="url"]:-webkit-autofill:hover,
.dark input[type="number"]:-webkit-autofill:hover,
.dark input[type="date"]:-webkit-autofill:hover,
.dark input[type="time"]:-webkit-autofill:hover,
.dark .auth-input:-webkit-autofill:hover,
.dark input[type="text"]:-webkit-autofill:focus,
.dark input[type="email"]:-webkit-autofill:focus,
.dark input[type="password"]:-webkit-autofill:focus,
.dark input[type="search"]:-webkit-autofill:focus,
.dark input[type="tel"]:-webkit-autofill:focus,
.dark input[type="url"]:-webkit-autofill:focus,
.dark input[type="number"]:-webkit-autofill:focus,
.dark input[type="date"]:-webkit-autofill:focus,
.dark input[type="time"]:-webkit-autofill:focus,
.dark .auth-input:-webkit-autofill:focus,
.dark input[type="text"]:-webkit-autofill:active,
.dark input[type="email"]:-webkit-autofill:active,
.dark input[type="password"]:-webkit-autofill:active,
.dark input[type="search"]:-webkit-autofill:active,
.dark input[type="tel"]:-webkit-autofill:active,
.dark input[type="url"]:-webkit-autofill:active,
.dark input[type="number"]:-webkit-autofill:active,
.dark input[type="date"]:-webkit-autofill:active,
.dark input[type="time"]:-webkit-autofill:active,
.dark .auth-input:-webkit-autofill:active {
  -webkit-text-fill-color: #f3f4f6 !important;
  caret-color: #f3f4f6 !important;
  -webkit-box-shadow: 0 0 0px 1000px rgba(31, 41, 55, 0.92) inset !important;
  box-shadow: 0 0 0px 1000px rgba(31, 41, 55, 0.92) inset !important;
}

/* Login auth fields: always light background + black text */
.auth-input {
  background-color: #ffffff !important;
  color: #111111 !important;
  caret-color: #111111 !important;
}

.auth-input::placeholder {
  color: #9ca3af !important;
  -webkit-text-fill-color: #9ca3af !important;
  opacity: 1 !important;
}

.dark .auth-input {
  background-color: #ffffff !important;
  color: #111111 !important;
  caret-color: #111111 !important;
}

.dark .auth-input::placeholder {
  color: #9ca3af !important;
  -webkit-text-fill-color: #9ca3af !important;
  opacity: 1 !important;
}

/* Override dark autofill for auth inputs only */
.dark .auth-input:-webkit-autofill,
.dark .auth-input:-webkit-autofill:hover,
.dark .auth-input:-webkit-autofill:focus,
.dark .auth-input:-webkit-autofill:active {
  -webkit-text-fill-color: #111111 !important;
  caret-color: #111111 !important;
  -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.96) inset !important;
  box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.96) inset !important;
}

/* Strong dark-mode override for login inputs (higher specificity than generic dark autofill) */
.dark input.auth-input[type="text"]:-webkit-autofill,
.dark input.auth-input[type="email"]:-webkit-autofill,
.dark input.auth-input[type="password"]:-webkit-autofill,
.dark input.auth-input[type="search"]:-webkit-autofill,
.dark input.auth-input[type="tel"]:-webkit-autofill,
.dark input.auth-input[type="url"]:-webkit-autofill,
.dark input.auth-input[type="number"]:-webkit-autofill,
.dark input.auth-input[type="text"]:-webkit-autofill:hover,
.dark input.auth-input[type="email"]:-webkit-autofill:hover,
.dark input.auth-input[type="password"]:-webkit-autofill:hover,
.dark input.auth-input[type="search"]:-webkit-autofill:hover,
.dark input.auth-input[type="tel"]:-webkit-autofill:hover,
.dark input.auth-input[type="url"]:-webkit-autofill:hover,
.dark input.auth-input[type="number"]:-webkit-autofill:hover,
.dark input.auth-input[type="text"]:-webkit-autofill:focus,
.dark input.auth-input[type="email"]:-webkit-autofill:focus,
.dark input.auth-input[type="password"]:-webkit-autofill:focus,
.dark input.auth-input[type="search"]:-webkit-autofill:focus,
.dark input.auth-input[type="tel"]:-webkit-autofill:focus,
.dark input.auth-input[type="url"]:-webkit-autofill:focus,
.dark input.auth-input[type="number"]:-webkit-autofill:focus,
.dark input.auth-input[type="text"]:-webkit-autofill:active,
.dark input.auth-input[type="email"]:-webkit-autofill:active,
.dark input.auth-input[type="password"]:-webkit-autofill:active,
.dark input.auth-input[type="search"]:-webkit-autofill:active,
.dark input.auth-input[type="tel"]:-webkit-autofill:active,
.dark input.auth-input[type="url"]:-webkit-autofill:active,
.dark input.auth-input[type="number"]:-webkit-autofill:active {
  -webkit-text-fill-color: #111111 !important;
  color: #111111 !important;
  caret-color: #111111 !important;
  -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
  box-shadow: 0 0 0px 1000px #ffffff inset !important;
}
