﻿:root {
  color-scheme: light;
  --bg: #eef4f2;
  --surface: #ffffff;
  --surface-2: #e6efec;
  --text: #102626;
  --muted: #526365;
  --line: #cbd9d6;
  --accent: #064333;
  --accent-dark: #032d24;
  --blue: #174b7a;
  --danger: #b71924;
  --warning: #b45d10;
  --ok: #0d6b4f;
  --shadow: 0 18px 50px rgba(20, 46, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(6, 67, 51, 0.08), rgba(238, 244, 242, 0) 340px),
    var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

.report,
.report * {
  overflow-wrap: break-word;
  word-break: normal;
}

button,
input {
  font: inherit;
}

button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 16px;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
}

button:hover:not(:disabled) {
  border-color: var(--accent);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

button.primary:hover:not(:disabled) {
  background: var(--accent-dark);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px clamp(18px, 4vw, 48px);
  background:
    radial-gradient(circle at 82% 18%, rgba(183, 25, 36, 0.18), transparent 28%),
    linear-gradient(135deg, #07372d, #102f46);
  color: #ffffff;
  border-bottom: 5px solid #b71924;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 900;
}

.brand-block span {
  color: #b9d5d0;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-header h1 {
  margin: 4px 0 6px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: 0;
  line-height: 1;
}

.app-header p {
  margin: 0;
  max-width: 760px;
  color: #d8e8e5;
}

.status-pill {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.top-actions,
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.user-pill,
.ghost-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 0 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.top-actions button,
.admin-actions button {
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 520px) minmax(0, 1fr);
  gap: 20px;
  padding: 24px clamp(16px, 4vw, 48px);
}

.panel,
.report-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 24px;
  align-self: start;
}

.account-card {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 12px;
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid #d6e3df;
  border-left: 6px solid var(--accent);
  border-radius: 12px;
  background: #f7fbfa;
}

.account-card span {
  display: block;
  color: #b71924;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-card strong,
.account-card small {
  display: block;
}

.account-card small {
  color: var(--muted);
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading.compact {
  margin-bottom: 0;
}

.section-heading span {
  display: block;
  margin-bottom: 4px;
  color: #b71924;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  font-size: 1.25rem;
  color: #102626;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

label.wide {
  grid-column: 1 / -1;
}

input,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfdfc;
  color: var(--text);
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(15, 123, 108, 0.18);
  border-color: var(--accent);
}

.preview-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  align-items: center;
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid #d6e3df;
  background: linear-gradient(135deg, #f6fbfa, #eef5fb);
  border-radius: 12px;
}

.preview-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.logo-preview {
  display: grid;
  place-items: center;
  width: 86px;
  height: 66px;
  border: 1px dashed #91a4a0;
  border-radius: 10px;
  overflow: hidden;
  color: var(--muted);
  background: #ffffff;
  font-size: 0.85rem;
}

.logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.photo-card {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-card.failed {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(183, 25, 36, 0.12);
}

.photo-error-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  background: rgba(183, 25, 36, 0.88);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.report-overlay {
  font-size: 0.95rem;
}

.photo-card-warning {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 10px;
  background: #fff3f4;
  color: #b71924;
  font-size: 0.74rem;
  font-weight: 900;
  text-align: center;
}

.photo-card span {
  position: absolute;
  left: 6px;
  top: 6px;
  min-width: 26px;
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  font-size: 0.78rem;
}

.analysis-error-note {
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 5px solid var(--danger);
  border-radius: 6px;
  background: #fff4f4;
  color: #94131d;
  font-weight: 800;
}

.actions,
.report-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.actions {
  padding-top: 2px;
}

.message {
  min-height: 22px;
  margin-top: 14px;
  color: var(--muted);
  font-weight: 700;
}

.message.error {
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.analysis-progress {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #b7cbc6;
  border-left: 6px solid var(--accent);
  border-radius: 8px;
  background: #f7fbfa;
}

.analysis-progress.error {
  border-left-color: var(--danger);
  background: #fff7f7;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.progress-header strong {
  color: var(--accent);
}

.progress-header span {
  color: var(--blue);
  font-weight: 800;
}

.analysis-progress p {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.progress-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce8e5;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  transition: width 0.35s ease;
}

.progress-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.progress-list li {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid #dce8e5;
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
}

.progress-list li.active {
  border-color: var(--blue);
  background: #eef5fb;
}

.progress-list li.done {
  border-color: #b7dbc9;
  background: #f1faf5;
}

.progress-list li.error {
  border-color: #f0b5bb;
  background: #fff4f4;
}

.progress-list li.skipped {
  border-color: #d8c7a8;
  background: #fff8eb;
}

.progress-list span {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 900;
}

.progress-list strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-list em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
}

.progress-list li.active em {
  color: var(--blue);
}

.progress-list li.done em {
  color: var(--ok);
}

.progress-list li.error em {
  color: var(--danger);
}

.progress-list li.skipped em {
  color: var(--warning);
}

.report-shell {
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.report-toolbar {
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  border-radius: 14px 14px 0 0;
}

.report-toolbar h2 {
  margin: 0;
}

.report {
  min-height: 620px;
  padding: 0;
  background:
    linear-gradient(135deg, rgba(6, 67, 51, 0.05), rgba(23, 75, 122, 0.06)),
    #eef2f4;
}

.report:not(.empty) {
  width: 210mm;
  max-width: 210mm;
  margin: 0 auto;
  background: #ffffff;
}

.report.editing {
  outline: 4px solid rgba(23, 75, 122, 0.35);
  outline-offset: -4px;
}

.report.editing [contenteditable],
.report.editing * {
  cursor: text;
}

.report.editing:focus {
  outline-color: rgba(183, 25, 36, 0.45);
}

.report:not(.empty) .exclusive-cover,
.report:not(.empty) .compact-page,
.report:not(.empty) .action-plan-page,
.report:not(.empty) .cover-page,
.report:not(.empty) .report-page {
  width: 210mm;
  max-width: 210mm;
  box-sizing: border-box;
}

.report.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.empty-report {
  max-width: 360px;
  padding: 34px;
  border: 1px dashed #a9bdb8;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.empty-report strong {
  display: block;
  color: #174b7a;
  font-size: 1.05rem;
}

.empty-report p {
  margin: 8px 0 0;
}

.history-heading {
  margin-top: 24px;
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-item {
  padding: 10px;
  border: 1px solid #d6e3df;
  border-radius: 8px;
  background: #fbfdfc;
}

.history-item strong,
.history-item span {
  display: block;
}

.history-item span {
  color: var(--muted);
  font-size: 0.86rem;
}

.auth-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 20px;
  background:
    radial-gradient(circle at 80% 20%, rgba(183, 25, 36, 0.18), transparent 28%),
    linear-gradient(135deg, #07372d, #102f46);
}

.sales-login-body {
  align-items: stretch;
  padding: clamp(16px, 3vw, 42px);
}

.sales-login-layout {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 440px);
  gap: clamp(18px, 3vw, 34px);
  align-items: stretch;
}

.sales-panel,
.auth-card {
  padding: 34px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.22);
}

.sales-panel {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  display: grid;
  align-content: start;
  gap: 18px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(6, 67, 51, 0.96), rgba(16, 47, 70, 0.94)),
    radial-gradient(circle at 88% 18%, rgba(55, 198, 112, 0.42), transparent 28%);
}

.sales-panel::before {
  content: "";
  position: absolute;
  right: -120px;
  top: -110px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: rgba(55, 198, 112, 0.22);
}

.sales-kicker {
  width: fit-content;
  padding: 8px 12px;
  border-left: 4px solid #b71924;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sales-panel h1 {
  position: relative;
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.sales-lead {
  position: relative;
  max-width: 760px;
  margin: 0;
  color: #d9ebe7;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.sales-visual {
  position: relative;
  min-height: 170px;
  margin: 8px 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(255, 255, 255, 0.04) 28px 29px);
}

.helmet {
  position: absolute;
  left: 30px;
  bottom: 24px;
  width: 110px;
  height: 88px;
  border-radius: 56px 56px 18px 18px;
  background: #f6c84c;
  box-shadow: inset 0 -14px 0 #d69810;
}

.helmet::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 22px;
  height: 10px;
  border-radius: 99px;
  background: rgba(16, 38, 38, 0.2);
}

.phone-card,
.report-card-mini {
  position: absolute;
  display: grid;
  gap: 5px;
  padding: 16px;
  border-radius: 10px;
  color: #102626;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.26);
}

.phone-card {
  left: 158px;
  top: 26px;
  width: min(260px, calc(100% - 190px));
  border-left: 6px solid #b71924;
}

.report-card-mini {
  right: 28px;
  bottom: 26px;
  width: 190px;
  border-left: 6px solid #174b7a;
}

.phone-card span,
.report-card-mini span {
  color: #b71924;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.phone-card strong,
.report-card-mini strong {
  font-size: 1.05rem;
}

.phone-card small,
.report-card-mini small {
  color: #526365;
  font-weight: 800;
}

.sales-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sales-grid div {
  min-height: 118px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.09);
}

.sales-grid strong {
  display: block;
  margin-bottom: 10px;
  color: #37c670;
  font-size: 2rem;
  line-height: 1;
}

.sales-grid span {
  color: #edf7f5;
  font-weight: 800;
}

.sales-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #e8f4f1;
}

.sales-list li {
  position: relative;
  padding-left: 24px;
}

.sales-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #37c670;
}

