/* ==========================================================
   DUOVOX THEME SYSTEM V3 STABLE
   Correcciones explícitas por ruta
   Solo afecta el tema claro
   ========================================================== */


/* ==========================================================
   PALETA GENERAL Y BOTONES
   ========================================================== */

html[data-theme="light"]{
  --dvx-light-primary:#5b5bd6;
  --dvx-light-primary-hover:#4848ba;
  --dvx-light-primary-soft:#eeeeff;

  --dvx-light-page:#f3f6fb;
  --dvx-light-surface:#ffffff;
  --dvx-light-surface-soft:#f8fafc;

  --dvx-light-text:#172033;
  --dvx-light-muted:#64748b;
  --dvx-light-border:#dbe3ee;
}

html[data-theme="light"] .btn-primary,
html[data-theme="light"] .duovox-theme-choice.is-active,
html[data-theme="light"] .duovox-primary-action{
  background:#5b5bd6 !important;
  border-color:#5b5bd6 !important;
  color:#ffffff !important;

  box-shadow:
    0 9px 20px rgba(91,91,214,.20)
    !important;
}

html[data-theme="light"] .btn-primary:hover,
html[data-theme="light"] .btn-primary:focus,
html[data-theme="light"] .duovox-primary-action:hover{
  background:#4848ba !important;
  border-color:#4848ba !important;
  color:#ffffff !important;
}

html[data-theme="light"] .btn-success{
  background:#16a34a !important;
  border-color:#16a34a !important;
  color:#ffffff !important;
}

html[data-theme="light"] .btn-danger{
  background:#dc3545 !important;
  border-color:#dc3545 !important;
  color:#ffffff !important;
}

html[data-theme="light"] .btn-warning{
  background:#d97706 !important;
  border-color:#d97706 !important;
  color:#ffffff !important;
}

html[data-theme="light"] .btn-info{
  background:#0284c7 !important;
  border-color:#0284c7 !important;
  color:#ffffff !important;
}

html[data-theme="light"]:is(
  .btn-outline-primary,
  .btn-outline-secondary,
  .btn-outline-dark
){
  background:#ffffff !important;
  border-color:#cbd5e1 !important;
  color:#334155 !important;
}

html[data-theme="light"]:is(
  .btn-outline-primary,
  .btn-outline-secondary,
  .btn-outline-dark
):hover{
  background:#eeeeff !important;
  border-color:#b8b8ee !important;
  color:#4242a8 !important;
}


/* ==========================================================
   BADGES, VIÑETAS, CHIPS Y NÚMEROS
   ========================================================== */

html[data-theme="light"] .content
:is(
  .pill,
  .status-pill,
  .soft-badge,
  [class*="soft-badge"],
  [class*="metric-badge"],
  [class*="stock-badge"],
  [class*="margin-badge"]
){
  background:#e9e7ff !important;
  border:1px solid #d4d0ff !important;
  color:#4c3f91 !important;
  opacity:1 !important;
  text-shadow:none !important;
}

html[data-theme="light"] .content
:is(
  .pill,
  .status-pill,
  .soft-badge,
  [class*="soft-badge"],
  [class*="metric-badge"],
  [class*="stock-badge"],
  [class*="margin-badge"]
)
*{
  color:#4c3f91 !important;
  opacity:1 !important;
}

html[data-theme="light"] .content
:is(
  .bg-success,
  .text-bg-success,
  [class*="badge-success"],
  [class*="status-success"]
){
  background:#dcfce7 !important;
  border-color:#86efac !important;
  color:#166534 !important;
}

html[data-theme="light"] .content
:is(
  .bg-danger,
  .text-bg-danger,
  [class*="badge-danger"],
  [class*="status-danger"]
){
  background:#fee2e2 !important;
  border-color:#fca5a5 !important;
  color:#991b1b !important;
}

html[data-theme="light"] .content
:is(
  .bg-warning,
  .text-bg-warning,
  [class*="badge-warning"],
  [class*="status-warning"]
){
  background:#fef3c7 !important;
  border-color:#fcd34d !important;
  color:#92400e !important;
}


/* ==========================================================
   FOOTER INTERNO
   ========================================================== */

html[data-theme="light"] footer,
html[data-theme="light"] .duovox-footer,
html[data-theme="light"] .app-footer,
html[data-theme="light"] .main-footer{
  background:
    linear-gradient(
      180deg,
      #f7f5ff,
      #f1f4fa
    ) !important;

  color:#475569 !important;
  border-top:1px solid #d9d5f5 !important;
  box-shadow:none !important;
}

html[data-theme="light"] footer *,
html[data-theme="light"] .duovox-footer *,
html[data-theme="light"] .app-footer *,
html[data-theme="light"] .main-footer *{
  color:#475569 !important;
  text-shadow:none !important;
}

html[data-theme="light"] footer a,
html[data-theme="light"] .duovox-footer a{
  color:#4f46c8 !important;
}

html[data-theme="light"] footer img,
html[data-theme="light"] .duovox-footer img{
  filter:
    brightness(.30)
    contrast(1.15)
    saturate(.75)
    !important;
}


/* ==========================================================
   PROMOCIONES — SIN FLASH OSCURO
   ========================================================== */

html[data-theme="light"][data-duovox-page="promotions"]
.content
:is(
  select[multiple],
  #productList,
  #productsList,
  #promotionProducts,
  [class*="promotion-products"],
  [class*="product-selector"],
  [class*="product-list"],
  [class*="products-list"],
  [class*="product-options"],
  [class*="selection-list"]
){
  background:#ffffff !important;
  color:#172033 !important;

  border:
    1px solid #cbd5e1
    !important;

  box-shadow:
    inset 0 1px 2px rgba(15,23,42,.03)
    !important;
}

html[data-theme="light"][data-duovox-page="promotions"]
.content
:is(
  select[multiple],
  #productList,
  #productsList,
  #promotionProducts,
  [class*="promotion-products"],
  [class*="product-selector"],
  [class*="product-list"],
  [class*="products-list"],
  [class*="product-options"],
  [class*="selection-list"]
)
*{
  color:#334155 !important;
}

html[data-theme="light"][data-duovox-page="promotions"]
.content
:is(
  [class*="product-row"],
  [class*="product-option"],
  option
){
  background:#ffffff !important;
  color:#334155 !important;
  border-bottom-color:#e2e8f0 !important;
}

html[data-theme="light"][data-duovox-page="promotions"]
.content
:is(
  [class*="product-row"],
  [class*="product-option"],
  option
):hover{
  background:#f1f0ff !important;
}


/* ==========================================================
   CAJA Y CIERRE DE CAJA
   ========================================================== */

html[data-theme="light"]:is(
  [data-duovox-page="cash"],
  [data-duovox-page="cash-close"]
){
  --dvx-night:#f3f6fb !important;
  --dvx-panel:#ffffff !important;
  --dvx-panel-2:#f8fafc !important;
  --dvx-border:#dbe3ee !important;
  --dvx-line:#dbe3ee !important;
  --dvx-line-strong:#cbd5e1 !important;
  --dvx-text:#172033 !important;
  --dvx-muted:#64748b !important;
  --dvx-muted-2:#7b8aa0 !important;
}

html[data-theme="light"]:is(
  [data-duovox-page="cash"],
  [data-duovox-page="cash-close"]
)
.content{
  color:#172033 !important;
}

