/* ══════════════════════════════════════════════════
   Dropdown inline (espaciosmaker_header placement)
══════════════════════════════════════════════════ */

.sipanel-action-menus-em-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 20px;
}

.sipanel-action-menus-em-actions-left {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.sipanel-action-menu {
  position: relative;
  display: inline-block;
  margin-left: auto;
}

.sipanel-action-menu summary {
  list-style: none;
}

.sipanel-action-menu summary::-webkit-details-marker {
  display: none;
}

.sipanel-action-menu__toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  margin: 0;
}

.sipanel-action-menu__summary-icon,
.sipanel-action-menu__item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
}

.sipanel-action-menu__menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 50;
  min-width: 260px;
  padding: 4px 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 4px;
  box-shadow: 0 6px 12px rgba(0,0,0,.175);
}

.sipanel-action-menu__menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  color: #333;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
}

.sipanel-action-menu__menu a:hover,
.sipanel-action-menu__menu a:focus {
  background: #f5f5f5;
  color: #262626;
  text-decoration: none;
}

.sipanel-action-menu__menu .sipanel-action-menu__item-icon {
  color: #b52b27;
  background: #f4e7e6;
}

@media (max-width: 768px) {
  .sipanel-action-menus-em-header {
    flex-direction: column;
    align-items: stretch;
  }

  .sipanel-action-menu {
    width: 100%;
    margin-left: 0;
  }

  .sipanel-action-menu__toggle {
    justify-content: center;
    width: 100%;
  }

  .sipanel-action-menu__menu {
    position: static;
    width: 100%;
    margin-top: 4px;
  }
}

/* ══════════════════════════════════════════════════
   Sidebar tab (floating_dropdown placement)
══════════════════════════════════════════════════ */

/* Tab — pestaña vertical fija en el borde derecho */
.sipanel-sidebar-menu__tab {
  position: fixed;
  top: 88px;
  right: 0;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #c0312e 0%, #8f1e1b 100%);
  color: #fff;
  border: none;
  border-radius: 8px 0 0 8px;
  padding: 12px 9px;
  cursor: pointer;
  box-shadow: -3px 2px 14px rgba(181,43,39,.4);
  transition: padding-right .18s, box-shadow .18s;
}

.sipanel-sidebar-menu__tab:hover {
  padding-right: 5px;
  box-shadow: -4px 3px 20px rgba(181,43,39,.55);
}

.sipanel-sidebar-menu__tab-icon {
  width: 24px;
  height: 24px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.sipanel-sidebar-menu__tab-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  white-space: nowrap;
}

.sipanel-sidebar-menu__tab-count {
  background: #ff4444;
  color: #fff;
  border-radius: 8px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  border: 2px solid #8f1e1b;
}

/* Backdrop */
.sipanel-sidebar-menu__backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.3);
  z-index: 9998;
}

.sipanel-sidebar-menu__backdrop.open {
  display: block;
}

/* Panel lateral */
.sipanel-sidebar-menu__panel {
  position: fixed;
  top: 0;
  right: -300px;
  bottom: 0;
  width: 280px;
  background: #fff;
  border-left: 3px solid #b52b27;
  box-shadow: -8px 0 28px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  transition: right .26s cubic-bezier(.4, 0, .2, 1);
}

.sipanel-sidebar-menu__panel.open {
  right: 0;
}

/* Cabecera del panel */
.sipanel-sidebar-menu__panel-header {
  background: linear-gradient(135deg, #b52b27 0%, #8f1e1b 100%);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.sipanel-sidebar-menu__panel-header h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sipanel-sidebar-menu__panel-header-icon {
  width: 24px;
  height: 24px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.sipanel-sidebar-menu__close {
  background: rgba(255,255,255,.15);
  border: none;
  border-radius: 5px;
  color: #fff;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.sipanel-sidebar-menu__close:hover {
  background: rgba(255,255,255,.28);
}

/* Cuerpo con los links */
.sipanel-sidebar-menu__body {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}

.sipanel-sidebar-menu__body a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: #222;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.3;
  border-left: 3px solid transparent;
  transition: background .1s, border-color .1s, color .1s;
}

.sipanel-sidebar-menu__body a:hover,
.sipanel-sidebar-menu__body a:focus {
  background: #fff5f5;
  border-left-color: #b52b27;
  color: #b52b27;
  text-decoration: none;
}

.sipanel-sidebar-menu__body a:hover .sipanel-sidebar-menu__item-icon,
.sipanel-sidebar-menu__body a:focus .sipanel-sidebar-menu__item-icon {
  background: #b52b27;
  color: #fff;
}

.sipanel-sidebar-menu__item-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #fde8e7;
  color: #b52b27;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
  transition: background .1s, color .1s;
}

/* Pie del panel */
.sipanel-sidebar-menu__footer {
  border-top: 1px solid #eee;
  padding: 10px 16px;
  background: #fafafa;
  font-size: 11px;
  color: #bbb;
  text-align: center;
  flex-shrink: 0;
}

/* Ajustes móvil */
@media (max-width: 768px) {
  .sipanel-sidebar-menu__tab {
    top: auto;
    bottom: 14px;
  }

  .sipanel-sidebar-menu__panel {
    width: 260px;
    right: -260px;
  }
}

/* Misc heredado */
.views-field-field-em-ref-administrativo h2 {
  display: none;
}

.table > thead > tr > th {
  min-width: 100px;
}
