confirm-dialog,
input-dialog {
  display: flex;
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.cd-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.cd-box {
  position: relative;
  background: #1a1d27;
  border: 1px solid #2a2d3a;
  border-radius: 8px;
  width: min(420px, 90vw);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.cd-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #13151f;
  border-bottom: 1px solid #2a2d3a;
}

.cd-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.cd-title {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
  color: #e2e4ed;
}

.cd-close {
  background: none;
  border: none;
  color: #555;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 3px 7px;
  border-radius: 4px;
  line-height: 1;
}

.cd-close:hover {
  color: #e2e4ed;
  background: #2a2d3a;
}

.cd-body {
  padding: 20px 20px 16px;
}

.cd-message {
  color: #c8cbde;
  font-size: 0.9rem;
  line-height: 1.6;
}

.cd-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #2a2d3a;
}

.cd-btn {
  padding: 6px 18px;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
}

.cd-btn-cancel {
  background: transparent;
  border-color: #2a2d3a;
  color: #9ba4c7;
}

.cd-btn-cancel:hover {
  background: #2a2d3a;
  color: #e2e4ed;
}

.cd-btn-confirm {
  background: #7c8cff;
  border-color: #7c8cff;
  color: #fff;
}

.cd-btn-confirm:hover {
  background: #6070ee;
  border-color: #6070ee;
}

.cd-btn-confirm.cd-btn-danger {
  background: #c0392b;
  border-color: #c0392b;
}

.cd-btn-confirm.cd-btn-danger:hover {
  background: #e74c3c;
  border-color: #e74c3c;
}

/* ── Input dialog ────────────────────────────────────────────────────────── */

.cd-input-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9ba4c7;
  margin-bottom: 6px;
}

.cd-input-field {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: #0f1117;
  border: 1px solid #2a2d3a;
  border-radius: 4px;
  color: #e2e4ed;
  font-size: 0.9rem;
  font-family: inherit;
  padding: 7px 10px;
  outline: none;
}

.cd-input-field:focus {
  border-color: #7c8cff;
}