html[data-theme="light"]:is(
  [data-duovox-page="cash"],
  [data-duovox-page="cash-close"]
)
.content
:is(
  section,
  article,
  div
)[class*="cash-"]:not([class*="icon"]):not([class*="badge"]):not([class*="btn"]),

html[data-theme="light"]:is(
  [data-duovox-page="cash"],
  [data-duovox-page="cash-close"]
)
.content
:is(
  section,
  article,
  div
)[class*="dvx-"]:not([class*="icon"]):not([class*="badge"]):not([class*="btn"]),

html[data-theme="light"]:is(
  [data-duovox-page="cash"],
  [data-duovox-page="cash-close"]
)
.content
:is(
  .cash-box,
  .cash-card,
  .cash-panel,
  .cash-summary,
  .cash-history,
  .metric-card,
  .summary-card,
  .close-card
){
  background:
    linear-gradient(
      180deg,
      #ffffff,
      #f8fafc
    ) !important;

  color:#172033 !important;
  border-color:#dbe3ee !important;

  box-shadow:
    0 12px 28px rgba(15,23,42,.07)
    !important;
}

html[data-theme="light"]:is(
  [data-duovox-page="cash"],
  [data-duovox-page="cash-close"]
)
.content
:is(
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  [class*="title"],
  [class*="value"],
  [class*="amount"],
  [class*="total"],
  [class*="label"]
):not(.btn):not([class*="btn"]){
  color:#172033 !important;
  text-shadow:none !important;
  opacity:1 !important;
}

html[data-theme="light"]:is(
  [data-duovox-page="cash"],
  [data-duovox-page="cash-close"]
)
.content
:is(
  p,
  small,
  .small,
  .text-muted,
  [class*="subtitle"],
  [class*="description"],
  [class*="meta"]
){
  color:#64748b !important;
  opacity:1 !important;
}

html[data-theme="light"]:is(
  [data-duovox-page="cash"],
  [data-duovox-page="cash-close"]
)
.content
.table-responsive{
  background:#ffffff !important;
  border-color:#dbe3ee !important;
}

html[data-theme="light"]:is(
  [data-duovox-page="cash"],
  [data-duovox-page="cash-close"]
)
.content
.table{
  --bs-table-bg:transparent !important;
  --bs-table-color:#243047 !important;
  color:#243047 !important;
}

html[data-theme="light"]:is(
  [data-duovox-page="cash"],
  [data-duovox-page="cash-close"]
)
.content
.table > :not(caption) > * > *{
  background:transparent !important;
  color:#243047 !important;
  border-bottom-color:#e2e8f0 !important;
}

/* Acciones rápidas */

html[data-theme="light"][data-duovox-page="cash"]
.content
:is(
  [class*="quick-action"],
  [class*="action-card"],
  [class*="shortcut"]
){
  background:#ffffff !important;
  color:#172033 !important;
  border-color:#dbe3ee !important;
}

/* Botón cerrar caja */

html[data-theme="light"]:is(
  [data-duovox-page="cash"],
  [data-duovox-page="cash-close"]
)
.content
:is(
  [class*="close-cash"],
  [class*="cash-close"],
  .btn-danger
){
  background:#dc3545 !important;
  border-color:#dc3545 !important;
  color:#ffffff !important;
}

html[data-theme="light"]:is(
  [data-duovox-page="cash"],
  [data-duovox-page="cash-close"]
)
.content
:is(
  [class*="close-cash"],
  [class*="cash-close"],
  .btn-danger
)
*{
  color:#ffffff !important;
}


/* ==========================================================
   NUEVA VENTA / POS
   ========================================================== */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
.content
button:not(.btn-primary)
:not(.btn-success)
:not(.btn-danger)
:not(.btn-warning)
:not(.v3-submit)
:not([class*="submit"])
:not([class*="selected"])
:not(.active)
:not(.is-active)
:not([aria-selected="true"])
:not([aria-pressed="true"]){
  background:#f8fafc !important;
  color:#334155 !important;
  border-color:#cbd5e1 !important;
  box-shadow:none !important;
}

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
.content
button:is(
  .active,
  .is-active,
  .v3-payment-selected,
  [class*="selected"],
  [aria-selected="true"],
  [aria-pressed="true"]
){
  background:#5b5bd6 !important;
  color:#ffffff !important;
  border-color:#5b5bd6 !important;
}

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
.content
:is(
  [class*="customer-option"],
  [class*="client-option"],
  [class*="sale-tab"],
  [class*="counter-tab"],
  [class*="open-sale"]
){
  background:#f8fafc !important;
  color:#334155 !important;
  border-color:#cbd5e1 !important;
}

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
.content
:is(
  [class*="customer-option"],
  [class*="client-option"],
  [class*="sale-tab"],
  [class*="counter-tab"],
  [class*="open-sale"]
).active{
  background:#5b5bd6 !important;
  color:#ffffff !important;
}


/* ==========================================================
   RESUMEN SUCURSALES, BACKUPS Y DETALLE DE VENTA
   ========================================================== */

html[data-theme="light"]:is(
  [data-duovox-page="branch-summary"],
  [data-duovox-page="backups"],
  [data-duovox-page="sale-detail"],
  [data-duovox-page="product-edit"]
)
.content
:is(
  section,
  article,
  div
)[class*="summary"]:not([class*="badge"]):not([class*="btn"]),

html[data-theme="light"]:is(
  [data-duovox-page="branch-summary"],
  [data-duovox-page="backups"],
  [data-duovox-page="sale-detail"],
  [data-duovox-page="product-edit"]
)
.content
:is(
  section,
  article,
  div
)[class*="panel"]:not([class*="badge"]):not([class*="btn"]),

html[data-theme="light"]:is(
  [data-duovox-page="branch-summary"],
  [data-duovox-page="backups"],
  [data-duovox-page="sale-detail"],
  [data-duovox-page="product-edit"]
)
.content
:is(
  section,
  article,
  div
)[class*="card"]:not([class*="badge"]):not([class*="btn"]){
  background:
    linear-gradient(
      180deg,
      #ffffff,
      #f8fafc
    ) !important;

  color:#172033 !important;
  border-color:#dbe3ee !important;

  box-shadow:
    0 12px 28px rgba(15,23,42,.07)
    !important;
}


/* Stock de producto */

html[data-theme="light"][data-duovox-page="product-edit"]
.content
:is(
  [class*="stock-card"],
  [class*="branch-stock"],
  [class*="stock-summary"],
  [class*="stock-total"]
){
  background:
    linear-gradient(
      135deg,
      #ffffff,
      #f1f0ff
    ) !important;

  color:#172033 !important;
  border-color:#c9c5ef !important;
}

html[data-theme="light"][data-duovox-page="product-edit"]
.content
:is(
  [class*="stock-card"],
  [class*="branch-stock"],
  [class*="stock-summary"],
  [class*="stock-total"]
)
*{
  color:#334155 !important;
}


/* ==========================================================
   CONFIGURACIÓN CRM
   ========================================================== */

html[data-theme="light"][data-duovox-page="crm-config"]
.content
:is(
  [class*="critical-actions"],
  [class*="danger-zone"],
  [class*="reset-zone"]
){
  background:#fff7f7 !important;
  color:#7f1d1d !important;
  border-color:#fecaca !important;
}

