/* ==========================================================
   TICKEXPA · GLOBAL THEME SYSTEM
   Cargado para toda la plataforma.
   Evita superficies blancas accidentales en modo oscuro.
   ========================================================== */


/* ==========================================================
   TOKENS
   ========================================================== */

html[data-theme="dark"]{
  color-scheme:dark;

  --tx-bg:#09152f;
  --tx-surface:#10203f;
  --tx-surface-2:#142545;
  --tx-surface-3:#192c4d;

  --tx-text:#f7f9ff;
  --tx-text-soft:#d7deec;
  --tx-muted:#9cacc9;

  --tx-border:rgba(148,163,184,.20);
  --tx-border-strong:rgba(148,163,184,.30);

  --tx-purple-soft:rgba(123,45,255,.16);

  --tx-success-bg:rgba(34,197,94,.14);
  --tx-success-text:#86efac;
  --tx-success-border:rgba(34,197,94,.30);

  --tx-warning-bg:rgba(245,158,11,.14);
  --tx-warning-text:#fcd34d;
  --tx-warning-border:rgba(245,158,11,.30);

  --tx-danger-bg:rgba(244,63,94,.14);
  --tx-danger-text:#fda4af;
  --tx-danger-border:rgba(244,63,94,.30);
}


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

  --tx-bg:#f6f8fc;
  --tx-surface:#ffffff;
  --tx-surface-2:#f8fafc;
  --tx-surface-3:#f1f5f9;

  --tx-text:#0f172a;
  --tx-text-soft:#334155;
  --tx-muted:#64748b;

  --tx-border:#e2e8f0;
  --tx-border-strong:#cbd5e1;

  --tx-purple-soft:rgba(123,45,255,.08);

  --tx-success-bg:#ecfdf3;
  --tx-success-text:#166534;
  --tx-success-border:#bbf7d0;

  --tx-warning-bg:#fffbeb;
  --tx-warning-text:#92400e;
  --tx-warning-border:#fde68a;

  --tx-danger-bg:#fff1f2;
  --tx-danger-text:#be123c;
  --tx-danger-border:#fecdd3;
}


/* ==========================================================
   DOCUMENTO
   ========================================================== */

html[data-theme="dark"] body{
  background-color:var(--tx-bg)!important;
  color:var(--tx-text);
}


/* ==========================================================
   COMPONENTES BASE
   ========================================================== */

html[data-theme] body .panel,
html[data-theme] body .eventcard,
html[data-theme] body .empty{
  background-color:var(--tx-surface)!important;
  border-color:var(--tx-border)!important;
  color:var(--tx-text)!important;
}


/* ==========================================================
   BOTONES SECUNDARIOS
   ========================================================== */

html[data-theme] body .btn.ghost,
html[data-theme] body button.ghost,
html[data-theme] body .admin-toolbar a{
  background-color:var(--tx-surface-2)!important;
  border-color:var(--tx-border)!important;
  color:var(--tx-text)!important;
}

html[data-theme] body .btn.ghost:hover,
html[data-theme] body button.ghost:hover,
html[data-theme] body .admin-toolbar a:hover{
  background-color:var(--tx-surface-3)!important;
  border-color:rgba(123,45,255,.48)!important;
  color:var(--purple)!important;
}


/* ==========================================================
   FORMULARIOS
   ========================================================== */

html[data-theme] body input:not([type="checkbox"]):not([type="radio"]),
html[data-theme] body select,
html[data-theme] body textarea{
  background-color:var(--tx-surface-2)!important;
  border-color:var(--tx-border)!important;
  color:var(--tx-text)!important;
}

html[data-theme] body input::placeholder,
html[data-theme] body textarea::placeholder{
  color:var(--tx-muted)!important;
  opacity:.78;
}

html[data-theme="dark"] body select option{
  background:#10203f;
  color:#f7f9ff;
}


/* ==========================================================
   PILLS / ESTADOS
   ========================================================== */

html[data-theme] body .pill,
html[data-theme] body .status{
  background-color:var(--tx-purple-soft)!important;
  border-color:rgba(123,45,255,.28)!important;
  color:var(--purple)!important;
}


/* ÉXITO */

html[data-theme] body .status.active,
html[data-theme] body .status.verified,
html[data-theme] body .status.published,
html[data-theme] body .status.paid,
html[data-theme] body .status.valid,
html[data-theme] body .status.completed,
html[data-theme] body .status.approved{
  background-color:var(--tx-success-bg)!important;
  border-color:var(--tx-success-border)!important;
  color:var(--tx-success-text)!important;
}


