/**
 * ESTILOS DEL MÓDULO DE EVENTOS
 * MundiTrofeos S.A.
 */

/* --- Barra de Filtros Activos --- */
.filter-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background-color: var(--color-primary-light);
  border: 1px solid var(--color-primary-border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}

.filter-chips-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background-color: var(--color-primary);
  color: #FFF;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.filter-chip.orange {
  background-color: var(--color-secondary);
}

.filter-chip.neutral {
  background-color: #475569;
}

.filter-chip-remove {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}
.filter-chip-remove:hover {
  color: #FFF;
}

.filter-chips-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-primary);
}

.filter-chips-clear {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-secondary);
}
.filter-chips-clear:hover {
  text-decoration: underline;
}

/* --- Pestañas de Estado (Tabs) --- */
.status-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.status-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

.status-tab-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
}

.status-tab-count {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.status-tab-btn.active {
  color: #FFF !important;
  transform: translateY(-2px);
}

/* Colores de pestañas activas */
.status-tab-btn[data-tab="programado"].active {
  background-color: var(--color-info);
  border-color: var(--color-info);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}
.status-tab-btn[data-tab="programado"].active .status-tab-dot { background-color: rgba(255, 255, 255, 0.7); }
.status-tab-btn[data-tab="programado"].active .status-tab-count { background-color: rgba(255,255,255,0.25); color: #FFF; }
.status-tab-btn[data-tab="programado"] .status-tab-dot { background-color: var(--color-info); }
.status-tab-btn[data-tab="programado"] .status-tab-count { background-color: var(--color-info-bg); color: var(--color-info-text); }

.status-tab-btn[data-tab="seguimiento"].active {
  background-color: var(--color-warning);
  border-color: var(--color-warning);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.status-tab-btn[data-tab="seguimiento"].active .status-tab-dot { background-color: rgba(255, 255, 255, 0.7); }
.status-tab-btn[data-tab="seguimiento"].active .status-tab-count { background-color: rgba(255,255,255,0.25); color: #FFF; }
.status-tab-btn[data-tab="seguimiento"] .status-tab-dot { background-color: var(--color-warning); }
.status-tab-btn[data-tab="seguimiento"] .status-tab-count { background-color: var(--color-warning-bg); color: var(--color-warning-text); }

.status-tab-btn[data-tab="alta_urgencia"].active {
  background-color: var(--color-danger);
  border-color: var(--color-danger);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}
.status-tab-btn[data-tab="alta_urgencia"].active .status-tab-dot { background-color: rgba(255, 255, 255, 0.7); }
.status-tab-btn[data-tab="alta_urgencia"].active .status-tab-count { background-color: rgba(255,255,255,0.25); color: #FFF; }
.status-tab-btn[data-tab="alta_urgencia"] .status-tab-dot { background-color: var(--color-danger); }
.status-tab-btn[data-tab="alta_urgencia"] .status-tab-count { background-color: var(--color-danger-bg); color: var(--color-danger-text); }

.status-tab-btn[data-tab="confirmado"].active {
  background-color: var(--color-success);
  border-color: var(--color-success);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
.status-tab-btn[data-tab="confirmado"].active .status-tab-dot { background-color: rgba(255, 255, 255, 0.7); }
.status-tab-btn[data-tab="confirmado"].active .status-tab-count { background-color: rgba(255,255,255,0.25); color: #FFF; }
.status-tab-btn[data-tab="confirmado"] .status-tab-dot { background-color: var(--color-success); }
.status-tab-btn[data-tab="confirmado"] .status-tab-count { background-color: var(--color-success-bg); color: var(--color-success-text); }


.status-tab-hint {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
}

/* --- Drag & Drop Zone --- */
.event-dropzone {
  min-height: 480px;
  border-radius: var(--radius-lg);
  position: relative;
  transition: all var(--transition-normal);
}

/* Estilo de Dropzone Activo */
.event-dropzone.drag-active {
  background-color: rgba(59, 130, 246, 0.04);
  border: 2px dashed var(--color-info);
}

.event-dropzone-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background-color: rgba(239, 246, 255, 0.95);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.event-dropzone.drag-active .event-dropzone-overlay {
  opacity: 1;
}

.dropzone-overlay-content {
  text-align: center;
  color: var(--color-info-text);
}

.dropzone-overlay-content ion-icon {
  font-size: 48px;
  margin-bottom: 8px;
  animation: bounce 1s infinite alternate;
}

.dropzone-overlay-text {
  font-size: 18px;
  font-weight: 700;
}

@keyframes bounce {
  from { transform: translateY(-4px); }
  to { transform: translateY(4px); }
}

/* Estado de Grilla Vacía */
.empty-state {
  padding: 80px 24px;
  text-align: center;
}

.empty-state-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
}

.empty-state-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.empty-state-hint {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 280px;
  margin: 0 auto 16px auto;
}

/* --- Grilla de Eventos --- */
.events-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.events-info-text {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.events-info-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Tarjeta de Evento (Card) */
.event-card {
  background-color: var(--color-card-bg);
  border-radius: var(--radius-lg);
  border-left: 3px solid transparent;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all var(--transition-normal);
}
.event-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.event-card-top {
  height: 144px;
  background-color: #F1F5F9;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.event-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
}
.event-card-img-placeholder ion-icon {
  font-size: 32px;
  opacity: 0.35;
}
.event-card-img-placeholder p {
  font-size: 10px;
  text-align: center;
  padding: 0 16px;
}

.event-card-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
  cursor: pointer;
}
.event-card-top:hover .event-card-overlay {
  opacity: 1;
}
.event-card-overlay ion-icon {
  font-size: 32px;
  color: #FFF;
}

.event-card-status-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  color: #FFF;
  border-radius: var(--radius-full);
}

.event-card-urgency-chip {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  color: #FFF;
  background-color: var(--color-danger);
  border-radius: var(--radius-full);
}

.event-card-tags {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
}

.event-card-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: #FFF;
  background-color: rgba(0,0,0,0.65);
}

.event-card-tag.blue {
  background-color: rgba(30,58,95,0.75);
}

.event-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.event-card-title-row {
  display: flex;
  align-items: start;
  gap: 6px;
}

.event-card-grip {
  color: var(--text-muted);
  cursor: grab;
  font-size: 16px;
  margin-top: 2px;
}
.event-card-grip:active {
  cursor: grabbing;
}

.event-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #1F2937;
  line-height: 1.3;
}

.event-card-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.event-card-detail-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}
.event-card-detail-item ion-icon {
  font-size: 15px;
  color: var(--text-muted);
}
.event-card-detail-item .val-right {
  margin-left: auto;
  font-weight: 600;
}

.event-card-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.event-card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  text-decoration: none;
  font-weight: 600;
}
.event-card-link.web { color: var(--color-info-text); }
.event-card-link.instagram { color: #E1306C; }
.event-card-link.facebook { color: #1877F2; }

.event-card-commercial {
  border-top: 1px solid #F1F5F9;
  padding-top: 8px;
  display: flex;
  gap: 12px;
}

.event-card-comm-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-secondary);
}
.event-card-comm-item ion-icon {
  font-size: 14px;
}
.event-card-comm-item.value {
  font-weight: 600;
  color: var(--text-primary);
}
.event-card-comm-item.value ion-icon {
  color: var(--color-success);
}

.event-card-contact-box {
  background-color: var(--color-warning-bg);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--radius-md);
  padding: 6px 8px;
  font-size: 11.5px;
  color: var(--color-warning-text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.event-card-contact-box.overdue {
  background-color: var(--color-danger-bg);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--color-danger-text);
}
.event-card-contact-box ion-icon {
  font-size: 14px;
}

.event-card-badges {
  border-top: 1px solid #F1F5F9;
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-card-badge-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}
.event-card-badge-row ion-icon {
  color: var(--text-muted);
}
.event-card-badge-val {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
}

/* Botones de acción */
.event-card-actions {
  border-top: 1px solid #F1F5F9;
  padding-top: 8px;
  margin-top: auto;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100% !important;
}


.event-card-row-btns {
  display: flex;
  gap: 6px;
}

.event-card-btn {
  flex: 1;
  padding: 6px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.event-card-btn.edit {
  background-color: #F8FAFC;
  border: 1px solid var(--color-border);
  color: #374151;
}
.event-card-btn.edit:hover { background-color: #F1F5F9; }
.event-card-btn.quote {
  background-color: var(--color-info-bg);
  color: var(--color-info-text);
}
.event-card-btn.quote:hover { background-color: rgba(59,130,246,0.15); }
.event-card-btn.production {
  background-color: rgba(109, 40, 217, 0.08);
  color: #6D28D9;
}
.event-card-btn.production:hover { background-color: rgba(109, 40, 217, 0.15); }

.event-card-more-btn {
  padding: 6px 8px;
  border: 1px solid var(--color-border);
  background-color: #F8FAFC;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.event-card-more-btn:hover { background-color: #F1F5F9; }

/* Badge "Evento Pasado" */
.tarjeta__chip--pasado {
  background-color: #FEF2F2 !important;
  color: #DC2626 !important;
  font-weight: 700;
  border: 1px solid #FCA5A5;
  animation: pulse-pasado 2s ease-in-out infinite;
}
@keyframes pulse-pasado {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}



/* Menú contextual "Más opciones" */
.more-actions-menu-wrapper {
  position: relative;
}

/* --- Dialog de Creación de Eventos (Wizard) --- */
.wizard-dialog-card {
  width: 600px;
}

.wizard-progress-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-border);
  background-color: #FFF;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.wizard-step-circle {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background-color: #F1F5F9;
  color: var(--text-muted);
}
.wizard-step.active .wizard-step-circle {
  background-color: var(--color-secondary);
  color: #FFF;
}
.wizard-step.done .wizard-step-circle {
  background-color: var(--color-primary);
  color: #FFF;
}

.wizard-step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.wizard-step.active .wizard-step-label { color: var(--color-secondary); }
.wizard-step.done .wizard-step-label { color: var(--color-primary); }

.wizard-connector {
  flex: 1;
  height: 2px;
  background-color: #E2E8F0;
  margin: 0 12px;
}
.wizard-step.done + .wizard-connector {
  background-color: var(--color-primary);
}

.wizard-step-content {
  display: none;
}
.wizard-step-content.active {
  display: block;
}

/* Paso 1: Autocompletado Tipo Evento */
.combobox-container {
  position: relative;
}

.combobox-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-premium);
  max-height: 160px;
  overflow-y: auto;
  z-index: 60;
  display: none;
}
.combobox-container.open .combobox-dropdown {
  display: block;
}