html[data-theme="light"][data-duovox-page="crm-config"]
.content
:is(
  [class*="login-preview"],
  [id*="login-preview"],
  [class*="preview-login"]
){
  background:
    linear-gradient(
      135deg,
      #183b63,
      #285985
    ) !important;

  color:#ffffff !important;
}


/* ==========================================================
   CONTROLES Y SCROLL
   ========================================================== */

html[data-theme="light"] .content
::-webkit-scrollbar-track{
  background:#f1f5f9;
}

html[data-theme="light"] .content
::-webkit-scrollbar-thumb{
  background:#b8c2d0;
  border-radius:999px;
}

html[data-theme="light"] ::selection{
  background:rgba(91,91,214,.20);
  color:#172033;
}

@media print{
  .duovox-theme-switch{
    display:none !important;
  }
}


/* ==========================================================
   DUOVOX PRODUCTS BUTTON SYSTEM V33 FIXED
   Jerarquía exclusiva de Productos en tema claro
   ========================================================== */

html[data-theme="light"][data-duovox-page="products"]
.content
:is(
  .dvx-action-primary,
  .dvx-action-secondary,
  .dvx-action-success,
  .dvx-action-warning-outline,
  .dvx-action-warning-solid
){
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:7px !important;

  min-height:42px !important;
  padding:9px 16px !important;

  border-radius:14px !important;

  font-size:14px !important;
  font-weight:850 !important;
  line-height:1.1 !important;
  text-decoration:none !important;
  white-space:nowrap !important;

  text-shadow:none !important;

  transition:
    transform .15s ease,
    background-color .15s ease,
    border-color .15s ease,
    box-shadow .15s ease
    !important;
}

html[data-theme="light"][data-duovox-page="products"]
.content
:is(
  .dvx-action-primary,
  .dvx-action-secondary,
  .dvx-action-success,
  .dvx-action-warning-outline,
  .dvx-action-warning-solid
):hover{
  transform:translateY(-1px) !important;
}


/* Acción principal */

html[data-theme="light"][data-duovox-page="products"]
.content .dvx-action-primary{
  background:#4f46e5 !important;
  border:1px solid #4f46e5 !important;
  color:#ffffff !important;

  box-shadow:
    0 8px 18px rgba(79,70,229,.19)
    !important;
}

html[data-theme="light"][data-duovox-page="products"]
.content .dvx-action-primary:hover,
html[data-theme="light"][data-duovox-page="products"]
.content .dvx-action-primary:focus{
  background:#4338ca !important;
  border-color:#4338ca !important;
  color:#ffffff !important;

  box-shadow:
    0 10px 22px rgba(67,56,202,.23)
    !important;
}


/* Acción secundaria */

html[data-theme="light"][data-duovox-page="products"]
.content .dvx-action-secondary{
  background:#ffffff !important;
  border:1px solid #cbd5e1 !important;
  color:#334155 !important;
  box-shadow:none !important;
}

html[data-theme="light"][data-duovox-page="products"]
.content .dvx-action-secondary:hover,
html[data-theme="light"][data-duovox-page="products"]
.content .dvx-action-secondary:focus{
  background:#f8fafc !important;
  border-color:#94a3b8 !important;
  color:#172033 !important;
}


/* Advertencias secundarias */

html[data-theme="light"][data-duovox-page="products"]
.content .dvx-action-warning-outline{
  background:#fffbeb !important;
  border:1px solid #f59e0b !important;
  color:#92400e !important;
  box-shadow:none !important;
}

html[data-theme="light"][data-duovox-page="products"]
.content .dvx-action-warning-outline:hover,
html[data-theme="light"][data-duovox-page="products"]
.content .dvx-action-warning-outline:focus{
  background:#fef3c7 !important;
  border-color:#d97706 !important;
  color:#78350f !important;
}


/* Exportación */

html[data-theme="light"][data-duovox-page="products"]
.content .dvx-action-success{
  background:#16a34a !important;
  border:1px solid #16a34a !important;
  color:#ffffff !important;

  box-shadow:
    0 8px 18px rgba(22,163,74,.18)
    !important;
}

html[data-theme="light"][data-duovox-page="products"]
.content .dvx-action-success:hover,
html[data-theme="light"][data-duovox-page="products"]
.content .dvx-action-success:focus{
  background:#15803d !important;
  border-color:#15803d !important;
  color:#ffffff !important;
}


/* Acción masiva sensible */

html[data-theme="light"][data-duovox-page="products"]
.content .dvx-action-warning-solid{
  background:#d97706 !important;
  border:1px solid #d97706 !important;
  color:#ffffff !important;

  box-shadow:
    0 8px 18px rgba(217,119,6,.19)
    !important;
}

html[data-theme="light"][data-duovox-page="products"]
.content .dvx-action-warning-solid:hover,
html[data-theme="light"][data-duovox-page="products"]
.content .dvx-action-warning-solid:focus{
  background:#b45309 !important;
  border-color:#b45309 !important;
  color:#ffffff !important;
}


/* Íconos y elementos internos */

html[data-theme="light"][data-duovox-page="products"]
.content
:is(
  .dvx-action-primary,
  .dvx-action-secondary,
  .dvx-action-success,
  .dvx-action-warning-outline,
  .dvx-action-warning-solid
)
*{
  color:inherit !important;
}


/* ==========================================================
   DUOVOX THEME FINAL LIGHT V34 FIXED
   Caja · Cierre · Alertas · Backups · Config · Permisos · POS
   Solo tema claro — El 24 TEST
   ========================================================== */


/* ==========================================================
   ALERTAS Y CONFIRMACIONES GLOBALES
   ========================================================== */

html[data-theme="light"] .duovox-toast{
  background:#ffffff !important;
  color:#172033 !important;
  border:1px solid #dbe3ee !important;
  box-shadow:0 18px 46px rgba(15,23,42,.18) !important;
}

html[data-theme="light"] .duovox-toast-danger{
  background:#fff1f2 !important;
  border-color:#fda4af !important;
}

html[data-theme="light"] .duovox-toast-warning{
  background:#fffbeb !important;
  border-color:#fcd34d !important;
}

html[data-theme="light"] .duovox-toast-success{
  background:#ecfdf5 !important;
  border-color:#86efac !important;
}

html[data-theme="light"] .duovox-toast-info{
  background:#eff6ff !important;
  border-color:#93c5fd !important;
}

html[data-theme="light"] .duovox-toast-primary{
  background:#eef2ff !important;
  border-color:#a5b4fc !important;
}

html[data-theme="light"] .duovox-toast-title{
  color:#172033 !important;
  opacity:1 !important;
}

html[data-theme="light"] .duovox-toast-message{
  color:#475569 !important;
  opacity:1 !important;
  font-weight:650 !important;
}

html[data-theme="light"] .duovox-toast-danger .duovox-toast-message{
  color:#881337 !important;
}

html[data-theme="light"] .duovox-toast-warning .duovox-toast-message{
  color:#78350f !important;
}

html[data-theme="light"] .duovox-toast-success .duovox-toast-message{
  color:#14532d !important;
}

html[data-theme="light"] .duovox-toast-info .duovox-toast-message{
  color:#1e3a8a !important;
}

html[data-theme="light"] .duovox-toast-close{
  color:#475569 !important;
}

html[data-theme="light"] .duovox-toast-close:hover{
  background:rgba(15,23,42,.07) !important;
  color:#172033 !important;
}