.sales-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.whatsapp-btn,
.demo-btn,
.support-link {
  display: inline-grid;
  min-height: 44px;
  place-items: center;
  border-radius: 7px;
  padding: 0 18px;
  font-weight: 900;
  text-decoration: none;
}

.whatsapp-btn {
  color: #07372d;
  background: #37c670;
}

.demo-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.1);
}

.auth-card .brand-mark {
  color: var(--accent);
  border-color: #d6e3df;
  background: #f7fbfa;
}

.auth-card > span {
  display: block;
  margin-top: 18px;
  color: #b71924;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-card h1,
.auth-card h2 {
  margin: 4px 0 8px;
  color: var(--accent);
}

.auth-card h2 {
  font-size: 2.15rem;
}

.auth-card form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.auth-card small {
  display: block;
  margin-top: 18px;
  color: var(--muted);
}

.support-link {
  width: 100%;
  margin-top: 14px;
  color: var(--accent);
  border: 1px solid #cbd9d6;
  background: #f7fbfa;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 480px) 1fr;
  gap: 20px;
  padding: 24px clamp(16px, 4vw, 48px);
}

.wide-panel {
  grid-column: span 2;
}

.table-wrap {
  overflow-x: auto;
}

.compact-page {
  padding: 28px;
  background: #ffffff;
  color: #102626;
}

.exclusive-cover {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 1120px;
  padding: 64px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(6, 67, 51, 0.08) 0 22%, transparent 22%),
    linear-gradient(135deg, #ffffff 0%, #f8fbfd 58%, #eef5fb 100%);
  color: #102626;
  border: 1px solid #d9e4e1;
}

.exclusive-cover::before {
  content: "";
  position: absolute;
  right: 42px;
  top: 58px;
  width: 172px;
  height: 172px;
  border: 22px solid rgba(23, 75, 122, 0.12);
  border-radius: 50%;
}

.exclusive-cover::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 26mm;
  height: 100%;
  background: linear-gradient(180deg, #174b7a 0%, #064333 58%, #b71924 100%);
}

.cover-topline,
.cover-footerline {
  position: absolute;
  left: 0;
  right: 0;
  height: 16px;
}

.cover-topline {
  top: 0;
  background: linear-gradient(90deg, #b71924 0 22%, #3fc459 22% 72%, #174b7a 72%);
}

.cover-footerline {
  bottom: 0;
  background: linear-gradient(90deg, #174b7a 0 40%, #3fc459 40% 82%, #b71924 82%);
}

.cover-brand-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 76px;
  position: relative;
  z-index: 1;
}

.exclusive-logo {
  display: grid;
  place-items: center;
  width: 116px;
  height: 82px;
  object-fit: contain;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  background: #ffffff;
  color: #064333;
}

.cover-brand-row span,
.exclusive-title span,
.exclusive-card span {
  display: block;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cover-brand-row strong {
  display: block;
  margin-top: 4px;
  font-size: 1.25rem;
  color: #0a2f45;
}

.exclusive-title {
  max-width: 840px;
  margin-bottom: 66px;
  position: relative;
  z-index: 1;
}

.exclusive-title h2 {
  margin: 12px 0;
  color: #072f4f;
  font-size: 4.6rem;
  line-height: 1.02;
  text-transform: uppercase;
  text-shadow: none;
}

.exclusive-title h3 {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  color: #0a6a4f;
  font-size: 2.45rem;
  font-weight: 900;
}

.exclusive-title p {
  max-width: 720px;
  color: #354d55;
  font-size: 1.12rem;
  font-weight: 700;
}

.exclusive-card {
  max-width: 860px;
  padding: 34px;
  border: 1px solid #cbd9d6;
  border-left: 12px solid #b71924;
  border-radius: 8px;
  background: #ffffff;
  color: #102626;
  box-shadow: 0 18px 50px rgba(10, 47, 69, 0.12);
  position: relative;
  z-index: 1;
}

.exclusive-card > div {
  margin-bottom: 22px;
}

.exclusive-card strong {
  display: block;
  margin-top: 6px;
  color: #102626;
  font-size: 1.35rem;
}

.exclusive-card small {
  display: block;
  margin-top: 4px;
  color: #526365;
}

.exclusive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 0 !important;
}

.exclusive-grid div {
  padding-top: 12px;
  border-top: 3px solid #174b7a;
}

.exclusive-grid strong.alto,
.exclusive-grid strong.critico {
  color: #b71924;
}

.exclusive-grid strong.baixo {
  color: #0b6f33;
}

.exclusive-grid strong.moderado {
  color: #b45d10;
}

.compact-cover {
  overflow: hidden;
  border: 1px solid #c7d6d2;
  border-radius: 6px;
  margin-bottom: 18px;
  background: #ffffff;
}

.compact-cover-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  background: linear-gradient(90deg, #0a2f45, #174b7a);
  color: #ffffff;
}

.compact-cover-bar span {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.compact-cover-bar strong {
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.compact-cover-body {
  display: grid;
  grid-template-columns: 130px 1fr 230px;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-bottom: 5px solid #b71924;
}

.compact-logo-box {
  display: grid;
  place-items: center;
  min-height: 92px;
  padding: 10px;
  border: 1px solid #d8e3e0;
  border-radius: 6px;
  background: #f8fbfa;
}

.compact-logo {
  max-width: 104px;
  max-height: 66px;
  object-fit: contain;
}

.compact-logo.placeholder {
  display: grid;
  place-items: center;
  width: 118px;
  height: 72px;
  border: 1px dashed #90a4a0;
  color: #526365;
}

.compact-title {
  text-align: left;
}

.compact-title span {
  color: #b71924;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.compact-title h2 {
  margin: 6px 0;
  color: #174b7a;
  font-size: 1.75rem;
  line-height: 1.12;
  text-transform: uppercase;
}

.compact-title p,
.compact-client span,
.compact-client p {
  margin: 0;
  color: #526365;
}

.compact-client {
  padding: 14px;
  border-left: 4px solid #064333;
  background: #f4f8f7;
}

.compact-client span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.compact-client strong {
  display: block;
  margin-bottom: 4px;
  color: #102626;
  font-size: 1.05rem;
}

.compact-meta {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin-bottom: 20px;
  border: 1px solid #064333;
}

.compact-meta div {
  min-height: 64px;
  padding: 10px;
  border-right: 1px solid #064333;
  background: #f7faf9;
}

.compact-meta div:last-child {
  border-right: 0;
}

.compact-meta span {
  display: block;
  color: #526365;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.compact-meta strong {
  display: block;
  margin-top: 4px;
  color: #102626;
}

.risk-text.baixo {
  color: #0d6b4f;
}

.risk-text.moderado {
  color: #b45d10;
}

.risk-text.alto,
.risk-text.critico {
  color: #b71924;
}

.compact-page h3 {
  margin: 20px 0 10px;
  padding: 8px 12px;
  background: #064333;
  color: #ffffff;
  border-left: 8px solid #b71924;
  font-size: 1.02rem;
  text-transform: uppercase;
}

.fine-note {
  padding: 10px 12px;
  border-left: 5px solid #b71924;
  background: #fff3f4;
  color: #263d3e;
}

.risk-classification {
  font-size: 0.86rem;
}

.risk-classification th {
  background: #174b7a;
  color: #ffffff;
}

.compact-page .lead {
  margin: 0 0 12px;
  color: #253b3c;
}

.inspector-note {
  margin: 12px 0;
  padding: 12px;
  border-left: 5px solid #174b7a;
  background: #eef5fb;
}

.inspector-note p {
  margin: 4px 0 0;
}

.inspection-list {
  display: grid;
  gap: 16px;
}

.inspection-card {
  display: grid;
  grid-template-columns: 42% 1fr;
  min-height: 300px;
  border: 1px solid #0a2f45;
  break-inside: auto;
}

.inspection-photo {
  position: relative;
  min-height: 280px;
  border-right: 1px solid #0a2f45;
  background: #e7ecef;
}

.inspection-photo img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: contain;
  background: #f5f7f8;
}

.inspection-photo span {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 8px 12px;
  background: #174b7a;
  color: #ffffff;
  font-weight: 800;
}

.inspection-content {
  padding: 14px;
}

.inspection-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid #064333;
}

.inspection-heading span {
  color: #526365;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inspection-heading h4 {
  margin: 4px 0 0;
  color: #174b7a;
  font-size: 1.05rem;
}

.inspection-heading strong {
  align-self: start;
  min-width: 44px;
  padding: 6px 8px;
  background: #b71924;
  color: #ffffff;
  text-align: center;
}

.finding-card {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #d6e0dd;
  border-left: 5px solid #b71924;
  background: #fbfdfc;
}

.finding-card p {
  margin: 6px 0;
  font-size: 0.9rem;
}

.finding-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.finding-head strong {
  color: #102626;
}

.risk-line {
  color: #526365;
}

.action-summary th {
  background: #0a2f45;
  color: #ffffff;
}

.action-summary td {
  min-height: 42px;
}

.action-summary th:nth-child(4),
.action-summary td:nth-child(4) {
  width: 30%;
}

.action-summary th:nth-child(5),
.action-summary td:nth-child(5),
.action-summary th:nth-child(7),
.action-summary td:nth-child(7) {
  width: 94px;
}

.blank-cell {
  min-width: 110px;
  height: 44px;
}

.action-plan-page {
  padding: 28px;
  background: #ffffff;
  color: #102626;
}

.action-plan-page h3 {
  margin: 20px 0 10px;
  padding: 8px 12px;
  border-left: 8px solid #b71924;
  background: #064333;
  color: #ffffff;
  font-size: 1.02rem;
  text-transform: uppercase;
}

.report .action-plan-page h3 {
  border: 0;
  border-left: 8px solid #b71924;
  background: #064333;
  color: #ffffff;
}

.cover-page,
.report-page {
  background: #ffffff;
}

.cover-page {
  display: grid;
  align-content: center;
  min-height: 1120px;
  padding: 76px 64px;
  color: #ffffff;
  background: #172640;
  border-bottom: 16px solid #f4a22a;
}

.cover-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 90px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cover-logo {
  width: 84px;
  height: 60px;
  object-fit: contain;
  border-radius: 6px;
  background: #ffffff;
}

.cover-logo.placeholder {
  display: grid;
  place-items: center;
  color: #172640;
  font-size: 0.8rem;
}

.cover-title {
  text-align: center;
  margin-bottom: 86px;
}

.cover-title span,
.eyebrow {
  color: #748197;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cover-title h2 {
  margin: 18px 0;
  color: #ffffff;
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  line-height: 1.05;
}

.cover-title p {
  margin: 0;
  color: #dbe3ef;
  font-size: 1.1rem;
}

.cover-card {
  display: grid;
  gap: 28px;
  max-width: 820px;
  margin: 0 auto 72px;
  padding: 44px;
  border-radius: 8px;
  background: #ffffff;
  color: #172640;
  text-align: center;
}

.cover-card span,
.summary-grid span,
.kpi span {
  display: block;
  color: #69758a;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cover-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.4rem;
}

.cover-card small {
  display: block;
  margin-top: 6px;
  color: #69758a;
}

.cover-grid,
.cover-kpis,
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.cover-kpis {
  grid-template-columns: repeat(3, 1fr);
  max-width: 820px;
  margin: 0 auto;
}

.kpi,
.summary-grid div {
  padding: 24px;
  border-radius: 8px;
  background: #ffffff;
  color: #172640;
  text-align: center;
}

.kpi strong,
.summary-grid strong {
  display: block;
  margin-top: 12px;
  font-size: 2rem;
  line-height: 1;
}

.kpi.alto,
.kpi.critico,
.kpi.critical {
  background: #f4a22a;
  color: #ffffff;
}

.kpi.baixo {
  background: #2b8c62;
  color: #ffffff;
}

.kpi.moderado {
  background: #d9921e;
  color: #ffffff;
}

.kpi.critico,
.kpi.critical {
  background: #b83232;
}

.kpi.alto span,
.kpi.baixo span,
.kpi.moderado span,
.kpi.critico span,
.kpi.critical span {
  color: rgba(255, 255, 255, 0.84);
}

.report-page {
  padding: 44px 54px;
  color: #172640;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f4a22a;
  color: #69758a;
  font-size: 0.86rem;
}

.page-header strong {
  display: block;
  color: #172640;
}

.report h3 {
  margin: 26px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f4a22a;
  color: #172640;
  font-size: 1.35rem;
}

.report h4 {
  margin: 18px 0 8px;
  color: #172640;
}

.report h5 {
  margin: 14px 0 4px;
  color: #172640;
  font-size: 0.9rem;
}

.lead {
  color: #2d3d57;
  font-size: 1.02rem;
}

.summary-grid {
  grid-template-columns: repeat(5, 1fr);
  margin: 22px 0 30px;
}

.summary-grid div {
  border: 1px solid #dde5ee;
  background: #f7fafc;
}

.criteria-box {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #f4a22a;
  border-radius: 8px;
  background: #fff7e8;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 3px 10px;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
}

.badge.baixa,
.badge.baixo {
  background: var(--ok);
}

.badge.media,
.badge.medio,
.badge.moderado {
  background: var(--warning);
}

.badge.alta,
.badge.alto,
.badge.critica,
.badge.critico {
  background: var(--danger);
}

.analysis-block {
  break-inside: avoid;
  border-top: 1px solid #dde5ee;
}

.photo-title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px;
  border-left: 12px solid #172640;
  background: #f3f6f8;
}

.photo-title h3 {
  margin: 4px 0 0;
  padding: 0;
  border: 0;
}

.photo-title span {
  color: #69758a;
  font-size: 0.9rem;
}

.photo-evidence {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 20px;
}

figure {
  margin: 0;
  border: 1px solid #dde5ee;
  background: #ffffff;
}

.analysis-photo {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: contain;
}

figcaption {
  padding: 8px 10px;
  background: #172640;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
}

.nc-detail {
  margin: 24px 0;
  padding-top: 18px;
  border-top: 1px solid #dde5ee;
  break-inside: avoid;
}

.nc-heading,
.nc-meta {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.nc-heading h4 {
  margin: 4px 0 0;
  font-size: 1.12rem;
}

.nc-meta {
  flex-wrap: wrap;
  justify-content: start;
  margin: 10px 0 14px;
  color: #5b687b;
  font-size: 0.9rem;
}

.nc-meta span {
  padding-right: 12px;
}

.risk-layout {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
}

.risk-matrix {
  position: relative;
  width: 180px;
}

.matrix-title {
  margin-bottom: 8px;
  color: #172640;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(5, 28px);
  grid-template-rows: repeat(5, 28px);
  gap: 3px;
}

.matrix-cell {
  display: grid;
  place-items: center;
  min-width: 28px;
  min-height: 28px;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
}

.matrix-cell.low {
  background: #a8d5bf;
}

.matrix-cell.medium {
  background: #f0d994;
}

.matrix-cell.high {
  background: #eda16a;
}

.matrix-cell.critical {
  background: #db7373;
}

.matrix-cell.active {
  outline: 3px solid #172640;
  outline-offset: -3px;
}

.matrix-y,
.matrix-x {
  color: #69758a;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.matrix-y {
  margin-bottom: 4px;
}

.matrix-x {
  margin-top: 6px;
  text-align: center;
}

.technical-text p,
.technical-text ul {
  margin-top: 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 16px;
  font-size: 0.9rem;
  table-layout: fixed;
}

th,
td {
  border: 1px solid #dde5ee;
  padding: 8px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  background: #edf2f6;
  color: #172640;
}

.nc-table {
  font-size: 0.82rem;
}

.signature-block {
  max-width: 360px;
  margin-top: 70px;
  padding-top: 14px;
  border-top: 1px solid #172640;
}

.signature-block span {
  display: block;
  color: #5b687b;
}

.report .compact-page h3 {
  margin: 20px 0 10px;
  padding: 8px 12px;
  border: 0;
  border-left: 8px solid #b71924;
  background: #064333;
  color: #ffffff;
  font-size: 1.02rem;
  text-transform: uppercase;
}

.report .compact-page .lead {
  color: #253b3c;
  font-size: 0.98rem;
}

.report .action-summary th {
  background: #064333;
  color: #ffffff;
}

ul {
  margin-top: 8px;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sales-login-layout {
    grid-template-columns: 1fr;
  }

  .sales-panel {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .app-header {
    align-items: start;
    flex-direction: column;
  }

  .form-grid,
  .exclusive-grid,
  .compact-cover-body,
  .compact-meta,
  .inspection-card,
  .cover-grid,
  .cover-kpis,
  .summary-grid,
  .photo-evidence,
  .risk-layout {
    grid-template-columns: 1fr;
  }

  .panel,
  .exclusive-cover,
  .action-plan-page,
  .compact-page,
  .report-page,
  .cover-page {
    padding: 16px;
  }

  .compact-logo-box,
  .compact-title,
  .compact-client,
  .compact-meta div,
  .inspection-photo {
    border-right: 0;
  }

  .report-shell {
    margin-right: -16px;
    margin-left: -16px;
    border-radius: 0;
  }

  .report:not(.empty) {
    width: 210mm;
    max-width: 210mm;
    margin: 0;
  }

  .report:not(.empty) .exclusive-cover {
    min-height: 1120px;
    padding: 64px;
  }

  .report:not(.empty) .compact-page,
  .report:not(.empty) .action-plan-page,
  .report:not(.empty) .report-page,
  .report:not(.empty) .cover-page {
    padding: 28px;
  }

  .report:not(.empty) .exclusive-grid,
  .report:not(.empty) .cover-grid,
  .report:not(.empty) .cover-kpis,
  .report:not(.empty) .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report:not(.empty) .compact-cover-body {
    grid-template-columns: 130px 1fr 230px;
  }

  .report:not(.empty) .compact-meta {
    grid-template-columns: repeat(6, 1fr);
  }

  .report:not(.empty) .inspection-card {
    grid-template-columns: 42% 1fr;
  }

  .report:not(.empty) .inspection-photo {
    border-right: 1px solid #0a2f45;
    border-bottom: 0;
  }

  .sales-login-body {
    padding: 12px;
  }

  .sales-panel,
  .auth-card {
    padding: 24px;
    border-radius: 16px;
  }

  .sales-panel h1 {
    font-size: 3rem;
  }

  .sales-grid {
    grid-template-columns: 1fr;
  }

  .sales-visual {
    min-height: 210px;
  }

  .helmet {
    left: 22px;
    bottom: 22px;
    width: 88px;
    height: 70px;
  }

  .phone-card {
    left: 108px;
    top: 22px;
    width: calc(100% - 128px);
  }

  .report-card-mini {
    right: 18px;
    bottom: 18px;
    width: 170px;
  }

  .sales-actions a {
    width: 100%;
  }
}

@media print {
  html,
  body {
    width: 210mm !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
  }

  body {
    background: #ffffff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .app-header,
  .panel,
  .report-toolbar {
    display: none !important;
  }

  .layout {
    display: block;
    padding: 0;
    width: auto;
  }

  .report-shell {
    border: 0;
    box-shadow: none;
    overflow: visible;
  }

  .report {
    padding: 0;
    background: #ffffff;
    width: 210mm;
    max-width: none;
    margin: 0;
  }

  .compact-page,
  .action-plan-page,
  .report-page,
  .cover-page,
  .exclusive-cover {
    width: 210mm !important;
    max-width: none;
    margin: 0 !important;
    box-sizing: border-box;
  }

  .cover-page,
  .exclusive-cover,
  .report-page {
    min-height: auto;
    box-shadow: none;
  }

  .exclusive-cover {
    min-height: 297mm;
    height: 297mm;
    padding: 18mm;
    page-break-after: always;
    break-after: page;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .cover-brand-row {
    margin-bottom: 34mm;
  }

  .exclusive-title h2 {
    font-size: 36pt;
    line-height: 1.05;
    color: #0a2f45;
  }

  .exclusive-title h3 {
    font-size: 22pt;
    color: #064333;
    border: 0;
    background: transparent;
  }

  .exclusive-title {
    margin-bottom: 24mm;
  }

  .exclusive-card {
    max-width: none;
    padding: 8mm;
  }

  .exclusive-card strong {
    font-size: 14pt;
  }

  .exclusive-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .compact-page {
    padding: 12mm;
    min-height: 297mm;
    page-break-after: auto;
    break-after: auto;
  }

  .compact-cover {
    margin-bottom: 6mm;
  }

  .compact-cover-bar {
    padding: 3mm 5mm;
  }

  .compact-cover-body {
    grid-template-columns: 28mm 1fr 44mm;
    gap: 5mm;
    padding: 5mm;
  }

  .compact-title h2 {
    font-size: 16pt;
  }

  .compact-logo-box {
    min-height: 24mm;
    padding: 2mm;
  }

  .compact-client {
    padding: 3mm;
  }

  .compact-meta {
    grid-template-columns: repeat(6, 1fr);
    margin-bottom: 5mm;
    font-size: 8pt;
  }

  .compact-meta div {
    min-height: 14mm;
    padding: 2mm;
  }

  .compact-page h3 {
    margin: 5mm 0 3mm;
    padding: 2mm 3mm;
    font-size: 10pt;
  }

  .inspection-list {
    gap: 4mm;
  }

  .inspection-section-title {
    page-break-before: always;
    break-before: page;
  }

  .inspection-card {
    display: grid;
    grid-template-columns: 70mm 1fr;
    min-height: auto;
    margin: 0 0 8mm;
    width: 186mm;
    page-break-inside: auto;
    break-inside: auto;
  }

  .inspection-card + .inspection-card {
    page-break-before: always;
    break-before: page;
  }

  .inspection-card:first-child {
    page-break-before: auto;
    break-before: auto;
  }

  .inspection-photo {
    min-height: auto;
    max-height: none;
    padding: 3mm;
    border-right: 1px solid #0a2f45;
    border-bottom: 0;
  }

  .inspection-photo,
  .inspection-photo img {
    min-height: auto;
  }

  .inspection-photo img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 86mm;
    object-fit: contain;
    background: #f5f7f8;
  }

  .inspection-photo span {
    bottom: 3mm;
    left: 3mm;
  }

  .inspection-content {
    padding: 4mm;
    font-size: 8.6pt;
    line-height: 1.32;
  }

  .inspection-content p {
    margin: 2mm 0;
  }

  .inspection-heading {
    margin-bottom: 2mm;
    padding-bottom: 2mm;
  }

  .inspection-heading h4 {
    font-size: 10pt;
    line-height: 1.2;
  }

  .finding-card {
    margin-top: 2mm;
    padding: 2mm;
    page-break-inside: auto;
    break-inside: auto;
  }

  .finding-card p {
    font-size: 8pt;
    line-height: 1.28;
  }

  .action-summary {
    font-size: 7.5pt;
    line-height: 1.25;
  }

  .action-plan-page {
    page-break-before: always;
    break-before: page;
    padding: 12mm;
    min-height: 297mm;
    page-break-after: auto;
    break-after: auto;
  }

  .report .action-plan-page h3 {
    margin: 0 0 5mm;
    padding: 3mm 4mm;
    color: #ffffff;
    border: 0;
    border-left: 2mm solid #b71924;
    background: #064333;
    font-size: 13pt;
    line-height: 1.2;
  }

  .closing-page {
    page-break-after: auto;
    break-after: auto;
  }

  .analysis-block,
  .criteria-box,
  figure {
    break-inside: avoid;
  }

  .nc-detail,
  table {
    break-inside: auto;
  }

  .cover-page {
    min-height: 273mm;
    page-break-after: always;
    break-after: page;
  }

  .report-page {
    padding: 12mm;
    min-height: 297mm;
  }

  .photo-evidence {
    grid-template-columns: 76mm 1fr;
  }

  .risk-layout {
    grid-template-columns: 45mm 1fr;
  }

  @page {
    size: A4;
    margin: 0;
  }
}