.combobox-option {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.combobox-option:hover { background-color: var(--color-primary-light); }
.combobox-option.selected { font-weight: 600; color: var(--color-primary); }
.combobox-option.selected ion-icon { display: block; }
.combobox-option ion-icon { display: none; font-size: 16px; color: var(--color-primary); }

.combobox-empty {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.combobox-empty-btn {
  font-weight: 700;
  color: var(--color-primary);
}
.combobox-empty-btn:hover { text-decoration: underline; }

/* Paso 2: Buscador de contactos existentes */
.wizard-contact-search-box {
  background-color: var(--color-primary-light);
  border: 1px solid var(--color-primary-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}

.wizard-divider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}
.wizard-divider-line {
  flex: 1;
  height: 1px;
  background-color: var(--color-border);
}
.wizard-divider-text {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.phone-input-group {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.phone-prefix {
  padding: 8px 12px;
  background-color: #F8FAFC;
  color: var(--text-secondary);
  font-family: monospace;
  font-size: 13px;
  border-right: 1px solid var(--color-border);
  display: flex;
  align-items: center;
}

.phone-input-group input {
  border: none;
  flex: 1;
  padding: 8px 12px;
  font-size: 13.5px;
}

/* Paso 3: Ficha Resumen */
.wizard-summary-box {
  background-color: var(--color-primary-light);
  border: 1px solid var(--color-primary-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 16px;
}

.wizard-summary-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.wizard-summary-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.wizard-summary-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Errores del Formulario */
.form-error-msg {
  color: var(--color-danger-text);
  font-size: 11px;
  margin-top: 4px;
  display: none;
}
.form-group.has-error .form-input {
  border-color: var(--color-danger);
  background-color: rgba(239, 68, 68, 0.02);
}
.form-group.has-error .form-error-msg {
  display: block;
}

/* Wizard Footer Dots */
.wizard-dots {
  display: flex;
  gap: 6px;
}

.wizard-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background-color: #E2E8F0;
  transition: all var(--transition-normal);
}
.wizard-dot.active {
  width: 20px;
  background-color: var(--color-secondary);
}
.wizard-dot.done {
  background-color: var(--color-primary);
}

/* --- Switch de Modo de Vista --- */
.view-toggle-group {
  display: flex;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2px;
  box-shadow: var(--shadow-sm);
  margin-left: 12px;
}

.view-mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  font-size: 15px;
}
.view-mode-btn:hover {
  color: var(--color-primary);
  background-color: var(--color-primary-light);
}
.view-mode-btn.active {
  background-color: var(--color-primary);
  color: #FFF;
}

/* --- Vista de Tabla/Lista --- */
.events-list-table-wrapper {
  width: 100%;
  overflow-x: auto;
  background-color: var(--color-card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.events-list-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
}

.events-list-table th,
.events-list-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.events-list-table th {
  background-color: #F8FAFC;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.events-list-table tr:last-child td {
  border-bottom: none;
}

.events-list-table tr:hover td {
  background-color: #F8FAFC;
}

.table-poster-img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  object-fit: cover;
  cursor: pointer;
  border: 1px solid var(--color-border);
}

.table-poster-placeholder {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background-color: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

.table-event-name {
  font-weight: 700;
  color: var(--text-primary);
}

.table-event-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.table-badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.table-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background-color: #FFF;
  color: var(--text-secondary);
  font-size: 13px;
  transition: all var(--transition-fast);
}
.table-action-btn:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-primary-border);
}
.table-action-btn.delete:hover {
  background-color: var(--color-danger-bg);
  color: var(--color-danger-text);
  border-color: rgba(239, 68, 68, 0.2);
}

/* ── Thumbnail de tarjeta ────────────────────────── */
.tarjeta__poster {
  width: 100%;
  height: 140px;       /* Altura fija para la miniatura */
  overflow: hidden;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--color-surface-muted);
  position: relative;
}