html[data-theme="light"] .duovox-confirm-modal{
  background:#ffffff !important;
  color:#172033 !important;
  border-color:#dbe3ee !important;
}

html[data-theme="light"] .duovox-confirm-title{
  color:#172033 !important;
}

html[data-theme="light"] .duovox-confirm-body{
  color:#475569 !important;
}

html[data-theme="light"] .duovox-confirm-backdrop{
  background:rgba(15,23,42,.38) !important;
}

html[data-theme="light"] .modal-backdrop.show{
  opacity:.38 !important;
}


/* ==========================================================
   CAJA
   ========================================================== */

html[data-theme="light"][data-duovox-page="cash"] body{
  background:#f3f6fb !important;
  color:#172033 !important;
}

html[data-theme="light"][data-duovox-page="cash"]
.cash-pro-shell{
  background:
    radial-gradient(
      circle at 10% 0%,
      rgba(79,70,229,.07),
      transparent 28%
    ),
    linear-gradient(180deg,#f8fafc,#eef2f7)
    !important;

  color:#172033 !important;
  border-color:#dbe3ee !important;
  box-shadow:0 18px 46px rgba(15,23,42,.09) !important;
}

html[data-theme="light"][data-duovox-page="cash"]
:is(
  .cash-topbar,
  .cash-kpi,
  .cash-dark-card,
  .cash-info
){
  background:#ffffff !important;
  color:#172033 !important;
  border-color:#dbe3ee !important;
  box-shadow:0 12px 28px rgba(15,23,42,.07) !important;
}

html[data-theme="light"][data-duovox-page="cash"]
:is(
  .cash-brand-block,
  .cash-top-item,
  .quick-action
){
  background:#f8fafc !important;
  color:#172033 !important;
  border-color:#e2e8f0 !important;
}

html[data-theme="light"][data-duovox-page="cash"]
:is(
  .cash-title,
  .cash-card-title,
  .cash-info-title,
  .cash-kpi-value,
  .cash-top-value,
  .history-id,
  .history-money
){
  color:#172033 !important;
  text-shadow:none !important;
}

html[data-theme="light"][data-duovox-page="cash"]
:is(
  .cash-subtitle,
  .cash-card-sub,
  .cash-info-copy,
  .cash-kpi-meta,
  .cash-kpi-label,
  .cash-top-kicker,
  .cash-top-meta,
  .history-date
){
  color:#64748b !important;
  opacity:1 !important;
}

html[data-theme="light"][data-duovox-page="cash"]
.cash-main-action{
  background:#16a34a !important;
  border:1px solid #16a34a !important;
  color:#ffffff !important;
  box-shadow:0 10px 22px rgba(22,163,74,.20) !important;
}

html[data-theme="light"][data-duovox-page="cash"]
.cash-main-action.danger-action{
  background:#dc2626 !important;
  border-color:#dc2626 !important;
  color:#ffffff !important;
  box-shadow:0 10px 22px rgba(220,38,38,.20) !important;
}

html[data-theme="light"][data-duovox-page="cash"]
.cash-mini-btn{
  background:#ffffff !important;
  border:1px solid #cbd5e1 !important;
  color:#4338ca !important;
  box-shadow:none !important;
}

html[data-theme="light"][data-duovox-page="cash"]
.cash-table{
  background:#ffffff !important;
  color:#243047 !important;
  border-color:#dbe3ee !important;
}

html[data-theme="light"][data-duovox-page="cash"]
.cash-table thead th{
  background:#f4f6fa !important;
  color:#526077 !important;
  border-color:#dbe3ee !important;
}

html[data-theme="light"][data-duovox-page="cash"]
.cash-table tbody td{
  background:#ffffff !important;
  color:#243047 !important;
  border-color:#e2e8f0 !important;
}

html[data-theme="light"][data-duovox-page="cash"]
.cash-table tbody tr:hover td{
  background:#f8fafc !important;
}

html[data-theme="light"][data-duovox-page="cash"]
.cash-pill{
  background:#eef2ff !important;
  border-color:#c7d2fe !important;
  color:#3730a3 !important;
}

html[data-theme="light"][data-duovox-page="cash"]
.cash-pill.open{
  background:#dcfce7 !important;
  border-color:#86efac !important;
  color:#166534 !important;
}

html[data-theme="light"][data-duovox-page="cash"]
.cash-pill.closed{
  background:#fee2e2 !important;
  border-color:#fca5a5 !important;
  color:#991b1b !important;
}

html[data-theme="light"][data-duovox-page="cash"]
.amount-pos{
  color:#15803d !important;
}

html[data-theme="light"][data-duovox-page="cash"]
.amount-neg{
  color:#b91c1c !important;
}

html[data-theme="light"][data-duovox-page="cash"]
.amount-neutral{
  color:#334155 !important;
}


/* ==========================================================
   CIERRE DE CAJA
   ========================================================== */

html[data-theme="light"][data-duovox-page="cash-close"] body{
  background:linear-gradient(180deg,#f3f6fb,#eef2f7) !important;
  color:#172033 !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body .close-hero{
  background:
    radial-gradient(
      circle at 92% 0%,
      rgba(79,70,229,.10),
      transparent 30%
    ),
    linear-gradient(135deg,#ffffff,#eef2ff)
    !important;

  color:#172033 !important;
  border-color:#c7d2fe !important;
  box-shadow:0 16px 38px rgba(15,23,42,.09) !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body .close-hero h2{
  color:#172033 !important;
  text-shadow:none !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body .close-hero p{
  color:#526077 !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm
:is(
  .close-card,
  .metric-card,
  .bill-card,
  .summary-box,
  .alert.alert-light,
  .table-responsive
){
  background:#ffffff !important;
  color:#172033 !important;
  border-color:#dbe3ee !important;
  box-shadow:0 12px 28px rgba(15,23,42,.07) !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm
:is(
  h5,
  .fw-bold,
  .form-label,
  .section-title,
  .metric-value,
  .metric-value-sm,
  .bill-title,
  .summary-row strong,
  .bill-card strong
){
  color:#172033 !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm
:is(
  .text-muted,
  .text-muted-2,
  .form-text,
  .small,
  .metric-label,
  .bill-sub,
  .summary-row span
){
  color:#64748b !important;
  opacity:1 !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm
:is(
  .count-input,
  #counted_cash,
  #close_note,
  #whatsapp_number,
  .form-control,
  .form-select
){
  background:#ffffff !important;
  color:#172033 !important;
  border-color:#cbd5e1 !important;
  box-shadow:none !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm .form-control::placeholder{
  color:#94a3b8 !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm .metric-success .metric-value{
  color:#15803d !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm .metric-danger .metric-value{
  color:#b91c1c !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm .metric-neutral .metric-value{
  color:#1d4ed8 !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm .badge.text-bg-primary{
  background:#e0e7ff !important;
  border:1px solid #a5b4fc !important;
  color:#3730a3 !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm .badge.text-bg-secondary{
  background:#f1f5f9 !important;
  border:1px solid #cbd5e1 !important;
  color:#475569 !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm .badge.text-bg-danger{
  background:#fee2e2 !important;
  border:1px solid #fca5a5 !important;
  color:#991b1b !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm .badge.text-bg-success{
  background:#dcfce7 !important;
  border:1px solid #86efac !important;
  color:#166534 !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm .payment-badge{
  background:#eef2ff !important;
  border:1px solid #c7d2fe !important;
  color:#3730a3 !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm .table{
  --bs-table-bg:transparent !important;
  --bs-table-color:#243047 !important;
  color:#243047 !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm .table thead th{
  background:#f4f6fa !important;
  color:#526077 !important;
  border-color:#dbe3ee !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm .table tbody td{
  background:#ffffff !important;
  color:#243047 !important;
  border-color:#e2e8f0 !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm .difference-panel.zero{
  background:#f1f5f9 !important;
  border-color:#cbd5e1 !important;
  color:#334155 !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm .difference-panel.positive{
  background:#dcfce7 !important;
  border-color:#86efac !important;
  color:#166534 !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm .difference-panel.negative{
  background:#fee2e2 !important;
  border-color:#fca5a5 !important;
  color:#991b1b !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm .difference-big,
html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm .difference-panel .small{
  color:inherit !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm #openConfirmModalBtn{
  background:#dc2626 !important;
  border:1px solid #dc2626 !important;
  color:#ffffff !important;
  box-shadow:0 10px 22px rgba(220,38,38,.20) !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #cashCloseForm .btn-outline-secondary{
  background:#ffffff !important;
  color:#334155 !important;
  border-color:#cbd5e1 !important;
  box-shadow:none !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #confirmCloseModal .modal-content{
  background:#ffffff !important;
  color:#172033 !important;
  border:1px solid #dbe3ee !important;
  box-shadow:0 30px 80px rgba(15,23,42,.24) !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #confirmCloseModal
:is(
  .modal-title,
  strong
){
  color:#172033 !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #confirmCloseModal
:is(
  span,
  .text-muted,
  .small
){
  color:#526077 !important;
  opacity:1 !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #confirmCloseModal .border-bottom,
html[data-theme="light"][data-duovox-page="cash-close"]
body #confirmCloseModal .modal-header,
html[data-theme="light"][data-duovox-page="cash-close"]
body #confirmCloseModal .modal-footer{
  border-color:#e2e8f0 !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #confirmCloseModal .btn-close{
  filter:none !important;
  opacity:.75 !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #confirmCloseModal #modal_note_warning{
  background:#fef3c7 !important;
  border:1px solid #fcd34d !important;
  color:#78350f !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #confirmCloseModal #confirmSubmitWhatsappBtn{
  background:#16a34a !important;
  border-color:#16a34a !important;
  color:#ffffff !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #confirmCloseModal #confirmSubmitBtn{
  background:#dc2626 !important;
  border-color:#dc2626 !important;
  color:#ffffff !important;
}

html[data-theme="light"][data-duovox-page="cash-close"]
body #confirmCloseModal .btn-outline-secondary{
  background:#ffffff !important;
  border-color:#cbd5e1 !important;
  color:#334155 !important;
}


/* ==========================================================
   BACKUPS
   ========================================================== */

html[data-theme="light"][data-duovox-page="backups"] body{
  background:#f3f6fb !important;
}

html[data-theme="light"][data-duovox-page="backups"]
.duovox-backup-wrap{
  color:#172033 !important;
}

html[data-theme="light"][data-duovox-page="backups"]
.duovox-backup-hero{
  background:
    radial-gradient(
      circle at 92% 0%,
      rgba(79,70,229,.10),
      transparent 32%
    ),
    linear-gradient(135deg,#ffffff,#eef2ff)
    !important;

  border-color:#c7d2fe !important;
  color:#172033 !important;
  box-shadow:0 16px 38px rgba(15,23,42,.09) !important;
}

html[data-theme="light"][data-duovox-page="backups"]
.duovox-backup-hero::before,
html[data-theme="light"][data-duovox-page="backups"]
.duovox-backup-hero::after{
  opacity:.10 !important;
}

html[data-theme="light"][data-duovox-page="backups"]
.duovox-backup-kicker{
  color:#4338ca !important;
}

html[data-theme="light"][data-duovox-page="backups"]
.duovox-backup-hero h1{
  color:#172033 !important;
}

html[data-theme="light"][data-duovox-page="backups"]
.duovox-backup-hero p{
  color:#526077 !important;
}

html[data-theme="light"][data-duovox-page="backups"]
.duovox-backup-btn.primary{
  background:#4f46e5 !important;
  color:#ffffff !important;
  box-shadow:0 9px 20px rgba(79,70,229,.20) !important;
}

html[data-theme="light"][data-duovox-page="backups"]
.duovox-backup-btn.secondary{
  background:#ffffff !important;
  color:#334155 !important;
  border:1px solid #cbd5e1 !important;
}

html[data-theme="light"][data-duovox-page="backups"]
:is(
  .duovox-backup-card,
  .duovox-backup-section
){
  background:#ffffff !important;
  color:#172033 !important;
  border-color:#dbe3ee !important;
  box-shadow:0 12px 28px rgba(15,23,42,.07) !important;
}

html[data-theme="light"][data-duovox-page="backups"]
:is(
  .duovox-backup-label,
  .duovox-backup-meta,
  .duovox-backup-section-sub,
  .duovox-muted
){
  color:#64748b !important;
}

html[data-theme="light"][data-duovox-page="backups"]
:is(
  .duovox-backup-value,
  .duovox-backup-section h2,
  .duovox-backup-filename,
  .duovox-empty strong
){
  color:#172033 !important;
}

html[data-theme="light"][data-duovox-page="backups"]
.duovox-backup-value.success{
  color:#15803d !important;
}

html[data-theme="light"][data-duovox-page="backups"]
.duovox-backup-icon,
html[data-theme="light"][data-duovox-page="backups"]
.duovox-backup-file-icon{
  background:#eef2ff !important;
  color:#4338ca !important;
  border-color:#c7d2fe !important;
}

html[data-theme="light"][data-duovox-page="backups"]
.duovox-backup-section-head{
  border-color:#e2e8f0 !important;
}

html[data-theme="light"][data-duovox-page="backups"]
.duovox-backup-table{
  background:#ffffff !important;
  color:#243047 !important;
}

html[data-theme="light"][data-duovox-page="backups"]
.duovox-backup-table th{
  background:#f4f6fa !important;
  color:#526077 !important;
  border-color:#dbe3ee !important;
}

html[data-theme="light"][data-duovox-page="backups"]
.duovox-backup-table td{
  background:#ffffff !important;
  color:#243047 !important;
  border-color:#e2e8f0 !important;
}

html[data-theme="light"][data-duovox-page="backups"]
.duovox-backup-table tbody tr:hover{
  background:#f8fafc !important;
}

html[data-theme="light"][data-duovox-page="backups"]
.duovox-download-link{
  background:#4f46e5 !important;
  color:#ffffff !important;
}


/* ==========================================================
   CONFIGURACIÓN CRM
   ========================================================== */

html[data-theme="light"][data-duovox-page="crm-config"]
.duovox-critical-panel{
  background:#fff7f7 !important;
  color:#7f1d1d !important;
  border:1px solid #fecaca !important;
  box-shadow:0 12px 28px rgba(127,29,29,.08) !important;
}

html[data-theme="light"][data-duovox-page="crm-config"]
.duovox-critical-panel h5{
  color:#991b1b !important;
}

html[data-theme="light"][data-duovox-page="crm-config"]
.duovox-critical-panel
:is(
  .text-muted,
  .text-muted-2,
  .small
){
  color:#7f1d1d !important;
  opacity:1 !important;
}

html[data-theme="light"][data-duovox-page="crm-config"]
.duovox-critical-help{
  background:#fffbeb !important;
  color:#78350f !important;
  border:1px solid #fcd34d !important;
}

html[data-theme="light"][data-duovox-page="crm-config"]
.duovox-critical-help strong{
  color:#92400e !important;
}

html[data-theme="light"][data-duovox-page="crm-config"]
.duovox-critical-panel .badge{
  background:#fee2e2 !important;
  color:#991b1b !important;
  border:1px solid #fca5a5 !important;
}

html[data-theme="light"][data-duovox-page="crm-config"]
#criticalActionModal .modal-content{
  background:#ffffff !important;
  color:#172033 !important;
  border:1px solid #dbe3ee !important;
}

html[data-theme="light"][data-duovox-page="crm-config"]
#criticalActionModal
:is(
  .modal-title,
  .form-label,
  p
){
  color:#172033 !important;
}

html[data-theme="light"][data-duovox-page="crm-config"]
#criticalActionModal
:is(
  .form-text,
  .small
){
  color:#64748b !important;
}

html[data-theme="light"][data-duovox-page="crm-config"]
#criticalActionModal .form-control{
  background:#ffffff !important;
  color:#172033 !important;
  border-color:#cbd5e1 !important;
}

html[data-theme="light"][data-duovox-page="crm-config"]
#criticalActionModal .alert-warning{
  background:#fef3c7 !important;
  color:#78350f !important;
  border-color:#fcd34d !important;
}


/* ==========================================================
   PERMISOS POR ROL
   ========================================================== */

html[data-theme="light"][data-duovox-page="permissions-role"] body{
  background:#f3f6fb !important;
  color:#172033 !important;
}

html[data-theme="light"][data-duovox-page="permissions-role"]
.page-card,
html[data-theme="light"][data-duovox-page="permissions-role"]
.duovox-permissions-wrap{
  background:#ffffff !important;
  color:#172033 !important;
  border-color:#dbe3ee !important;
  box-shadow:0 12px 28px rgba(15,23,42,.07) !important;
}

html[data-theme="light"][data-duovox-page="permissions-role"]
.duovox-permissions-table{
  --bs-table-bg:#ffffff !important;
  --bs-table-color:#243047 !important;
  color:#243047 !important;
}

html[data-theme="light"][data-duovox-page="permissions-role"]
.duovox-permissions-table th{
  background:#f4f6fa !important;
  color:#526077 !important;
  border-color:#dbe3ee !important;
}

html[data-theme="light"][data-duovox-page="permissions-role"]
.duovox-permissions-table td{
  background:#ffffff !important;
  color:#243047 !important;
  border-color:#e2e8f0 !important;
}

html[data-theme="light"][data-duovox-page="permissions-role"]
.duovox-permissions-table
:is(
  td:first-child,
  th:first-child
){
  background:#f8fafc !important;
  color:#172033 !important;
  box-shadow:6px 0 14px rgba(15,23,42,.04) !important;
}

html[data-theme="light"][data-duovox-page="permissions-role"]
.duovox-permissions-wrap::-webkit-scrollbar-track{
  background:#eef2f7 !important;
}

html[data-theme="light"][data-duovox-page="permissions-role"]
.duovox-permissions-wrap::-webkit-scrollbar-thumb{
  background:#94a3b8 !important;
  border:3px solid #eef2f7 !important;
}

html[data-theme="light"][data-duovox-page="permissions-role"]
.alert-info{
  background:#eff6ff !important;
  color:#1e3a8a !important;
  border:1px solid #bfdbfe !important;
}

html[data-theme="light"][data-duovox-page="permissions-role"]
.alert-warning{
  background:#fffbeb !important;
  color:#78350f !important;
  border:1px solid #fde68a !important;
}

html[data-theme="light"][data-duovox-page="permissions-role"]
input[type="checkbox"]{
  accent-color:#4f46e5 !important;
}


/* ==========================================================
   NUEVA VENTA — PAGO MIXTO DINÁMICO
   ========================================================== */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
.duovox-mixed-payment-panel-v34{
  background:#ffffff !important;
  color:#172033 !important;
  border:1px solid #dbe3ee !important;
  box-shadow:0 10px 24px rgba(15,23,42,.06) !important;
}

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
.duovox-mixed-payment-panel-v34
:is(
  h1,h2,h3,h4,h5,h6,
  strong,
  label
){
  color:#172033 !important;
}

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
.duovox-mixed-payment-panel-v34
:is(
  input,
  select,
  textarea,
  .form-control,
  .v3-input
){
  background:#ffffff !important;
  color:#172033 !important;
  border-color:#cbd5e1 !important;
  box-shadow:none !important;
}

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
.duovox-mixed-payment-panel-v34
:is(
  [class*="total"],
  [class*="summary"],
  [class*="status"]
){
  background:#fff1f2 !important;
  color:#9f1239 !important;
  border-color:#fecdd3 !important;
}

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
.duovox-mixed-payment-panel-v34
:is(
  [class*="total"],
  [class*="summary"],
  [class*="status"]
)
*{
  color:#9f1239 !important;
}


/* ==========================================================
   DUOVOX SALES SLOTS LIGHT STATIC V36
   Mostradores de Nueva venta — solo CSS, sin JavaScript
   ========================================================== */


/* Contenedor de mostradores */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body main.content
.v3-card.v3-multisale-card
#v3-sale-slots{
  gap:8px !important;
}


/* Estado base de los mostradores inactivos */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body main.content
.v3-card.v3-multisale-card
#v3-sale-slots
> button.v3-sale-slot{
  background:
    linear-gradient(
      180deg,
      #ffffff 0%,
      #f8fafc 100%
    )
    !important;

  color:#172033 !important;

  border:
    1px solid #cbd5e1
    !important;

  box-shadow:
    0 3px 8px rgba(15,23,42,.05)
    !important;

  border-radius:14px !important;

  transform:none !important;

  transition:
    background-color .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    transform .15s ease
    !important;
}


/* Textos de los mostradores inactivos */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body main.content
.v3-card.v3-multisale-card
#v3-sale-slots
> button.v3-sale-slot
.v3-sale-slot-title{
  color:#172033 !important;
  font-weight:900 !important;
  opacity:1 !important;
  text-shadow:none !important;
}

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body main.content
.v3-card.v3-multisale-card
#v3-sale-slots
> button.v3-sale-slot
.v3-sale-slot-sub{
  color:#64748b !important;
  opacity:1 !important;
  text-shadow:none !important;
}


/* Hover de mostradores inactivos */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body main.content
.v3-card.v3-multisale-card
#v3-sale-slots
> button.v3-sale-slot:not(.active):hover{
  background:#f1f5ff !important;
  border-color:#a5b4fc !important;

  box-shadow:
    0 7px 16px rgba(79,70,229,.10)
    !important;

  transform:translateY(-1px) !important;
}


/* Mostrador activo */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body main.content
.v3-card.v3-multisale-card
#v3-sale-slots
> button.v3-sale-slot.active{
  background:
    linear-gradient(
      135deg,
      #4f46e5 0%,
      #6366f1 100%
    )
    !important;

  color:#ffffff !important;

  border:
    1px solid #4f46e5
    !important;

  box-shadow:
    0 9px 20px rgba(79,70,229,.22)
    !important;

  transform:none !important;
}


/* Textos del mostrador activo */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body main.content
.v3-card.v3-multisale-card
#v3-sale-slots
> button.v3-sale-slot.active
.v3-sale-slot-title{
  color:#ffffff !important;
  opacity:1 !important;
  text-shadow:none !important;
}

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body main.content
.v3-card.v3-multisale-card
#v3-sale-slots
> button.v3-sale-slot.active
.v3-sale-slot-sub{
  color:#e0e7ff !important;
  opacity:1 !important;
  text-shadow:none !important;
}


/* Botón + Nueva */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body main.content
.v3-card.v3-multisale-card
#v3-new-sale-slot.v3-mini-btn{
  background:
    linear-gradient(
      135deg,
      #4f46e5,
      #7c3aed
    )
    !important;

  color:#ffffff !important;

  border:
    1px solid transparent
    !important;

  box-shadow:
    0 7px 16px rgba(79,70,229,.18)
    !important;

  border-radius:12px !important;
  font-weight:900 !important;
  text-shadow:none !important;
}

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body main.content
.v3-card.v3-multisale-card
#v3-new-sale-slot.v3-mini-btn:hover{
  background:
    linear-gradient(
      135deg,
      #4338ca,
      #6d28d9
    )
    !important;

  color:#ffffff !important;
  transform:translateY(-1px) !important;
}


/* Protección adicional del texto interno */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body main.content
.v3-card.v3-multisale-card
#v3-new-sale-slot.v3-mini-btn
*{
  color:#ffffff !important;
}


/* ==========================================================
   DUOVOX FREE AMOUNT MODAL LIGHT V37
   Importe libre — solo tema claro, solo CSS
   ========================================================== */


/* Fondo detrás del modal */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body #v3-free-modal.v3-free-modal{
  background:rgba(15,23,42,.34) !important;
  backdrop-filter:blur(3px) !important;
  -webkit-backdrop-filter:blur(3px) !important;
  padding:18px !important;
}


/* Tarjeta principal */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body #v3-free-modal
.v3-free-card{
  width:min(390px,calc(100vw - 32px)) !important;

  background:
    linear-gradient(
      180deg,
      #ffffff 0%,
      #fbfdff 100%
    )
    !important;

  color:#172033 !important;

  border:
    1px solid #dbe3ee
    !important;

  border-radius:22px !important;

  padding:24px !important;

  box-shadow:
    0 28px 75px rgba(15,23,42,.24)
    !important;
}


/* Título */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body #v3-free-modal
.v3-free-title{
  color:#172033 !important;
  font-size:22px !important;
  font-weight:900 !important;
  line-height:1.2 !important;
  letter-spacing:-.025em !important;
  margin-bottom:5px !important;
  text-shadow:none !important;
}


/* Texto auxiliar */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body #v3-free-modal
.v3-free-subtitle{
  color:#64748b !important;
  font-size:14px !important;
  font-weight:600 !important;
  line-height:1.45 !important;
  margin-bottom:17px !important;
  opacity:1 !important;
}


/* Campo del importe */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body #v3-free-modal
#v3-free-amount-input.v3-free-input{
  width:100% !important;
  height:56px !important;

  background:#ffffff !important;
  color:#172033 !important;

  border:
    1px solid #cbd5e1
    !important;

  border-radius:15px !important;

  box-shadow:
    inset 0 1px 2px rgba(15,23,42,.04)
    !important;

  font-size:21px !important;
  font-weight:800 !important;
  line-height:1 !important;
  text-align:center !important;

  padding:10px 14px !important;

  appearance:textfield;
  -moz-appearance:textfield;
}


/* Ocultar flechas del campo numérico */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body #v3-free-modal
#v3-free-amount-input::-webkit-inner-spin-button,

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body #v3-free-modal
#v3-free-amount-input::-webkit-outer-spin-button{
  margin:0 !important;
  -webkit-appearance:none !important;
}


/* Placeholder */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body #v3-free-modal
#v3-free-amount-input::placeholder{
  color:#94a3b8 !important;
  opacity:1 !important;
  font-size:19px !important;
  font-weight:750 !important;
}


/* Foco */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body #v3-free-modal
#v3-free-amount-input:focus{
  background:#ffffff !important;
  color:#172033 !important;
  border-color:#6366f1 !important;

  box-shadow:
    0 0 0 4px rgba(99,102,241,.14)
    !important;

  outline:none !important;
}


/* Contenedor de acciones */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body #v3-free-modal
.v3-free-actions{
  display:flex !important;
  justify-content:flex-end !important;
  align-items:center !important;
  gap:10px !important;
  margin-top:18px !important;
}


/* Base común de botones */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body #v3-free-modal
:is(
  #v3-free-cancel,
  #v3-free-confirm
){
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;

  min-height:42px !important;

  padding:
    9px 17px
    !important;

  border-radius:13px !important;

  font-size:14px !important;
  font-weight:850 !important;
  line-height:1 !important;

  text-shadow:none !important;

  transition:
    transform .15s ease,
    background-color .15s ease,
    border-color .15s ease,
    box-shadow .15s ease
    !important;
}


/* Cancelar */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body #v3-free-modal
#v3-free-cancel{
  background:#ffffff !important;
  color:#334155 !important;
  border:1px solid #cbd5e1 !important;
  box-shadow:none !important;
}

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body #v3-free-modal
#v3-free-cancel:hover{
  background:#f8fafc !important;
  color:#172033 !important;
  border-color:#94a3b8 !important;
  transform:translateY(-1px) !important;
}


