.dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.dialog-backdrop.hidden {
  display: none;
}

.dialog {
  background: #ffffff;
  color: #111111;
  width: min(90vw, 520px);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e6e6e6;
}

.dialog-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.dialog-body {
  padding: 1rem 1.25rem;
}

.dialog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  align-items: center;
}

.dialog-grid label {
  font-size: 0.9rem;
  color: #333333;
}

.dialog-grid input,
.dialog-grid select {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid #cccccc;
  border-radius: 6px;
  font-size: 0.95rem;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.9rem 1.25rem 1.25rem;
  border-top: 1px solid #e6e6e6;
}

.dialog-close,
.dialog-secondary,
.dialog-primary {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.dialog-secondary {
  background: #f2f2f2;
  color: #222222;
}

.dialog-primary {
  background: #2d8cff;
  color: #ffffff;
}

@media (max-width: 640px) {
  .dialog {
    width: min(92vw, 420px);
  }

  .dialog-grid {
    grid-template-columns: 1fr;
  }
}
