/* SweetAlert2 theme aligned with app UI */
.swal2-container {
  z-index: 2147483647 !important;
}

.swal2-popup {
  border-radius: 16px;
  border: 1px solid var(--border, rgba(255, 255, 255, .08));
  background: var(--card, #0f1216);
  color: var(--text, #eaeef4);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
  font: 600 14px/1.45 "Montserrat", "Roboto", sans-serif;
}

.swal2-title {
  color: var(--text, #eaeef4);
  font-weight: 800;
}

.swal2-html-container,
.swal2-content {
  color: var(--muted, #9aa4b2);
  font-weight: 500;
}

.swal2-actions {
  gap: 10px;
}

.swal2-radio {
  background: transparent !important;
}

.swal2-radio label {
  color: inherit;
}

.swal2-styled {
  border-radius: 12px !important;
  padding: 10px 16px !important;
  font-weight: 800 !important;
  border: 1px solid var(--border, rgba(255, 255, 255, .1)) !important;
  box-shadow: none !important;
}

.swal2-confirm {
  background: #2563eb !important;
  border-color: #1d4ed8 !important;
  color: #fff !important;
}

.swal2-cancel {
  background: transparent !important;
  color: var(--text, #eaeef4) !important;
}

.swal2-icon.swal2-success,
.swal2-icon.swal2-success .swal2-success-ring {
  border-color: #16a34a !important;
  color: #16a34a !important;
}

.swal2-icon.swal2-warning {
  border-color: #d97706 !important;
  color: #d97706 !important;
}

.swal2-icon.swal2-error {
  border-color: #dc2626 !important;
  color: #dc2626 !important;
}

.swal2-icon.swal2-info {
  border-color: #0b5ea8 !important;
  color: #0b5ea8 !important;
}

/* Light theme */
:root[data-theme="light"] .swal2-popup {
  background: #ffffff;
  color: #1f2937;
  border-color: #d7dee8;
  box-shadow: 0 18px 34px rgba(15, 23, 42, .16);
}

:root[data-theme="light"] .swal2-title {
  color: #0f172a;
}

:root[data-theme="light"] .swal2-html-container,
:root[data-theme="light"] .swal2-content {
  color: #475569;
}

:root[data-theme="light"] .swal2-cancel {
  color: #1f2937 !important;
  border-color: #d7dee8 !important;
  background: #ffffff !important;
}

:root .swal2-deny-yellow.swal2-styled {
  background: #f59e0b !important;
  color: #111827 !important;
}
:root .swal2-deny-yellow.swal2-styled:focus-visible {
  box-shadow: 0 0 0 3px rgba(245,158,11,.35) !important;
}

:root .swal-inc-list.swal2-popup {
  width: min(520px, 92vw) !important;
}
.inc-list-wrap {
  max-height: 360px;
  overflow: auto;
  border: 1px solid rgba(148,163,184,.35);
  border-radius: 10px;
}
.inc-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.inc-list-table thead th {
  position: sticky;
  top: 0;
  background: rgba(15,23,42,.9);
  color: #e5e7eb;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148,163,184,.35);
}
.inc-list-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148,163,184,.2);
}
.inc-list-table .btn {
  font-weight: 500;
  letter-spacing: 0;
}
.inc-list-table .btn.sm {
  padding: 6px 10px;
}
.inc-list-table tr:hover td {
  background: rgba(148,163,184,.12);
}
.inc-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.inc-state.ok { color: #22c55e; }
.inc-state.nok { color: #f59e0b; }

.swal-link-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.swal-link-wrap .btn {
  white-space: nowrap;
}
@media (max-width: 520px) {
  .inc-list-table thead { display: none; }
  .inc-list-table tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 10px 12px; }
  .inc-list-table td { padding: 0; border: 0; }
  .inc-list-table td:nth-child(1)::before { content: "ID: "; color: #94a3b8; font-weight: 600; }
  .inc-list-table td:nth-child(2)::before { content: "Fecha: "; color: #94a3b8; font-weight: 600; }
  .inc-list-table td:nth-child(3)::before { content: "Estado: "; color: #94a3b8; font-weight: 600; }
  .inc-list-table td:nth-child(4) { grid-column: 1 / -1; }
}