/* PENDIENTE */

html[data-theme] body .status.pending,
html[data-theme] body .status.review,
html[data-theme] body .status.draft,
html[data-theme] body .status.processing{
  background-color:var(--tx-warning-bg)!important;
  border-color:var(--tx-warning-border)!important;
  color:var(--tx-warning-text)!important;
}


/* ERROR / CANCELADO */

html[data-theme] body .status.suspended,
html[data-theme] body .status.cancelled,
html[data-theme] body .status.refunded,
html[data-theme] body .status.failed,
html[data-theme] body .status.rejected{
  background-color:var(--tx-danger-bg)!important;
  border-color:var(--tx-danger-border)!important;
  color:var(--tx-danger-text)!important;
}


/* INACTIVO */

html[data-theme] body .status.inactive{
  background-color:var(--tx-surface-3)!important;
  border-color:var(--tx-border)!important;
  color:var(--tx-muted)!important;
}


/* ==========================================================
   NOTICES / EMPTY STATES
   ========================================================== */

html[data-theme] body .notice{
  background-color:var(--tx-surface-2)!important;
  border-color:var(--tx-border)!important;
  color:var(--tx-text-soft)!important;
}

html[data-theme] body .empty{
  color:var(--tx-muted)!important;
}


/* ==========================================================
   FLASH MESSAGES
   ========================================================== */

html[data-theme] body .flash{
  background-color:var(--tx-surface)!important;
  border-color:var(--tx-border)!important;
  color:var(--tx-text)!important;
}

html[data-theme] body .flash.success{
  background-color:var(--tx-success-bg)!important;
  border-color:var(--tx-success-border)!important;
  color:var(--tx-success-text)!important;
}

html[data-theme] body .flash.error{
  background-color:var(--tx-danger-bg)!important;
  border-color:var(--tx-danger-border)!important;
  color:var(--tx-danger-text)!important;
}


/* ==========================================================
   TABLAS
   ========================================================== */

html[data-theme] body table{
  color:var(--tx-text);
}

html[data-theme] body thead{
  background-color:var(--tx-surface-2)!important;
}

html[data-theme] body th{
  color:var(--tx-muted)!important;
  border-color:var(--tx-border)!important;
}

html[data-theme] body td{
  border-color:var(--tx-border)!important;
}

html[data-theme="dark"] body tbody tr{
  background-color:transparent;
}

html[data-theme="dark"] body tbody tr:hover{
  background-color:rgba(255,255,255,.025);
}


/* ==========================================================
   MODALES / POPOVERS / DROPDOWNS GENÉRICOS
   ========================================================== */

html[data-theme] body .modal,
html[data-theme] body .modal-card,
html[data-theme] body .modal-content,
html[data-theme] body .dialog-card,
html[data-theme] body .popover,
html[data-theme] body .dropdown-menu{
  background-color:var(--tx-surface)!important;
  border-color:var(--tx-border)!important;
  color:var(--tx-text)!important;
}


/* ==========================================================
   NAVEGACIÓN ANTIGUA / FALLBACK
   No afecta txp-mobile-command.
   ========================================================== */

html[data-theme="dark"] body .mobile-menu:not(.txp-mobile-command){
  background-color:var(--tx-surface)!important;
  border-color:var(--tx-border)!important;
}

html[data-theme="dark"] body .menu-toggle{
  background-color:var(--tx-surface-2)!important;
  border-color:var(--tx-border)!important;
}


/* ==========================================================
   HEADER
   ========================================================== */

html[data-theme="dark"] body .site-header{
  background:rgba(9,21,47,.94)!important;
  border-bottom-color:var(--tx-border)!important;
}

html[data-theme="dark"] body .site-header .desktop-nav,
html[data-theme="dark"] body .site-header .account-nav,
html[data-theme="dark"] body .login-link,
html[data-theme="dark"] body .linkbtn{
  color:var(--tx-text-soft)!important;
}


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

html[data-theme="dark"] body .footer{
  background-color:#071229!important;
  border-color:var(--tx-border)!important;
  color:var(--tx-muted)!important;
}

html[data-theme="dark"] body .footer strong{
  color:var(--tx-text)!important;
}

html[data-theme="dark"] body .footer-bottom{
  border-color:var(--tx-border)!important;
}


