/* =============================================================================
   Modal-Dialog
   ============================================================================= */
.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: dialog-fade-in 120ms ease-out;
}
@keyframes dialog-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.dialog {
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  background: var(--mod-base);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  animation: dialog-slide-in 160ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
@keyframes dialog-slide-in {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}

.dialog--wide {
  max-width: 720px;
}

.dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--glass-border-subtle);
}
.dialog__title {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.dialog__title-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(37, 99, 235, 0.15);
  color: var(--mod-crm);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.30);
}
.dialog__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 100ms ease, color 100ms ease;
  font-size: 18px;
  line-height: 1;
}
.dialog__close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.dialog__body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.dialog__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--glass-border-subtle);
  background: rgba(0, 0, 0, 0.15);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.dialog__footer-spread {
  margin-right: auto;
  font-size: 12px;
  color: var(--text-dim);
}

/* Confirm-Dialog (kleiner) */
.dialog--confirm {
  max-width: 420px;
}
.dialog--confirm .dialog__title-icon {
  background: rgba(220, 38, 38, 0.15);
  color: var(--mod-alert);
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.30);
}
