/* ==========================================================
   DUOVOX THEME SYSTEM V1
   El 24 de las 500 TEST
   ========================================================== */

html{
  color-scheme:dark;
}

html[data-theme="light"]{
  color-scheme:light !important;

  --bg:#f3f6fb !important;
  --card:#ffffff !important;
  --card-2:#f8fafc !important;

  --text:#172033 !important;
  --text-soft:#475569 !important;
  --muted:#64748b !important;

  --border:#dfe6ef !important;
  --border-strong:#cbd5e1 !important;

  --shadow:0 16px 38px rgba(15,23,42,.08) !important;
  --shadow-soft:0 10px 26px rgba(15,23,42,.06) !important;

  --duovox-panel:
    linear-gradient(135deg,#ffffff,#f8faff 58%,#f2efff)
    !important;

  --duovox-card:
    linear-gradient(180deg,#ffffff,#fbfdff)
    !important;

  --duovox-glow:
    0 0 0 1px rgba(124,58,237,.08),
    0 18px 42px rgba(15,23,42,.08)
    !important;

  --duo-bg:#f3f6fb !important;
  --duo-panel:#ffffff !important;
  --duo-panel-2:#f8fafc !important;
  --duo-card:#ffffff !important;
  --duo-card-soft:#f8fafc !important;
  --duo-border:#dfe6ef !important;
  --duo-border-2:#d4dcea !important;
  --duo-text:#172033 !important;
  --duo-muted:#64748b !important;

  --dvx-bg:#f3f6fb !important;
  --dvx-night:#f3f6fb !important;
  --dvx-panel:#ffffff !important;
  --dvx-panel-2:#f8fafc !important;
  --dvx-line:#dfe6ef !important;
  --dvx-line-strong:#cbd5e1 !important;
  --dvx-border:#dfe6ef !important;
  --dvx-text:#172033 !important;
  --dvx-muted:#64748b !important;
  --dvx-muted-2:#7b8aa0 !important;

  --sx-bg:#f3f6fb !important;
  --sx-panel:#ffffff !important;
  --sx-panel2:#f8fafc !important;
  --sx-soft:#eef2f7 !important;
  --sx-border:#d8dfea !important;
  --sx-border2:#e2e8f0 !important;
  --sx-text:#172033 !important;
  --sx-muted:#64748b !important;

  --dx-dark:#f3f6fb !important;
  --dx-dark-2:#ffffff !important;
  --dx-soft:#f8fafc !important;
  --dx-border:#dfe6ef !important;
  --dx-text:#172033 !important;
  --dx-muted:#64748b !important;

  --bs-body-bg:#f3f6fb !important;
  --bs-body-color:#172033 !important;
  --bs-border-color:#dfe6ef !important;
  --bs-secondary-color:#64748b !important;
  --bs-tertiary-bg:#f8fafc !important;
}


/* Fondo general */

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

html[data-theme="light"] body{
  background:
    radial-gradient(
      circle at 10% 3%,
      rgba(124,58,237,.09),
      transparent 27%
    ),
    radial-gradient(
      circle at 96% 8%,
      rgba(37,99,235,.07),
      transparent 28%
    ),
    linear-gradient(
      180deg,
      #f7f9fd 0%,
      #f2f5fa 100%
    ) !important;
}

html[data-theme="light"] .layout,
html[data-theme="light"] .content{
  background:transparent !important;
}


/* Menú lateral */

html[data-theme="light"] .sidebar{
  background:
    radial-gradient(
      circle at top right,
      rgba(124,58,237,.12),
      transparent 30%
    ),
    linear-gradient(
      180deg,
      #ffffff 0%,
      #f8f7ff 56%,
      #f1f4fa 100%
    ) !important;

  color:#263247 !important;
  border-right:1px solid #dfe6ef !important;
  box-shadow:10px 0 34px rgba(15,23,42,.08) !important;
}

html[data-theme="light"] .sidebar::-webkit-scrollbar-thumb{
  background:rgba(100,116,139,.30) !important;
}

html[data-theme="light"] .brand{
  background:rgba(255,255,255,.88) !important;
  border-color:#dfe6ef !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 12px 28px rgba(15,23,42,.06)
    !important;
}

html[data-theme="light"] .brand-text .fw-bold{
  color:#172033 !important;
  text-shadow:none !important;
}

html[data-theme="light"] .brand-text .small{
  color:#64748b !important;
}

html[data-theme="light"] .sidebar-toggle,
html[data-theme="light"] .nav-link-crm{
  color:#334155 !important;
}

html[data-theme="light"] .sidebar-toggle{
  background:#f5f3ff !important;
  border-color:#e5e0ff !important;
}

html[data-theme="light"] .sidebar-toggle:hover,
html[data-theme="light"] .nav-link-crm:hover{
  background:#f3f0ff !important;
  border-color:#ded7ff !important;
  color:#5b2de6 !important;
}

html[data-theme="light"] .nav-title{
  color:#7b8aa0 !important;
}

html[data-theme="light"] .nav-link-crm.active{
  color:#4c1d95 !important;

  background:
    linear-gradient(
      135deg,
      rgba(124,58,237,.15),
      rgba(37,99,235,.07)
    ) !important;

  border-color:rgba(124,58,237,.20) !important;

  box-shadow:
    0 12px 26px rgba(124,58,237,.08),
    inset 0 1px 0 rgba(255,255,255,.8)
    !important;
}

html[data-theme="light"] .nav-link-crm.active i{
  color:#6d28d9 !important;
}

html[data-theme="light"] .nav-link-crm.active::before{
  background:
    linear-gradient(180deg,#7c3aed,#2563eb)
    !important;

  box-shadow:0 0 12px rgba(124,58,237,.28) !important;
}


/* Encabezado */

html[data-theme="light"] .topbar,
html[data-theme="light"] .topbar.duovox-business-header{
  background:
    radial-gradient(
      circle at 94% 0%,
      rgba(124,58,237,.10),
      transparent 34%
    ),
    linear-gradient(
      135deg,
      #ffffff 0%,
      #fafbff 60%,
      #f4f2ff 100%
    ) !important;

  color:#172033 !important;
  border-color:#dfe6ef !important;
  box-shadow:0 18px 44px rgba(15,23,42,.08) !important;
}

html[data-theme="light"] .topbar::before,
html[data-theme="light"] .topbar::after,
html[data-theme="light"] .topbar.duovox-business-header::before,
html[data-theme="light"] .topbar.duovox-business-header::after{
  opacity:.18 !important;
}

html[data-theme="light"] .topbar-left .fw-bold,
html[data-theme="light"] .topbar .fw-bold{
  color:#172033 !important;
  text-shadow:none !important;
}

html[data-theme="light"] .topbar-left .text-muted-2,
html[data-theme="light"] .topbar-left .small{
  color:#64748b !important;
}

html[data-theme="light"] .topbar .pill{
  background:#ffffff !important;
  color:#334155 !important;
  border-color:#dfe6ef !important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95)
    !important;
}

html[data-theme="light"] .topbar .pill i{
  color:#6d28d9 !important;
}


/* Tarjetas */

html[data-theme="light"] .page-card,
html[data-theme="light"] .card,
html[data-theme="light"] .crm-card,
html[data-theme="light"] .card-soft,
html[data-theme="light"] .surface-card,
html[data-theme="light"] .dashboard-panel,
html[data-theme="light"] .kpi-card,
html[data-theme="light"] .metric-card,
html[data-theme="light"] .cash-box,
html[data-theme="light"] .alert-card,
html[data-theme="light"] .quick-link,
html[data-theme="light"] .quick-box,
html[data-theme="light"] .mini-finance-item,
html[data-theme="light"] .section-card,
html[data-theme="light"] .price-card,
html[data-theme="light"] .close-card,
html[data-theme="light"] .receipt-card,
html[data-theme="light"] .duovox-permissions-wrap,
html[data-theme="light"] .hero-soft{
  background:
    linear-gradient(180deg,#ffffff,#fbfdff)
    !important;

  color:#172033 !important;
  border-color:#dfe6ef !important;
  box-shadow:0 14px 34px rgba(15,23,42,.07) !important;
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6,
html[data-theme="light"] .section-title,
html[data-theme="light"] .dashboard-title,
html[data-theme="light"] .dashboard-subtitle,
html[data-theme="light"] .kpi-value,
html[data-theme="light"] .metric-value,
html[data-theme="light"] .metric-value-sm,
html[data-theme="light"] .cash-value,
html[data-theme="light"] .mini-value{
  color:#172033 !important;
}

html[data-theme="light"] .text-muted,
html[data-theme="light"] .text-muted-2,
html[data-theme="light"] .muted,
html[data-theme="light"] .small.text-muted,
html[data-theme="light"] .form-text,
html[data-theme="light"] .metric-label,
html[data-theme="light"] .metric-meta,
html[data-theme="light"] .kpi-label,
html[data-theme="light"] .kpi-meta,
html[data-theme="light"] .mini-label{
  color:#64748b !important;
}


/* Formularios */

html[data-theme="light"] .form-label{
  color:#334155 !important;
}

html[data-theme="light"] .form-control,
html[data-theme="light"] .form-select,
html[data-theme="light"] textarea.form-control,
html[data-theme="light"] input[type="file"],
html[data-theme="light"] input[type="color"]{
  background:#ffffff !important;
  color:#172033 !important;
  border-color:#cfd8e5 !important;
}

html[data-theme="light"] .form-control::placeholder,
html[data-theme="light"] textarea.form-control::placeholder{
  color:#94a3b8 !important;
}

html[data-theme="light"] .form-control:focus,
html[data-theme="light"] .form-select:focus{
  background:#ffffff !important;
  color:#172033 !important;
  border-color:rgba(124,58,237,.48) !important;

  box-shadow:
    0 0 0 .22rem rgba(124,58,237,.11)
    !important;
}

html[data-theme="light"] .form-select option{
  background:#ffffff !important;
  color:#172033 !important;
}

html[data-theme="light"] .form-check-input{
  background-color:#ffffff !important;
  border-color:#b8c4d4 !important;
}


/* Tablas */

html[data-theme="light"] .table-responsive{
  background:#ffffff !important;
  border-color:#dfe6ef !important;
  box-shadow:0 12px 30px rgba(15,23,42,.06) !important;
}

html[data-theme="light"] .table,
html[data-theme="light"] .table-premium{
  --bs-table-bg:transparent !important;
  --bs-table-color:#243047 !important;
  --bs-table-striped-bg:#f8fafc !important;
  --bs-table-hover-bg:#f4f1ff !important;

  color:#243047 !important;
}

html[data-theme="light"] .table > :not(caption) > * > *{
  background:transparent !important;
  color:#243047 !important;
  border-bottom-color:#e7ecf3 !important;
}

html[data-theme="light"] .table thead th,
html[data-theme="light"] .duovox-permissions-table th{
  background:#f5f7fb !important;
  color:#526077 !important;
  border-bottom-color:#dfe6ef !important;
}

html[data-theme="light"] .table tbody tr:hover{
  background:#f6f3ff !important;
}


/* Botones secundarios */

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

html[data-theme="light"] .btn-outline-primary:hover,
html[data-theme="light"] .btn-outline-secondary:hover,
html[data-theme="light"] .btn-outline-dark:hover,
html[data-theme="light"] .btn-outline-success:hover,
html[data-theme="light"] .btn-outline-danger:hover{
  background:#f3f0ff !important;
  color:#5b21b6 !important;
  border-color:#c4b5fd !important;
}


/* Alertas */

html[data-theme="light"] .alert{
  background:#ffffff !important;
  color:#334155 !important;
  border:1px solid #dfe6ef !important;
}

html[data-theme="light"] .alert-success{
  background:#edfdf3 !important;
  color:#17653f !important;
  border-color:#c8f1d7 !important;
}

html[data-theme="light"] .alert-warning{
  background:#fff9ea !important;
  color:#8a5b00 !important;
  border-color:#ffe4a3 !important;
}

html[data-theme="light"] .alert-danger{
  background:#fff2f3 !important;
  color:#9f2633 !important;
  border-color:#ffcbd1 !important;
}

html[data-theme="light"] .alert-info{
  background:#eef8ff !important;
  color:#0d5f8f !important;
  border-color:#cfe9fb !important;
}


/* Modales y listas */

html[data-theme="light"] .dropdown-menu,
html[data-theme="light"] .modal-content,
html[data-theme="light"] .duovox-toast,
html[data-theme="light"] .duovox-confirm-modal{
  background:#ffffff !important;
  color:#172033 !important;
  border-color:#dfe6ef !important;
  box-shadow:0 24px 60px rgba(15,23,42,.15) !important;
}

html[data-theme="light"] .dropdown-item{
  color:#334155 !important;
}

html[data-theme="light"] .dropdown-item:hover,
html[data-theme="light"] .dropdown-item:focus{
  background:#f3f0ff !important;
  color:#5b21b6 !important;
}

html[data-theme="light"] .modal-header,
html[data-theme="light"] .modal-footer{
  border-color:#e7ecf3 !important;
}

html[data-theme="light"] .btn-close{
  filter:none !important;
}


/* Accesos y badges */

html[data-theme="light"] .pill,
html[data-theme="light"] .soft-badge{
  background:#f5f7fb !important;
  border-color:#dfe6ef !important;
  color:#334155 !important;
}

html[data-theme="light"] .subtle-box,
html[data-theme="light"] .empty-state,
html[data-theme="light"] .chart-preview-line{
  background:#f8fafc !important;
  color:#475569 !important;
  border-color:#dfe6ef !important;
}

html[data-theme="light"] .quick-link{
  color:#243047 !important;
}

html[data-theme="light"] .quick-link i,
html[data-theme="light"] .quick-link-icon,
html[data-theme="light"] .empty-state .bi{
  background:
    linear-gradient(135deg,#ede9fe,#e8f0ff)
    !important;

  color:#6d28d9 !important;
}


/* POS: cobertura inicial */

html[data-theme="light"] .v3-shell{
  color:#172033 !important;
}

html[data-theme="light"] .v3-hero,
html[data-theme="light"] .v3-card,
html[data-theme="light"] .v3-product,
html[data-theme="light"] .v3-payment-status{
  background:#ffffff !important;
  color:#172033 !important;
  border-color:#dfe6ef !important;
  box-shadow:0 16px 38px rgba(15,23,42,.07) !important;
}

html[data-theme="light"] .v3-input,
html[data-theme="light"] .v3-cart-row input{
  background:#ffffff !important;
  color:#172033 !important;
  border-color:#cfd8e5 !important;
}

html[data-theme="light"] .v3-cart-row{
  background:#ffffff !important;
  color:#172033 !important;
  border-bottom-color:#e7ecf3 !important;
}

html[data-theme="light"] .v3-product small{
  color:#64748b !important;
}


/* Selector */

.duovox-theme-switch{
  display:inline-flex;
  align-items:center;
  gap:3px;
  min-height:42px;
  padding:4px;
  border-radius:14px;

  background:rgba(255,255,255,.075);
  border:1px solid rgba(148,163,184,.20);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06);
}

.duovox-theme-choice{
  border:0;
  background:transparent;
  color:#cbd5e1;

  min-height:32px;
  padding:5px 9px;
  border-radius:10px;

  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;

  font-size:.78rem;
  font-weight:850;
  transition:.16s ease;
}

.duovox-theme-choice:hover{
  color:#ffffff;
  background:rgba(255,255,255,.08);
}

.duovox-theme-choice.is-active{
  color:#ffffff;

  background:
    linear-gradient(135deg,#7c3aed,#5b2de6);

  box-shadow:
    0 7px 16px rgba(91,45,230,.24);
}

html[data-theme="light"] .duovox-theme-switch{
  background:#ffffff;
  border-color:#dfe6ef;
  box-shadow:0 8px 20px rgba(15,23,42,.06);
}

html[data-theme="light"] .duovox-theme-choice{
  color:#64748b;
}

html[data-theme="light"] .duovox-theme-choice:hover{
  background:#f3f0ff;
  color:#5b21b6;
}

html[data-theme="light"] .duovox-theme-choice.is-active{
  color:#ffffff;
}

@media (max-width:576px){
  .duovox-theme-choice span{
    display:none;
  }

  .duovox-theme-choice{
    width:34px;
    padding:5px;
  }
}

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