/* UI de edição de fotos (admin) — só aparece após login via /admin ou ?edit=1 */

body.sf-editing {
  padding-top: 58px;
}

.sf-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
  background: #1c1915;
  color: #f7f4ee;
  font: 600 14px/1.3 "Open Sans", "Segoe UI", sans-serif;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.sf-bar[hidden] {
  display: none !important;
}

.sf-bar button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.6rem 0.95rem;
  min-height: 44px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.sf-bar__msg {
  flex: 1;
  min-width: 0;
}

.sf-bar__out {
  background: transparent;
  color: #f7f4ee;
  border: 1px solid rgba(247, 244, 238, 0.35) !important;
}

img[data-slot].sf-editable {
  cursor: pointer;
  outline: 3px solid transparent;
  transition: outline-color 0.15s ease, transform 0.15s ease;
}

body.sf-editing img[data-slot].sf-editable {
  outline-color: rgba(47, 93, 58, 0.9);
}

body.sf-editing img[data-slot].sf-editable:active {
  transform: scale(0.99);
}

.sf-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(20, 18, 15, 0.55);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.sf-modal[hidden] {
  display: none !important;
}

.sf-card {
  width: min(400px, 100%);
  background: #fffdf9;
  color: #1c1915;
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  font: 400 15px/1.45 "Open Sans", "Segoe UI", sans-serif;
}

.sf-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.sf-card p {
  margin: 0 0 1rem;
  color: #6b6358;
}

.sf-card label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.sf-card input {
  width: 100%;
  padding: 0.85rem 0.9rem;
  border: 1px solid #ddd4c6;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
}

.sf-card .sf-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.sf-card .sf-actions button {
  flex: 1;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  font: 700 15px/1 "Open Sans", "Segoe UI", sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}

.sf-card .sf-go {
  background: #2f5d3a;
  color: #fff;
}

.sf-card .sf-cancel {
  background: transparent;
  border: 1px solid #ddd4c6 !important;
  color: #1c1915;
}

.sf-err {
  color: #8a2f2f;
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
}

.sf-toast {
  position: fixed;
  left: 50%;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 10001;
  background: #1c1915;
  color: #fff;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  font: 600 14px/1.3 "Open Sans", "Segoe UI", sans-serif;
  max-width: 92vw;
  text-align: center;
}

@media (max-width: 640px) {
  .sf-bar {
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .sf-bar__msg {
    width: 100%;
    order: -1;
  }
}
