/* ─── MODAL ─── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 29, 46, 0.4);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.overlay.open {
  display: flex;
}

.modal {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn .2s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.modal-title {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.fg {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fl {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  letter-spacing: .5px;
  text-transform: uppercase;
}

.fin,
.fsel,
.fta {
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: var(--body);
  outline: none;
  transition: border-color .18s;
  width: 100%;
}

.fin:focus,
.fsel:focus,
.fta:focus {
  border-color: var(--accent);
  background: var(--white);
}

.fsel option {
  background: var(--white);
}

.fta {
  resize: vertical;
  min-height: 80px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
}
