/* GM dark theme — Bootstrap dropdowns, selects, autocomplete lists (portal + Panel GM) */

body.panel-gm-theme,
body.portal-theme-grafica {
  color-scheme: dark;
  --bs-dropdown-bg: #141414;
  --bs-dropdown-color: #f5f5f5;
  --bs-dropdown-border-color: rgba(230, 82, 151, 0.35);
  --bs-dropdown-link-color: #f3f4f6;
  --bs-dropdown-link-hover-color: #f6d76b;
  --bs-dropdown-link-hover-bg: rgba(230, 82, 151, 0.14);
  --bs-dropdown-link-active-color: #f6d76b;
  --bs-dropdown-link-active-bg: rgba(246, 215, 107, 0.12);
  --bs-dropdown-link-disabled-color: rgba(255, 255, 255, 0.45);
  --bs-dropdown-divider-bg: rgba(255, 255, 255, 0.1);
  --bs-dropdown-box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55), 0 0 40px rgba(230, 82, 151, 0.08);
}

body.portal-theme-grafica {
  --bs-dropdown-link-hover-color: #fbc2eb;
  --bs-dropdown-link-active-color: #f6d76b;
  --bs-dropdown-border-color: rgba(230, 82, 151, 0.4);
}

body.panel-gm-theme .dropdown-menu,
body.portal-theme-grafica .dropdown-menu,
body.panel-gm-theme .dropdown-menu.show,
body.portal-theme-grafica .dropdown-menu.show {
  background: linear-gradient(165deg, #141414 0%, #0a0a0a 100%) !important;
  color: #f5f5f5 !important;
  border: 1px solid rgba(230, 82, 151, 0.35) !important;
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(230, 82, 151, 0.08) !important;
  padding: 0.35rem !important;
}

body.panel-gm-theme .dropdown-menu::before,
body.portal-theme-grafica .dropdown-menu::before {
  content: "";
  display: block;
  height: 3px;
  margin: -0.35rem -0.35rem 0.35rem;
  border-radius: inherit inherit 0 0;
  background: linear-gradient(90deg, #e65297, #f6d76b);
  opacity: 0.85;
}

body.panel-gm-theme .dropdown-item,
body.portal-theme-grafica .dropdown-item {
  color: #f3f4f6 !important;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
}

body.panel-gm-theme .dropdown-item:hover,
body.panel-gm-theme .dropdown-item:focus,
body.portal-theme-grafica .dropdown-item:hover,
body.portal-theme-grafica .dropdown-item:focus {
  background: rgba(230, 82, 151, 0.14) !important;
  color: #f6d76b !important;
}

body.portal-theme-grafica .dropdown-item:hover,
body.portal-theme-grafica .dropdown-item:focus {
  color: #fbc2eb !important;
}

body.panel-gm-theme .dropdown-item.active,
body.panel-gm-theme .dropdown-item:active,
body.portal-theme-grafica .dropdown-item.active,
body.portal-theme-grafica .dropdown-item:active {
  background: rgba(246, 215, 107, 0.15) !important;
  color: #f6d76b !important;
}

body.panel-gm-theme .dropdown-item.disabled,
body.panel-gm-theme .dropdown-item:disabled,
body.portal-theme-grafica .dropdown-item.disabled,
body.portal-theme-grafica .dropdown-item:disabled {
  color: rgba(255, 255, 255, 0.4) !important;
}

body.panel-gm-theme .dropdown-divider,
body.portal-theme-grafica .dropdown-divider {
  border-color: rgba(255, 255, 255, 0.1) !important;
  opacity: 1;
}

body.panel-gm-theme .dropdown-header,
body.portal-theme-grafica .dropdown-header {
  color: #f6d76b !important;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Native select + closed form-select */
body.panel-gm-theme .form-select,
body.portal-theme-grafica .form-select,
body.panel-gm-theme main.container .form-select,
body.portal-theme-grafica main.container .form-select {
  background-color: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #f5f5f5 !important;
}

body.portal-theme-grafica main.container .form-select {
  background-color: #000 !important;
  border-color: rgba(230, 82, 151, 0.35) !important;
}

body.panel-gm-theme .form-select option,
body.portal-theme-grafica .form-select option {
  background: #141414;
  color: #f5f5f5;
}

body.panel-gm-theme .form-select:focus,
body.portal-theme-grafica .form-select:focus {
  border-color: #f6d76b !important;
  box-shadow: 0 0 0 0.2rem rgba(246, 215, 107, 0.2) !important;
}

body.portal-theme-grafica .form-select:focus {
  border-color: #e65297 !important;
  box-shadow: 0 0 0 0.2rem rgba(230, 82, 151, 0.25) !important;
}

/* Autocomplete / search result lists */
body.panel-gm-theme .list-group,
body.portal-theme-grafica .list-group {
  background: linear-gradient(165deg, #141414 0%, #0a0a0a 100%) !important;
  border: 1px solid rgba(230, 82, 151, 0.35) !important;
  border-radius: 10px !important;
  overflow: hidden;
}

body.panel-gm-theme .list-group-item,
body.portal-theme-grafica .list-group-item {
  background: transparent !important;
  color: #f5f5f5 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

body.panel-gm-theme .list-group-item:hover,
body.panel-gm-theme .list-group-item-action:hover,
body.portal-theme-grafica .list-group-item:hover,
body.portal-theme-grafica .list-group-item-action:hover {
  background: rgba(230, 82, 151, 0.12) !important;
  color: #f6d76b !important;
}

body.panel-gm-theme .list-group-item.active,
body.portal-theme-grafica .list-group-item.active {
  background: rgba(246, 215, 107, 0.15) !important;
  border-color: rgba(246, 215, 107, 0.25) !important;
  color: #f6d76b !important;
}

/* Pedidos calendario block dropdowns */
body.panel-gm-theme.page-pedidos-calendario .cal-block-dropdown-menu,
body.panel-gm-theme.page-pedidos-calendario .cal-block-assignee-menu {
  z-index: 1060 !important;
}

/* Clientes — violet accent on selects and dropdown hovers */
body.panel-gm-theme.page-pedidos-clientes .form-select:focus,
body.panel-gm-theme.page-pedidos-clientes .form-control:focus {
  border-color: var(--gm-violet-accent, #a78bfa) !important;
  box-shadow: 0 0 0 0.2rem rgba(167, 139, 250, 0.22) !important;
}

body.panel-gm-theme.page-pedidos-clientes .dropdown-item:hover,
body.panel-gm-theme.page-pedidos-clientes .dropdown-item:focus {
  color: var(--gm-violet-accent, #a78bfa) !important;
}

body.panel-gm-theme.page-pedidos-clientes .dropdown-item.active,
body.panel-gm-theme.page-pedidos-clientes .dropdown-item:active {
  color: #fff !important;
}

/* Cuenta corriente resumen — green accent on selects and dropdown hovers */
body.panel-gm-theme.page-pedidos-cuentacorriente .form-select:focus,
body.panel-gm-theme.page-pedidos-cuentacorriente .form-control:focus {
  border-color: var(--cc-accent, #4ade80) !important;
  box-shadow: 0 0 0 0.2rem rgba(74, 222, 128, 0.22) !important;
}

body.panel-gm-theme.page-pedidos-cuentacorriente .dropdown-item:hover,
body.panel-gm-theme.page-pedidos-cuentacorriente .dropdown-item:focus {
  color: var(--cc-accent, #4ade80) !important;
}

body.panel-gm-theme.page-pedidos-cuentacorriente .dropdown-item.active,
body.panel-gm-theme.page-pedidos-cuentacorriente .dropdown-item:active {
  color: #fff !important;
}

/* Interesados — orange accent on selects */
body.panel-gm-theme.page-pedidos-interesados .form-select:focus,
body.panel-gm-theme.page-pedidos-interesados .form-control:focus {
  border-color: var(--gm-orange-accent, #c2410c) !important;
  box-shadow: 0 0 0 0.2rem rgba(194, 65, 12, 0.22) !important;
}
