/* Sistema global de dialogos mexDialog */
#mex-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}

#mex-dialog-overlay.active {
  display: flex;
}

.mex-dlg-card {
  background: #fff;
  border-radius: 22px;
  max-width: 430px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  animation: mex-dlg-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes mex-dlg-in {
  from {
    opacity: 0;
    transform: scale(0.84) translateY(24px);
  }
}

.mex-dlg-icon-row {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px 24px;
  position: relative;
  overflow: hidden;
}

.mex-dlg-icon-row::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background: radial-gradient(circle at 50% 120%, #fff 0%, transparent 70%);
}

.mex-dlg-icon-row.dlg-info {
  background: linear-gradient(135deg, #0d2a54 0%, #1a73e8 100%);
}

.mex-dlg-icon-row.dlg-success {
  background: linear-gradient(135deg, #064e3b 0%, #059669 100%);
}

.mex-dlg-icon-row.dlg-warning {
  background: linear-gradient(135deg, #78350f 0%, #d97706 100%);
}

.mex-dlg-icon-row.dlg-danger,
.mex-dlg-icon-row.dlg-error {
  background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 100%);
}

.mex-dlg-main-icon {
  font-size: 52px;
  color: #fff;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
  position: relative;
  z-index: 1;
}

.mex-dlg-body {
  padding: 24px 28px 12px;
}

.mex-dlg-title {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: 0;
}

.mex-dlg-text {
  margin: 0;
  font-size: 14px;
  color: #64748b;
  line-height: 1.65;
  white-space: pre-wrap;
}

.mex-dlg-input-wrap {
  margin-top: 16px;
}

.mex-dlg-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: #1e293b;
  background: #f8fafc;
}

.mex-dlg-input:focus {
  border-color: var(--mex-accent, #1a73e8);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.mex-dlg-actions {
  padding: 12px 28px 26px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.mex-dlg-btn {
  padding: 11px 24px;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
  min-width: 90px;
  letter-spacing: 0.3px;
}

.mex-dlg-btn-cancel {
  background: #f1f5f9;
  color: #64748b;
}

.mex-dlg-btn-cancel:hover {
  background: #e2e8f0;
  color: #475569;
}

.mex-dlg-btn-extra {
  background: #e0f2fe;
  color: #0369a1;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.16);
}

.mex-dlg-btn-extra:hover {
  transform: translateY(-2px);
  background: #bae6fd;
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.24);
}

.mex-dlg-btn-confirm {
  background: var(--mex-accent, #1a73e8);
  color: #fff;
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.35);
}

.mex-dlg-btn-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(26, 115, 232, 0.5);
}

.mex-dlg-btn-confirm.dlg-danger,
.mex-dlg-btn-confirm.dlg-error {
  background: #dc2626;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.mex-dlg-btn-confirm.dlg-success {
  background: #059669;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.mex-dlg-btn-confirm.dlg-warning {
  background: #d97706;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
}

body.dark-theme .mex-dlg-card,
html.dark-theme .mex-dlg-card,
html[data-theme="dark"] .mex-dlg-card {
  background: #1e293b;
}

body.dark-theme .mex-dlg-title,
html.dark-theme .mex-dlg-title,
html[data-theme="dark"] .mex-dlg-title {
  color: #f1f5f9;
}

body.dark-theme .mex-dlg-text,
html.dark-theme .mex-dlg-text,
html[data-theme="dark"] .mex-dlg-text {
  color: #94a3b8;
}

body.dark-theme .mex-dlg-input,
html.dark-theme .mex-dlg-input,
html[data-theme="dark"] .mex-dlg-input {
  background: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}

body.dark-theme .mex-dlg-btn-cancel,
html.dark-theme .mex-dlg-btn-cancel,
html[data-theme="dark"] .mex-dlg-btn-cancel {
  background: #334155;
  color: #94a3b8;
}