.tarjeta__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* object-position se aplica inline desde JS */
  transition: object-position 0.3s ease;
}



/* ── Modal Image Focus & Crop ────────────────────── */
#crop-modal-dialog::backdrop {
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
}

.focus-modal {
  width: min(780px, 100%) !important;
  max-height: 95vh !important;
}

.focus-modal__header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.focus-modal__header h3 {
  margin: 0 0 0.25rem;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.focus-modal__hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.focus-modal__body {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 1.5rem;
  padding: 1.5rem;
  align-items: start;
}

@media (max-width: 640px) {
  .focus-modal__body {
    grid-template-columns: 1fr;
  }
}

/* Editor (imagen a tamaño completo con recuadro de recorte) */
.focus-editor {
  position: relative;
  cursor: default;
  border-radius: var(--radius-sm);
  overflow: hidden;
  user-select: none;
  border: 1px solid var(--color-border);
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  background-color: #000;
}

.focus-editor img {
  display: block;
  max-width: 100%;
  max-height: 380px;
  height: auto;
  width: auto;
  pointer-events: none;
}

/* Recuadro de Recorte */
.crop-box {
  position: absolute;
  border: 2px dashed #3B82F6;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6); /* Translucent overlay outside the crop box */
  cursor: move;
  box-sizing: border-box;
  z-index: 5;
}

/* Guías de regla de tercios */
.crop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.crop-grid-line {
  position: absolute;
  background: rgba(255, 255, 255, 0.35);
}
.crop-grid-line.h1 { left: 0; right: 0; top: 33.33%; height: 1px; }
.crop-grid-line.h2 { left: 0; right: 0; top: 66.66%; height: 1px; }
.crop-grid-line.v1 { top: 0; bottom: 0; left: 33.33%; width: 1px; }
.crop-grid-line.v2 { top: 0; bottom: 0; left: 66.66%; width: 1px; }

/* Asas/Manejadores de Redimensionado */
.crop-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: #ffffff;
  border: 2px solid #3B82F6;
  border-radius: 2px;
  z-index: 10;
  box-sizing: border-box;
}

