/* =========================================================
   Global app theme — clean blue/gray (matches ERP-style UI)
   ========================================================= */

:root,
html,
body,
[data-primary],
[data-primary="color_1"],
[data-primary="color_2"],
[data-primary="color_3"],
[data-primary="color_4"],
[data-primary="color_5"],
[data-primary="color_6"],
[data-primary="color_7"],
[data-primary="color_8"],
[data-primary="color_9"],
[data-primary="color_10"],
[data-primary="color_11"],
[data-primary="color_12"],
[data-primary="color_13"],
[data-primary="color_14"],
[data-primary="color_15"] {
  --primary: #2563eb !important;
  --secondary: #64748b !important;
  --primary-hover: #1d4ed8 !important;
  --primary-light: #dbeafe !important;
  --primary-dark: #1e40af !important;
  --rgba-primary-1: rgba(37, 99, 235, 0.1) !important;
  --rgba-primary-2: rgba(37, 99, 235, 0.2) !important;
  --rgba-primary-3: rgba(37, 99, 235, 0.3) !important;
  --rgba-primary-4: rgba(37, 99, 235, 0.4) !important;
  --rgba-primary-5: rgba(37, 99, 235, 0.5) !important;
  --rgba-primary-6: rgba(37, 99, 235, 0.6) !important;
  --rgba-primary-7: rgba(37, 99, 235, 0.7) !important;
  --rgba-primary-8: rgba(37, 99, 235, 0.8) !important;
  --rgba-primary-9: rgba(37, 99, 235, 0.9) !important;

  /* Bootstrap 5 color tokens (theme hardcodes orange here) */
  --bs-primary: #2563eb !important;
  --bs-primary-rgb: 37, 99, 235 !important;
  --bs-link-color: #2563eb !important;
  --bs-link-hover-color: #1d4ed8 !important;

  --app-text: #000000;
  --app-text-muted: #6b7280;
  --app-border: #d1d5db;
  --app-bg: #f3f4f6;
  --app-card: #ffffff;
}

body {
  background-color: var(--app-bg);
  color: #111827;
}

.content-body {
  background-color: var(--app-bg);
}

.card {
  background-color: var(--app-card);
  border: 1px solid #e5e7eb;
}

/* Primary buttons — override Bootstrap's hardcoded orange --bs-btn-* vars */
.btn-primary {
  --bs-btn-color: #fff !important;
  --bs-btn-bg: #2563eb !important;
  --bs-btn-border-color: #2563eb !important;
  --bs-btn-hover-color: #fff !important;
  --bs-btn-hover-bg: #1d4ed8 !important;
  --bs-btn-hover-border-color: #1d4ed8 !important;
  --bs-btn-focus-shadow-rgb: 37, 99, 235 !important;
  --bs-btn-active-color: #fff !important;
  --bs-btn-active-bg: #1e40af !important;
  --bs-btn-active-border-color: #1e40af !important;
  --bs-btn-disabled-color: #fff !important;
  --bs-btn-disabled-bg: #2563eb !important;
  --bs-btn-disabled-border-color: #2563eb !important;
  background-color: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active {
  background-color: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #fff !important;
}

.btn-outline-primary {
  --bs-btn-color: #2563eb !important;
  --bs-btn-border-color: #2563eb !important;
  --bs-btn-hover-bg: #2563eb !important;
  --bs-btn-hover-border-color: #2563eb !important;
  --bs-btn-active-bg: #2563eb !important;
  --bs-btn-active-border-color: #2563eb !important;
  --bs-btn-disabled-color: #2563eb !important;
  --bs-btn-disabled-border-color: #2563eb !important;
  color: #2563eb !important;
  border-color: #2563eb !important;
}

.text-primary,
a.text-primary,
.accordion-header-text.text-primary {
  color: #2563eb !important;
}

.bg-primary {
  background-color: #2563eb !important;
}

.border-primary {
  border-color: #2563eb !important;
}

.badge-primary,
span.badge-primary,
.badge.badge-primary {
  background-color: #2563eb !important;
  color: #fff !important;
}

.badge-primary.light,
span.badge-primary.light,
.badge.badge-primary.light {
  background-color: #dbeafe !important;
  color: #1e40af !important;
}

.page-item.active .page-link,
.pagination .page-item.active .page-link {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background-color: #2563eb !important;
}

.progress-bar {
  background-color: #2563eb !important;
}

/* =========================================================
   Form fields: bold black text everywhere (inputs + dropdowns)
   ========================================================= */

input.form-control,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="time"],
input[type="week"],
textarea.form-control,
textarea,
select.form-control,
select.default-select,
select.me-sm-2,
select {
  color: #000000 !important;
  font-weight: 700 !important;
  border: 1px solid var(--app-border) !important;
  background-color: #ffffff !important;
}

