/* ==========================================================
   FIR Montevideo - Histórico administrativo de eventos ATC
   UI consistente con el plugin de reservas de eventos
   ========================================================== */

.fir-mvd-events-history-root, .fir-mvd-events-history-root *{
  font-family: "Overpass", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  box-sizing: border-box;
}

.fir-mvd-events-history-root .fir-mvd-events-wrapper{
  width: 100%;
  max-width: none;
  margin: 0 0 24px 0;
  font-size: 15px;
}

/* Layout columnas */
.fir-mvd-events-history-root .fir-mvd-events-columns{
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 16px;
}

/* Lista izquierda */
.fir-mvd-events-history-root .fir-mvd-events-list{
  border: 1px solid #e5e7eb;
  background: #ffffff;
  min-height: 80px;
}

.fir-mvd-events-history-root .fir-mvd-events-list-ul{
  list-style: none;
  margin: 0;
  padding: 0;
}

.fir-mvd-events-history-root .fir-mvd-events-item{
  padding: 8px 4px;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  transition: background 0.15s ease, border-left-color 0.15s ease;
  border-left: 3px solid transparent;
}

.fir-mvd-events-history-root .fir-mvd-events-item:last-child{
  border-bottom: none;
}

.fir-mvd-events-history-root .fir-mvd-events-item:hover{
  background: #f3f4ff;
}

.fir-mvd-events-history-root .fir-mvd-events-item.is-selected{
  background: #e5effa;
  border-left-color: #0e446b;
}

.fir-mvd-events-history-root .fir-mvd-events-item-title{
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 3px;
}

.fir-mvd-events-history-root .fir-mvd-events-item-meta{
  font-size: 12px;
  color: #6b7280;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.fir-mvd-events-history-root .fir-mvd-events-item-location::before{
  content: "\2022 ";
}

.fir-mvd-events-history-root .fir-mvd-events-item-start::before{
  content: "\2022 ";
}

.fir-mvd-events-history-root .fir-mvd-events-loading, .fir-mvd-events-history-root .fir-mvd-events-empty, .fir-mvd-events-history-root .fir-mvd-events-hint, .fir-mvd-events-history-root .fir-mvd-events-error{
  margin: 8px 10px;
  font-size: 13px;
}

.fir-mvd-events-history-root .fir-mvd-events-error{
  color: #b91c1c;
}

/* Detalle derecha */
.fir-mvd-events-history-root .fir-mvd-events-detail{
  border: 1px solid #e5e7eb;
  background: #ffffff;
  min-height: 120px;
  padding: 10px 12px;
}

.fir-mvd-events-history-root .fir-mvd-events-detail-title{
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 700;
}

.fir-mvd-events-history-root .fir-mvd-events-detail-meta > div{
  margin-bottom: 2px;
}

.fir-mvd-events-history-root .fir-mvd-events-detail-meta strong{
  font-weight: 600;
}


/* Head: meta + banner */
.fir-mvd-events-history-root .fir-eh-event-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.fir-mvd-events-history-root .fir-eh-event-head-main{
  flex: 1 1 auto;
  min-width: 0;
}

.fir-mvd-events-history-root .fir-eh-event-head-banner{
  flex: 0 0 320px;
  max-width: 360px;
}

.fir-mvd-events-history-root .fir-eh-banner-thumb{
  width: 100%;
  aspect-ratio: 16/9;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  display: block;
}

/* Responsive: en pantallas chicas apilar */
@media (max-width: 720px){
  .fir-mvd-events-history-root .fir-eh-event-head{
    flex-direction: column;
  }
  .fir-mvd-events-history-root .fir-eh-event-head-banner{
    flex: 1 1 auto;
    max-width: 100%;
  }
}

/* Modal banner */
.fir-mvd-events-history-root .fir-eh-banner-modal{
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.fir-mvd-events-history-root .fir-eh-banner-modal.is-open{
  display: flex;
}

.fir-mvd-events-history-root .fir-eh-banner-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
}

.fir-mvd-events-history-root .fir-eh-banner-dialog{
  position: relative;
  z-index: 1;
  max-width: 95vw;
  max-height: 90vh;
}

.fir-mvd-events-history-root .fir-eh-banner-img{
  max-width: 95vw;
  max-height: 90vh;
  border-radius: 12px;
  background: #fff;
  display: block;
}