.crop-handle.tl { top: -6px; left: -6px; cursor: nwse-resize; }
.crop-handle.tr { top: -6px; right: -6px; cursor: nesw-resize; }
.crop-handle.bl { bottom: -6px; left: -6px; cursor: nesw-resize; }
.crop-handle.br { bottom: -6px; right: -6px; cursor: nwse-resize; }

/* Preview de miniatura */
.focus-preview {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background-color: #F8FAFC;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.focus-preview__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.focus-preview__card {
  width: 100%;
  aspect-ratio: 2.14 / 1; /* Miniatura horizontal de la tarjeta */
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  position: relative;
  background: var(--color-surface-muted);
}

.focus-preview__card img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  max-height: none;
}

.focus-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border);
  background-color: #F8FAFC;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Botón disparador dentro del wizard */
.focus-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.5rem;
  font-size: var(--text-sm);
}

/* ── Tarjetas Kanban ────────────────────────── */
.tarjeta {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal),
              transform    var(--transition-normal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 3px solid transparent;
}

.tarjeta:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tarjeta[data-estado="programado"]   { border-left-color: var(--color-estado-programado); }
.tarjeta[data-estado="seguimiento"]  { border-left-color: var(--color-estado-seguimiento); }
.tarjeta[data-estado="alta_urgencia"]{ border-left-color: var(--color-estado-urgencia); }
.tarjeta[data-estado="descartado"]   { border-left-color: var(--color-estado-descartado); }