input.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
textarea.form-control:focus,
textarea:focus,
select.form-control:focus,
select:focus {
  color: #000000 !important;
  font-weight: 700 !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.2) !important;
}

.form-control-plaintext,
input.form-control-plaintext,
input[readonly].form-control {
  color: #000000 !important;
  font-weight: 700 !important;
  border: 1px solid var(--app-border) !important;
  border-radius: 0.375rem !important;
  background-color: #ffffff !important;
  padding: 0.375rem 0.75rem !important;
}

.form-control-plaintext:focus,
input.form-control-plaintext:focus,
input[readonly].form-control:focus {
  border-color: var(--app-border) !important;
  box-shadow: none !important;
  outline: 0 !important;
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af !important;
  font-weight: 400 !important;
  opacity: 1;
}

input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
  color: #9ca3af !important;
  font-weight: 400 !important;
}

input::-moz-placeholder,
textarea::-moz-placeholder {
  color: #9ca3af !important;
  font-weight: 400 !important;
}

.bootstrap-select > .dropdown-toggle,
.bootstrap-select .filter-option,
.bootstrap-select .filter-option-inner-inner,
.bootstrap-select .dropdown-toggle .filter-option-inner-inner {
  color: #000000 !important;
  font-weight: 700 !important;
}

.bootstrap-select .dropdown-menu li a,
.bootstrap-select .dropdown-menu li a span.text,
.bootstrap-select .dropdown-item {
  color: #000000 !important;
  font-weight: 700 !important;
}

.bootstrap-select .dropdown-menu li.selected a,
.bootstrap-select .dropdown-menu li.active a {
  color: #000000 !important;
  font-weight: 700 !important;
  background-color: #dbeafe !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--multiple .select2-selection__choice,
.select2-results__option {
  color: #000000 !important;
  font-weight: 700 !important;
}

.nice-select,
.nice-select .current,
.nice-select .list .option {
  color: #000000 !important;
  font-weight: 700 !important;
}

input:disabled,
select:disabled,
textarea:disabled,
.form-control:disabled,
.bootstrap-select.disabled > .dropdown-toggle {
  color: #111827 !important;
  font-weight: 700 !important;
  opacity: 0.75;
}

label,
.control-label,
.form-label {
  color: var(--app-text-muted);
  font-weight: 500;
}

/* Quick Links: sit below field labels; wrap on narrow columns */
.btn-quick-links {
  margin-top: 1.75rem;
  height: auto !important;
  min-height: 2.25rem;
  white-space: normal !important;
  word-break: break-word;
  line-height: 1.25;
  padding: 0.4rem 0.55rem !important;
  text-align: center;
  max-width: 100%;
}

@media (max-width: 1399.98px) {
  .btn-quick-links {
    margin-top: 1.85rem;
    font-size: 0.8rem;
    padding: 0.35rem 0.4rem !important;
  }
}

[data-sidebar-style] .deznav .metismenu > li.mm-active > a,
.deznav .metismenu > li.mm-active > a {
  background-color: #f3f4f6 !important;
  color: #111827 !important;
}

.deznav .metismenu > li.mm-active > a:before,
[data-sidebar-style="full"][data-layout="vertical"] .deznav .metismenu > li.mm-active > a:before {
  background-color: #2563eb !important;
}

.nav-tabs .nav-link.active {
  color: #2563eb !important;
  border-color: #2563eb !important;
}

/* Active wizard step is filled blue — label must be white (not primary blue) */
.form-wizard .nav-wizard li .nav-link.active span,
.form-wizard .nav-wizard li .nav-link.active .step_title {
  border-color: #2563eb !important;
  background-color: #2563eb !important;
  color: #fff !important;
}

.form-wizard .nav-wizard li .nav-link.done span,
.form-wizard .nav-wizard li .nav-link.done .step_title {
  border-color: #2563eb !important;
}

/* Search/list selection (app uses bg-warning for selected rows) */
.table .bg-warning,
.table td.bg-warning,
.table tr.bg-warning,
.item-button.bg-warning,
.item-button-row.bg-warning,
.merge-result-row.bg-warning {
  background-color: #2563eb !important;
  color: #fff !important;
}