.fir-mvd-events-history-root .fir-eh-banner-close{
  position: absolute;
  top: -10px;
  right: -10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 32px;
  text-align: center;
}

/* ==========================================================
   Panel admin (alta manual) - mismo look que reservas
   ========================================================== */
.fir-mvd-events-history-root .fir-mvd-events-admin-box{
  margin-top: 10px;
  padding: 8px 4px;
  border-radius: 4px;
  border: 1px dashed #cbd5f5;
  background: #f3f4ff;
}

.fir-mvd-events-history-root .fir-mvd-events-admin-box h4{
  margin: 0 0 4px 0;
  font-size: 13px;
  font-weight: 700;
}

.fir-mvd-events-history-root .fir-mvd-events-admin-box p{
  margin: 0 0 6px 0;
  font-size: 12px;
  color: #4b5563;
}

.fir-mvd-events-history-root .fir-mvd-events-manual-panel{
  margin-top: 6px;
}

.fir-mvd-events-history-root .fir-mvd-events-manual-grid{
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 6px 12px;
  align-items: flex-end;
  margin-top: 4px;
}



/* Inline (1 fila) para Controlador / Posición / Desde / Hasta */
.fir-mvd-events-history-root .fir-mvd-events-manual-grid-inline{
  /* Queremos que entren en 1 sola línea dentro del contenedor del panel.
     Usamos minmax(0, ...) para permitir que el grid comprima en layouts angostos. */
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 0.8fr);
}

.fir-mvd-events-history-root .fir-mvd-events-manual-grid-inline .fir-mvd-events-field label{
  font-size: 12px;
}

.fir-mvd-events-history-root .fir-mvd-events-manual-grid-inline .fir-mvd-events-field select{
  font-size: 13px;
  padding: 5px 8px;
  height: 34px;
}