/* Agregar */

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body #v3-free-modal
#v3-free-confirm{
  background:
    linear-gradient(
      135deg,
      #4f46e5,
      #7c3aed
    )
    !important;

  color:#ffffff !important;
  border:1px solid transparent !important;

  box-shadow:
    0 8px 18px rgba(79,70,229,.22)
    !important;
}

html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
body #v3-free-modal
#v3-free-confirm:hover{
  background:
    linear-gradient(
      135deg,
      #4338ca,
      #6d28d9
    )
    !important;

  color:#ffffff !important;

  box-shadow:
    0 10px 22px rgba(79,70,229,.27)
    !important;

  transform:translateY(-1px) !important;
}


/* Responsive */

@media (max-width:480px){

  html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
  body #v3-free-modal
  .v3-free-card{
    padding:20px !important;
    border-radius:19px !important;
  }

  html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
  body #v3-free-modal
  .v3-free-actions{
    flex-direction:column-reverse !important;
  }

  html[data-theme="light"][data-duovox-page="sales-new-v3-clean"]
  body #v3-free-modal
  :is(
    #v3-free-cancel,
    #v3-free-confirm
  ){
    width:100% !important;
  }
}


/* ==========================================================
   DUOVOX CRM LOGIN PREVIEW LIGHT V38
   Vista previa del login e imágenes — solo tema claro
   ========================================================== */


