:root {
  --ipb-accent: #0A66FF;
  --ipb-accent-hover: #0058df;
  --ipb-accent-soft: #eef5ff;
  --ipb-accent-soft-2: #f7faff;
  --ipb-text: #111318;
  --ipb-text-2: #434956;
  --ipb-text-3: #737b8c;
  --ipb-surface: #ffffff;
  --ipb-line: #e6eaf0;
  --ipb-line-strong: #cbd2dc;
  --ipb-danger: #d52b2b;
  --ipb-danger-soft: #fff2f2;
  --ipb-radius: 16px;
  --ipb-shadow: 0 1px 2px rgba(16,24,40,.03), 0 10px 30px rgba(16,24,40,.04);
}

.ipb-public-body { margin: 0; background: #fff; color: var(--ipb-text); }
.ipb-app, .ipb-app * { box-sizing: border-box; }
.ipb-app { min-height: 100vh; margin: 0; background: #fff; color: var(--ipb-text); font-family: 'Figtree', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 16px; -webkit-font-smoothing: antialiased; }
.ipb-context-admin { margin-left: -20px; }
.ipb-app button, .ipb-app select { font: inherit; }

.ipb-topbar { min-height: 76px; padding: 0 30px; border-bottom: 1px solid var(--ipb-line); background: rgba(255,255,255,.96); display: flex; align-items: center; justify-content: space-between; gap: 20px; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); }
.ipb-context-admin .ipb-topbar { top: 32px; }
.ipb-brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.ipb-brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #dbe7ff; border-radius: 11px; background: var(--ipb-accent-soft); color: var(--ipb-accent); }
.ipb-brand-mark svg { width: 22px; height: 22px; }
.ipb-brand strong { display: block; font-size: 15px; line-height: 19px; font-weight: 700; color: var(--ipb-text); }
.ipb-brand span { display: block; margin-top: 1px; font-size: 12px; line-height: 16px; color: var(--ipb-text-3); }

.ipb-main { width: min(1460px, calc(100% - 48px)); margin: 0 auto; padding: 56px 0 72px; }
.ipb-title-row { margin-bottom: 36px; display: flex; justify-content: space-between; gap: 30px; align-items: end; }
.ipb-eyebrow { margin-bottom: 8px; font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .11em; color: var(--ipb-accent); }
.ipb-title-row h1 { margin: 0; font-size: clamp(34px, 4vw, 48px); line-height: 1.05; letter-spacing: -1.7px; font-weight: 700; color: var(--ipb-text); }
.ipb-title-row p { max-width: 760px; margin: 12px 0 0; font-size: 16px; line-height: 25px; color: var(--ipb-text-2); }

.ipb-btn { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; line-height: 20px; font-weight: 600; cursor: pointer; transition: .16s ease; white-space: nowrap; }
.ipb-btn:disabled { opacity: .45; cursor: not-allowed; }
.ipb-btn-primary { background: var(--ipb-accent); color: #fff; border-color: var(--ipb-accent); }
.ipb-btn-primary:hover:not(:disabled) { background: var(--ipb-accent-hover); border-color: var(--ipb-accent-hover); }
.ipb-btn-secondary, .ipb-btn-ghost { background: #fff; color: var(--ipb-text); border-color: var(--ipb-line); }
.ipb-btn-secondary:hover:not(:disabled), .ipb-btn-ghost:hover:not(:disabled) { border-color: #b9c7dc; background: var(--ipb-accent-soft-2); }

.ipb-evaluation-grid { display: grid; grid-template-columns: minmax(320px,.9fr) minmax(430px,1.25fr) minmax(320px,.85fr); gap: 20px; align-items: start; }
.ipb-card { border: 1px solid var(--ipb-line); border-radius: var(--ipb-radius); background: #fff; box-shadow: var(--ipb-shadow); overflow: hidden; }
.ipb-device-card, .ipb-damage-card { padding: 24px; }
.ipb-card-head { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 22px; }
.ipb-card-head-inline { justify-content: space-between; gap: 20px; }
.ipb-card-head-left { display: flex; align-items: flex-start; gap: 13px; }
.ipb-step { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 9px; background: var(--ipb-accent-soft); color: var(--ipb-accent); font-size: 12px; font-weight: 700; }
.ipb-card-head h2 { margin: 0; font-size: 20px; line-height: 25px; letter-spacing: -.35px; font-weight: 700; color: var(--ipb-text); }
.ipb-card-head p { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: var(--ipb-text-3); }
.ipb-count-badge { min-height: 30px; padding: 0 10px; border-radius: 999px; background: var(--ipb-accent-soft); color: var(--ipb-accent); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; white-space: nowrap; }

.ipb-device-image { min-height: 238px; margin: 0 0 24px; border: 1px solid #e4edff; border-radius: 14px; background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%); display: grid; place-items: center; overflow: hidden; }
.ipb-device-image img { display: block; width: 100%; height: 238px; padding: 16px; object-fit: contain; }
.ipb-device-placeholder { min-height: 238px; padding: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #a4b7d5; text-align: center; }
.ipb-device-placeholder[hidden] { display: none; }
.ipb-device-placeholder svg { width: 72px; height: 108px; }
.ipb-device-placeholder span { font-size: 13px; line-height: 18px; color: #7992b7; }

.ipb-field { display: block; margin-bottom: 18px; }
.ipb-field > span { display: block; margin: 0 0 8px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ipb-text-2); }
.ipb-field select { width: 100%; min-height: 50px; padding: 0 42px 0 14px; border: 1px solid var(--ipb-line); border-radius: 10px; background: #fff; color: var(--ipb-text); box-shadow: none; font-size: 15px; font-weight: 500; }
.ipb-field select:focus { border-color: var(--ipb-accent); box-shadow: 0 0 0 3px rgba(10,102,255,.12); outline: 0; }
.ipb-field select:disabled { background: #f8fafc; color: #9aa3af; }
.ipb-base-value { margin-top: 24px; min-height: 66px; padding: 15px 16px; border: 1px solid #dce8ff; border-radius: 12px; background: var(--ipb-accent-soft-2); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ipb-base-value span { color: var(--ipb-text-2); font-size: 13px; font-weight: 500; }
.ipb-base-value strong { font-size: 18px; line-height: 24px; font-weight: 700; letter-spacing: -.25px; color: var(--ipb-text); }

.ipb-damage-list { display: grid; gap: 10px; }
.ipb-damage-item { position: relative; }
.ipb-damage-check { position: absolute; opacity: 0; pointer-events: none; }
.ipb-damage-label { min-height: 72px; padding: 13px 14px; border: 1px solid var(--ipb-line); border-radius: 12px; background: #fff; display: grid; grid-template-columns: 26px minmax(0,1fr) auto; gap: 12px; align-items: center; cursor: pointer; transition: .15s ease; }
.ipb-damage-label:hover { border-color: #bfcbe0; background: #fbfdff; }
.ipb-check-ui { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #bbc3ce; border-radius: 6px; color: #fff; transition: .15s ease; }
.ipb-check-ui svg { width: 13px; height: 13px; opacity: 0; transform: scale(.75); transition: .15s ease; }
.ipb-damage-check:checked + .ipb-damage-label { border-color: #9fc1ff; background: var(--ipb-accent-soft); }
.ipb-damage-check:checked + .ipb-damage-label .ipb-check-ui { background: var(--ipb-accent); border-color: var(--ipb-accent); }
.ipb-damage-check:checked + .ipb-damage-label .ipb-check-ui svg { opacity: 1; transform: scale(1); }
.ipb-damage-copy { min-width: 0; }
.ipb-damage-copy strong { display: block; margin-bottom: 3px; font-size: 15px; line-height: 20px; font-weight: 650; color: var(--ipb-text); }
.ipb-damage-copy span { display: block; font-size: 13px; line-height: 18px; color: var(--ipb-text-3); }
.ipb-damage-amount { font-size: 13px; line-height: 18px; font-weight: 700; color: var(--ipb-text-2); white-space: nowrap; }
.ipb-damage-check:checked + .ipb-damage-label .ipb-damage-amount { color: var(--ipb-accent); }
.ipb-damage-empty { min-height: 180px; border: 1px dashed #d9e2ef; border-radius: 12px; background: #fbfdff; display: grid; align-content: center; justify-items: center; padding: 24px; text-align: center; }
.ipb-damage-empty strong { font-size: 15px; margin-bottom: 5px; color: var(--ipb-text); }
.ipb-damage-empty span { font-size: 13px; line-height: 20px; color: var(--ipb-text-3); }

.ipb-summary-card { position: sticky; top: 96px; }
.ipb-context-admin .ipb-summary-card { top: 128px; }
.ipb-summary-top { padding: 26px 24px 22px; border-bottom: 1px solid #dce8ff; background: linear-gradient(180deg, #f4f8ff 0%, #fff 100%); }
.ipb-final-value { margin: 8px 0 6px; font-size: clamp(36px, 4vw, 48px); line-height: 1; letter-spacing: -1.8px; font-weight: 700; color: var(--ipb-text); }
.ipb-summary-device { font-size: 13px; line-height: 19px; color: var(--ipb-text-3); }
.ipb-summary-lines { padding: 18px 24px 13px; }
.ipb-summary-line { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 7px 0; font-size: 14px; line-height: 20px; color: var(--ipb-text-2); }
.ipb-summary-line strong { color: var(--ipb-text); font-weight: 700; }
.ipb-summary-discount strong { color: var(--ipb-danger); }
.ipb-selected-damages { margin: 0 24px; padding: 14px 0; border-top: 1px solid var(--ipb-line); border-bottom: 1px solid var(--ipb-line); max-height: 210px; overflow: auto; }
.ipb-selected-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; line-height: 18px; color: var(--ipb-text-2); }
.ipb-selected-row span:last-child { color: var(--ipb-danger); font-weight: 600; white-space: nowrap; }
.ipb-empty-mini { color: var(--ipb-text-3); font-size: 13px; line-height: 18px; padding: 4px 0; }
.ipb-summary-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 18px 24px 10px; }
.ipb-summary-note { margin: 0; padding: 0 24px 24px; font-size: 12px; line-height: 18px; color: var(--ipb-text-3); }

.ipb-toast { position: fixed; z-index: 99999; left: 50%; bottom: 28px; transform: translate(-50%, 14px); opacity: 0; pointer-events: none; padding: 11px 15px; border-radius: 10px; background: var(--ipb-accent); color: #fff; box-shadow: 0 10px 30px rgba(10,102,255,.24); font-size: 13px; font-weight: 600; transition: .2s ease; }
.ipb-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1180px) {
  .ipb-evaluation-grid { grid-template-columns: minmax(300px,.9fr) minmax(420px,1.25fr); }
  .ipb-summary-card { grid-column: 1 / -1; position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .ipb-summary-top { border-bottom: 0; border-right: 1px solid #dce8ff; grid-row: 1 / 5; }
}

@media (max-width: 782px) {
  .ipb-context-admin { margin-left: -10px; }
  .ipb-context-admin .ipb-topbar { top: 46px; }
  .ipb-main { width: min(100% - 28px, 760px); padding: 34px 0 48px; }
  .ipb-topbar { min-height: 68px; padding: 0 14px; }
  .ipb-brand span { display: none; }
  .ipb-title-row { margin-bottom: 26px; }
  .ipb-title-row h1 { font-size: 32px; line-height: 36px; letter-spacing: -1px; }
  .ipb-title-row p { font-size: 15px; line-height: 23px; }
  .ipb-evaluation-grid { grid-template-columns: 1fr; gap: 14px; }
  .ipb-summary-card { grid-column: auto; display: block; }
  .ipb-summary-top { border-right: 0; border-bottom: 1px solid #dce8ff; }
  .ipb-device-card, .ipb-damage-card { padding: 19px; }
  .ipb-card-head h2 { font-size: 19px; }
  .ipb-device-image, .ipb-device-placeholder { min-height: 220px; }
  .ipb-device-image img { height: 220px; }
}

@media (max-width: 520px) {
  .ipb-topbar .ipb-btn { min-height: 40px; padding: 0 12px; font-size: 13px; }
  .ipb-brand-mark { width: 34px; height: 34px; }
  .ipb-main { width: calc(100% - 20px); padding-top: 28px; }
  .ipb-title-row h1 { font-size: 29px; line-height: 33px; }
  .ipb-device-card, .ipb-damage-card { padding: 16px; border-radius: 14px; }
  .ipb-card-head-inline { display: block; }
  .ipb-count-badge { margin: 12px 0 0 47px; }
  .ipb-device-image, .ipb-device-placeholder { min-height: 205px; }
  .ipb-device-image img { height: 205px; }
  .ipb-field select { min-height: 52px; font-size: 16px; }
  .ipb-damage-label { min-height: 78px; grid-template-columns: 25px minmax(0,1fr); }
  .ipb-damage-amount { grid-column: 2; margin-top: -4px; }
  .ipb-damage-copy strong { font-size: 15px; }
  .ipb-summary-actions { grid-template-columns: 1fr; }
  .ipb-summary-actions .ipb-btn { width: 100%; min-height: 48px; }
  .ipb-final-value { font-size: 40px; }
}

@media print {
  .ipb-topbar, .ipb-title-row, .ipb-device-card, .ipb-damage-card, .ipb-summary-actions, .ipb-summary-note, #adminmenumain, #wpadminbar { display: none !important; }
  #wpcontent { margin-left: 0 !important; }
  .ipb-context-admin { margin-left: 0 !important; }
  .ipb-main { padding: 0; width: 100%; }
  .ipb-evaluation-grid { display: block; }
  .ipb-summary-card { position: static; box-shadow: none; border: 1px solid #ddd; max-width: 560px; margin: 0 auto; display: block; }
}


/* v2.7.2 image swap enhancement */
.ipb-device-image { position: relative; }
.ipb-device-image::after { content: attr(data-note); }
.ipb-device-image img { opacity: 1; transform: scale(1); transition: opacity .42s ease, transform .42s ease; will-change: opacity, transform; }
.ipb-device-image img.is-fading-out { opacity: .08; transform: scale(.988); }
.ipb-device-image img.is-fading-in { opacity: 0; transform: scale(1.012); }


/* v2.1.1 — estado vazio da imagem */
.ipb-device-image img[hidden] { display: none !important; }
.ipb-device-placeholder { gap: 0; }
.ipb-device-placeholder span { display: none !important; }
.ipb-device-placeholder svg { width: 64px; height: 96px; opacity: .78; }

/* v2.3 — identidade personalizada + nova avaliação abaixo do resultado */
.ipb-brand-logo-wrap {
  min-width: 38px;
  min-height: 38px;
  max-width: 150px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.ipb-brand-logo {
  display: block;
  max-width: 150px;
  max-height: 42px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.ipb-brand-copy { min-width: 0; }
.ipb-summary-column {
  min-width: 0;
  position: sticky;
  top: 96px;
}
.ipb-context-admin .ipb-summary-column { top: 128px; }
.ipb-summary-column .ipb-summary-card { position: static; top: auto; }
.ipb-new-evaluation {
  width: 100%;
  min-height: 50px;
  margin-top: 12px;
  border-radius: 12px;
  font-size: 15px;
  box-shadow: 0 1px 2px rgba(16,24,40,.025);
}

@media (max-width: 1180px) {
  .ipb-summary-column { grid-column: 1 / -1; position: static; }
  .ipb-summary-column .ipb-summary-card { display: grid; grid-template-columns: 1fr 1fr; }
  .ipb-summary-column .ipb-summary-top { border-bottom: 0; border-right: 1px solid #dce8ff; grid-row: 1 / 5; }
}

@media (max-width: 782px) {
  .ipb-summary-column { grid-column: auto; }
  .ipb-summary-column .ipb-summary-card { display: block; }
  .ipb-summary-column .ipb-summary-top { border-right: 0; border-bottom: 1px solid #dce8ff; }
  .ipb-brand-logo-wrap { max-width: 120px; }
  .ipb-brand-logo { max-width: 120px; max-height: 38px; }
}

@media (max-width: 520px) {
  .ipb-brand-logo-wrap { min-width: 34px; min-height: 34px; max-width: 100px; }
  .ipb-brand-logo { max-width: 100px; max-height: 34px; }
  .ipb-new-evaluation { min-height: 48px; }
}

@media print {
  .ipb-new-evaluation { display: none !important; }
  .ipb-summary-column { position: static; }
}

/* v2.6.0 — CTA WhatsApp */
.ipb-whatsapp-btn { gap: 9px; }
.ipb-whatsapp-icon { width: 18px; height: 18px; flex: 0 0 18px; display: block; }
@media (max-width: 520px) {
  .ipb-whatsapp-icon { width: 19px; height: 19px; flex-basis: 19px; }
}
