/* ==========================================================================
   ATLAS RUGS ISTANBUL — SALE INVOICE DARK MODE FIX
   Scoped strictly to html[data-theme="dark"] body.atlas-sale-route (#/sale-invoice)
   Light mode and all other routes remain 100% untouched.
   ========================================================================== */

html[data-theme="dark"] body.atlas-sale-route,
html[data-theme="dark"] body.atlas-sale-route .main-wrapper,
html[data-theme="dark"] body.atlas-sale-route .main-wrapper .page-wrapper,
html[data-theme="dark"] body.atlas-sale-route .page-wrapper .bg-white,
html[data-theme="dark"] body.atlas-sale-route .page-wrapper .content,
html[data-theme="dark"] body.atlas-sale-route .content .row.mt-2,
html[data-theme="dark"] body.atlas-sale-route .newbody,
html[data-theme="dark"] body.atlas-sale-route .newBill {
  background: #120F0D !important;
  background-color: #120F0D !important;
  color: #F5F0E6 !important;
}

/* Remove muddy grey background/overlay on Angular .disabled containers */
html[data-theme="dark"] body.atlas-sale-route .disabled,
html[data-theme="dark"] body.atlas-sale-route .newbody.disabled {
  background-color: transparent !important;
  background: transparent !important;
  opacity: 0.94 !important;
}

/* Cards & Tables */
html[data-theme="dark"] body.atlas-sale-route .card,
html[data-theme="dark"] body.atlas-sale-route .table-responsive,
html[data-theme="dark"] body.atlas-sale-route .table,
html[data-theme="dark"] body.atlas-sale-route .table-product,
html[data-theme="dark"] body.atlas-sale-route .my-table {
  background: #171310 !important;
  background-color: #171310 !important;
  border-color: #2D251E !important;
  color: #F5F0E6 !important;
}

html[data-theme="dark"] body.atlas-sale-route table thead th,
html[data-theme="dark"] body.atlas-sale-route table thead td {
  background: #221C16 !important;
  background-color: #221C16 !important;
  color: #E8DEC8 !important;
  border-color: #352C23 !important;
}

html[data-theme="dark"] body.atlas-sale-route table tbody td {
  background: #171310 !important;
  background-color: #171310 !important;
  color: #F5F0E6 !important;
  border-color: #2A221B !important;
}

/* Inputs, ng-select, SP/SR radio box, and inline #e9ecef icon boxes */
html[data-theme="dark"] body.atlas-sale-route input.form-control,
html[data-theme="dark"] body.atlas-sale-route input.form-control:disabled,
html[data-theme="dark"] body.atlas-sale-route input.form-control[disabled],
html[data-theme="dark"] body.atlas-sale-route select.form-select,
html[data-theme="dark"] body.atlas-sale-route .ng-select .ng-select-container,
html[data-theme="dark"] body.atlas-sale-route .ng-select.ng-select-disabled > .ng-select-container,
html[data-theme="dark"] body.atlas-sale-route .sp-Bg,
html[data-theme="dark"] body.atlas-sale-route .add-icon,
html[data-theme="dark"] body.atlas-sale-route .add-icon > a,
html[data-theme="dark"] body.atlas-sale-route [data-bs-target="#DeliveryPersonModal"],
html[data-theme="dark"] body.atlas-sale-route #btnCashPayment,
html[data-theme="dark"] body.atlas-sale-route #btnCashPayment a {
  background: #1F1914 !important;
  background-color: #1F1914 !important;
  border-color: #382E24 !important;
  color: #F5F0E6 !important;
}

html[data-theme="dark"] body.atlas-sale-route .ng-select,
html[data-theme="dark"] body.atlas-sale-route .ng-select *,
html[data-theme="dark"] body.atlas-sale-route .ng-select .ng-select-container .ng-value-container .ng-value,
html[data-theme="dark"] body.atlas-sale-route .ng-select .ng-select-container .ng-value-container .ng-value *,
html[data-theme="dark"] body.atlas-sale-route .ng-select .ng-input > input,
html[data-theme="dark"] body.atlas-sale-route .ng-select .ng-clear-wrapper,
html[data-theme="dark"] body.atlas-sale-route .sp-Bg label {
  color: #F5F0E6 !important;
  opacity: 1 !important;
}

html[data-theme="dark"] body.atlas-sale-route input::placeholder,
html[data-theme="dark"] body.atlas-sale-route .ng-select .ng-placeholder,
html[data-theme="dark"] body.atlas-sale-route .ng-select .ng-select-container .ng-value-container .ng-placeholder {
  color: #A69C8E !important;
  opacity: 1 !important;
}

html[data-theme="dark"] body.atlas-sale-route .ng-select .ng-input,
html[data-theme="dark"] body.atlas-sale-route .ng-select .ng-input > input {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #F5F0E6 !important;
}

html[data-theme="dark"] body.atlas-sale-route .ng-select .ng-arrow {
  border-color: #C7BEB2 transparent transparent !important;
}

html[data-theme="dark"] body.atlas-sale-route .ng-dropdown-panel {
  background: #1A1511 !important;
  border-color: #382E24 !important;
}

html[data-theme="dark"] body.atlas-sale-route .ng-dropdown-panel .ng-option {
  background: #1A1511 !important;
  color: #F5F0E6 !important;
}

html[data-theme="dark"] body.atlas-sale-route .ng-dropdown-panel .ng-option.ng-option-marked {
  background: #2A221B !important;
  color: #E7C973 !important;
}

/* Invoices button & icon contrast */
html[data-theme="dark"] body.atlas-sale-route button[data-bs-target="#InvoiceListModal"] {
  background: #2A221B !important;
  border: 1px solid #B59438 !important;
  color: #F5F0E6 !important;
}

html[data-theme="dark"] body.atlas-sale-route .addonset img,
html[data-theme="dark"] body.atlas-sale-route .add-icon img.plusSvg {
  filter: invert(0.85) sepia(0.15) !important;
}

/* Utility Modal Dark Mode Polish */
html[data-theme="dark"] body.atlas-sale-route #UtlityModal .modal-content {
  background: #171310 !important;
  border: 1px solid #382E24 !important;
  color: #F5F0E6 !important;
}

html[data-theme="dark"] body.atlas-sale-route #UtlityModal .border {
  border-color: #2D251E !important;
}

html[data-theme="dark"] body.atlas-sale-route #UtlityModal select.form-select,
html[data-theme="dark"] body.atlas-sale-route #UtlityModal select.form-select option {
  background-color: #1F1914 !important;
  color: #F5F0E6 !important;
  border-color: #382E24 !important;
}

html[data-theme="dark"] body.atlas-sale-route #UtlityModal .btn-primary {
  background: #B59438 !important;
  border-color: #B59438 !important;
  color: #120F0D !important;
  font-weight: 700 !important;
}