/* ----------------------------------------------------------
   Miniaturas de Logo y Favicon
   ---------------------------------------------------------- */

html[data-theme="light"][data-duovox-page="crm-config"]
#crmConfigForm
.crm-config-preview-box{
  background:
    linear-gradient(
      180deg,
      #ffffff 0%,
      #f8fafc 100%
    )
    !important;

  color:#172033 !important;

  border:
    1px solid #dbe3ee
    !important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.8),
    0 5px 14px rgba(15,23,42,.05)
    !important;
}

html[data-theme="light"][data-duovox-page="crm-config"]
#crmConfigForm
.crm-config-preview-box span{
  color:#64748b !important;
  opacity:1 !important;
}


/* Imágenes cargadas dentro de las miniaturas */

html[data-theme="light"][data-duovox-page="crm-config"]
#crmConfigForm
.crm-config-preview-box img{
  background:#ffffff !important;
  border-radius:10px !important;
}


/* ----------------------------------------------------------
   Miniatura de Fondo login
   Conserva una imagen cargada, pero la adapta al tema claro
   ---------------------------------------------------------- */

html[data-theme="light"][data-duovox-page="crm-config"]
#crmConfigForm
.crm-config-login-bg-preview{
  position:relative !important;
  isolation:isolate !important;

  background-color:#eef4ff !important;

  border:
    1px solid #cbd5e1
    !important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.75),
    0 5px 14px rgba(15,23,42,.05)
    !important;
}