/* Metadata de la tarjeta — distribución de información */
.tarjeta__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.75rem;
}

.tarjeta__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-surface-muted);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.625rem;
  white-space: nowrap;
}

.tarjeta__chip ion-icon {
  font-size: 12px;
  flex-shrink: 0;
}

/* Menú de opciones de la tarjeta */
.more-actions-menu {
  position: absolute;
  right: 0;
  bottom: 100%;
  margin-bottom: 6px;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 170px;
  display: none;
  z-index: 50;
  padding: 4px 0;
  list-style: none;
  margin: 0;
}

.more-actions-menu li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.more-actions-menu.active {
  display: block;
}

.more-action-item {
  width: 100%;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-family-base);
}

.more-action-item:hover {
  background-color: var(--color-surface-muted);
}

.more-action-item ion-icon {
  font-size: 15px;
  color: var(--color-text-secondary);
}

.more-action-item.delete {
  color: var(--color-danger);
}

.more-action-item.delete ion-icon {
  color: var(--color-danger);
}

.more-actions-menu hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 4px 0;
}

/* ── Badge de estado del evento ────────────────── */
.badge-estado {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.2rem 0.625rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.badge-estado::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-estado--programado {
  background: var(--color-primary-light);
  color: var(--color-primary);
}
.badge-estado--programado::before { background: var(--color-primary); }

.badge-estado--seguimiento {
  background: var(--color-warning-light);
  color: var(--color-warning);
}
.badge-estado--seguimiento::before { background: var(--color-warning); }

.badge-estado--alta_urgencia {
  background: var(--color-danger-light);
  color: var(--color-danger);
}
.badge-estado--alta_urgencia::before {
  background: var(--color-danger);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.75); }
}