/* ==========================================================
   TEXTO DE PANELES
   ========================================================== */

html[data-theme="dark"] body .panel h1,
html[data-theme="dark"] body .panel h2,
html[data-theme="dark"] body .panel h3,
html[data-theme="dark"] body .dashboard-head h1{
  color:var(--tx-text)!important;
}

html[data-theme="dark"] body .muted{
  color:var(--tx-muted)!important;
}


/* ==========================================================
   EVENTOS
   ========================================================== */

html[data-theme="dark"] body .eventbody h3{
  color:var(--tx-text)!important;
}

html[data-theme="dark"] body .eventbody p,
html[data-theme="dark"] body .eventmeta{
  color:var(--tx-muted)!important;
}


/* ==========================================================
   IMPORTANTE:
   NO tocamos elementos blancos intencionales como:
   - imágenes
   - QR
   - botones CTA específicamente blancos
   - overlays fotográficos
   ========================================================== */


/* ==========================================================
   TICKEXPA GLOBAL THEME GUARD V2
   Segunda pasada sobre módulos especializados.
   ========================================================== */


/* ==========================================================
   VARIABLES DE COMPATIBILIDAD CON COMPONENTES ANTIGUOS
   ========================================================== */

html[data-theme="dark"]{
  --line:var(--tx-border);
  --surface:var(--tx-surface);
}

html[data-theme="light"]{
  --surface:var(--tx-surface);
}


/* ==========================================================
   CONTENEDORES DE ADMIN / PRODUCTOR / WALLET
   ========================================================== */

html[data-theme="dark"] body .admin-grid > *,
html[data-theme="dark"] body .form-card,
html[data-theme="dark"] body .settings-card,
html[data-theme="dark"] body .summary-card,
html[data-theme="dark"] body .stat-card,
html[data-theme="dark"] body .metric-card,
html[data-theme="dark"] body .wallet-card,
html[data-theme="dark"] body .order-card,
html[data-theme="dark"] body .ticket-card,
html[data-theme="dark"] body .report-card{
  background:var(--tx-surface)!important;
  border-color:var(--tx-border)!important;
  color:var(--tx-text)!important;
}

html[data-theme="light"] body .admin-grid > *,
html[data-theme="light"] body .form-card,
html[data-theme="light"] body .settings-card,
html[data-theme="light"] body .summary-card,
html[data-theme="light"] body .stat-card,
html[data-theme="light"] body .metric-card,
html[data-theme="light"] body .wallet-card,
html[data-theme="light"] body .order-card,
html[data-theme="light"] body .ticket-card,
html[data-theme="light"] body .report-card{
  background:var(--tx-surface)!important;
  border-color:var(--tx-border)!important;
}


/* ==========================================================
   ROLE MENUS / NAVEGACIÓN
   ========================================================== */

html[data-theme="dark"] body .txp-role-panel,
html[data-theme="dark"] body .role-menu-popover{
  background:#0d1b37!important;
  border-color:var(--tx-border)!important;
  color:var(--tx-text)!important;
}

html[data-theme="dark"] body .txp-role-head{
  border-color:var(--tx-border)!important;
}

html[data-theme="dark"] body .txp-role-panel .txp-nav-section > a{
  color:var(--tx-text-soft)!important;
}

html[data-theme="dark"] body .txp-role-panel .txp-nav-section > a:hover,
html[data-theme="dark"] body .txp-role-panel .txp-nav-section > a.txp-current{
  background:rgba(123,45,255,.15)!important;
  color:#fff!important;
}

html[data-theme="light"] body .txp-role-panel{
  background:#fff!important;
  border-color:var(--tx-border)!important;
}

html[data-theme="light"] body .txp-role-panel .txp-nav-section > a{
  color:#334155!important;
}


/* ==========================================================
   MOBILE COMMAND CENTER
   ========================================================== */

html[data-theme="dark"] body .txp-command-quick > a,
html[data-theme="dark"] body .txp-command-group-panel > a,
html[data-theme="dark"] body .txp-command-explore-grid > a{
  background:rgba(255,255,255,.045)!important;
  border-color:rgba(255,255,255,.10)!important;
  color:#f7f9ff!important;
}

html[data-theme="dark"] body .txp-command-quick > a:hover,
html[data-theme="dark"] body .txp-command-group-panel > a:hover,
html[data-theme="dark"] body .txp-command-explore-grid > a:hover{
  background:rgba(123,45,255,.16)!important;
  border-color:rgba(123,45,255,.35)!important;
}


