/*
  BravoERP Theme Contrast (Safe Overrides)
  ------------------------------------------------------------
  Objetivo: coherencia de contraste (modo claro/oscuro) sin
  arriesgar el layout. Este archivo NO define estructura, solo
  colores/contraste para componentes (chips/badges/botones/tablas).

  Regla:
  - Light = html:not([data-bs-theme="dark"])
  - Dark  = html[data-bs-theme="dark"]
*/

/* -----------------------------
   Tokens (Light / Dark)
------------------------------ */
html:not([data-bs-theme="dark"]) {
  --br-chip-bg: rgba(15, 23, 42, .05);
  --br-chip-border: rgba(15, 23, 42, .10);
  --br-chip-text: rgba(15, 23, 42, .72);

  --br-btn-neutral-bg: rgba(15, 23, 42, .02);
  --br-btn-neutral-border: rgba(15, 23, 42, .14);
  --br-btn-neutral-text: rgba(15, 23, 42, .78);
  --br-btn-neutral-hover-bg: rgba(15, 23, 42, .06);
  --br-btn-neutral-hover-border: rgba(15, 23, 42, .22);

  /* Fallbacks Bootstrap subtle tokens (Light) */
  --bs-success-bg-subtle: var(--bs-success-bg-subtle, rgba(25,135,84,.12));
  --bs-success-border-subtle: var(--bs-success-border-subtle, rgba(25,135,84,.28));
  --bs-success-text-emphasis: var(--bs-success-text-emphasis, rgba(25,135,84,.95));

  --bs-danger-bg-subtle: var(--bs-danger-bg-subtle, rgba(220,53,69,.10));
  --bs-danger-border-subtle: var(--bs-danger-border-subtle, rgba(220,53,69,.28));
  --bs-danger-text-emphasis: var(--bs-danger-text-emphasis, rgba(220,53,69,.95));

  --bs-warning-bg-subtle: var(--bs-warning-bg-subtle, rgba(255,193,7,.14));
  --bs-warning-border-subtle: var(--bs-warning-border-subtle, rgba(255,193,7,.34));
  --bs-warning-text-emphasis: var(--bs-warning-text-emphasis, rgba(102,77,3,.95));

  --bs-info-bg-subtle: var(--bs-info-bg-subtle, rgba(13,202,240,.14));
  --bs-info-border-subtle: var(--bs-info-border-subtle, rgba(13,202,240,.34));
  --bs-info-text-emphasis: var(--bs-info-text-emphasis, rgba(8,81,94,.95));

  --bs-secondary-bg-subtle: var(--bs-secondary-bg-subtle, rgba(108,117,125,.12));
  --bs-secondary-border-subtle: var(--bs-secondary-border-subtle, rgba(108,117,125,.26));
  --bs-secondary-text-emphasis: var(--bs-secondary-text-emphasis, rgba(33,37,41,.78));

  --bs-primary-bg-subtle: var(--bs-primary-bg-subtle, rgba(79,140,255,.12));
  --bs-primary-border-subtle: var(--bs-primary-border-subtle, rgba(79,140,255,.30));
  --bs-primary-text-emphasis: var(--bs-primary-text-emphasis, rgba(29,78,216,.95));
}