.badge-estado--descartado {
  background: #F1F5F9;
  color: var(--color-text-muted);
}
.badge-estado--descartado::before { background: var(--color-text-muted); }

/* ── Acordeón de países y Sidebars ──────────────── */
.sidebar-acordeon__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.sidebar-acordeon__trigger:hover {
  background: var(--color-surface-muted);
}

.sidebar-acordeon__icon {
  transition: transform var(--transition-normal);
  color: var(--color-text-muted);
}

.sidebar-acordeon--open .sidebar-acordeon__icon {
  transform: rotate(180deg);
}

.sidebar-acordeon__body {
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--transition-slow);
}

.sidebar-acordeon--open .sidebar-acordeon__body {
  max-height: 500px; /* Valor suficientemente grande para cualquier lista */
}

/* Badge de conteo */
.sidebar-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  min-width: 22px;
  text-align: center;
}

/* =========================================================================
   Estilos del Asociador Masivo de Imágenes (Pestaña Completa)
   ========================================================================= */

.associator-page-wrapper {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  flex: 1;
  height: calc(100vh - 170px);
  min-height: 520px;
  overflow: hidden;
}

.associator-list-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--color-border);
  padding-right: 20px;
  overflow-y: auto;
  height: 100%;
}

.associator-event-item {
  display: flex;
  flex-direction: column;
  padding: 12px;
  background-color: #F8FAFC;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast) ease-in-out;
  user-select: none;
}

.associator-event-item:hover {
  background-color: #F1F5F9;
  border-color: var(--text-secondary);
}

.associator-event-item.active {
  background-color: var(--color-primary-light);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.1);
}

.associator-event-item-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.associator-event-item-meta {
  font-size: 10.5px;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.associator-event-item-date {
  font-family: monospace;
}

.associator-upload-panel {
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: stretch;
  position: relative;
  height: 100%;
  overflow-y: auto;
  padding: 10px 10px 10px 20px;
}

#associator-uploader-container .image-uploader-container {
  width: 100%;
}

#associator-uploader-container .uploader-preview-wrapper.landscape,
#associator-uploader-container .uploader-dropzone.landscape {
  height: 280px; /* Un poco más alto al tener más espacio en pantalla completa */
}

/* Estilos de la Línea Temporal en el Diálogo de Recurrencia */
.rec-timeline-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #F1F5F9;
  border: 1px solid var(--color-border);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  user-select: none;
}
.rec-timeline-pill.current {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-primary-border);
}
.rec-timeline-pill.future {
  background-color: var(--color-success-light);
  color: var(--color-success);
  border-color: var(--color-success-border);
  border-style: dashed;
}
.rec-timeline-arrow {
  color: var(--text-muted);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
}

/* Soporte visual premium para errores de validación */
.input-error {
  border-color: var(--color-danger) !important;
  background-color: rgba(239, 68, 68, 0.02) !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1) !important;
}

.mensaje-error-campo {
  color: var(--color-danger-text) !important;
  font-size: 11px !important;
  margin-top: 4px !important;
  display: block !important;
  font-weight: 500 !important;
}




/* ===== Campo de valor estimado con prefijo de moneda ===== */

/**
 * Contenedor del input de valor estimado.
 * Usa position:relative para anclar los badges de prefijo/sufijo.
 */
.valor-estimado-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

/** Símbolo de la moneda (izquierda) */
.valor-estimado-prefix {
  position: absolute;
  left: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;       /* Evita que BZ$ salte de línea */
  pointer-events: none;
  z-index: 1;
}

/** Código de la moneda (derecha) */
.valor-estimado-suffix {
  position: absolute;
  right: 12px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
}

/** Input del valor — el JS calcula padding-left dinámicamente */
.valor-estimado-input {
  /* padding-left se sobreescribe por JS según la longitud del símbolo */
  padding-left: 28px;
  padding-right: 52px;
  flex: 1;
  width: 100%;
}