/* ==========================================================
   PAYMENT / PROVIDER MODULES
   ========================================================== */

html[data-theme="dark"] body .provider-picker,
html[data-theme="dark"] body .provider-card,
html[data-theme="dark"] body .provider-option,
html[data-theme="dark"] body .payment-card,
html[data-theme="dark"] body .gateway-card,
html[data-theme="dark"] body .payment-box,
html[data-theme="dark"] body .checkout-card{
  background:var(--tx-surface)!important;
  border-color:var(--tx-border)!important;
  color:var(--tx-text)!important;
}

html[data-theme="light"] body .provider-picker,
html[data-theme="light"] body .provider-card,
html[data-theme="light"] body .provider-option,
html[data-theme="light"] body .payment-card,
html[data-theme="light"] body .gateway-card,
html[data-theme="light"] body .payment-box,
html[data-theme="light"] body .checkout-card{
  background:#fff!important;
  border-color:var(--tx-border)!important;
}


/* ==========================================================
   ESCÁNER
   Mantiene significado de colores sin tarjetas blancas.
   ========================================================== */

html[data-theme="dark"] body .scan-kind-used{
  background:rgba(244,63,94,.14)!important;
  border-color:rgba(244,63,94,.45)!important;
  color:#fda4af!important;
}

html[data-theme="dark"] body .scan-kind-network{
  background:rgba(245,158,11,.14)!important;
  border-color:rgba(245,158,11,.42)!important;
  color:#fcd34d!important;
}

html[data-theme="dark"] body .scan-kind-closed{
  background:rgba(148,163,184,.12)!important;
  border-color:var(--tx-border)!important;
  color:#cbd5e1!important;
}


/* ==========================================================
   VENUE DESIGNER
   OSCURECEMOS LA INTERFAZ, NO EL LIENZO.
   ========================================================== */

html[data-theme="dark"] body .vd-page{
  background:var(--tx-bg)!important;
  color:var(--tx-text)!important;
}

html[data-theme="dark"] body .vd-sidebar,
html[data-theme="dark"] body .vd-center{
  background:var(--tx-surface)!important;
  border-color:var(--tx-border)!important;
  color:var(--tx-text)!important;
}

html[data-theme="dark"] body .vd-template-grid button,
html[data-theme="dark"] body .vd-tool-list button,
html[data-theme="dark"] body .vd-secondary-btn,
html[data-theme="dark"] body .vd-level-list button,
html[data-theme="dark"] body .vd-easy-add button,
html[data-theme="dark"] body .vd-section-list button,
html[data-theme="dark"] body .vd-focus-btn,
html[data-theme="dark"] body .vd-view-switch{
  background:var(--tx-surface-2)!important;
  border-color:var(--tx-border)!important;
  color:var(--tx-text)!important;
}

html[data-theme="dark"] body .vd-template-grid button:hover,
html[data-theme="dark"] body .vd-tool-list button:hover,
html[data-theme="dark"] body .vd-secondary-btn:hover,
html[data-theme="dark"] body .vd-level-list button:hover,
html[data-theme="dark"] body .vd-easy-add button:hover,
html[data-theme="dark"] body .vd-section-list button:hover{
  background:var(--tx-surface-3)!important;
  border-color:rgba(123,45,255,.55)!important;
}

html[data-theme="dark"] body .vd-seat-quick,
html[data-theme="dark"] body .vd-inspector-empty{
  background:var(--tx-surface-2)!important;
  border-color:var(--tx-border)!important;
  color:var(--tx-text-soft)!important;
}

html[data-theme="dark"] body .vd-dialog{
  background:var(--tx-surface)!important;
  color:var(--tx-text)!important;
}

/*
   INTENCIONAL:
   .vd-stage-wrap / canvas / objetos del plano NO se fuerzan
   a oscuro. El área de diseño conserva contraste neutro.
*/


/* ==========================================================
   VENUE VIEWER
   INTERFAZ OSCURA, MAPA/ASIENTOS CONSERVAN SUS COLORES.
   ========================================================== */

html[data-theme="dark"] body .txp-pro-levels,
html[data-theme="dark"] body .txp-pro-legend{
  background:var(--tx-surface)!important;
  border-color:var(--tx-border)!important;
  color:var(--tx-muted)!important;
}

