/* Global forms override: dark theme compatible */
:root {
  --crm-input-border: #233145; /* dark slate */
  --crm-input-border-focus: #4facfe; /* blue accent */
  --crm-input-ring: rgba(79, 172, 254, 0.15);
}

/* Base border for all text-like controls */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea,
.input,
.form-control,
.form-select,
.select,
textarea.textarea {
  --tw-border-opacity: 1 !important;
  border-color: var(--crm-input-border) !important;
  border-width: 1px !important;
  background-color: #1c2a3e !important;
  color: #ffffff !important;
  border-radius: .45rem;
  font-size: .9rem;
}

/* Common Daisy/Bootstrap variants */
.input.input-bordered,
.select.select-bordered,
.textarea.textarea-bordered,
.form-control {
  --tw-border-opacity: 1 !important;
  border-color: var(--crm-input-border) !important;
  border-width: 1px !important;
}

/* Focus state */
input:focus:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select:focus,
textarea:focus,
.input:focus,
.input.input-bordered:focus,
.form-control:focus,
.form-select:focus,
.select:focus,
textarea.textarea:focus {
  outline: none !important;
  --tw-border-opacity: 1 !important;
  border-color: var(--crm-input-border-focus) !important;
  border-width: 2px !important;
  box-shadow: 0 0 0 3px var(--crm-input-ring);
  background-color: #233145 !important;
}

/* Disabled look */
input[disabled], select[disabled], textarea[disabled],
.input[disabled], .select[disabled], .form-control[disabled] {
  background-color: #0b1320 !important;
  color: #64748b !important;
}

/* Dark bg inside cards */
.card .input, .card .form-control, .card select, .card textarea {
  background-color: #1c2a3e !important;
  color: #ffffff !important;
}