html[data-bs-theme="dark"]{
  --br-chip-bg: rgba(255,255,255,.08);
  --br-chip-border: rgba(255,255,255,.14);
  --br-chip-text: rgba(255,255,255,.78);

  --br-btn-neutral-bg: rgba(255,255,255,.06);
  --br-btn-neutral-border: rgba(255,255,255,.18);
  --br-btn-neutral-text: rgba(255,255,255,.82);
  --br-btn-neutral-hover-bg: rgba(255,255,255,.10);
  --br-btn-neutral-hover-border: rgba(255,255,255,.26);

  /* Fallbacks Bootstrap subtle tokens (Dark) */
  --bs-success-bg-subtle: var(--bs-success-bg-subtle, rgba(25,135,84,.18));
  --bs-success-border-subtle: var(--bs-success-border-subtle, rgba(25,135,84,.34));
  --bs-success-text-emphasis: var(--bs-success-text-emphasis, rgba(113,221,160,.95));

  --bs-danger-bg-subtle: var(--bs-danger-bg-subtle, rgba(220,53,69,.18));
  --bs-danger-border-subtle: var(--bs-danger-border-subtle, rgba(220,53,69,.34));
  --bs-danger-text-emphasis: var(--bs-danger-text-emphasis, rgba(255,152,166,.95));

  --bs-warning-bg-subtle: var(--bs-warning-bg-subtle, rgba(255,193,7,.18));
  --bs-warning-border-subtle: var(--bs-warning-border-subtle, rgba(255,193,7,.34));
  --bs-warning-text-emphasis: var(--bs-warning-text-emphasis, rgba(255,229,153,.95));

  --bs-info-bg-subtle: var(--bs-info-bg-subtle, rgba(13,202,240,.18));
  --bs-info-border-subtle: var(--bs-info-border-subtle, rgba(13,202,240,.34));
  --bs-info-text-emphasis: var(--bs-info-text-emphasis, rgba(166,236,250,.95));

  --bs-secondary-bg-subtle: var(--bs-secondary-bg-subtle, rgba(108,117,125,.18));
  --bs-secondary-border-subtle: var(--bs-secondary-border-subtle, rgba(108,117,125,.34));
  --bs-secondary-text-emphasis: var(--bs-secondary-text-emphasis, rgba(255,255,255,.70));

  --bs-primary-bg-subtle: var(--bs-primary-bg-subtle, rgba(79,140,255,.16));
  --bs-primary-border-subtle: var(--bs-primary-border-subtle, rgba(79,140,255,.34));
  --bs-primary-text-emphasis: var(--bs-primary-text-emphasis, rgba(190,214,255,.95));
}

/* -----------------------------
   Chips / Badges
------------------------------ */

/* Neutral badges behave like chips (email, small labels, etc.) */
.badge:not([class*="bg-"]):not([class*="text-bg-"]) {
  background: var(--br-chip-bg) !important;
  color: var(--br-chip-text) !important;
  border: 1px solid var(--br-chip-border) !important;
  font-weight: 540;
  letter-spacing: .01em;
  padding: .32rem .55rem;
}

/* Custom chips used by forms (e.g., SKU pill) */
.chip{
  background: var(--br-chip-bg) !important;
  color: var(--br-chip-text) !important;
  border: 1px solid var(--br-chip-border) !important;
  font-weight: 540;
  letter-spacing: .01em;
}

/* Status badges (subtle, consistent) */
.badge.bg-success, .badge.text-bg-success{
  background: var(--bs-success-bg-subtle) !important;
  color: var(--bs-success-text-emphasis) !important;
  border: 1px solid var(--bs-success-border-subtle) !important;
}
.badge.bg-danger, .badge.text-bg-danger{
  background: var(--bs-danger-bg-subtle) !important;
  color: var(--bs-danger-text-emphasis) !important;
  border: 1px solid var(--bs-danger-border-subtle) !important;
}
.badge.bg-warning, .badge.text-bg-warning{
  background: var(--bs-warning-bg-subtle) !important;
  color: var(--bs-warning-text-emphasis) !important;
  border: 1px solid var(--bs-warning-border-subtle) !important;
}
.badge.bg-info, .badge.text-bg-info{
  background: var(--bs-info-bg-subtle) !important;
  color: var(--bs-info-text-emphasis) !important;
  border: 1px solid var(--bs-info-border-subtle) !important;
}
.badge.bg-secondary, .badge.text-bg-secondary{
  background: var(--bs-secondary-bg-subtle) !important;
  color: var(--bs-secondary-text-emphasis) !important;
  border: 1px solid var(--bs-secondary-border-subtle) !important;
}
.badge.bg-primary, .badge.text-bg-primary{
  background: var(--bs-primary-bg-subtle) !important;
  color: var(--bs-primary-text-emphasis) !important;
  border: 1px solid var(--bs-primary-border-subtle) !important;
}

/* Ensure rounded pills keep subtle feel */
.badge.rounded-pill{ padding-left: .6rem; padding-right: .6rem; }

