body.app-confirm-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.app-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(5px);
  isolation: isolate;
}

.app-confirm-modal.is-open {
  display: flex;
}

.app-confirm-modal__content {
  --app-confirm-accent: #2563eb;
  --app-confirm-accent-soft: rgba(59, 130, 246, 0.15);
  --app-confirm-border: rgba(59, 130, 246, 0.2);
  --app-confirm-radial: rgba(59, 130, 246, 0.14);
  --app-confirm-bg-end: rgba(248, 251, 255, 0.98);
  width: min(520px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  display: flex;
  flex-direction: column;
  margin: auto;
  padding: 1.5rem;
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 1rem;
  border: 1px solid var(--app-confirm-border);
  background:
    radial-gradient(circle at top center, var(--app-confirm-radial), rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), var(--app-confirm-bg-end));
  box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, 0.24);
}

.app-confirm-modal__content--danger {
  --app-confirm-accent: #dc2626;
  --app-confirm-accent-soft: rgba(248, 113, 113, 0.18);
  --app-confirm-border: rgba(248, 113, 113, 0.24);
  --app-confirm-radial: rgba(248, 113, 113, 0.18);
  --app-confirm-bg-end: rgba(255, 249, 249, 0.99);
}

.app-confirm-modal__content--success {
  --app-confirm-accent: #16a34a;
  --app-confirm-accent-soft: rgba(74, 222, 128, 0.18);
  --app-confirm-border: rgba(74, 222, 128, 0.24);
  --app-confirm-radial: rgba(74, 222, 128, 0.16);
  --app-confirm-bg-end: rgba(247, 254, 249, 0.99);
}

.app-confirm-modal__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
}

.app-confirm-modal__icon {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--app-confirm-accent-soft);
  color: var(--app-confirm-accent);
}

.app-confirm-modal__icon svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-confirm-modal__title {
  margin: 0;
  font-size: clamp(1.55rem, 1.9vw, 1.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text, var(--drivebook-text, #0f172a));
}

.app-confirm-modal__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
  margin-top: 1rem;
}

.app-confirm-modal__body p {
  margin: 0;
  color: var(--color-text-muted, var(--drivebook-text-muted, #64748b));
  font-size: 1rem;
  line-height: 1.5;
}

.app-confirm-modal__body p strong {
  color: #475569;
  font-weight: 600;
}

.app-confirm-modal__detail {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.4;
}

.app-confirm-modal__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.35rem;
}

.app-confirm-modal__actions .btn {
  min-width: 130px;
}

.app-confirm-modal__actions .btn-outline-secondary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.98));
  border-color: rgba(148, 163, 184, 0.42);
  color: #475569;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.app-confirm-modal__actions .btn-outline-secondary:hover,
.app-confirm-modal__actions .btn-outline-secondary:focus-visible {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(226, 232, 240, 0.98));
  border-color: rgba(100, 116, 139, 0.48);
  color: #334155;
}

.app-confirm-modal__actions .btn-outline-danger {
  background: linear-gradient(180deg, rgba(255, 245, 245, 0.98), rgba(254, 226, 226, 0.92));
  border-color: rgba(248, 113, 113, 0.46);
  color: #b91c1c;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48);
}

.app-confirm-modal__actions .btn-outline-danger:hover,
.app-confirm-modal__actions .btn-outline-danger:focus-visible {
  background: linear-gradient(180deg, rgba(255, 241, 242, 0.99), rgba(254, 202, 202, 0.92));
  border-color: rgba(239, 68, 68, 0.56);
  color: #991b1b;
}

.app-confirm-modal__actions .btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626 58%, #b91c1c);
  border-color: rgba(220, 38, 38, 0.72);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(219, 234, 254, 0.95), 0 0.85rem 1.6rem rgba(220, 38, 38, 0.2);
}

.app-confirm-modal__actions .btn-danger:hover,
.app-confirm-modal__actions .btn-danger:focus-visible {
  background: linear-gradient(135deg, #f87171, #dc2626 60%, #991b1b);
  border-color: rgba(220, 38, 38, 0.82);
  color: #fff;
}

.app-confirm-modal__actions .btn-primary {
  background: linear-gradient(
    135deg,
    var(--color-primary-500, #60a5fa),
    var(--color-primary-600, #2563eb) 58%,
    var(--color-primary-800, #1e3a8a)
  );
  border-color: rgba(37, 99, 235, 0.62);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(219, 234, 254, 0.95), 0 0.85rem 1.6rem rgba(37, 99, 235, 0.18);
}

.app-confirm-modal__actions .btn-primary:hover,
.app-confirm-modal__actions .btn-primary:focus-visible {
  background: linear-gradient(
    135deg,
    var(--color-primary-400, #93c5fd),
    var(--color-primary-600, #2563eb) 60%,
    var(--color-primary-800, #1e3a8a)
  );
  border-color: rgba(37, 99, 235, 0.72);
  color: #fff;
}

.app-confirm-modal__actions .btn-success {
  background: linear-gradient(135deg, #4ade80, #16a34a 58%, #166534);
  border-color: rgba(22, 163, 74, 0.64);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(220, 252, 231, 0.95), 0 0.85rem 1.6rem rgba(22, 163, 74, 0.18);
}

.app-confirm-modal__actions .btn-success:hover,
.app-confirm-modal__actions .btn-success:focus-visible {
  background: linear-gradient(135deg, #86efac, #16a34a 60%, #14532d);
  border-color: rgba(22, 163, 74, 0.74);
  color: #fff;
}

@media (max-width: 575.98px) {
  .app-confirm-modal {
    padding: 0.8rem;
  }

  .app-confirm-modal__content {
    width: min(100vw - 1.6rem, 520px);
    padding: 1.2rem 1rem 1.05rem;
  }

  .app-confirm-modal__title {
    font-size: 1.4rem;
  }

  .app-confirm-modal__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .app-confirm-modal__actions .btn {
    width: 100%;
  }
}
