.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.confirm-overlay.show {
  display: flex;
}

.confirm-box {
  width: 100%;
  max-width: 360px;
  background: #151D1A;
  border: 1px solid #2a2a2a;
  border-radius: 18px;
  padding: 22px 20px 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  animation: confirm-in 0.18s ease-out;
}

@keyframes confirm-in {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.confirm-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.confirm-icon.primary {
  background: color-mix(in srgb, var(--confirm-accent) 22%, transparent);
}

.confirm-icon.danger {
  background: rgba(127, 29, 29, 0.35);
}

.confirm-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
}

.confirm-msg {
  font-size: 0.9rem;
  color: #999;
  line-height: 1.45;
  margin: 0 0 18px;
}

.confirm-actions {
  display: flex;
  gap: 10px;
}

.confirm-btn {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.confirm-btn.cancel {
  background: #2a2a2a;
  color: #ccc;
}

.confirm-btn.cancel:active {
  background: #333;
}

.confirm-btn.ok {
  background: var(--confirm-accent);
  color: var(--confirm-ok-text, #fff);
}

.confirm-btn.ok.danger {
  background: #7f1d1d;
  color: #f87171;
}

.confirm-btn.ok:active {
  filter: brightness(1.08);
}

.theme-gastos {
  --confirm-accent: #176B87;
  --confirm-ok-text: #fff;
}

.theme-prestamos {
  --confirm-accent: #f59e0b;
  --confirm-ok-text: #111;
}

.theme-calculadora {
  --confirm-accent: #a78bfa;
  --confirm-ok-text: #fff;
}

.theme-prestamos .confirm-box {
  border-color: #f59e0b33;
}

.theme-gastos .confirm-box {
  border-color: #176B8733;
}

.theme-calculadora .confirm-box {
  border-color: #06b6d433;
}