/* -----------------------------
   Role chips (Tenant Users)
   - Más visibles en claro/oscuro
   - Sin afectar otros badges
------------------------------ */

.role-chip{
  /* un poquito más de presencia */
  filter: saturate(1.15);
}

/* Light */
html:not([data-bs-theme="dark"]) .role-chip.text-bg-primary{
  background: rgba(var(--app-primary-rgb), .18) !important;
  border: 1px solid rgba(var(--app-primary-rgb), .42) !important;
  color: var(--bs-primary-text-emphasis) !important;
}
html:not([data-bs-theme="dark"]) .role-chip.text-bg-success{
  background: rgba(25,135,84,.18) !important;
  border: 1px solid rgba(25,135,84,.40) !important;
  color: var(--bs-success-text-emphasis) !important;
}
html:not([data-bs-theme="dark"]) .role-chip.text-bg-warning{
  background: rgba(255,193,7,.24) !important;
  border: 1px solid rgba(255,193,7,.46) !important;
  color: rgba(17,17,17,.92) !important;
}
html:not([data-bs-theme="dark"]) .role-chip.text-bg-info{
  background: rgba(13,202,240,.22) !important;
  border: 1px solid rgba(13,202,240,.46) !important;
  color: rgba(7,55,64,.95) !important;
}
html:not([data-bs-theme="dark"]) .role-chip.text-bg-danger{
  background: rgba(220,53,69,.18) !important;
  border: 1px solid rgba(220,53,69,.42) !important;
  color: var(--bs-danger-text-emphasis) !important;
}
html:not([data-bs-theme="dark"]) .role-chip.text-bg-secondary{
  background: rgba(108,117,125,.16) !important;
  border: 1px solid rgba(108,117,125,.34) !important;
  color: var(--bs-secondary-text-emphasis) !important;
}
html:not([data-bs-theme="dark"]) .role-chip.text-bg-dark{
  background: rgba(15,23,42,.12) !important;
  border: 1px solid rgba(15,23,42,.24) !important;
  color: rgba(15,23,42,.86) !important;
}

/* Dark */
html[data-bs-theme="dark"] .role-chip.text-bg-primary{
  background: rgba(var(--app-primary-rgb), .24) !important;
  border: 1px solid rgba(var(--app-primary-rgb), .48) !important;
  color: rgba(235,244,255,.96) !important;
}
html[data-bs-theme="dark"] .role-chip.text-bg-success{
  background: rgba(25,135,84,.26) !important;
  border: 1px solid rgba(25,135,84,.48) !important;
  color: rgba(219,255,236,.96) !important;
}
html[data-bs-theme="dark"] .role-chip.text-bg-warning{
  background: rgba(255,193,7,.26) !important;
  border: 1px solid rgba(255,193,7,.48) !important;
  color: rgba(20,20,20,.92) !important;
}
html[data-bs-theme="dark"] .role-chip.text-bg-info{
  background: rgba(13,202,240,.28) !important;
  border: 1px solid rgba(13,202,240,.52) !important;
  color: rgba(10,10,10,.90) !important;
}
html[data-bs-theme="dark"] .role-chip.text-bg-danger{
  background: rgba(220,53,69,.26) !important;
  border: 1px solid rgba(220,53,69,.48) !important;
  color: rgba(255,230,234,.96) !important;
}
html[data-bs-theme="dark"] .role-chip.text-bg-secondary{
  background: rgba(108,117,125,.22) !important;
  border: 1px solid rgba(108,117,125,.42) !important;
  color: rgba(255,255,255,.82) !important;
}
html[data-bs-theme="dark"] .role-chip.text-bg-dark{
  background: rgba(255,255,255,.12) !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  color: rgba(255,255,255,.86) !important;
}

/* -----------------------------
   Price List Links (Discount / Surcharge)
   - Vivid in Light and clearly visible in Dark.
   - Scoped via .pl-link-badge so we don't affect all badges.
------------------------------ */

.pl-link-badge{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 680;
  letter-spacing: .01em;
  border-radius: 999px;
  padding: .28rem .55rem;
  line-height: 1.05;
  border: 1px solid rgba(0,0,0,.12);
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}