html[data-theme="light"][data-duovox-page="crm-config"]
#crmConfigForm
.crm-config-login-bg-preview::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;

  background:
    linear-gradient(
      135deg,
      rgba(238,242,255,.82),
      rgba(239,246,255,.78)
    );

  pointer-events:none;
}

html[data-theme="light"][data-duovox-page="crm-config"]
#crmConfigForm
.crm-config-login-bg-preview > *{
  position:relative;
  z-index:1;
}


/* ----------------------------------------------------------
   Selectores de archivos
   ---------------------------------------------------------- */

html[data-theme="light"][data-duovox-page="crm-config"]
#crmConfigForm
input[type="file"]{
  background:#ffffff !important;
  color:#475569 !important;

  border:
    1px solid #cbd5e1
    !important;

  box-shadow:none !important;
}

html[data-theme="light"][data-duovox-page="crm-config"]
#crmConfigForm
input[type="file"]::file-selector-button{
  background:
    linear-gradient(
      135deg,
      #4f46e5,
      #7c3aed
    )
    !important;

  color:#ffffff !important;
  border:0 !important;

  border-radius:10px !important;

  font-weight:850 !important;

  padding:
    8px 12px
    !important;
}


/* ----------------------------------------------------------
   Contenedor completo de la vista previa del login
   Se conserva cualquier imagen configurada debajo del overlay
   ---------------------------------------------------------- */

