/* ==========================================================================
   Estilos específicos del módulo de Vencimientos
   ========================================================================== */

.vencimiento-category-filter { min-width: 0; margin: 0; padding: 0; border: 0; }
.vencimiento-category-filter > legend { margin-bottom: 6px; }
.category-multiselect { position: relative; }
.category-multiselect-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; cursor: pointer; }
.category-multiselect-trigger:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.category-multiselect-panel { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(360px, calc(100vw - 48px)); max-height: 320px; overflow: auto; padding: 10px; border: 1px solid #dbe3ef; border-radius: 10px; background: #fff; box-shadow: 0 12px 28px rgba(15, 23, 42, .14); }
.category-multiselect-tools { display: flex; justify-content: space-between; gap: 12px; padding: 2px 4px 9px; border-bottom: 1px solid #eef2f7; }
.category-multiselect-tools .btn-link { border: 0; padding: 4px; background: transparent; color: #4f46e5; font-weight: 650; cursor: pointer; }
.category-multiselect-tools .btn-link:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; border-radius: 4px; }
.category-multiselect-options { display: grid; gap: 2px; padding-top: 7px; }
.category-multiselect-option { display: flex; align-items: flex-start; gap: 9px; padding: 8px; border-radius: 7px; color: #334155; cursor: pointer; line-height: 1.3; }
.category-multiselect-option:hover { background: #f8fafc; }
.category-multiselect-option input { margin-top: 2px; accent-color: #4f46e5; }
.category-mode-label { display: grid; gap: 6px; margin-top: 10px; color: #64748b; font-size: 12px; }

@media (max-width: 640px) {
  .category-multiselect-panel { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; max-height: min(60vh, 360px); }
}

/* Badges de indicador visible */
.badge-vencimiento-vencido {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  font-weight: 600;
}

.badge-vencimiento-hoy {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fdba74;
  font-weight: 600;
}

.badge-vencimiento-proximo {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fcd34d;
  font-weight: 600;
}

.badge-vencimiento-futuro {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-weight: 500;
}

.badge-vencimiento-cumplido {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-weight: 600;
}

/* Tabla de Vencimientos */
.vencimientos-table-container {
  overflow-x: auto;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.vencimientos-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.vencimientos-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.vencimientos-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

.vencimientos-table tbody tr:hover {
  background-color: #f8fafc;
}

.vencimientos-table tbody tr {
  transition: opacity 180ms ease, transform 180ms ease;
}

.vencimientos-table tbody tr.vencimiento-row-removing {
  opacity: 0;
  transform: translateX(8px);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .vencimientos-table tbody tr {
    transition: none;
  }
}

.vencimiento-title-cell strong {
  display: block;
  color: #0f172a;
}

.vencimiento-title-cell small {
  display: block;
  color: #64748b;
  margin-top: 0.15rem;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vencimiento-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* Modal de confirmación interna */
.confirm-dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  padding: 1rem;
}

.confirm-dialog-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 440px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.confirm-dialog-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
}

.confirm-dialog-message {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.4;
  margin: 0;
}

.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Aviso de vencimiento bloqueado por estar cumplido */
.vencimiento-locked-notice {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Sincronización de vencimientos desde calendarios */
.sync-intro-text {
  font-size: 0.95rem;
  color: #334155;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.sync-explanation-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.875rem 1rem;
  margin-top: 1rem;
}

.sync-explanation-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  margin: 0 0 0.5rem 0;
}

.sync-explanation-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
}

.sync-explanation-list li {
  margin-bottom: 0.25rem;
}

.sync-summary-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.sync-summary-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.75rem 0;
}

.sync-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.5rem;
}

.sync-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 0.5rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  text-align: center;
}

.sync-stat-num {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

.sync-stat-lbl {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.2rem;
}

.sync-avisos-container {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 0.875rem 1rem;
  margin-top: 0.75rem;
}

.sync-avisos-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #92400e;
  margin: 0 0 0.5rem 0;
}

.sync-avisos-items {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: #78350f;
  line-height: 1.4;
}

.sync-avisos-items li {
  margin-bottom: 0.25rem;
}
.vencimiento-month-control{display:flex;align-items:end;flex-wrap:wrap;gap:8px;min-width:0;width:100%;max-width:100%}
.vencimiento-month-control .filter-label{flex:1 1 170px;min-width:130px}
.vencimiento-month-control .btn{white-space:nowrap;min-height:44px}
@media(max-width:680px){.vencimiento-month-control{flex-wrap:wrap}.vencimiento-month-control .filter-label{flex-basis:100%}}