.pl-link-badge i{ opacity: .9; }

.pl-link-badge .pl-link-percent{
  font-variant-numeric: tabular-nums;
  padding: .10rem .40rem;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.18);
}

html:not([data-bs-theme="dark"]) .pl-link-badge--discount{
  background: rgba(220,53,69,.95) !important;
  color: #fff !important;
  border-color: rgba(220,53,69,.70) !important;
}
html:not([data-bs-theme="dark"]) .pl-link-badge--surcharge{
  background: rgba(25,135,84,.95) !important;
  color: #fff !important;
  border-color: rgba(25,135,84,.70) !important;
}
html:not([data-bs-theme="dark"]) .pl-link-badge--neutral{
  background: rgba(13,202,240,.95) !important;
  color: rgba(0,0,0,.78) !important;
  border-color: rgba(13,202,240,.70) !important;
}

html[data-bs-theme="dark"] .pl-link-badge{
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 1px 0 rgba(0,0,0,.35);
}
html[data-bs-theme="dark"] .pl-link-badge--discount{
  background: rgba(220,53,69,.96) !important;
  color: #fff !important;
}
html[data-bs-theme="dark"] .pl-link-badge--surcharge{
  background: rgba(25,135,84,.96) !important;
  color: #fff !important;
}
html[data-bs-theme="dark"] .pl-link-badge--neutral{
  background: rgba(13,202,240,.96) !important;
  color: rgba(0,0,0,.82) !important;
}

/* Outbound badges ("→ derivadas") a bit more subtle, but keep the % vivid */
html:not([data-bs-theme="dark"]) .pl-link-badge--out{
  filter: saturate(.92);
}
html[data-bs-theme="dark"] .pl-link-badge--out{
  filter: saturate(.92);
}


/* -----------------------------
   Price List Links (Indicator)
   - More intuitive: % + DESCUENTO / SOBRECARGO.
   - Works in Light and Dark.
------------------------------ */

.pl-link-indicator{
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem .45rem;
  padding: .10rem .05rem;
  line-height: 1.1;
}

.pl-link-indicator__icon{
  font-size: .95em;
  opacity: .92;
  transform: translateY(-.5px);
}

.pl-link-indicator__pct{
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  padding: .12rem .46rem;
  border-radius: 999px;
  color: #fff;
  line-height: 1;
  border: 1px solid rgba(0,0,0,.12);
  box-shadow: 0 1px 0 rgba(0,0,0,.10);
}

.pl-link-indicator__kind{
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .72rem;
}

.pl-link-indicator__of,
.pl-link-indicator__name{
  font-size: .86rem;
  opacity: .90;
}

.pl-link-indicator__of strong{ font-weight: 800; }

/* Compact variant for "→ derivadas" */
.pl-link-indicator--out{
  padding: 0;
  gap: .30rem .40rem;
}
.pl-link-indicator--out .pl-link-indicator__kind{
  font-size: .68rem;
  letter-spacing: .06em;
  opacity: .95;
}
.pl-link-indicator--out .pl-link-indicator__name{
  font-weight: 750;
  opacity: .95;
}

/* Color mapping (Light + Dark) */
.pl-link-indicator--discount .pl-link-indicator__pct{
  background: rgba(220,53,69,.98);
  border-color: rgba(220,53,69,.65);
}
.pl-link-indicator--discount .pl-link-indicator__kind,
.pl-link-indicator--discount .pl-link-indicator__icon{
  color: rgba(220,53,69,1);
}
.pl-link-indicator--discount .pl-link-indicator__of strong{
  color: rgba(220,53,69,1);
}

.pl-link-indicator--surcharge .pl-link-indicator__pct{
  background: rgba(25,135,84,.98);
  border-color: rgba(25,135,84,.65);
}
.pl-link-indicator--surcharge .pl-link-indicator__kind,
.pl-link-indicator--surcharge .pl-link-indicator__icon{
  color: rgba(25,135,84,1);
}
.pl-link-indicator--surcharge .pl-link-indicator__of strong{
  color: rgba(25,135,84,1);
}

