
.body-hero{
  display:flex;justify-content:space-between;align-items:center;gap:16px;
  background:linear-gradient(135deg,#153d31,#08271e);
  color:#fff;border-radius:22px;padding:22px;box-shadow:var(--shadow);margin-bottom:14px
}
.body-hero h3{font-size:34px;margin:3px 0 4px}
.body-hero .subtle{color:#c8d7cf}
.compare-controls{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}
.body-comparison{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.compare-column{border:1px solid var(--line);border-radius:16px;padding:12px;background:#fbfcfb}
.compare-column h4{margin:0 0 10px}
.compare-photo{aspect-ratio:3/4;border-radius:12px;overflow:hidden;background:#e8eeea;display:grid;place-items:center;margin-bottom:9px}
.compare-photo img{width:100%;height:100%;object-fit:cover}
.compare-empty{font-size:12px;color:var(--muted);text-align:center;padding:22px}
.photo-timeline{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.photo-card{border:1px solid var(--line);border-radius:15px;padding:10px;background:#fbfcfb}
.photo-card strong{display:block;margin-bottom:8px}
.photo-card-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}
.photo-thumb{aspect-ratio:3/4;border-radius:8px;overflow:hidden;background:#e8eeea;display:grid;place-items:center;font-size:10px;color:var(--muted)}
.photo-thumb img{width:100%;height:100%;object-fit:cover}
.measurement-form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.body-dialog{border:none;padding:0;background:transparent;width:min(94vw,660px)}
.body-dialog::backdrop{background:rgba(3,18,13,.72);backdrop-filter:blur(3px)}
.body-dialog-panel{margin:0;max-height:88vh;overflow:auto}
.body-dialog-section{display:grid;gap:12px;margin-bottom:14px}
.icon-btn{border:0;background:#edf2ef;width:34px;height:34px;border-radius:50%;font-size:22px;cursor:pointer}
.measure-card-detail{font-size:11px;color:var(--muted);margin-top:4px}
.body-history-entry{display:grid;grid-template-columns:1fr auto;gap:12px}
@media(max-width:560px){
  .body-hero{align-items:flex-start;flex-direction:column}
  .body-comparison,.compare-controls{grid-template-columns:1fr}
  .measurement-form-grid{grid-template-columns:1fr 1fr}
}

/* V4.2.18 — Corpo 360° e histórico editável */
.photo-upload-grid-360,.photo-card-grid-360{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.photo-card-grid-360 .photo-thumb{min-height:128px;border:0;padding:0;position:relative;cursor:pointer}
.photo-thumb-label{position:absolute;left:5px;right:5px;bottom:5px;background:rgba(0,0,0,.62);color:#fff;border-radius:6px;padding:4px;font-size:10px}
.body-history-entry{align-items:center}
.body-history-entry>div:first-child strong{font-size:13px;font-weight:600;color:var(--text)}
.body-history-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end;margin-top:10px}
.btn-small{padding:8px 12px!important;min-height:auto!important;font-size:12px!important}
.btn-danger{background:#fff1f1!important;color:#a32828!important;border:1px solid #efcaca!important}
.compare-angle-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.compare-angle-grid .compare-photo{cursor:pointer;margin-bottom:3px}
.compare-angle-grid .subtle{font-size:10px;text-align:center;margin:0 0 6px}
.body-photo-viewer{border:0;padding:0;background:transparent;width:min(96vw,720px)}
.body-photo-viewer::backdrop{background:rgba(0,0,0,.88)}
.body-photo-viewer-panel{position:relative;background:#071d16;border-radius:18px;padding:48px 12px 14px;color:#fff;text-align:center}
.body-photo-viewer-panel h3{margin:0 0 10px}
.body-photo-viewer-panel img{display:block;max-width:100%;max-height:78vh;margin:auto;border-radius:12px;object-fit:contain}
.body-photo-viewer-close{position:absolute;right:12px;top:8px;border:0;background:rgba(255,255,255,.14);color:#fff;width:38px;height:38px;border-radius:50%;font-size:28px;line-height:1;cursor:pointer}
@media(max-width:560px){.body-history-entry{grid-template-columns:1fr}.body-history-actions{justify-content:flex-start}.photo-upload-grid-360{grid-template-columns:1fr 1fr}.compare-angle-grid{grid-template-columns:1fr 1fr}}


/* V4.2.18 — feedback visível no salvamento corporal */
.body-save-status{margin:14px 0 4px;padding:12px 14px;border-radius:12px;font-weight:700;line-height:1.35;background:#eef3f0;color:#173d31;border:1px solid #cbd9d3}
.body-save-status-success{background:#e7f6ec;color:#145c2e;border-color:#a9d6b7}
.body-save-status-error{background:#fff0ef;color:#9a261f;border-color:#efb4af;white-space:normal}
#bodyDialogSave:disabled{opacity:.78;cursor:wait}

/* V4.2.20: garante separação total entre medidas e fotos */
.body-dialog-section[hidden]{display:none!important}