/* En pantallas chicas, bajamos a 2 columnas */
@media (max-width: 560px){
  .fir-mvd-events-history-root .fir-mvd-events-manual-grid-inline{
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 380px){
  .fir-mvd-events-history-root .fir-mvd-events-manual-grid-inline{
    grid-template-columns: 1fr;
  }
}
.fir-mvd-events-history-root .fir-mvd-events-manual-grid-time{
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.fir-mvd-events-history-root .fir-mvd-events-field{
  margin-bottom: 10px;
}

.fir-mvd-events-history-root .fir-mvd-events-field label{
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #374151;
}

.fir-mvd-events-history-root .fir-mvd-events-field select, .fir-mvd-events-history-root .fir-mvd-events-field input[type="text"], .fir-mvd-events-history-root .fir-mvd-events-field textarea{
  width: 100%;
  font-size: 15px;
  padding: 8px 4px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  color: #0e446b;
}

.fir-mvd-events-history-root .fir-mvd-events-field textarea{
  resize: vertical;
}

.fir-mvd-events-history-root .fir-mvd-events-field select:focus, .fir-mvd-events-history-root .fir-mvd-events-field input[type="text"]:focus, .fir-mvd-events-history-root .fir-mvd-events-field textarea:focus{
  outline: none;
  border-color: #0e446b;
  box-shadow: 0 0 0 1px rgba(14, 68, 107, 0.15);
}

.fir-mvd-events-history-root .fir-mvd-events-actions{
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fir-mvd-events-history-root .fir-mvd-events-message{
  margin-top: 6px;
  font-size: 14px;
}

.fir-mvd-events-history-root .fir-mvd-events-message.is-error{
  color: #b91c1c;
}

.fir-mvd-events-history-root .fir-mvd-events-message.is-success{
  color: #15803d;
}

.fir-mvd-events-history-root .fir-mvd-events-message.is-pending{
  color: #4b5563;
}

/* Botones */
.fir-mvd-events-history-root .fir-mvd-events-btn{
  display: inline-block;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid #0e446b;
  background: #0e446b;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.fir-mvd-events-history-root .fir-mvd-events-btn:hover{
  background: #1f2933;
  border-color: #1f2933;
}

.fir-mvd-events-history-root .fir-mvd-events-btn-secondary{
  background: #ffffff;
  color: #0e446b;
}

.fir-mvd-events-history-root .fir-mvd-events-btn-compact{
  padding: 5px 10px;
  font-size: 13px;
}

/* ==========================================================
   Tabla histórico
   ========================================================== */

.fir-mvd-events-history-root .fir-mvd-events-table-wrap{
  width: 100%;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
}

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table{
border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  table-layout: fixed;
  min-width: 0;
}

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th, .fir-mvd-events-history-root .fir-mvd-events-history-admin-table td{
  border: 1px solid #e5e7eb;
  padding: 8px 4px;
  vertical-align: middle;
  color: #0f172a;
  overflow-wrap: anywhere;
}


.fir-mvd-events-history-root .fir-mvd-events-history-admin-table thead th{
  background: #0e446b;
  color: #ffffff;
  font-weight: 700;
  text-align: left;
  white-space: normal;
  border: 1px solid #e5e7eb;
}



.fir-mvd-events-history-root .fir-mvd-events-history-admin-table tbody tr:nth-child(even){
  background: #f9fafb;
}

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table tbody tr:hover{
  background: #e5effa;
}

/* Inputs compactos dentro de la tabla */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table select, .fir-mvd-events-history-root .fir-mvd-events-history-admin-table input[type="text"], .fir-mvd-events-history-root .fir-mvd-events-history-admin-table textarea{
  width: 100%;
  font-size: 13px;
  padding: 5px 6px;
}

.fir-mvd-events-history-root .fir-mvd-events-time-edit{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.fir-mvd-events-history-root .fir-mvd-events-admin-col-actions{
  white-space: normal;
}

.fir-mvd-events-history-root .fir-mvd-events-admin-col-actions button + button{
  margin-left: 6px;
}

.fir-mvd-events-history-root .fir-mvd-events-row-status{
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
}

.fir-mvd-events-history-root .fir-mvd-events-row-status.is-pending{
  color: #92400e;
}

.fir-mvd-events-history-root .fir-mvd-events-row-status.is-success{
  color: #166534;
}

.fir-mvd-events-history-root .fir-mvd-events-row-status.is-error{
  color: #b91c1c;
}

/* Badges */
.fir-mvd-events-history-root .fir-mvd-badge{
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #334155;
}

.fir-mvd-events-history-root .fir-mvd-badge-ok{
  border-color: #16a34a;
  background: #dcfce7;
  color: #14532d;
}

.fir-mvd-events-history-root .fir-mvd-events-notes-preview{
  white-space: pre-wrap;
  color: #334155;
  font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
  .fir-mvd-events-history-root .fir-mvd-events-columns{
    grid-template-columns: 1fr;
  }

  .fir-mvd-events-history-root .fir-mvd-events-manual-grid, .fir-mvd-events-history-root .fir-mvd-events-manual-grid-time{
    grid-template-columns: 1fr;
  }

  .fir-mvd-events-history-root .fir-mvd-events-time-edit{
    grid-template-columns: 1fr;
  }
}


/* Column sizing (desktop) */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(1), .fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(1){min-width:110px;}
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(2), .fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(2){min-width:80px;}
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(3), .fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(3){min-width:90px;}
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(4), .fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(4){min-width:170px;}
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(5), .fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(5){min-width:220px;}
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(6), .fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(6){min-width:200px;}
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(7), .fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(7){min-width:90px; text-align:center;}
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(8), .fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(8){min-width:220px;}
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(9), .fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(9){min-width:150px; white-space: normal;}

/* ==========================================================
   v0.4.5 – Volver a ancho "normal" (contenedor)
   Mantiene:
   - Columna Acciones sticky
   - Botones con wrap (no se cortan)
   ========================================================== */

.fir-mvd-events-history-root .fir-mvd-events-table-wrap{
  padding-bottom: 8px;
}

.fir-mvd-events-history-root .fir-mvd-events-admin-col-actions{
  white-space: normal !important;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
  min-width: 190px;
}

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:last-child, .fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:last-child{
  position: sticky;
  right: 0;
}

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:last-child{
  z-index: 5;
  background: #0f3b57;
}

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:last-child{
  z-index: 4;
  background: #ffffff;
  box-shadow: -6px 0 8px rgba(15, 59, 87, 0.08);
}

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table tbody tr:nth-child(even) td:last-child{
  background: #f9fafb;
}

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table tbody tr:hover td:last-child{
  background: #e5effa;
}


/* ==========================================================
   v0.4.6 – Mantener 100% dentro del contenedor (sin overflow X)
   Objetivo: que todo se vea dentro del contenedor, aunque implique wraps
   ========================================================== */

.fir-mvd-events-history-root .fir-mvd-events-table-wrap{
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table{
  width: 100%;
  table-layout: fixed;
  min-width: 0 !important;
  font-size: 13px;
}

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th, .fir-mvd-events-history-root .fir-mvd-events-history-admin-table td{
  padding: 7px 8px;
  white-space: normal;
}

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table thead th{
  white-space: normal !important;
}

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(1), .fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(1){ min-width:0 !important; width:10%; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(2), .fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(2){ min-width:0 !important; width:7%; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(3), .fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(3){ min-width:0 !important; width:8%; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(4), .fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(4){ min-width:0 !important; width:14%; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(5), .fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(5){ min-width:0 !important; width:16%; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(6), .fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(6){ min-width:0 !important; width:16%; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(7), .fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(7){ min-width:0 !important; width:7%; text-align:center; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(8), .fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(8){ min-width:0 !important; width:16%; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:last-child, .fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:last-child{ min-width:0 !important; width:110px; }

.fir-mvd-events-history-root .fir-mvd-events-time-edit{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fir-mvd-events-history-root .fir-mvd-events-time-edit select{
  flex: 1 1 1px;
  min-width: 80px;
}

.fir-mvd-events-history-root .fir-mvd-events-admin-col-actions{
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  white-space: normal !important;
}

.fir-mvd-events-history-root .fir-mvd-events-admin-col-actions button{
  width: 100%;
}

.fir-mvd-events-history-root .fir-mvd-events-admin-col-actions button + button{
  margin-left: 0 !important;
}

/* ---- FIX: forzar 4 selectores en 1 sola línea dentro del contenedor ----
   Brizy/tema puede sobreescribir grid-template-columns; por eso usamos
   selector más específico + !important. */
.fir-mvd-events-history-root .fir-mvd-events-admin-box .fir-mvd-events-manual-grid.fir-mvd-events-manual-grid-inline{
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr) minmax(0, 0.8fr) minmax(0, 0.8fr) !important;
}
@media (max-width: 520px){
  .fir-mvd-events-history-root .fir-mvd-events-admin-box .fir-mvd-events-manual-grid.fir-mvd-events-manual-grid-inline{
    grid-template-columns: 1fr 1fr !important;
  }
}
@media (max-width: 360px){
  .fir-mvd-events-history-root .fir-mvd-events-admin-box .fir-mvd-events-manual-grid.fir-mvd-events-manual-grid-inline{
    grid-template-columns: 1fr !important;
  }
}

/* --- Column sizing (evita que Horario se desfasé / solape) --- */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th,
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td{
  box-sizing: border-box;
}

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(1),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(1){ width: 95px; white-space: nowrap; }

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(2),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(2){ width: 75px; text-align: center; }

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(3),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(3){ width: 95px; text-align: center; white-space: nowrap; }

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(4),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(4){ width: 220px; white-space: normal; word-break: break-word; line-height: 1.15; }

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(5),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(5){ width: 210px; white-space: normal; word-break: break-word; }

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(6),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(6){ width: 260px; white-space: nowrap; }

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(7),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(7){ width: 95px; text-align: center; white-space: nowrap; }

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(8),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(8){ width: 210px; white-space: normal; word-break: break-word; }

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(9),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(9){ width: 150px; text-align: center; white-space: nowrap; }


/* Compact column widths (Histórico) */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(1),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(1){ width: 90px; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(2),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(2){ width: 60px; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(3),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(3){ width: 85px; white-space: nowrap; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(4),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(4){ width: 160px; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(5),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(5){ width: 150px; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(6),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(6){ width: 140px; white-space: nowrap; text-align:center; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(7),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(7){ width: 70px; text-align:center; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(8),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(8){ width: 150px; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(9),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(9){ width: 120px; text-align:center; }

/* Evitar que el header haga “letra vertical” */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th{
  white-space: normal;
  line-height: 1.15;
}

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:last-child .fir-mvd-events-link-btn{ width:100%; display:block; margin:0 0 6px 0; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:last-child .fir-mvd-events-link-btn:last-child{ margin-bottom:0; }

/* ==========================================================
   v0.4.19 – Compacto + acciones sin sticky/sombra (no overlay)
   - Columnas más apretadas
   - Botones en Acciones uno debajo del otro
   ========================================================== */

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table{
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}

/* Padding lateral mínimo */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th,
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td{
  padding: 8px 4px !important;
  box-sizing: border-box;
}

/* Desactivar sticky + sombra en Acciones */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:last-child,
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:last-child{
  position: static !important;
  right: auto !important;
  z-index: auto !important;
  box-shadow: none !important;
}

/* Acciones: stack vertical, más angosta */
.fir-mvd-events-history-root .fir-mvd-events-admin-col-actions{
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  align-items: stretch !important;
  justify-content: center !important;
  min-width: 0 !important;
  width: 105px !important;
}

.fir-mvd-events-history-root .fir-mvd-events-admin-col-actions .fir-mvd-events-link-btn{
  width: 100% !important;
  display: block;
  margin: 0 !important;
}

/* Compact column widths (9 cols):
   1 Posición | 2 Tipo | 3 CID | 4 Controlador | 5 Notas insc | 6 Horario | 7 Participó | 8 Notas internas | 9 Acciones */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(1),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(1){ width: 85px !important; white-space: nowrap; }

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(2),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(2){ width: 55px !important; }

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(3),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(3){ width: 75px !important; white-space: nowrap; }

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(4),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(4){ width: 145px !important; white-space: normal; word-break: break-word; line-height: 1.15; }

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(5),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(5){ width: 130px !important; white-space: normal; word-break: break-word; }

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(6),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(6){ width: 115px !important; white-space: nowrap; text-align: center; }

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(7),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(7){ width: 60px !important; text-align: center; }

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(8),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(8){ width: 110px !important; white-space: normal; word-break: break-word; }

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(9),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(9){ width: 105px !important; }

/* ==========================================================
   v0.4.20 – Acciones en columna (editar arriba, borrar abajo)
   - Arregla selector: usa fir-mvd-events-history-admin-col-actions
   - Más compacto aún
   ========================================================== */

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th,
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td{
  padding: 7px 3px !important; /* mínimo lateral */
}

/* Acciones: sin overlay */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:last-child,
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:last-child{
  position: static !important;
  right: auto !important;
  z-index: auto !important;
  box-shadow: none !important;
}

/* Mantener header con el mismo color */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table thead th:last-child{
  background: #0e446b !important;
  color: #ffffff !important;
}

/* Celdas de Acciones sin fondo/overlay */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table tbody td:last-child{
  background: transparent !important;
}


/* Stack vertical real */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions{
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  align-items: stretch !important;
  justify-content: center !important;
  width: 96px !important;
}

.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn{
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
}

/* Orden explícito */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions [data-action="edit"]{ order: 1; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions [data-action="delete"]{ order: 2; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions [data-action="save"]{ order: 1; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions [data-action="cancel"]{ order: 2; }

/* Un poco más apretado de anchos */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(4),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(4){ width: 135px !important; }

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(5),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(5){ width: 120px !important; }

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(8),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(8){ width: 100px !important; }

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(9),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(9){ width: 96px !important; }


/* Íconos en botones de acciones */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn span{
  font-size: 16px;
  line-height: 1;
  display: inline-block;
}

.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn{
  padding: 7px 0 !important;
}

/* ==========================================================
   v0.4.22 – Acciones: íconos "ghost" sin borde, en la misma línea
   ========================================================== */

/* Acciones: fila horizontal y más angosta */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions{
  flex-direction: row !important;
  gap: 10px !important;
  width: auto !important;
  justify-content: center !important;
  align-items: center !important;
}

/* ==========================================================
   v0.4.25 – FIX solape en modo edición (fila inline edit)
   - La columna Horario es angosta; forzamos selects en columna
   - Box-sizing para que width:100% no se desborde
   - Checkbox Participó compacto y centrado
   ========================================================== */

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table select,
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table input[type="text"],
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table textarea{
  box-sizing: border-box;
  max-width: 100%;
}

.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-time .fir-mvd-events-time-edit{
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-time .fir-mvd-events-time-edit select{
  width: 100% !important;
  min-width: 0 !important;
}

.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-attended{
  white-space: normal !important;
}

.fir-mvd-events-history-root .fir-mvd-events-check-label{
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  margin: 0 !important;
}

.fir-mvd-events-history-root .fir-mvd-events-check-label input[type="checkbox"]{
  margin: 0 !important;
}

/* Ajuste ancho de la columna Acciones */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(9),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(9){
  width: 78px !important;
}

/* Botones sin borde (ghost) */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 6px 8px !important;
  border-radius: 10px !important;
  line-height: 1 !important;
  cursor: pointer;
}

/* Hover suave */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn:hover{
  background: rgba(14, 68, 107, 0.10) !important;
}

/* Íconos */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn span{
  font-size: 16px;
  line-height: 1;
  display: inline-block;
}

/* Evitar que el td tenga padding extra raro */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:last-child{
  background: transparent !important;
}

/* ==========================================================
   v0.4.23 – Íconos visibles + restaurar íconos de detalle
   ========================================================== */

/* Acciones: colores visibles siempre */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn[data-action="edit"] span{
  color:#0e446b !important;
}
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn[data-action="delete"] span{
  color:#c0392b !important;
}
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn[data-action="edit"]:hover span{
  color:#256ea0 !important;
}
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn[data-action="delete"]:hover span{
  color:#e74c3c !important;
}

/* Restore: si algún rule del historial “apagó” pseudo-íconos en el detalle/listado */
.fir-mvd-events-history-root .fir-mvd-events-history-event-details *::before,
.fir-mvd-events-history-root .fir-mvd-events-history-event-details *::after,
.fir-mvd-events-history-root .fir-mvd-events-history-event-list *::before,
.fir-mvd-events-history-root .fir-mvd-events-history-event-list *::after{
  opacity: 1 !important;
  visibility: visible !important;
  display: inline-block !important;
}

/* Fuerza los íconos del listado/detalle a usar escapes (ASCII safe) si el theme los reescribe */
.fir-mvd-events-history-root .fir-mvd-events-history-meta-location::before{ content:"\1F4CD " !important; }
.fir-mvd-events-history-root .fir-mvd-events-history-meta-time::before{ content:"\1F552 " !important; }

/* ==========================================================
   v0.4.24 – Acciones: SVG nítido + bordes de header + meta íconos
   ========================================================== */

/* Meta del listado: pin + reloj (ASCII-safe) */
.fir-mvd-events-history-root .fir-mvd-events-item-location::before{
  content:"\1F4CD " !important;
  opacity: 1 !important;
}
.fir-mvd-events-history-root .fir-mvd-events-item-start::before{
  content:"\1F552 " !important;
  opacity: 1 !important;
}
.fir-mvd-events-history-root .fir-mvd-events-item-location::before,
.fir-mvd-events-history-root .fir-mvd-events-item-start::before{
  display:inline-block;
  margin-right: 2px;
}

/* Header y celdas de Acciones alineadas (sin “corte” visual) */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table thead th:last-child{
  background:#0e446b !important;
  color:#fff !important;
  border: 1px solid #e5e7eb !important;
}
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:last-child{
  background: transparent !important;
}

/* SVG icon sizing */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-icon{
  width: 18px;
  height: 18px;
  display: inline-block;
}

/* Colores por acción */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn[data-action="edit"]{
  color: #0e446b !important;
}
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn[data-action="delete"]{
  color: #c0392b !important;
}

/* Hover */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn:hover{
  background: rgba(14, 68, 107, 0.10) !important;
}

/* Ajuste columna Acciones para 2 íconos en línea */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table th:nth-child(9),
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table td:nth-child(9){
  width: 86px !important;
}


/* Acciones: íconos en la misma línea, sin borde */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions{
  display:flex !important;
  flex-direction: row !important;
  gap: 10px !important;
  justify-content: center !important;
  align-items: center !important;
}
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 6px 8px !important;
  border-radius: 10px !important;
  line-height: 1 !important;
}

/* ==========================================================
   v0.4.26 – Editor: selects compactos + acciones con íconos
   - Evita selects gigantes por estilos del theme (Brizy)
   - Save/Cancel con colores visibles como Edit/Delete
   ========================================================== */

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table select,
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table input[type="text"],
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table textarea{
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  padding: 4px 6px !important;
  height: 32px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
}

/* textarea no debe quedar “gigante” pero sí usable */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table textarea{
  height: auto !important;
  min-height: 56px !important;
  resize: vertical;
}

/* Horario en edición: 2 selects en columna, compactos */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-time .fir-mvd-events-time-edit{
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-time .fir-mvd-events-time-edit select{
  height: 32px !important;
}

/* Acciones: íconos más grandes y nítidos */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn span{
  font-size: 18px !important;
  font-weight: 700;
}

/* Colores por acción */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn[data-action="save"] span{ color:#15803d !important; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn[data-action="cancel"] span{ color:#64748b !important; }

.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn[data-action="save"]:hover span{ color:#16a34a !important; }
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn[data-action="cancel"]:hover span{ color:#0e446b !important; }

/* v0.4.26 – Editor: controles compactos (evitar CSS del theme) */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table select,
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table textarea,
.fir-mvd-events-history-root .fir-mvd-events-history-admin-table input[type="text"] {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  padding: 4px 6px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #0f172a !important;
}

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table select {
  height: 32px !important;
}

.fir-mvd-events-history-root .fir-mvd-events-history-admin-table textarea {
  height: auto !important;
  min-height: 56px !important;
  resize: vertical !important;
}

/* Horario (2 selects) siempre en columna y sin "bloques" enormes */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-time .fir-mvd-events-time-edit {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

/* Acciones en edición: iconos como editar/borrar */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn {
  padding: 6px 8px !important;
}
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn span {
  font-size: 18px !important;
  font-weight: 700;
  line-height: 1;
}
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn[data-action="save"] span {
  color: #16a34a; /* verde */
}
.fir-mvd-events-history-root .fir-mvd-events-history-admin-col-actions .fir-mvd-events-btn[data-action="cancel"] span {
  color: #64748b; /* gris */
}

/* ---------------------------------------------------------
   Enhancements v0.5.x: búsqueda, filtros, sorting, stats
   --------------------------------------------------------- */

.fir-mvd-events-history-root .fir-eh-list-tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

/* Lista: filtro fijo + lista scrolleable */
.fir-mvd-events-history-root .fir-mvd-events-list{
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.fir-mvd-events-history-root .fir-eh-list-scroll{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin; /* Firefox */
}
.fir-mvd-events-history-root .fir-eh-list-scroll::-webkit-scrollbar{ width: 8px; }
.fir-mvd-events-history-root .fir-eh-list-scroll::-webkit-scrollbar-thumb{
  background: rgba(15, 23, 42, .20);
  border-radius: 10px;
}
.fir-mvd-events-history-root .fir-eh-list-scroll::-webkit-scrollbar-track{ background: transparent; }

.fir-mvd-events-history-root .fir-eh-search-actions{
  gap: 8px;
}
.fir-mvd-events-history-root .fir-eh-reload{
  border: 0;
  background: #e5effa;
  color: #0f172a;
  border-radius: 10px;
  height: 32px;
  line-height: 30px;
  cursor: pointer;
  font-weight: 800;
  padding: 0 12px;
}

.fir-mvd-events-history-root .fir-eh-search-wrap{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:6px;
  width:100%;
}

.fir-mvd-events-history-root .fir-eh-search {
  width: 100%;
  height: 36px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  outline: none;
  box-sizing: border-box;
}


.fir-mvd-events-history-root .fir-eh-search-actions{
  display:flex;
  justify-content:flex-end;
}

.fir-mvd-events-history-root .fir-eh-search-clear{
  border: 0;
  background: #e2e8f0;
  color: #0f172a;
  border-radius: 10px;
  height: 32px;
  line-height: 30px;
  cursor: pointer;
  font-weight: 800;
  padding: 0 10px;
  font-size: 12px;
}

.fir-mvd-events-history-root .fir-eh-search-clear.is-disabled{
  opacity: .55;
  cursor: default;
}

.fir-mvd-events-history-root .fir-eh-list-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
}

.fir-mvd-events-history-root .fir-eh-chip-x {
  border: 0;
  background: #e2e8f0;
  color: #0f172a;
  border-radius: 10px;
  width: 28px;
  height: 28px;
  line-height: 26px;
  cursor: pointer;
  font-weight: 800;
}


/* separar panel manual vs filtros */
.fir-mvd-events-history-root .fir-mvd-events-history-admin-box{
  margin: 12px 0 14px;
}

.fir-mvd-events-history-root .fir-eh-filters-wrap{
  margin: 10px 0 14px;
}

.fir-mvd-events-history-root .fir-eh-filters-title{
  font-weight: 800;
  color: #0f172a;
  font-size: 13px;
  margin: 0 0 8px 2px;
}

.fir-mvd-events-history-root .fir-eh-filters-wrap .fir-eh-filters{
  margin: 0;
}

/* filtros detalle */
.fir-mvd-events-history-root .fir-eh-filters {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 1100px) {
  .fir-mvd-events-history-root .fir-eh-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.fir-mvd-events-history-root .fir-eh-filter label {
  display: block;
  font-size: 12px;
  color: #475569;
  margin: 0 0 4px;
}

.fir-mvd-events-history-root .fir-eh-filter select {
  width: 100%;
  font-size: 15px;
  padding: 8px 4px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  color: #0e446b;
  background: #ffffff;
  height: 38px;
}

.fir-mvd-events-history-root .fir-eh-filter select:focus{
  outline: none;
  border-color: #0e446b;
  box-shadow: 0 0 0 1px rgba(14, 68, 107, 0.15);
}

.fir-mvd-events-history-root .fir-eh-filter-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.fir-mvd-events-history-root .fir-eh-count {
  margin: 6px 0 10px;
  font-size: 12px;
  color: #64748b;
}

/* sorting */
.fir-mvd-events-history-root .fir-eh-th.is-sortable {
  cursor: pointer;
  user-select: none;
}

.fir-mvd-events-history-root .fir-eh-sort-ind {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  color: #94a3b8;
}

.fir-mvd-events-history-root .fir-eh-sort-ind.is-active {
  color: #0f172a;
}

/* stats */
.fir-mvd-events-history-root .fir-eh-stats {
  margin: 14px 0;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
  padding: 12px;
}

.fir-mvd-events-history-root .fir-eh-stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.fir-mvd-events-history-root .fir-eh-stats-title {
  font-weight: 800;
  color: #0f172a;
}

.fir-mvd-events-history-root .fir-eh-stats-who {
  font-weight: 700;
  color: #334155;
}

.fir-mvd-events-history-root .fir-eh-stats-clear {
  border: 0;
  background: #e2e8f0;
  color: #0f172a;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 700;
}

.fir-mvd-events-history-root .fir-eh-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 1100px) {
  .fir-mvd-events-history-root .fir-eh-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.fir-mvd-events-history-root .fir-eh-stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px;
}

.fir-mvd-events-history-root .fir-eh-stat-label {
  font-size: 12px;
  color: #64748b;
}

.fir-mvd-events-history-root .fir-eh-stat-value {
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
  margin-top: 4px;
}

.fir-mvd-events-history-root .fir-eh-stats-sub {
  margin-top: 12px;
}

.fir-mvd-events-history-root .fir-eh-stats-subtitle {
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.fir-mvd-events-history-root .fir-eh-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fir-mvd-events-history-root .fir-eh-chip {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.fir-mvd-events-history-root .fir-eh-stats-table {
  width: 100%;
  border-collapse: collapse;
}

.fir-mvd-events-history-root .fir-eh-stats-table th,
.fir-mvd-events-history-root .fir-eh-stats-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
}

.fir-mvd-events-history-root .fir-eh-stats-row {
  cursor: pointer;
}

.fir-mvd-events-history-root .fir-eh-stats-row:hover {
  background: #ffffff;
}

.fir-mvd-events-history-root .fir-eh-stats-hint {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
}


/* === Empty-state helpers (keep filters visible) === */
.fir-mvd-events-history-root .fir-eh-empty-actions{ margin-top: 10px; }
.fir-mvd-events-history-root .fir-eh-filters-hint{ margin-top: 8px; font-size: 12px; color: #6b7280; }
.fir-mvd-events-history-root[data-view="list"] .fir-eh-list-scroll{
  max-height: var(--fir-eh-list-maxh, 520px);
  height: var(--fir-eh-list-maxh, 520px);
}