.pl-link-indicator--neutral .pl-link-indicator__pct{
  background: rgba(108,117,125,.98);
  border-color: rgba(108,117,125,.65);
}
.pl-link-indicator--neutral .pl-link-indicator__kind,
.pl-link-indicator--neutral .pl-link-indicator__icon{
  color: rgba(108,117,125,1);
}
.pl-link-indicator--neutral .pl-link-indicator__of strong{
  color: rgba(108,117,125,1);
}

/* In dark theme, lift the label colors a bit for readability */
html[data-bs-theme="dark"] .pl-link-indicator__pct{
  border-color: rgba(255,255,255,.20);
  box-shadow: 0 1px 0 rgba(0,0,0,.40);
}

html[data-bs-theme="dark"] .pl-link-indicator--discount .pl-link-indicator__kind,
html[data-bs-theme="dark"] .pl-link-indicator--discount .pl-link-indicator__icon,
html[data-bs-theme="dark"] .pl-link-indicator--discount .pl-link-indicator__of strong{
  color: rgba(255,135,145,1);
}

html[data-bs-theme="dark"] .pl-link-indicator--surcharge .pl-link-indicator__kind,
html[data-bs-theme="dark"] .pl-link-indicator--surcharge .pl-link-indicator__icon,
html[data-bs-theme="dark"] .pl-link-indicator--surcharge .pl-link-indicator__of strong{
  color: rgba(110,220,170,1);
}

html[data-bs-theme="dark"] .pl-link-indicator--neutral .pl-link-indicator__kind,
html[data-bs-theme="dark"] .pl-link-indicator--neutral .pl-link-indicator__icon,
html[data-bs-theme="dark"] .pl-link-indicator--neutral .pl-link-indicator__of strong{
  color: rgba(200,205,210,1);
}


/* Express grid: header + derived rows must follow theme */
.expr-grid thead.expr-grid-head th{
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

html:not([data-bs-theme="dark"]) .expr-grid thead.expr-grid-head th{
  background: rgba(15,23,42,.04);
  color: rgba(15,23,42,.78);
}

html[data-bs-theme="dark"] .expr-grid thead.expr-grid-head th{
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.84);
  border-bottom-color: rgba(255,255,255,.10);
}

.expr-grid tbody tr.pl-derived-row{
  background: rgba(13,202,240,.06) !important;
}

html[data-bs-theme="dark"] .expr-grid tbody tr.pl-derived-row{
  background: rgba(13,202,240,.10) !important;
}

.expr-grid tbody tr.pl-derived-row input[disabled]{
  opacity: 1 !important;
}

html:not([data-bs-theme="dark"]) .expr-grid tbody tr.pl-derived-row input[disabled]{
  background: rgba(15,23,42,.04) !important;
  border-color: rgba(15,23,42,.10) !important;
  color: rgba(15,23,42,.78) !important;
}

html[data-bs-theme="dark"] .expr-grid tbody tr.pl-derived-row input[disabled]{
  background: rgba(255,255,255,.06) !important;
  border-color: rgba(255,255,255,.14) !important;
  color: rgba(255,255,255,.82) !important;
}

/* -----------------------------
   Buttons (Grid actions / Outline)
------------------------------ */

/* Fix the classic issue: outline-light in LIGHT becomes white-on-white */
html:not([data-bs-theme="dark"]) .btn-outline-light,
html:not([data-bs-theme="dark"]) .btn-outline-light.text-white{
  color: var(--br-btn-neutral-text) !important;
  border-color: var(--br-btn-neutral-border) !important;
  background-color: var(--br-btn-neutral-bg) !important;
}
html:not([data-bs-theme="dark"]) .btn-outline-light:hover{
  color: var(--br-btn-neutral-text) !important;
  border-color: var(--br-btn-neutral-hover-border) !important;
  background-color: var(--br-btn-neutral-hover-bg) !important;
}

