/* Dark form overrides: readable text AND a clear boundary while typing */
:root{
  --df-bg: #0b1220;        /* field background */
  --df-bg-focus: #1e293b;  /* focused field bg */
  --df-text: #e5e7eb;      /* normal text      */
  --df-text-strong: #f9fafb;
  --df-muted: #9ca3af;     /* placeholders/help */
  --df-border: #4b5563;    /* visible border   */
  --df-border-hover: #93a3b5;
  --df-focus: #3b82f6;     /* focus ring       */
}

/* Catch‑all inputs (text/email/number/date/etc.), textareas, selects,
   AND Bootstrap helpers (.form-control/.form-select). */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="datetime-local"],
input[type="date"],
input[type="time"],
textarea,
select,
.form-control,
.form-select {
  background-color: var(--df-bg) !important;
  color: var(--df-text) !important;
  border: 1px solid var(--df-border) !important;
  box-shadow: none !important;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

/* Hover: make the boundary obvious before focus */
input:hover,
textarea:hover,
select:hover,
.form-control:hover,
.form-select:hover {
  border-color: var(--df-border-hover) !important;
}

/* Focus: darker bg, bright text, visible ring */
input:focus,
textarea:focus,
select:focus,
.form-control:focus,
.form-select:focus {
  background-color: var(--df-bg-focus) !important;
  color: var(--df-text-strong) !important;
  border-color: var(--df-focus) !important;
  outline: none !important;
  box-shadow: 0 0 0 .2rem rgba(59,130,246,.25) !important;
}

/* Placeholder/help text */
.form-control::placeholder,
input::placeholder,
textarea::placeholder { color: var(--df-muted) !important; opacity: 1; }
.form-text, .hint, .text-muted { color: var(--df-muted) !important; }

/* Disabled/readonly stay legible */
.form-control:disabled,
.form-select:disabled,
.form-control[readonly],
input[readonly],
textarea[readonly] {
  background-color: #0f172a !important;
  color: var(--df-muted) !important;
  border-color: #334155 !important;
}

/* Validation (optional) */
.is-invalid { border-color: #ef4444 !important; }
.is-valid   { border-color: #22c55e !important; }