html[data-theme="dark"] body .txp-pro-detail{
  background:var(--tx-bg)!important;
}

html[data-theme="dark"] body .txp-zone-card{
  background:var(--tx-surface)!important;
  border-color:var(--tx-border)!important;
  color:var(--tx-text)!important;
}

html[data-theme="dark"] body .txp-zone-card h3{
  color:var(--tx-text)!important;
}

html[data-theme="dark"] body .txp-zone-card p{
  color:var(--tx-muted)!important;
}

/*
   INTENCIONAL:
   .txp-pro-seat
   .txp-pro-label
   mapa de asientos y estados de butacas
   conservan su propia codificación visual.
*/


/* ==========================================================
   FORM SECTIONS / CONFIGURATION BOXES
   ========================================================== */

html[data-theme="dark"] body fieldset,
html[data-theme="dark"] body .field-group,
html[data-theme="dark"] body .settings-group,
html[data-theme="dark"] body .config-box{
  border-color:var(--tx-border)!important;
}

html[data-theme="dark"] body legend,
html[data-theme="dark"] body label{
  color:var(--tx-text-soft);
}


/* ==========================================================
   LISTAS / FILAS INTERACTIVAS
   ========================================================== */

html[data-theme="dark"] body .list-row,
html[data-theme="dark"] body .data-row,
html[data-theme="dark"] body .settings-row,
html[data-theme="dark"] body .user-row,
html[data-theme="dark"] body .payment-row{
  background:var(--tx-surface)!important;
  border-color:var(--tx-border)!important;
  color:var(--tx-text)!important;
}


/* ==========================================================
   DETAILS / ACCORDIONS
   ========================================================== */

html[data-theme="dark"] body details{
  border-color:var(--tx-border);
}

html[data-theme="dark"] body details > summary{
  color:var(--tx-text);
}


/* ==========================================================
   CODE / PRE / MONOSPACE DATA
   ========================================================== */

html[data-theme="dark"] body pre,
html[data-theme="dark"] body code{
  background:var(--tx-surface-2);
  color:var(--tx-text-soft);
}


/* ==========================================================
   EVITAR TEXTO OSCURO HEREDADO EN SUPERFICIES OSCURAS
   ========================================================== */

html[data-theme="dark"] body .panel strong,
html[data-theme="dark"] body .panel b{
  color:inherit;
}


/* ==========================================================
   COMPONENTES BLANCOS DELIBERADOS
   NO modificar:
   ========================================================== */

/*
   .light-button
   QR canvases / QR images
   mapas de asientos
   poster overlays
   slider dots activos
   logos
   imágenes
*/


/* ==========================================================
   TICKEXPA · GLOBAL SELECT SYSTEM
   Moderniza todos los dropdowns estándar de la plataforma.
   ========================================================== */

html[data-theme] body
select:not([multiple]):not(.txp-filter-native):not(.txp-native-select){

  -webkit-appearance:none!important;
  -moz-appearance:none!important;
  appearance:none!important;

  min-height:44px;

  padding:
    0
    42px
    0
    14px!important;

  border-radius:13px!important;

  border:
    1px solid
    var(--tx-border)!important;

  background-color:
    var(--tx-surface-2)!important;

  color:
    var(--tx-text)!important;

  font:inherit;
  font-size:14px;
  font-weight:600;

  cursor:pointer;

  background-image:
    linear-gradient(
      45deg,
      transparent 50%,
      currentColor 50%
    ),
    linear-gradient(
      135deg,
      currentColor 50%,
      transparent 50%
    )!important;

  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%!important;

  background-size:
    5px 5px,
    5px 5px!important;

  background-repeat:
    no-repeat!important;

  box-shadow:
    0 1px 2px
    rgba(0,0,0,.04);

  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background-color .18s ease;
}


/* Hover */

html[data-theme] body
select:not([multiple]):not(.txp-filter-native):not(.txp-native-select):hover{

  border-color:
    rgba(123,45,255,.48)!important;

  background-color:
    var(--tx-surface-3)!important;
}


/* Focus */

html[data-theme] body
select:not([multiple]):not(.txp-filter-native):not(.txp-native-select):focus{

  outline:none!important;

  border-color:
    rgba(123,45,255,.72)!important;

  box-shadow:
    0 0 0 3px
    rgba(123,45,255,.12)!important;
}


/* Disabled */