/* Safety: if some grid buttons carry text-white in LIGHT, force readable text */
html:not([data-bs-theme="dark"]) .btn.text-white{
  /* Only neutralize white text when the background is light/transparent */
  color: var(--br-btn-neutral-text) !important;
}
html:not([data-bs-theme="dark"]) .btn[class*="btn-outline-"] .text-white{
  color: var(--br-btn-neutral-text) !important;
}
html:not([data-bs-theme="dark"]) .btn[class*="btn-outline-"].text-white{
  color: var(--br-btn-neutral-text) !important;
}

/* Outline secondary in LIGHT should not go ghost */
html:not([data-bs-theme="dark"]) .btn-outline-secondary{
  color: rgba(15,23,42,.74) !important;
  border-color: rgba(15,23,42,.16) !important;
}
html:not([data-bs-theme="dark"]) .btn-outline-secondary:hover{
  color: rgba(15,23,42,.86) !important;
  background: rgba(15,23,42,.06) !important;
  border-color: rgba(15,23,42,.22) !important;
}

/* In tables: keep action buttons subtle (avoid neon outlines) */
.table .btn-outline-primary,
.table .btn-outline-info,
.table .btn-outline-secondary{
  background: transparent !important;
  border-color: var(--br-btn-neutral-border) !important;
  color: var(--br-btn-neutral-text) !important;
}
.table .btn-outline-primary:hover,
.table .btn-outline-info:hover,
.table .btn-outline-secondary:hover{
  background: var(--br-btn-neutral-hover-bg) !important;
  border-color: var(--br-btn-neutral-hover-border) !important;
  color: var(--br-btn-neutral-text) !important;
}

/* Dark: keep outline buttons readable and not too harsh */
html[data-bs-theme="dark"] .btn-outline-primary{
  border-color: rgba(var(--app-primary-rgb), .40) !important;
  color: rgba(var(--app-primary-rgb), .95) !important;
  background: rgba(var(--app-primary-rgb), .08) !important;
}
html[data-bs-theme="dark"] .btn-outline-primary:hover{
  border-color: rgba(var(--app-primary-rgb), .55) !important;
  background: rgba(var(--app-primary-rgb), .14) !important;
}

/* Ensure disabled buttons remain readable */
.btn:disabled, .btn.disabled{
  opacity: .55 !important;
}

/* -----------------------------
   Tables / Grids (text contrast)
------------------------------ */
.table thead th{
  color: var(--bs-body-color) !important;
}

.pl-link-badge--out{
  opacity: .92;
}

/* -----------------------------
   Express Price Grid (Lists)
   - Header follows theme
   - Derived rows are distinguishable in Light/Dark
------------------------------ */

.expr-grid thead.expr-grid-head th{
  border-bottom: 1px solid rgba(0,0,0,.10);
}

html:not([data-bs-theme="dark"]) .expr-grid thead.expr-grid-head th{
  background: rgba(15,23,42,.04);
  color: rgba(15,23,42,.78);
}

html[data-bs-theme="dark"] .expr-grid thead.expr-grid-head th{
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.84);
  border-bottom-color: rgba(255,255,255,.14);
}

html:not([data-bs-theme="dark"]) .expr-grid{
  --pl-derived-row-bg: rgba(13,202,240,.06);
}
html[data-bs-theme="dark"] .expr-grid{
  --pl-derived-row-bg: rgba(13,202,240,.12);
}

.expr-grid tbody tr.pl-derived-row > *{
  background: var(--pl-derived-row-bg) !important;
}

/* Disabled inputs in derived rows: keep readable */
.expr-grid tbody tr.pl-derived-row input[disabled]{
  opacity: 1 !important;
  cursor: not-allowed;
}
html:not([data-bs-theme="dark"]) .expr-grid tbody tr.pl-derived-row input[disabled]{
  background: rgba(255,255,255,.75) !important;
  border-color: rgba(15,23,42,.18) !important;
  color: rgba(15,23,42,.78) !important;
}
html[data-bs-theme="dark"] .expr-grid tbody tr.pl-derived-row input[disabled]{
  background: rgba(0,0,0,.28) !important;
  border-color: rgba(255,255,255,.14) !important;
  color: rgba(255,255,255,.86) !important;
}

