<section class="project-form-shell">
  <div class="admin-header">
    <h1><%= office ? 'Edit Office Location' : 'New Office Location' %></h1>
    <a class="button button-secondary" href="/admin/settings/offices">Back to Office Locations</a>
  </div>

  <form method="POST" action="<%= office ? '/admin/settings/offices/' + office.id + '?_method=PUT' : '/admin/settings/offices' %>">
    <div class="form-grid">
      <div class="form-main">
        <div class="form-section">
          <label>
            Location name
            <input type="text" name="name" value="<%= office ? office.name : '' %>" required placeholder="e.g. Nairobi HQ">
          </label>
          <label>
            Address
            <textarea name="address" rows="3" placeholder="KP Offices Suites, Milimani, Nairobi, Kenya"><%= office && office.address ? office.address : '' %></textarea>
          </label>
          <label>
            Phone <span class="hint">(optional, if different from the main company number)</span>
            <input type="text" name="phone" value="<%= office && office.phone ? office.phone : '' %>">
          </label>
          <label>
            Google Maps embed link <span class="hint">(optional — from Google Maps: Share &rarr; Embed a map)</span>
            <input type="text" name="mapEmbedUrl" value="<%= office && office.mapEmbedUrl ? office.mapEmbedUrl : '' %>" placeholder="https://www.google.com/maps/embed?pb=...">
          </label>
        </div>
      </div>
      <div class="form-sidebar">
        <div class="form-section">
          <h3 class="form-section-title">Save</h3>
          <button type="submit" class="button button-primary form-save-button">Save office</button>
        </div>
      </div>
    </div>
  </form>
</section>