html[data-theme] body
select:not([multiple]):disabled{

  opacity:.55;
  cursor:not-allowed;
}


/* Opciones */

html[data-theme="dark"] body select option{

  background:#10203f;
  color:#f8fafc;
}

html[data-theme="light"] body select option{

  background:#ffffff;
  color:#0f172a;
}


/* ==========================================================
   SELECT MULTIPLE
   ========================================================== */

html[data-theme] body select[multiple]{

  min-height:120px;

  padding:10px!important;

  border-radius:13px!important;

  border:
    1px solid
    var(--tx-border)!important;

  background:
    var(--tx-surface-2)!important;

  color:
    var(--tx-text)!important;
}


/* ==========================================================
   SELECT PEQUEÑO
   Para tablas / toolbars compactos
   ========================================================== */

html[data-theme] body select.small,
html[data-theme] body select.txp-select-sm{

  min-height:36px!important;

  padding:
    0
    36px
    0
    11px!important;

  border-radius:10px!important;

  font-size:12px!important;

  background-position:
    calc(100% - 16px) 50%,
    calc(100% - 11px) 50%!important;
}


/* ==========================================================
   SELECT GRANDE
   Para formularios principales
   ========================================================== */

html[data-theme] body select.txp-select-lg{

  min-height:50px!important;

  border-radius:15px!important;

  padding-left:16px!important;
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media(max-width:700px){

  html[data-theme] body
  select:not([multiple]):not(.txp-filter-native):not(.txp-native-select){

    width:100%;
    min-height:46px;
    font-size:16px;
  }

}


/* ==========================================================
   TICKEXPA · GLOBAL INPUT SYSTEM
   Moderniza inputs, búsquedas y textareas en toda la app.
   ========================================================== */

html[data-theme] body input:not(.txp-input-bare):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
html[data-theme] body textarea{
  -webkit-appearance:none!important;
  appearance:none!important;
  width:100%;
  min-height:46px;
  padding:0 14px!important;
  border-radius:14px!important;
  border:1px solid rgba(255,255,255,.12)!important;
  background:rgba(255,255,255,.04)!important;
  color:#F5F7FF!important;
  font-size:15px!important;
  font-weight:500!important;
  line-height:1.2!important;
  box-shadow:none!important;
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background-color .18s ease,
    transform .18s ease!important;
}

html[data-theme] body textarea{
  min-height:120px;
  padding:14px!important;
  resize:vertical;
}

html[data-theme] body input::placeholder,
html[data-theme] body textarea::placeholder{
  color:rgba(220,228,255,.58)!important;
  font-weight:400!important;
}

html[data-theme] body input:not(.txp-input-bare):hover,
html[data-theme] body textarea:hover{
  border-color:rgba(146,116,255,.42)!important;
  background:rgba(255,255,255,.055)!important;
}

html[data-theme] body input:not(.txp-input-bare):focus,
html[data-theme] body textarea:focus{
  outline:none!important;
  border-color:#7C3AED!important;
  background:rgba(255,255,255,.07)!important;
  box-shadow:0 0 0 4px rgba(124,58,237,.18)!important;
}

/* Search */
html[data-theme] body input[type="search"]:not(.txp-input-bare){
  border-radius:16px!important;
}

/* Disabled */
html[data-theme] body input:disabled,
html[data-theme] body textarea:disabled{
  opacity:.72!important;
  cursor:not-allowed!important;
}

/* Autofill */
html[data-theme] body input:-webkit-autofill,
html[data-theme] body input:-webkit-autofill:hover,
html[data-theme] body input:-webkit-autofill:focus,
html[data-theme] body textarea:-webkit-autofill{
  -webkit-text-fill-color:#F5F7FF!important;
  -webkit-box-shadow:0 0 0 1000px rgba(255,255,255,.04) inset!important;
  transition:background-color 9999s ease-in-out 0s!important;
}

/* Light theme */
html[data-theme="light"] body input:not(.txp-input-bare):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
html[data-theme="light"] body textarea{
  border:1px solid rgba(16,24,40,.10)!important;
  background:rgba(10,20,45,.035)!important;
  color:#13203A!important;
}

html[data-theme="light"] body input::placeholder,
html[data-theme="light"] body textarea::placeholder{
  color:rgba(19,32,58,.48)!important;
}

html[data-theme="light"] body input:not(.txp-input-bare):hover,
html[data-theme="light"] body textarea:hover{
  border-color:rgba(124,58,237,.35)!important;
  background:rgba(10,20,45,.05)!important;
}

html[data-theme="light"] body input:not(.txp-input-bare):focus,
html[data-theme="light"] body textarea:focus{
  border-color:#7C3AED!important;
  background:#FFFFFF!important;
  box-shadow:0 0 0 4px rgba(124,58,237,.14)!important;
}



/* ==========================================================
   TICKEXPA · SEARCH BAR FIX
   Un solo contenedor visual para buscadores compuestos.
   ========================================================== */

html[data-theme] body .txp-crm-search{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;

  min-height:48px!important;
  padding:0 14px!important;

  border:1px solid var(--tx-border)!important;
  border-radius:15px!important;

  background:var(--tx-surface-2)!important;

  box-shadow:none!important;

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


html[data-theme] body .txp-crm-search:hover{
  border-color:rgba(123,45,255,.38)!important;
}


html[data-theme] body .txp-crm-search:focus-within{
  border-color:#7c3aed!important;

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


/* El input NO es otra tarjeta */
html[data-theme] body
.txp-crm-search input[type="search"]{

  width:100%!important;
  min-width:0!important;

  min-height:44px!important;
  height:44px!important;

  padding:0!important;

  border:0!important;
  border-radius:0!important;

  outline:0!important;

  background:transparent!important;

  box-shadow:none!important;

  color:var(--tx-text)!important;

  font-size:14px!important;
  font-weight:500!important;
}


html[data-theme] body
.txp-crm-search input[type="search"]:hover,

html[data-theme] body
.txp-crm-search input[type="search"]:focus{

  border:0!important;
  outline:0!important;

  background:transparent!important;

  box-shadow:none!important;
}


html[data-theme] body
.txp-crm-search input[type="search"]::placeholder{

  color:var(--tx-muted)!important;
  opacity:.78!important;
}


/* Quitar decoración nativa del navegador */
html[data-theme] body
.txp-crm-search input[type="search"]::-webkit-search-decoration{

  -webkit-appearance:none;
}


html[data-theme] body
.txp-crm-search > span:first-child{

  flex:0 0 auto;

  display:grid!important;
  place-items:center!important;

  width:20px;
  height:20px;

  color:#9c7cff!important;

  font-size:15px!important;
  opacity:1!important;
}


/* LIGHT */

html[data-theme="light"] body .txp-crm-search{
  background:#fff!important;
  border-color:#dce3ef!important;
}

html[data-theme="light"] body .txp-crm-search:focus-within{
  border-color:#7c3aed!important;

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



/* ==========================================================
   TICKEXPA · BARE INPUT
   Para inputs que viven dentro de una superficie compuesta.
   El contenedor dibuja el borde; el input NO.
   ========================================================== */

html[data-theme] body input.txp-input-bare{
  -webkit-appearance:none!important;
  appearance:none!important;

  width:100%!important;
  min-width:0!important;

  margin:0!important;
  padding:0!important;

  border:0!important;
  border-width:0!important;
  border-style:none!important;
  border-radius:0!important;

  outline:0!important;

  background:none!important;
  background-color:transparent!important;
  background-image:none!important;

  box-shadow:none!important;

  color:var(--tx-text)!important;

  font:inherit!important;
}


html[data-theme] body input.txp-input-bare:hover,
html[data-theme] body input.txp-input-bare:focus,
html[data-theme] body input.txp-input-bare:active{

  border:0!important;
  border-width:0!important;

  outline:0!important;

  background:none!important;
  background-color:transparent!important;
  background-image:none!important;

  box-shadow:none!important;
}


html[data-theme] body input.txp-input-bare::placeholder{
  color:var(--tx-muted)!important;
  opacity:.72!important;
}


/* Evita decoración visual nativa del buscador */
html[data-theme] body
input.txp-input-bare[type="search"]::-webkit-search-decoration{

  -webkit-appearance:none!important;
}


/* El botón X nativo se mantiene, pero sin superficie */
html[data-theme] body
input.txp-input-bare[type="search"]::-webkit-search-cancel-button{

  cursor:pointer;
}



/* ==========================================================
   TICKEXPA · GLOBAL SEARCH SYSTEM
   Una sola superficie visual para todos los buscadores.
   ========================================================== */


/* ----------------------------------------------------------
   BARRA COMPUESTA
   ---------------------------------------------------------- */

html[data-theme] body .txp-search-shell{

  display:flex!important;
  align-items:center!important;

  width:100%;

  min-height:46px!important;

  gap:9px!important;

  padding:
    0
    13px!important;

  border:
    1px solid
    var(--tx-border)!important;

  border-radius:
    14px!important;

  background:
    var(--tx-surface-2)!important;

  box-shadow:
    none!important;

  overflow:hidden;

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


html[data-theme] body
.txp-search-shell:hover{

  border-color:
    rgba(123,45,255,.38)!important;
}


html[data-theme] body
.txp-search-shell:focus-within{

  border-color:
    #7c3aed!important;

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


/* ----------------------------------------------------------
   INPUT INTERIOR
   NO CREA SEGUNDA TARJETA
   ---------------------------------------------------------- */

html[data-theme] body
.txp-search-shell >
input[type="search"]{

  flex:1 1 auto!important;

  width:100%!important;
  min-width:0!important;

  height:44px!important;
  min-height:44px!important;

  margin:0!important;

  padding:
    0!important;

  border:
    0!important;

  border-width:
    0!important;

  border-style:
    none!important;

  border-radius:
    0!important;

  outline:
    0!important;

  background:
    transparent!important;

  background-color:
    transparent!important;

  background-image:
    none!important;

  box-shadow:
    none!important;

  color:
    var(--tx-text)!important;

  font-size:
    14px!important;

  font-weight:
    500!important;
}


html[data-theme] body
.txp-search-shell >
input[type="search"]:hover,

html[data-theme] body
.txp-search-shell >
input[type="search"]:focus,

html[data-theme] body
.txp-search-shell >
input[type="search"]:active{

  border:
    0!important;

  outline:
    0!important;

  background:
    transparent!important;

  box-shadow:
    none!important;
}


/* ----------------------------------------------------------
   PLACEHOLDER
   ---------------------------------------------------------- */

html[data-theme] body
.txp-search-shell >
input[type="search"]::placeholder{

  color:
    var(--tx-muted)!important;

  opacity:
    .76!important;
}


/* ----------------------------------------------------------
   ICONO
   ---------------------------------------------------------- */

html[data-theme] body
.txp-search-shell >
.txp-search-icon{

  flex:
    0 0 20px!important;

  width:
    20px!important;

  height:
    20px!important;

  display:
    grid!important;

  place-items:
    center!important;

  margin:
    0!important;

  padding:
    0!important;

  border:
    0!important;

  border-radius:
    0!important;

  background:
    transparent!important;

  box-shadow:
    none!important;

  color:
    #9d79ff!important;

  opacity:
    1!important;

  font-size:
    15px!important;
}


/* ----------------------------------------------------------
   DECORACIÓN NATIVA SEARCH
   ---------------------------------------------------------- */

html[data-theme] body
.txp-search-shell
input[type="search"]::-webkit-search-decoration{

  -webkit-appearance:
    none!important;
}


html[data-theme] body
.txp-search-shell
input[type="search"]::-webkit-search-cancel-button{

  cursor:pointer;
}


/* ----------------------------------------------------------
   BUSCADOR STANDALONE
   Si no vive dentro de una barra.
   ---------------------------------------------------------- */

html[data-theme] body
input[type="search"].txp-search-standalone{

  min-height:
    46px!important;

  padding:
    0 14px!important;

  border-radius:
    14px!important;

  border:
    1px solid
    var(--tx-border)!important;

  background:
    var(--tx-surface-2)!important;

  color:
    var(--tx-text)!important;
}


html[data-theme] body
input[type="search"].txp-search-standalone:focus{

  outline:
    none!important;

  border-color:
    #7c3aed!important;

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


/* ----------------------------------------------------------
   LIGHT
   ---------------------------------------------------------- */

html[data-theme="light"] body
.txp-search-shell,

html[data-theme="light"] body
input[type="search"].txp-search-standalone{

  background:
    #fff!important;

  border-color:
    #dce3ed!important;
}


html[data-theme="light"] body
.txp-search-shell:focus-within{

  border-color:
    #7c3aed!important;

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


/* ----------------------------------------------------------
   MOBILE
   ---------------------------------------------------------- */

@media(max-width:700px){

  html[data-theme] body
  .txp-search-shell{

    min-height:
      48px!important;
  }


  html[data-theme] body
  .txp-search-shell >
  input[type="search"]{

    font-size:
      16px!important;
  }

}