/* -----------------------------
   Express: Costo con/sin IVA (integrado al campo)
   - Se muestra como "con IVA" / "sin IVA" dentro del input-group
------------------------------ */

.expr-cost-vat-tag{
  font-weight: 700;
  letter-spacing: .2px;
  text-transform: none;
  min-width: 88px;
  justify-content: center;
}

/* Light */
html:not([data-bs-theme="dark"]) .expr-cost-vat-tag--on{
  color: rgba(25,135,84,.92);
  background: rgba(25,135,84,.10);
  border-color: rgba(25,135,84,.22);
}
html:not([data-bs-theme="dark"]) .expr-cost-vat-tag--off{
  color: rgba(108,117,125,.92);
  background: rgba(108,117,125,.10);
  border-color: rgba(108,117,125,.22);
}

/* Dark */
html[data-bs-theme="dark"] .expr-cost-vat-tag--on{
  color: rgba(170,242,210,.95);
  background: rgba(25,135,84,.22);
  border-color: rgba(25,135,84,.42);
}
html[data-bs-theme="dark"] .expr-cost-vat-tag--off{
  color: rgba(226,232,240,.86);
  background: rgba(148,163,184,.16);
  border-color: rgba(148,163,184,.28);
}

/* -----------------------------
   Definiciones: editor collapse estilo "cortina"
------------------------------ */

.pl-edit-row td{
  padding: 0 !important;
  border-top: 0;
}

.price-list-editor{
  will-change: height, opacity, transform;
}

.price-list-editor.collapse{
  transition: height .24s ease, opacity .24s ease, transform .24s ease;
}

.price-list-editor.collapsing{
  opacity: .08;
  transform: translateY(-6px);
}

.price-list-editor.collapse.show{
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .price-list-editor.collapse,
  .price-list-editor.collapsing{
    transition: none !important;
    transform: none !important;
  }
}

/* =========================
   SweetAlert2 (minimal + theme-aware)
   ========================= */
.swal2-container{ padding: 1rem; }

.swal2-popup.bravo-swal{
  border: 1px solid var(--app-border);
  border-radius: 18px;
  padding: 1.05rem 1.15rem;
  box-shadow: 0 14px 40px rgba(0,0,0,.22);
  font-family: inherit;
}

[data-bs-theme="light"] .swal2-popup.bravo-swal{
  background: #ffffff;
  color: #111827;
}

[data-bs-theme="dark"] .swal2-popup.bravo-swal{
  background: rgba(18, 20, 26, .98);
  color: var(--app-text, #e7eaf0);
}

.swal2-popup.bravo-swal .swal2-title.bravo-swal-title{
  font-size: 1.05rem;
  font-weight: 850;
  margin: .1rem 0 .35rem;
}

.swal2-popup.bravo-swal .swal2-html-container.bravo-swal-html{
  font-size: .95rem;
  line-height: 1.35;
  margin: 0;
  padding: 0;
  color: var(--app-text-muted, rgba(255,255,255,.72));
}

[data-bs-theme="light"] .swal2-popup.bravo-swal .swal2-html-container.bravo-swal-html{
  color: #4b5563;
}

.swal2-popup.bravo-swal .swal2-icon{
  margin: .35rem auto .25rem;
}

.swal2-popup.bravo-swal .swal2-actions.bravo-swal-actions{
  margin-top: .95rem;
}

.bravo-swal-list{
  text-align: left;
  margin: .75rem 0 0;
  padding-left: 1.1rem;
}

.bravo-swal-list li{ margin: .15rem 0; }

/* Toast */
.swal2-popup.bravo-swal.bravo-swal-toast{
  border-radius: 14px;
  padding: .75rem .9rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

.swal2-popup.bravo-swal.bravo-swal-toast .swal2-title{
  font-size: .95rem;
  font-weight: 800;
}

.swal2-popup.bravo-swal.bravo-swal-toast .swal2-icon{
  margin: 0 .5rem 0 0;
  transform: scale(.85);
}

@media (prefers-reduced-motion: reduce) {
  .swal2-popup.bravo-swal,
  .swal2-popup.bravo-swal.bravo-swal-toast{
    transition: none !important;
  }
}
