/* ---------- Trigger button ---------- */
  .open-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
  }
  .open-btn:hover { background: #1d4ed8; }
  .open-btn:active { transform: scale(0.98); }

  /* ---------- Overlay (the dark backdrop behind the modal) ---------- */
  .overlay {
    position: fixed;
    inset: 0;                              /* top/right/bottom/left: 0 */
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;

    /* Hidden by default — opacity + visibility for a clean fade */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 100;
  }

  /* When .active is added, the overlay fades in */
  .overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* ---------- Modal (the form container in front of the page) ---------- */
  .modal {
    background: #fff;
    border-radius: 12px;
    padding: 0.5rem 2rem 2rem 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    position: relative;

    /* Start slightly down and scaled — adds a subtle lift on fade-in */
    transform: translateY(8px) scale(0.98);
    transition: transform 0.25s ease;
  }

  .overlay.active .modal {
    transform: translateY(0) scale(1);
  }

  .modal h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
  }

  .modal .subtitle {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  /* ---------- Close (X) button ---------- */
  .close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
  }
  .close-btn:hover {
    background: #f3f4f6;
    color: #111827;
  }

  /* ---------- Form fields ---------- */
  .field { margin-bottom: 1rem; }

  .field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    margin-bottom: 0.35rem;
    color: #374151;
    line-height: 1.25rem;
  }

  .field input,
  .field textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-size:15px;
  }
  .field input:focus,
  .field textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  }

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

  /* ---------- Action buttons inside the modal ---------- */
  .actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.25rem;
  }

  .btn {
    padding: 0.6rem 1.1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.15s ease;
  }
  .btn-secondary {
    background: #f3f4f6;
    color: #374151;
  }
  .btn-secondary:hover { background: #e5e7eb; }

  .btn-primary {
    background: #2563eb;
    color: #fff;
  }
  .btn-primary:hover { background: #1d4ed8; }