html[data-theme="light"][data-duovox-page="crm-config"]
body #loginPreviewWrap{
  position:relative !important;
  isolation:isolate !important;

  color:#172033 !important;

  border:
    1px solid #c7d2fe
    !important;

  box-shadow:
    0 18px 42px rgba(15,23,42,.10)
    !important;
}

html[data-theme="light"][data-duovox-page="crm-config"]
body #loginPreviewWrap::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;

  background:
    radial-gradient(
      circle at 88% 8%,
      rgba(99,102,241,.13),
      transparent 31%
    ),
    radial-gradient(
      circle at 8% 92%,
      rgba(14,165,233,.10),
      transparent 32%
    ),
    linear-gradient(
      135deg,
      rgba(238,242,255,.94),
      rgba(248,250,252,.96)
    );

  pointer-events:none;
}

html[data-theme="light"][data-duovox-page="crm-config"]
body #loginPreviewWrap > *{
  position:relative !important;
  z-index:1 !important;
}


/* Tarjeta interna del login */

html[data-theme="light"][data-duovox-page="crm-config"]
body #loginPreviewWrap
.bg-white{
  background:
    rgba(255,255,255,.97)
    !important;

  color:#172033 !important;

  border:
    1px solid #dbe3ee
    !important;

  box-shadow:
    0 18px 42px rgba(15,23,42,.12)
    !important;
}


/* Títulos y datos principales */

html[data-theme="light"][data-duovox-page="crm-config"]
body #loginPreviewWrap
:is(
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  strong,
  .fw-bold,
  .fw-semibold
){
  color:#172033 !important;
  opacity:1 !important;
  text-shadow:none !important;
}


/* Textos secundarios y etiquetas */

html[data-theme="light"][data-duovox-page="crm-config"]
body #loginPreviewWrap
:is(
  p,
  small,
  .small,
  .text-muted,
  .text-muted-2,
  label,
  .form-label
){
  color:#64748b !important;
  opacity:1 !important;
  text-shadow:none !important;
}


/* Campos del login simulado */

html[data-theme="light"][data-duovox-page="crm-config"]
body #loginPreviewWrap
:is(
  input,
  .form-control
){
  background:#ffffff !important;
  color:#172033 !important;

  border:
    1px solid #cbd5e1
    !important;

  box-shadow:
    inset 0 1px 2px rgba(15,23,42,.04)
    !important;
}

html[data-theme="light"][data-duovox-page="crm-config"]
body #loginPreviewWrap
:is(
  input,
  .form-control
)::placeholder{
  color:#94a3b8 !important;
  opacity:1 !important;
}


/* Botón de ingreso: conserva los colores configurados */

html[data-theme="light"][data-duovox-page="crm-config"]
body #loginPreviewWrap
#previewLoginButton{
  color:#ffffff !important;
  border-color:transparent !important;

  box-shadow:
    0 9px 20px rgba(79,70,229,.22)
    !important;

  text-shadow:none !important;
}

html[data-theme="light"][data-duovox-page="crm-config"]
body #loginPreviewWrap
#previewLoginButton *{
  color:#ffffff !important;
}


/* Ícono de la vista previa: conserva el color configurado */

html[data-theme="light"][data-duovox-page="crm-config"]
body #loginPreviewWrap
:is(
  [class*="icon"],
  [id*="Icon"],
  [id*="icon"]
)
i{
  color:#ffffff !important;
}


/* Responsive */

@media (max-width:991.98px){

  html[data-theme="light"][data-duovox-page="crm-config"]
  body #loginPreviewWrap{
    min-height:520px !important;
  }
}


/* ==========================================================
   DUOVOX ACTIVE BRANCH LIGHT V39
   Indicador global de sucursal activa — solo tema claro
   ========================================================== */

html[data-theme="light"]
body
.topbar.duovox-business-header
.duovox-active-branch-badge{
  background:
    linear-gradient(
      180deg,
      #ecfdf5 0%,
      #dcfce7 100%
    )
    !important;

  color:#14532d !important;

  border:
    1px solid #6ee7b7
    !important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.90),
    0 8px 18px rgba(22,163,74,.13)
    !important;

  opacity:1 !important;
  text-shadow:none !important;
}


/* Ícono */

html[data-theme="light"]
body
.topbar.duovox-business-header
.duovox-active-branch-badge i{
  color:#15803d !important;
  opacity:1 !important;
  text-shadow:none !important;
}


/* Texto “Sucursal activa” */

html[data-theme="light"]
body
.topbar.duovox-business-header
.duovox-active-branch-badge span{
  color:#166534 !important;
  font-weight:800 !important;
  opacity:1 !important;
  text-shadow:none !important;
}


/* Nombre de la sucursal */

html[data-theme="light"]
body
.topbar.duovox-business-header
.duovox-active-branch-badge strong{
  color:#0f172a !important;
  font-weight:950 !important;
  opacity:1 !important;
  text-shadow:none !important;
}


/* Protección frente a estilos heredados del encabezado */

html[data-theme="light"]
body
.topbar.duovox-business-header
.duovox-active-branch-badge
*{
  opacity:1 !important;
}
