/* =========================================================
   MODALS — Overlay, modal shell, footer
   ========================================================= */

/* ── MODALES ── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.overlay.open { display: flex; }
.modal { isolation: isolate;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 0.5px solid var(--border);
  width: 500px;
  max-width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  transition: background 0.25s, border-color 0.25s;
}
.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.modal h3 { font-size: 16px; font-weight: 600; margin-bottom: 1.25rem; color: var(--text); }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
}
.modal-header h3 { margin-bottom: 0; font-size: 15px; }
.modal-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}
.modal-close-btn:hover { background: var(--surface2); color: var(--text); }

.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 0.5px solid var(--border);
  background: var(--surface2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  flex-shrink: 0;
}
.form-section {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 1rem 0 0.5rem;
  padding-top: 0.75rem;
  border-top: 0.5px solid var(--border);
}
