:root {
  --blue-900: #083b5b;
  --blue-800: #0a4f78;
  --blue-600: #1477a6;
  --green-600: #2eaa5f;
  --green-700: #238a4b;
  --gray-950: #111827;
  --gray-800: #1f2937;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f6f8;
  --gray-50: #f8fafc;
  --white: #ffffff;
  --warning: #a16207;
  --danger: #b42318;
  --shadow: 0 14px 35px rgba(15, 23, 42, 0.1);
  --soft-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  --radius: 8px;
}

.production-hidden {
  display: none !important;
}

/* Novo fluxo de laudos em duas etapas */
.laudo-flow-page {
  min-height: 100vh;
  background: #f4f8fb;
  color: #07324a;
}

.flow-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 28px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #dbe6ee;
  box-shadow: 0 10px 30px rgba(7, 50, 74, 0.08);
}

.flow-brand {
  display: inline-flex;
  align-items: center;
  min-width: 180px;
}

.flow-brand img {
  max-width: 174px;
  height: auto;
}

.flow-topbar-actions,
.flow-actions,
.editor-toolbar,
.preview-actions,
.row-actions,
.signature-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.flow-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.flow-hero {
  margin-bottom: 22px;
}

.flow-hero h1,
.editor-report-meta h1 {
  margin: 6px 0 8px;
  color: #043b5c;
}

.flow-hero p,
.editor-report-meta p,
.form-panel-heading p {
  margin: 0;
  color: #526375;
}

.initial-report-form,
.editor-form {
  display: grid;
  gap: 18px;
}

.form-panel {
  background: #ffffff;
  border: 1px solid #dbe6ee;
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 16px 36px rgba(7, 50, 74, 0.08);
}

.compact-panel {
  padding: 18px;
}

.form-panel-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.form-panel-heading svg {
  width: 22px;
  height: 22px;
  color: #0a7f4f;
  margin-top: 3px;
}

.form-panel-heading h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.form-grid label,
.technical-field label {
  display: grid;
  gap: 7px;
  font-weight: 700;
  color: #092f48;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.technical-field textarea,
.image-item input {
  width: 100%;
  border: 1px solid #c9d7e2;
  border-radius: 8px;
  padding: 12px 13px;
  font: inherit;
  color: #102536;
  background: #ffffff;
}

.form-grid textarea,
.technical-field textarea {
  resize: vertical;
}

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

.autosave-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 12px;
  background: #eaf5ef;
  color: #0a7f4f;
  font-size: 13px;
  font-weight: 800;
}

.autosave-status[data-mode="pending"] {
  background: #fff7e6;
  color: #8a5a00;
}

.autosave-status[data-mode="error"] {
  background: #fdecec;
  color: #b42318;
}

.report-editor-layout {
  display: grid;
  grid-template-columns: minmax(520px, 0.98fr) minmax(470px, 1fr);
  gap: 18px;
  width: min(1720px, calc(100% - 28px));
  margin: 18px auto 40px;
}

.editor-flow-topbar {
  align-items: center;
}

.editor-report-meta {
  flex: 1;
  min-width: 260px;
}

.report-editor-panel,
.report-preview-panel {
  min-width: 0;
}

.editor-toolbar {
  position: sticky;
  top: 82px;
  z-index: 10;
  margin-bottom: 14px;
  padding: 10px;
  background: rgba(244, 248, 251, 0.94);
  border: 1px solid #dbe6ee;
  border-radius: 8px;
}

.technical-fields {
  display: grid;
  gap: 14px;
}

.technical-field {
  border: 1px solid #dbe6ee;
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
}

.technical-field-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.field-tools,
.ai-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-button,
.ai-toolbar button {
  border: 1px solid #c9d7e2;
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  color: #07324a;
  font-weight: 800;
  cursor: pointer;
}

.action-button:hover,
.ai-toolbar button:hover {
  border-color: #0b5c89;
  color: #0b5c89;
}

.action-button.is-danger {
  color: #b42318;
  border-color: #f0b8b2;
}

.ai-suggestions-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.suggestion-title {
  font-weight: 900;
  color: #043b5c;
}

.suggestion-hint,
.empty-help {
  color: #526375;
  margin: 0;
}

.suggestion-card {
  border: 1px solid #dbe6ee;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbfd;
}

.suggestion-card p {
  margin: 8px 0;
  color: #24384a;
}

.suggestion-card small {
  display: block;
  color: #677788;
  margin-bottom: 10px;
}

.upload-dropzone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 132px;
  border: 1.5px dashed #9bb4c5;
  border-radius: 8px;
  background: #f8fbfd;
  color: #0b5c89;
  font-weight: 900;
  cursor: pointer;
}

.upload-dropzone svg {
  width: 30px;
  height: 30px;
}

.image-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.image-item {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 12px;
  align-items: start;
  border: 1px solid #dbe6ee;
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.image-item img {
  width: 128px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  background: #e7eef4;
}

.signature-upload-row img {
  max-width: 220px;
  max-height: 92px;
  padding: 8px;
  border: 1px solid #dbe6ee;
  border-radius: 8px;
  background: #ffffff;
}

.report-preview-panel {
  position: sticky;
  top: 88px;
  height: calc(100vh - 108px);
  display: grid;
  grid-template-rows: auto 1fr;
  background: #e6edf3;
  border: 1px solid #d0dce6;
  border-radius: 8px;
  overflow: hidden;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #ffffff;
  border-bottom: 1px solid #dbe6ee;
}

.preview-toolbar strong {
  display: block;
  color: #043b5c;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #c9d7e2;
  border-radius: 8px;
  background: #ffffff;
  color: #063c5b;
  cursor: pointer;
}

.pdf-preview-scroll {
  overflow: auto;
  padding: 20px;
}

.pdf-preview-a4 {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 17mm;
  background: #ffffff;
  color: #1e2e3d;
  box-shadow: 0 20px 54px rgba(7, 50, 74, 0.18);
  font-size: 12px;
  line-height: 1.48;
}

.pdf-live-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 2px solid var(--pdf-color, #083b5b);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.pdf-live-header img {
  max-width: 142px;
  max-height: 64px;
  object-fit: contain;
}

.pdf-live-header strong {
  display: block;
  color: var(--pdf-color, #083b5b);
  font-size: 18px;
}

.pdf-live-header span,
.pdf-live-provider span,
.pdf-live-box span,
.pdf-live-signature span {
  color: #617284;
}

.pdf-live-provider {
  display: grid;
  gap: 2px;
  margin-bottom: 12px;
}

.pdf-live-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid #d7e1e9;
  border-radius: 6px;
  background: #f8fbfd;
  margin-bottom: 12px;
}

.pdf-live-box div {
  display: grid;
  gap: 2px;
}

.pdf-live-section {
  break-inside: avoid;
  margin: 12px 0;
}

.pdf-live-section h3 {
  margin: 0 0 6px;
  color: var(--pdf-color, #083b5b);
  font-size: 13px;
  text-transform: uppercase;
}

.pdf-live-section p {
  margin: 0;
  white-space: normal;
}

.pdf-live-section table {
  width: 100%;
  border-collapse: collapse;
}

.pdf-live-section th,
.pdf-live-section td {
  border: 1px solid #d7e1e9;
  padding: 7px;
  text-align: left;
  vertical-align: top;
}

.pdf-live-section th {
  width: 34%;
  background: #f0f5f8;
  color: #083b5b;
}

.pdf-live-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pdf-live-images-page {
  break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 12px;
}

.pdf-live-images-page + .pdf-live-images-page {
  break-before: page;
  page-break-before: always;
}

.pdf-live-images figure {
  margin: 0;
  break-inside: avoid;
}

.pdf-live-images img {
  width: 100%;
  height: 112px;
  object-fit: contain;
  background: #f1f5f8;
  border: 1px solid #d7e1e9;
  border-radius: 4px;
}

.pdf-live-images figcaption {
  margin-top: 4px;
  color: #526375;
  font-size: 11px;
  text-align: center;
}

.pdf-live-signature {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin-top: 28px;
}

.pdf-live-signature img {
  max-width: 190px;
  max-height: 72px;
  object-fit: contain;
}

.pdf-live-signature div {
  width: 260px;
  border-top: 1px solid #7c8b99;
  margin-top: 4px;
}

.signature-placeholder {
  display: inline-grid;
  place-items: center;
  width: 190px;
  height: 58px;
  border: 1px dashed #aab9c6;
  color: #7c8b99;
}

.pdf-preview-a4 footer {
  margin-top: 20px;
  padding-top: 8px;
  border-top: 1px solid #d7e1e9;
  text-align: center;
  color: #617284;
}

.editor-mobile-tabs {
  display: none;
}

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

  .report-preview-panel {
    position: relative;
    top: auto;
    height: auto;
    min-height: 80vh;
  }
}

@media (max-width: 760px) {
  .flow-topbar {
    position: relative;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }

  .flow-topbar-actions,
  .flow-actions,
  .editor-toolbar {
    width: 100%;
  }

  .flow-topbar-actions .button,
  .flow-actions .button,
  .editor-toolbar .button {
    flex: 1;
    justify-content: center;
  }

  .form-grid,
  .pdf-live-box,
  .image-item {
    grid-template-columns: 1fr;
  }

  .grid-span-2 {
    grid-column: auto;
  }

  .editor-mobile-tabs {
    position: sticky;
    top: 0;
    z-index: 15;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #ffffff;
    border-bottom: 1px solid #dbe6ee;
  }

  .editor-mobile-tabs button {
    border: 0;
    padding: 12px;
    background: #ffffff;
    color: #526375;
    font-weight: 900;
  }

  .editor-mobile-tabs .is-active,
  .show-preview-tab #previewTabButton,
  body:not(.show-preview-tab) #editTabButton {
    color: #0b5c89;
    border-bottom: 3px solid #0a7f4f;
  }

  .show-preview-tab .report-editor-panel {
    display: none;
  }

  body:not(.show-preview-tab) .report-preview-panel {
    display: none;
  }

  .pdf-preview-scroll {
    padding: 12px;
  }

  .pdf-preview-a4 {
    width: 100%;
    min-height: auto;
    padding: 18px;
    box-shadow: none;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-950);
  background: var(--gray-50);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  width: 174px;
  height: auto;
  object-fit: contain;
}

.brand-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
  line-height: 1.1;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button svg,
.icon-button svg,
.side-nav svg,
.feature-card svg,
.topbar-user svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.button-primary {
  color: var(--white);
  background: var(--blue-800);
  box-shadow: 0 12px 22px rgba(10, 79, 120, 0.2);
}

.button-primary:hover {
  background: var(--blue-900);
}

.button-secondary {
  color: var(--blue-900);
  background: var(--white);
  border-color: rgba(8, 59, 91, 0.18);
}

.button-light {
  color: var(--gray-800);
  background: var(--gray-100);
  border-color: var(--gray-200);
}

.button-whatsapp {
  color: var(--white);
  background: var(--green-600);
}

.button-whatsapp:hover {
  background: var(--green-700);
}

.button-small {
  min-height: 38px;
  padding: 9px 13px;
  font-size: 0.9rem;
}

.button-block {
  width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 76px;
  padding: 12px max(24px, calc((100vw - 1120px) / 2));
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(209, 213, 219, 0.7);
  backdrop-filter: blur(16px);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--gray-600);
  font-weight: 700;
}

.site-nav a:hover {
  color: var(--blue-800);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
}

.dashboard-page #sidebarToggle {
  display: none;
}

.hero {
  min-height: 78vh;
  background-image: linear-gradient(90deg, rgba(248, 250, 252, 0.98) 0%, rgba(248, 250, 252, 0.9) 38%, rgba(248, 250, 252, 0.12) 72%), var(--hero-image);
  background-position: center;
  background-size: cover;
}

.hero-shade {
  min-height: 78vh;
  display: flex;
  align-items: center;
  padding: 70px 0 92px;
}

.hero-content {
  max-width: 690px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  color: var(--green-700);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1,
.section h2,
.panel-heading h1,
.auth-copy h1 {
  margin: 10px 0 16px;
  color: var(--blue-900);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 660px;
  font-size: 3.6rem;
}

.hero p {
  max-width: 620px;
  margin: 0 0 28px;
  color: var(--gray-600);
  font-size: 1.18rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-trial-note {
  max-width: 520px;
  margin-top: 14px;
  color: var(--blue-900);
  font-weight: 800;
}

.trial-cta-button {
  margin-top: 18px;
}

.section {
  padding: 82px 0;
  background: var(--white);
}

.section-muted {
  background: var(--gray-100);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 30px;
}

.section h2 {
  font-size: 2.25rem;
}

.section p {
  color: var(--gray-600);
}

.two-column {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.about-panel {
  display: grid;
  gap: 16px;
}

.mini-stat {
  padding: 22px;
  border: 1px solid var(--gray-200);
  border-left: 5px solid var(--green-600);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.mini-stat strong {
  display: block;
  color: var(--blue-900);
  font-size: 1.55rem;
}

.mini-stat span {
  color: var(--gray-600);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.photo-card,
.feature-card,
.price-card,
.stat-card,
.table-panel,
.entity-form,
.auth-panel {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.photo-card {
  overflow: hidden;
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo-card div {
  padding: 18px;
}

.photo-card h3,
.feature-card h3,
.table-panel h2,
.form-section h2 {
  margin: 0 0 8px;
  color: var(--blue-900);
}

.photo-card p,
.feature-card p {
  margin: 0;
  color: var(--gray-600);
  font-size: 0.96rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.feature-card {
  padding: 22px;
}

.feature-card svg {
  width: 28px;
  height: 28px;
  margin-bottom: 18px;
  color: var(--green-600);
}

.exam-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.exam-list span {
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  color: var(--blue-900);
  background: var(--gray-50);
  font-weight: 700;
}

.section-price {
  background: linear-gradient(120deg, var(--blue-900), var(--blue-800));
  color: var(--white);
}

.section-price .section-kicker,
.section-price h2,
.section-price p {
  color: var(--white);
}

.price-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, minmax(280px, 360px));
  gap: 22px;
  align-items: center;
}

.price-card {
  padding: 28px;
  color: var(--gray-950);
}

.price-header span {
  color: var(--green-700);
  font-weight: 800;
  text-transform: uppercase;
}

.price-header strong {
  display: block;
  margin-top: 8px;
  color: var(--blue-900);
  font-size: 2.6rem;
  line-height: 1;
}

.price-header small {
  color: var(--gray-600);
  font-size: 1rem;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  color: var(--gray-600);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 13px;
  height: 7px;
  border-left: 3px solid var(--green-600);
  border-bottom: 3px solid var(--green-600);
  transform: rotate(-45deg);
}

.site-footer {
  padding: 34px 0;
  color: var(--gray-300);
  background: var(--gray-950);
}

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

.site-footer strong {
  color: var(--white);
}

.site-footer p {
  margin: 6px 0 0;
}

.auth-page {
  min-height: 100vh;
  background: var(--gray-100);
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 520px) 1fr;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  padding: 48px 64px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.auth-brand {
  margin-bottom: 54px;
}

.auth-copy h1 {
  font-size: 2.25rem;
}

.auth-copy p {
  margin: 0 0 28px;
  color: var(--gray-600);
}

.stack-form,
.entity-form,
.compact-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--gray-800);
  font-size: 0.92rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  color: var(--gray-950);
  background: var(--white);
  outline: none;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(20, 119, 166, 0.14);
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.link-button {
  padding: 0;
  border: 0;
  color: var(--blue-800);
  background: transparent;
  font-weight: 800;
}

.form-message {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--gray-600);
  font-weight: 700;
}

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

.form-message.is-success {
  color: var(--green-700);
}

.auth-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  padding: 48px;
  color: var(--white);
  background-image: linear-gradient(0deg, rgba(8, 59, 91, 0.74), rgba(8, 59, 91, 0.06)), var(--login-image);
  background-position: center;
  background-size: cover;
}

.auth-visual-content {
  max-width: 540px;
}

.auth-visual-content span {
  display: block;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 800;
  text-transform: uppercase;
}

.auth-visual-content strong {
  display: block;
  font-size: 2.15rem;
  line-height: 1.08;
}

.dashboard-page {
  overflow-x: hidden;
}

.app-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  transition: grid-template-columns 0.2s ease;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px;
  color: var(--white);
  background: var(--blue-900);
  transition: width 0.2s ease, padding 0.2s ease;
}

.sidebar-brand {
  min-height: 58px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--white);
  justify-content: center;
}

.sidebar-brand .brand-logo {
  width: 190px;
}

.sidebar-brand::after {
  display: none;
  color: var(--blue-900);
  content: "MV";
  font-size: 1.05rem;
  font-weight: 900;
}

.side-nav {
  display: grid;
  gap: 6px;
}

.sidebar-collapse,
.side-nav button,
.side-nav a,
.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.84);
  background: transparent;
  text-align: left;
  font-weight: 750;
}

.sidebar-collapse {
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.sidebar-collapse:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.18);
}

.side-nav button:hover,
.side-nav button.is-active,
.side-nav a:hover,
.sidebar-logout:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.16);
}

.sidebar-logout {
  margin-top: auto;
}

.admin-only-link {
  display: none !important;
}

.is-admin-user .admin-only-link {
  display: flex !important;
}

.dashboard-page.sidebar-collapsed .app-layout {
  grid-template-columns: 86px 1fr;
}

.dashboard-page.sidebar-collapsed .sidebar {
  gap: 18px;
  padding: 18px 14px;
}

.dashboard-page.sidebar-collapsed .sidebar-brand {
  min-height: 52px;
  padding: 8px;
}

.dashboard-page.sidebar-collapsed .sidebar-brand .brand-logo,
.dashboard-page.sidebar-collapsed .brand-text,
.dashboard-page.sidebar-collapsed .nav-label {
  display: none;
}

.dashboard-page.sidebar-collapsed .sidebar-brand::after {
  display: block;
}

.dashboard-page.sidebar-collapsed .sidebar-collapse,
.dashboard-page.sidebar-collapsed .side-nav button,
.dashboard-page.sidebar-collapsed .side-nav a,
.dashboard-page.sidebar-collapsed .sidebar-logout {
  justify-content: center;
  padding-inline: 10px;
}

.dashboard-page.sidebar-collapsed .sidebar-collapse svg {
  transform: rotate(180deg);
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding: 16px 28px;
  background: rgba(248, 250, 252, 0.92);
  border-bottom: 1px solid var(--gray-200);
  backdrop-filter: blur(16px);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  color: var(--blue-900);
  background: var(--white);
}

.muted-label {
  display: block;
  color: var(--gray-500);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.topbar strong {
  color: var(--blue-900);
}

.topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--gray-600);
  font-weight: 700;
}

.panel-content {
  padding: 28px;
}

.trial-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid rgba(20, 119, 166, 0.2);
  border-radius: var(--radius);
  color: var(--blue-900);
  background: #eef8fb;
  box-shadow: var(--soft-shadow);
}

.trial-notice[hidden] {
  display: none;
}

.trial-notice strong {
  display: block;
  margin-bottom: 4px;
}

.trial-notice p {
  margin: 0;
  color: var(--gray-700);
}

.trial-notice.is-day-1,
.trial-notice.is-day-0 {
  border-color: rgba(22, 163, 74, 0.28);
  background: #f0fdf4;
}

.trial-notice.is-pending {
  border-color: rgba(245, 158, 11, 0.3);
  background: #fffbeb;
}

.panel-section {
  display: none;
}

.panel-section.is-active {
  display: block;
}

.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.panel-heading h1 {
  margin-bottom: 0;
  font-size: 2rem;
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card {
  padding: 18px;
}

.stat-card span {
  display: block;
  min-height: 42px;
  color: var(--gray-600);
  font-size: 0.88rem;
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  color: var(--blue-900);
  font-size: 2rem;
}

.table-panel {
  overflow: hidden;
}

.table-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--gray-200);
}

.table-panel-heading h2 {
  margin: 0;
  font-size: 1.15rem;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--gray-200);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--gray-600);
  background: var(--gray-50);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

td {
  color: var(--gray-800);
  font-size: 0.93rem;
}

.empty-row {
  color: var(--gray-500);
  text-align: center;
}

.row-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  min-width: 260px;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  color: var(--blue-900);
  background: var(--white);
  font-size: 0.82rem;
  font-weight: 800;
}

.action-button.is-danger {
  color: var(--danger);
}

.patient-create-report {
  display: inline-flex !important;
  white-space: nowrap;
  color: #ffffff;
  border-color: #0b5c89;
  background: #0b5c89;
}

.patient-create-report:hover {
  color: #ffffff;
  border-color: #06496f;
  background: #06496f;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.status-rascunho {
  color: var(--warning);
  background: #fef3c7;
}

.status-finalizado {
  color: var(--blue-900);
  background: #dbeafe;
}

.status-entregue {
  color: var(--green-700);
  background: #dcfce7;
}

.entity-form {
  padding: 22px;
}

.report-form {
  gap: 20px;
}

.form-section {
  display: grid;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--gray-200);
}

.form-section:last-of-type {
  border-bottom: 0;
}

.form-section h2 {
  font-size: 1.08rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.form-grid-one {
  grid-template-columns: 1fr;
}

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

.split-panel {
  display: grid;
  grid-template-columns: minmax(300px, 420px) 1fr;
  gap: 18px;
  align-items: start;
}

.compact-form {
  align-self: start;
}

.settings-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius);
  color: var(--gray-600);
  background: var(--gray-50);
}

.settings-preview img {
  width: 140px;
  height: 48px;
  object-fit: contain;
  background: var(--white);
  border-radius: var(--radius);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--blue-900);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  background: var(--danger);
}

.report-workbench {
  display: grid;
  grid-template-columns: minmax(440px, 0.92fr) minmax(420px, 0.78fr);
  gap: 20px;
  align-items: start;
}

.report-editor {
  max-height: calc(100vh - 112px);
  overflow: auto;
  scroll-padding-top: 18px;
}

.section-inline-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.section-inline-heading h2 {
  margin: 0;
}

.dynamic-exam-fields {
  gap: 18px;
}

.organ-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.organ-panel,
.technical-field,
.custom-measure-panel {
  display: grid;
  gap: 10px;
}

.organ-panel {
  padding: 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--gray-50);
}

.technical-field-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.technical-field-heading label {
  display: block;
  color: var(--blue-900);
  font-size: 0.95rem;
}

.field-tools {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}


.finding-shortcuts {
  width: 100%;
  justify-content: flex-start;
  gap: 6px;
}

.shortcut-chip {
  appearance: none;
  border: 1px solid var(--blue-200);
  background: #eff6ff;
  color: var(--blue-800);
  border-radius: 999px;
  padding: 0.3rem 0.68rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.shortcut-chip:hover,
.shortcut-chip:focus-visible {
  background: #dbeafe;
  border-color: var(--blue-400);
  transform: translateY(-1px);
}

.shortcut-chip:active {
  transform: translateY(0);
}

.measure-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.custom-measures-list {
  display: grid;
  gap: 10px;
}

.measure-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(90px, 1fr)) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
}

.upload-zone {
  position: relative;
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 160px;
  padding: 24px;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  color: var(--gray-600);
  background: var(--gray-50);
  text-align: center;
}

.upload-zone.is-dragging {
  border-color: var(--green-600);
  background: #effaf3;
}

.upload-zone svg {
  width: 34px;
  height: 34px;
  color: var(--green-600);
}

.upload-zone strong {
  color: var(--blue-900);
}

.upload-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.image-list {
  display: grid;
  gap: 12px;
}

.image-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--gray-50);
}

.image-item img {
  width: 130px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--white);
}

.signature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.signature-preview img {
  min-height: 48px;
  object-fit: contain;
}

.signature-preview img.is-empty,
#signaturePreview:not([src]),
#settingsSignaturePreview:not([src]) {
  display: none;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--gray-800);
  font-weight: 800;
}

.checkbox-line input {
  width: 18px;
  min-height: 18px;
}

.suggestion-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--gray-50);
}

.suggestion-title {
  color: var(--blue-900);
  font-weight: 900;
}

.suggestion-hint {
  margin: -2px 0 2px;
  color: var(--gray-600);
  font-size: 0.92rem;
}

.suggestion-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
}

.suggestion-card strong {
  color: var(--blue-900);
}

.suggestion-card p,
.empty-help {
  margin: 0;
  color: var(--gray-600);
}

.live-preview-panel {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 12px;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.preview-actions {
  display: flex;
  gap: 8px;
}

.pdf-preview-shell {
  position: relative;
  max-height: calc(100vh - 170px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: #dce3ea;
  box-shadow: var(--soft-shadow);
}

.pdf-preview-shell.is-expanded {
  position: fixed;
  inset: 20px;
  z-index: 80;
  max-height: none;
  padding: 24px;
}

.preview-close-button {
  display: none;
  position: sticky;
  top: 0;
  z-index: 2;
  width: fit-content;
  margin: 0 0 14px auto;
}

.pdf-preview-shell.is-expanded .preview-close-button {
  display: inline-flex;
}

.pdf-sheet {
  width: min(100%, 794px);
  min-height: 1123px;
  margin: 0 auto;
  padding: 46px;
  color: var(--gray-950);
  background: var(--white);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.2);
  font-family: "Segoe UI", Arial, sans-serif;
}

.pdf-live-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--pdf-color, var(--blue-900));
}

.pdf-live-header img {
  width: 150px;
  height: 50px;
  object-fit: contain;
}

.pdf-live-header div {
  display: grid;
  gap: 4px;
  text-align: right;
}

.pdf-live-header strong {
  color: var(--pdf-color, var(--blue-900));
  font-size: 1.18rem;
}

.pdf-live-header span,
.pdf-live-provider span,
.pdf-live-box span,
.pdf-live-signature span,
.pdf-sheet footer {
  color: var(--gray-600);
  font-size: 0.82rem;
}

.pdf-live-provider {
  display: grid;
  gap: 4px;
  margin: 20px 0;
}

.pdf-live-provider strong {
  color: var(--gray-950);
}

.pdf-live-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--gray-50);
}

.pdf-live-box div {
  display: grid;
  gap: 3px;
}

.pdf-live-box strong {
  font-size: 0.92rem;
}

.pdf-live-section {
  margin-top: 18px;
}

.pdf-live-section h3 {
  margin: 0 0 8px;
  padding: 7px 10px;
  border-radius: var(--radius);
  color: var(--pdf-color, var(--blue-900));
  background: var(--gray-100);
  font-size: 0.92rem;
}

.pdf-live-section p {
  margin: 0;
  color: var(--gray-800);
  font-size: 0.9rem;
  line-height: 1.55;
}

.pdf-live-section table {
  min-width: 0;
  font-size: 0.82rem;
}

.pdf-live-section th,
.pdf-live-section td {
  padding: 7px 8px;
}

.pdf-live-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pdf-live-images figure {
  margin: 0;
  padding: 7px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}

.pdf-live-images img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
}

.pdf-live-images figcaption {
  margin-top: 5px;
  color: var(--gray-600);
  font-size: 0.74rem;
}

.pdf-live-signature {
  display: grid;
  justify-items: end;
  gap: 5px;
  margin-top: 32px;
  text-align: right;
}

.pdf-live-signature img {
  width: 170px;
  max-height: 64px;
  object-fit: contain;
}

.signature-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  min-height: 54px;
  color: var(--gray-500);
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.82rem;
}

.pdf-live-signature div {
  width: 240px;
  border-top: 1px solid var(--gray-300);
}

.pdf-live-signature strong {
  color: var(--gray-900);
}

.pdf-sheet footer {
  margin-top: 30px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-200);
}

.subscription-page {
  min-height: 100vh;
  color: var(--gray-950);
  background:
    linear-gradient(180deg, rgba(240, 247, 250, 0.92), rgba(255, 255, 255, 0.98)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

.subscription-shell,
.admin-shell {
  width: min(100% - 32px, 1180px);
  margin: 0 auto;
}

.subscription-shell {
  padding: 34px 0 52px;
}

.subscription-brand {
  display: inline-flex;
  margin-bottom: 40px;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.subscription-hero {
  max-width: 760px;
  margin-bottom: 24px;
}

.subscription-hero h1 {
  margin: 8px 0 12px;
  color: var(--blue-900);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.04;
}

.subscription-hero p,
.subscription-note,
.plan-economy {
  color: var(--gray-600);
  line-height: 1.65;
}

.subscription-hero.is-warning {
  padding: 24px;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  background: #fff7ed;
}

.subscription-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 22px 0;
}

.subscription-card,
.subscription-summary-card {
  position: relative;
  padding: 26px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.subscription-card.is-highlighted {
  border-color: rgba(22, 163, 74, 0.36);
  box-shadow: 0 18px 38px rgba(22, 163, 74, 0.15);
}

.plan-ribbon {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--green-700);
  background: #dcfce7;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.subscription-card h2,
.subscription-summary-card h2 {
  margin: 8px 0;
  color: var(--blue-900);
}

.plan-price {
  display: block;
  margin: 12px 0;
  color: var(--blue-900);
  font-size: 2.2rem;
  line-height: 1;
}

.subscription-card ul {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.subscription-card li::before {
  content: "+";
  margin-right: 8px;
  color: var(--green-700);
  font-weight: 900;
}

.payment-method-grid,
.subscription-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pix-payment-panel {
  margin: 20px 0;
}

.pix-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.pix-card.is-error {
  border-color: #fecaca;
  background: #fff7ed;
}

.pix-content {
  display: grid;
  gap: 12px;
}

.pix-qr {
  width: min(100%, 260px);
  aspect-ratio: 1;
  object-fit: contain;
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
}

#pixCopyCode {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.82rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.summary-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--gray-50);
}

.summary-grid span {
  color: var(--gray-500);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-grid strong {
  color: var(--blue-900);
}

.admin-shell {
  padding-top: 28px;
}

.admin-stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 22px 0;
}

.admin-config-panel {
  margin-top: 22px;
}

@media (max-width: 1100px) {
  .photo-grid,
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .subscription-grid,
  .price-layout,
  .two-column,
  .split-panel {
    grid-template-columns: 1fr;
  }

  .summary-grid,
  .admin-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-workbench {
    grid-template-columns: 1fr;
  }

  .report-editor,
  .pdf-preview-shell {
    max-height: none;
  }

  .live-preview-panel {
    position: static;
  }

  .measure-grid,
  .signature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .measure-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .site-header {
    min-height: 70px;
    padding: 12px 20px;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    position: absolute;
    top: 70px;
    left: 20px;
    right: 20px;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 10px;
  }

  .hero,
  .hero-shade {
    min-height: 660px;
  }

  .hero {
    background-image: linear-gradient(90deg, rgba(248, 250, 252, 0.98), rgba(248, 250, 252, 0.76)), var(--hero-image);
    background-position: 64% center;
  }

  .hero h1 {
    font-size: 2.65rem;
  }

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

  .auth-panel {
    min-height: auto;
    padding: 34px 24px;
  }

  .auth-visual {
    min-height: 360px;
  }

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

  .dashboard-page #sidebarToggle {
    display: inline-grid;
  }

  .sidebar {
    position: fixed;
    z-index: 40;
    left: 0;
    top: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
  }

  .sidebar-collapse {
    display: none;
  }

  .dashboard-page.sidebar-collapsed .app-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-page.sidebar-collapsed .sidebar {
    gap: 24px;
    padding: 22px;
  }

  .dashboard-page.sidebar-collapsed .sidebar-brand .brand-logo,
  .dashboard-page.sidebar-collapsed .brand-text,
  .dashboard-page.sidebar-collapsed .nav-label {
    display: inline-flex;
  }

  .dashboard-page.sidebar-collapsed .sidebar-brand::after {
    display: none;
  }

  .dashboard-page.sidebar-collapsed .side-nav button,
  .dashboard-page.sidebar-collapsed .side-nav a,
  .dashboard-page.sidebar-collapsed .sidebar-logout {
    justify-content: flex-start;
  }

  .dashboard-page.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .panel-content {
    padding: 20px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .trial-notice {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-user span {
    display: none;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 28px, 1120px);
  }

  .brand-logo {
    width: 146px;
  }

  .hero h1 {
    font-size: 2.15rem;
  }

  .hero p,
  .auth-visual-content strong {
    font-size: 1.05rem;
  }

  .section {
    padding: 56px 0;
  }

  .section h2,
  .auth-copy h1 {
    font-size: 1.75rem;
  }

  .photo-grid,
  .feature-grid,
  .subscription-grid,
  .pix-card,
  .summary-grid,
  .admin-stats-grid,
  .stats-grid,
  .form-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .price-card {
    padding: 22px;
  }

  .price-header strong {
    font-size: 2.15rem;
  }

  .topbar {
    padding: 14px 16px;
  }

  .panel-content {
    padding: 16px;
  }

  .form-actions .button {
    width: 100%;
  }

  .organ-grid,
  .measure-grid,
  .signature-grid,
  .pdf-live-box,
  .pdf-live-images,
  .measure-row {
    grid-template-columns: 1fr;
  }

  .image-item {
    grid-template-columns: 1fr;
  }

  .image-item img {
    width: 100%;
  }

  .technical-field-heading,
  .preview-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .pdf-preview-shell {
    padding: 10px;
  }

  .pdf-sheet {
    min-height: auto;
    padding: 24px;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}

/* Professional report PDF layout */
.pdf-preview-a4,
.pdf-sheet.pdf-preview-a4 {
  background: #ffffff;
  color: #172033;
  font-size: var(--pdf-font-size, 11px);
  line-height: 1.42;
  min-height: 297mm;
  overflow: visible;
  padding: 0;
  width: 210mm;
}

.pdf-report {
  --pdf-color: #083b5b;
  --pdf-accent: #b6934b;
  --pdf-font-size: 11px;
  color: #172033;
  font-size: var(--pdf-font-size);
}

.pdf-text-page,
.pdf-image-page {
  background: #ffffff;
  box-sizing: border-box;
  box-shadow: 0 18px 50px rgba(7, 50, 74, 0.14);
  display: flex;
  flex-direction: column;
  margin: 0 auto 18px;
  min-height: 297mm;
  overflow: visible;
  padding: 15mm 14mm 12mm;
  page-break-after: always;
  position: relative;
  width: 210mm;
}

.pdf-report-modelo-enviado .pdf-text-page::before,
.pdf-report-modelo-enviado .pdf-image-page::before {
  background:
    linear-gradient(135deg, transparent 0 42%, rgba(8, 59, 91, .035) 42% 45%, transparent 45% 100%),
    linear-gradient(135deg, transparent 0 56%, rgba(182, 147, 75, .035) 56% 59%, transparent 59% 100%);
  content: "";
  inset: 24mm 14mm 17mm;
  pointer-events: none;
  position: absolute;
}

.pdf-report-modelo-enviado .pdf-text-page > *,
.pdf-report-modelo-enviado .pdf-image-page > * {
  position: relative;
  z-index: 1;
}

.pdf-image-page {
  break-before: page;
  page-break-before: always;
}

.pdf-live-header {
  align-items: start;
  border-bottom: 0;
  display: grid;
  gap: 8px 14px;
  grid-template-columns: 1fr auto 1fr;
  margin-bottom: 10px;
  min-height: 28mm;
  padding-bottom: 8px;
  position: relative;
}

.pdf-live-header.is-centered-logo {
  grid-template-columns: 1fr auto 1fr;
}

.pdf-header-spacer {
  grid-column: 1;
  grid-row: 1;
}

.pdf-live-header.is-centered-logo .pdf-header-logo {
  grid-column: 2;
  grid-row: 1;
}

.pdf-live-header.is-centered-logo .pdf-live-header-main {
  grid-column: 2;
  grid-row: 2;
  min-width: 210px;
  text-align: center;
}

.pdf-live-header.is-centered-logo .pdf-contact-list {
  grid-column: 3;
  grid-row: 1;
}

.pdf-header-logo,
.pdf-live-header img {
  height: 48px;
  max-width: 172px;
  object-fit: contain;
}

.pdf-live-header-main strong {
  color: var(--pdf-color, #083b5b);
  display: block;
  font-size: 13px;
  line-height: 1.2;
}

.pdf-live-header-main {
  display: grid;
  gap: 2px;
  text-align: left;
}

.pdf-live-header.is-centered-logo .pdf-live-header-main {
  text-align: center;
}

.pdf-live-header-main span {
  color: #5d6a7c;
  display: block;
  font-size: 8.8px;
  margin-top: 2px;
}

.pdf-contact-list {
  color: #344155;
  display: grid;
  font-size: 8.5px;
  gap: 2px;
  justify-self: end;
  text-align: right;
}

.pdf-contact-list.is-empty {
  min-width: 120px;
}

.pdf-header-rule {
  grid-column: 1 / -1;
  height: 2px;
  margin-top: 3px;
  background: linear-gradient(90deg, transparent, var(--pdf-accent, #b6934b) 10%, var(--pdf-color, #083b5b) 50%, var(--pdf-accent, #b6934b) 90%, transparent);
}

.pdf-main-data-grid {
  border-bottom: 1px solid rgba(182, 147, 75, .62);
  border-top: 1px solid rgba(182, 147, 75, .62);
  display: grid;
  gap: 0;
  grid-template-columns: 1fr 1.05fr .72fr;
  margin: 8px 0 13px;
  overflow: hidden;
}

.pdf-main-data-grid > div {
  border-right: 1px solid #d8e1e8;
  display: grid;
  gap: 0;
}

.pdf-main-data-grid > div:last-child {
  border-right: 0;
}

.pdf-main-data-grid > div > div {
  border-bottom: 1px solid #edf2f4;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  min-height: 15px;
  padding: 3px 7px;
}

.pdf-main-data-grid > div > div:last-child {
  border-bottom: 0;
}

.pdf-main-data-grid span {
  color: #415063;
  display: block;
  font-size: 7.4px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pdf-main-data-grid strong {
  color: #172033;
  display: block;
  font-size: 8.4px;
  font-weight: 600;
  margin-top: 0;
  overflow-wrap: anywhere;
}

.pdf-exam-title {
  background: #f1f5f7;
  border-left: 4px solid var(--pdf-color, #083b5b);
  color: var(--pdf-color, #083b5b);
  font-size: 15.5px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 8px;
  padding: 9px 12px 8px;
}

.pdf-live-section {
  background: rgba(255, 255, 255, .92);
  border: 1px solid #e3e9ee;
  border-radius: 3px;
  margin: 7px 0;
  overflow: hidden;
  padding: 0;
}

.pdf-live-section h3,
.pdf-image-page h3 {
  background: #f1f5f7;
  color: var(--pdf-color, #083b5b);
  font-size: 9.7px;
  font-weight: 900;
  letter-spacing: .03em;
  margin: 0;
  padding: 6px 9px;
  text-transform: uppercase;
}

.pdf-live-section p {
  color: #243044;
  font-size: 9.6px;
  margin: 0;
  padding: 8px 9px;
}

.pdf-live-section p:last-child {
  margin-bottom: 0;
}

.pdf-section-heading-only {
  background: #f5f9fc;
  border-color: #d9e5ef;
  margin-bottom: 6px;
  padding: 0;
}

.pdf-section-heading-only h3 {
  margin: 0;
}

.pdf-live-table {
  border-collapse: collapse;
  width: 100%;
}

.pdf-live-table th,
.pdf-live-table td {
  border-bottom: 1px solid #e5ebf2;
  font-size: 9px;
  padding: 5px 6px;
  text-align: left;
  vertical-align: top;
}

.pdf-live-table th {
  color: #4c596b;
  font-weight: 700;
  width: 48%;
}

.pdf-live-table tr:last-child th,
.pdf-live-table tr:last-child td {
  border-bottom: 0;
}

.pdf-diagnostic-impression {
  background: #ffffff;
  border-color: #cbdbe6;
  border-left: 4px solid var(--pdf-color, #083b5b);
}

.pdf-diagnostic-impression ul {
  margin: 0;
  padding: 8px 10px 8px 24px;
}

.pdf-diagnostic-impression li {
  margin: 3px 0;
}

.pdf-complementary-notice {
  background: #f7fafc;
  border: 1px solid #dce4ec;
  border-radius: 3px;
  color: #4a586a;
  font-size: 8.8px;
  margin: 8px 0;
  padding: 8px 10px;
}

.pdf-live-signature {
  margin: 18px 0 12px auto;
  max-width: 270px;
  text-align: right;
}

.pdf-live-signature.is-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.pdf-live-signature img {
  display: block;
  margin: 0 0 5px auto;
  max-height: 58px;
  max-width: 190px;
  object-fit: contain;
}

.pdf-live-signature.is-center img {
  margin-left: auto;
  margin-right: auto;
}

.pdf-live-signature div {
  border-top: 1px solid #8a98aa;
  margin: 6px 0 5px;
}

.pdf-live-signature strong,
.pdf-live-signature span {
  display: block;
  font-size: 9.5px;
}

.signature-placeholder {
  color: #7a8798;
  display: block;
  font-size: 9px;
  padding: 32px 0 6px;
}

.pdf-text-page footer,
.pdf-image-page footer,
.pdf-live-footer {
  border-top: 1px solid #dce4ec;
  color: #667085;
  display: grid;
  gap: 2px;
  font-size: 8.5px;
  margin-top: auto;
  padding-top: 7px;
  text-align: center;
}

.pdf-live-footer strong {
  color: var(--pdf-color, #083b5b);
  font-size: 8px;
}

.pdf-images-empty {
  display: none;
}

.pdf-images-grid {
  display: grid;
  gap: 10px;
}

.pdf-images-grid figure {
  border: 1px solid #dce4ec;
  border-radius: 6px;
  margin: 0;
  padding: 8px;
}

.pdf-images-grid img {
  background: #f3f6f9;
  display: block;
  height: 74mm;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.pdf-images-grid.is-layout-1 img {
  height: 188mm;
}

.pdf-images-grid.is-layout-2 img {
  height: 118mm;
}

.pdf-images-grid.is-layout-4 img {
  height: 82mm;
}

.pdf-images-grid.is-layout-6 img {
  height: 55mm;
}

.pdf-images-grid.is-layout-8 img {
  height: 40mm;
}

.pdf-images-grid figcaption {
  color: #4c596b;
  font-size: 8.5px;
  margin-top: 5px;
  text-align: center;
}

.pdf-export-host {
  pointer-events: none;
}

.pdf-export-host .pdf-export-page,
.pdf-export-sheet .pdf-text-page,
.pdf-export-sheet .pdf-image-page {
  box-shadow: none !important;
  margin: 0 !important;
}

.pdf-export-host .pdf-live-header,
.pdf-export-sheet .pdf-live-header {
  grid-template-columns: 1fr auto 1fr !important;
}

.pdf-export-host .pdf-main-data-grid,
.pdf-export-sheet .pdf-main-data-grid {
  display: grid !important;
  grid-template-columns: 1fr 1.05fr .72fr !important;
}

.pdf-export-host .pdf-main-data-grid > div,
.pdf-export-sheet .pdf-main-data-grid > div {
  border-right: 1px solid #d8e1e8 !important;
}

.pdf-export-host .pdf-main-data-grid > div:last-child,
.pdf-export-sheet .pdf-main-data-grid > div:last-child {
  border-right: 0 !important;
}

.pdf-export-host .pdf-main-data-grid > div > div,
.pdf-export-sheet .pdf-main-data-grid > div > div {
  grid-template-columns: 74px minmax(0, 1fr) !important;
}

.pdf-export-host .pdf-contact-list,
.pdf-export-sheet .pdf-contact-list {
  text-align: right !important;
}

.pdf-export-page img {
  image-rendering: auto;
}

.form-note {
  background: #f4f8fb;
  border: 1px solid #dce8f2;
  border-radius: 6px;
  color: #344155;
  font-size: .9rem;
  margin: 0 0 12px;
  padding: 10px 12px;
}

.form-note.is-error {
  background: #fff5f2;
  border-color: #ffd5ca;
  color: #9f2f18;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.settings-tabs button {
  background: #ffffff;
  border: 1px solid #d6e1ea;
  border-radius: 7px;
  color: #344155;
  cursor: pointer;
  font-weight: 800;
  padding: 10px 12px;
}

.settings-tabs button.is-active {
  background: #083b5b;
  border-color: #083b5b;
  color: #ffffff;
}

.settings-tab-panel {
  display: none;
}

.settings-tab-panel.is-active {
  display: block;
}

.model-defaults-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.table-subtext {
  color: #667085;
  display: block;
  font-size: .82rem;
  margin-top: 2px;
}

.pdf-model-note {
  color: #667085;
  font-size: 9px;
  margin: -6px 0 8px;
  text-align: right;
}

.pdf-model-library {
  display: grid;
  gap: 18px;
}

.sent-pdf-feature {
  background: #ffffff;
  border: 1px solid #dce7ef;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(8, 59, 91, .08);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, .85fr) minmax(320px, 1.15fr);
  padding: 18px;
}

.sent-pdf-feature span,
.sent-pdf-card span {
  color: var(--green-700);
  display: block;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.sent-pdf-feature h3,
.sent-pdf-card h3 {
  color: var(--blue-900);
  margin: 4px 0 6px;
}

.sent-pdf-feature p,
.sent-pdf-card p {
  color: #526375;
  margin: 0 0 14px;
}

.sent-pdf-feature iframe,
.embedded-pdf-reference iframe {
  background: #f8fbfd;
  border: 1px solid #dce7ef;
  border-radius: 6px;
  min-height: 520px;
  width: 100%;
}

.sent-pdf-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.sent-pdf-card {
  background: #ffffff;
  border: 1px solid #dce7ef;
  border-radius: 8px;
  padding: 16px;
}

.sent-pdf-preview-host {
  background: #ffffff;
  min-height: 297mm;
  overflow: hidden;
  padding: 0 !important;
}

.pdf-template-loading {
  align-items: center;
  color: #526375;
  display: flex;
  font-weight: 800;
  justify-content: center;
  min-height: 297mm;
  padding: 24px;
  text-align: center;
}

.pdf-template-preview-frame {
  background: #ffffff;
  border: 0;
  display: block;
  height: 297mm;
  min-height: 297mm;
  width: 100%;
}

.inline-filter {
  align-items: flex-start;
  color: #083b5b;
  display: grid;
  font-size: .78rem;
  font-weight: 800;
  gap: 6px;
  text-transform: uppercase;
}

.inline-filter input {
  min-width: 170px;
}

.exam-values-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.exam-values-grid label {
  background: #f8fbfd;
  border: 1px solid #dce7ef;
  border-radius: 8px;
  padding: 12px;
}

.monthly-report-stats .stat-card strong {
  font-size: clamp(1.5rem, 2vw, 2.1rem);
}

.sent-pdf-right-preview {
  background: #ffffff;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 297mm;
}

.sent-pdf-right-preview.is-empty {
  min-height: 360px;
  place-items: center;
}

.sent-pdf-right-header {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #dce7ef;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 16px;
}

.sent-pdf-right-header span,
.sent-pdf-right-header small,
.sent-pdf-right-header strong {
  display: block;
}

.sent-pdf-right-header span {
  color: var(--green-700);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.sent-pdf-right-header strong {
  color: var(--blue-900);
  font-size: .98rem;
}

.sent-pdf-right-header small {
  color: #667085;
  font-size: .82rem;
  margin-top: 2px;
}

.sent-pdf-right-preview iframe {
  background: #f8fbfd;
  border: 0;
  height: 100%;
  min-height: calc(297mm - 75px);
  width: 100%;
}

.embedded-pdf-reference {
  background: #ffffff;
  border: 1px solid #dce7ef;
  border-radius: 8px;
  grid-column: 1 / -1;
  margin-top: 12px;
  padding: 12px;
}

.embedded-pdf-reference-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.embedded-pdf-reference-header strong,
.embedded-pdf-reference-header span {
  display: block;
}

.embedded-pdf-reference-header span {
  color: #667085;
  font-size: .86rem;
}

@media (max-width: 900px) {
  .pdf-live-header,
  .pdf-main-data-grid {
    grid-template-columns: 1fr;
  }

  .pdf-contact-list {
    text-align: left;
  }

  .pdf-text-page,
  .pdf-image-page {
    padding: 22px;
  }

  .model-defaults-grid {
    grid-template-columns: 1fr;
  }

  .sent-pdf-feature {
    grid-template-columns: 1fr;
  }

  .embedded-pdf-reference-header {
    align-items: stretch;
    flex-direction: column;
  }

  .sent-pdf-right-header {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Correção 2026-06-17: prévia e PDF no visual dos novos modelos enviados */
.pdf-report-modelo-enviado .pdf-text-page,
.pdf-report-modelo-enviado .pdf-image-page {
  padding: 14mm 14mm 13mm;
  color: #1f2d3d;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.32;
}

.pdf-report-modelo-enviado .pdf-text-page::before,
.pdf-report-modelo-enviado .pdf-image-page::before {
  display: none !important;
}

.pdf-new-model-header {
  align-items: center !important;
  display: grid !important;
  grid-template-columns: 1fr 1.25fr 1fr !important;
  gap: 12px !important;
  min-height: 30mm !important;
  margin: -2mm 0 10mm !important;
  padding: 0 0 8mm !important;
  background: #f7fbfb;
}

.pdf-new-model-header .pdf-client-logo-box {
  align-self: center;
  justify-self: start;
  min-width: 46mm;
  max-width: 58mm;
  min-height: 18mm;
  padding: 5mm 6mm;
  border-radius: 8px;
  background: #eaf7f2;
  color: var(--pdf-color, #083b5b);
}

.pdf-new-model-header .pdf-client-logo-box strong {
  display: block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .03em;
}

.pdf-new-model-header .pdf-client-logo-box span {
  display: block;
  margin-top: 3px;
  color: #6d7786;
  font-size: 8.5px;
}

.pdf-new-model-header .pdf-header-logo {
  display: block;
  max-width: 46mm;
  max-height: 18mm;
  object-fit: contain;
}

.pdf-new-model-header .pdf-live-header-main {
  justify-self: center;
  min-width: 56mm;
  text-align: center !important;
}

.pdf-new-model-header .pdf-live-header-main strong {
  color: var(--pdf-color, #083b5b);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.08;
}

.pdf-new-model-header .pdf-live-header-main span {
  color: #667085;
  font-size: 9.5px;
}

.pdf-new-model-header .pdf-professional-lines {
  align-self: center;
  color: var(--pdf-color, #083b5b);
  font-size: 8.3px;
  justify-self: end;
  line-height: 1.6;
  min-width: 45mm;
  text-align: left;
}

.pdf-new-model-header .pdf-professional-lines strong {
  font-weight: 900;
}

.pdf-new-model-header .pdf-professional-lines span {
  color: #4f5f70;
}

.pdf-new-model-header .pdf-professional-lines em {
  color: #8a94a3;
  font-style: normal;
  padding: 0 3px;
}

.pdf-new-model-header .pdf-header-rule {
  grid-column: 1 / -1;
  height: 2px;
  margin-top: 5mm;
  background: linear-gradient(90deg, #119d7b 0 25%, var(--pdf-color, #083b5b) 25% 100%);
}

.pdf-new-patient-card,
.pdf-main-data-grid.pdf-new-patient-card {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  margin: 0 0 7mm !important;
  padding: 3.5mm 4mm !important;
  border: 1px solid #b7d6e5 !important;
  border-radius: 7px !important;
  background: #f6fbfd !important;
  overflow: hidden;
}

.pdf-new-patient-card .pdf-info-row {
  display: grid !important;
  grid-template-columns: 1.15fr .95fr .95fr !important;
  gap: 7mm !important;
  min-height: 7mm;
  align-items: center;
}

.pdf-new-patient-card .pdf-info-item,
.pdf-new-patient-card .pdf-info-item strong,
.pdf-new-patient-card .pdf-info-item span {
  display: inline !important;
  border: 0 !important;
  padding: 0 !important;
}

.pdf-new-patient-card .pdf-info-item {
  color: var(--pdf-color, #083b5b);
  font-size: 8.9px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.pdf-new-patient-card .pdf-info-item strong {
  color: var(--pdf-color, #083b5b);
  font-weight: 900;
}

.pdf-new-patient-card .pdf-info-item span {
  color: #172033;
  font-weight: 500;
  border-bottom: 1px solid #7b8794 !important;
  padding: 0 6px 1px !important;
}

.pdf-report-modelo-enviado .pdf-exam-title {
  margin: 0 0 6mm !important;
  padding: 3.2mm 4.5mm !important;
  border-left: 4px solid #12a884 !important;
  border-radius: 5px !important;
  background: #f1f9fb !important;
  color: var(--pdf-color, #083b5b) !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  letter-spacing: .02em;
}

.pdf-report-modelo-enviado .pdf-live-section {
  margin: 0 0 5.1mm !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

.pdf-report-modelo-enviado .pdf-live-section h3,
.pdf-report-modelo-enviado .pdf-image-page h3 {
  margin: 0 0 1.2mm !important;
  padding: 2.2mm 4.2mm !important;
  border: 1.4px solid #121212 !important;
  border-radius: 5px !important;
  background: #eefaf5 !important;
  color: var(--pdf-color, #083b5b) !important;
  font-size: 10.5px !important;
  font-weight: 900 !important;
  letter-spacing: .03em !important;
  text-transform: uppercase !important;
}

.pdf-report-modelo-enviado .pdf-section-body,
.pdf-report-modelo-enviado .pdf-live-section > p,
.pdf-report-modelo-enviado .pdf-live-section ul,
.pdf-report-modelo-enviado .pdf-live-table {
  margin: 0 !important;
  padding: 0 0 0 .4mm !important;
  color: #1f2d3d !important;
  font-size: 10.2px !important;
}

.pdf-report-modelo-enviado .pdf-section-body p,
.pdf-report-modelo-enviado .pdf-live-section > p {
  margin: 0 0 1.1mm !important;
  padding: 0 !important;
}

.pdf-report-modelo-enviado .pdf-section-body strong,
.pdf-report-modelo-enviado .pdf-live-section p strong {
  color: #1f2d3d;
  font-weight: 900;
}

.pdf-report-modelo-enviado .pdf-diagnostic-impression {
  border-left: 0 !important;
}

.pdf-report-modelo-enviado .pdf-diagnostic-impression ul {
  padding-left: 6mm !important;
}

.pdf-report-modelo-enviado .pdf-complementary-notice {
  display: none !important;
}

.pdf-report-modelo-enviado .pdf-live-signature {
  margin-top: auto !important;
}

.pdf-report-modelo-enviado .pdf-live-footer {
  margin-top: auto !important;
  border-top: 1px solid #d5dde6 !important;
  color: #667085 !important;
  font-size: 8.2px !important;
  padding-top: 4mm !important;
}

.pdf-report-modelo-enviado .pdf-live-footer span:first-child {
  display: none;
}

.pdf-report-modelo-enviado .pdf-live-footer strong {
  color: var(--pdf-color, #083b5b) !important;
  text-align: right;
}

.pdf-report-modelo-enviado .pdf-image-page h3 {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-size: 15px !important;
  margin-bottom: 8mm !important;
  padding: 0 !important;
}

.pdf-report-modelo-enviado .pdf-images-grid figure {
  min-height: 52mm;
  border: 1px solid #d9e2ea;
  border-radius: 6px;
  background: #ffffff;
}

.pdf-report-modelo-enviado .pdf-images-grid figcaption {
  color: #667085;
  font-size: 8.5px;
}

.pdf-export-host .pdf-new-model-header,
.pdf-export-sheet .pdf-new-model-header {
  grid-template-columns: 1fr 1.25fr 1fr !important;
}

.pdf-export-host .pdf-new-patient-card,
.pdf-export-sheet .pdf-new-patient-card {
  grid-template-columns: 1fr !important;
}


/* Correção 2026-06-17-7: paginação real A4 sem corte no PDF/previsão */
.pdf-report-paginated .pdf-text-page,
.pdf-report-paginated .pdf-image-page {
  box-sizing: border-box !important;
  height: 297mm !important;
  min-height: 297mm !important;
  max-height: 297mm !important;
  overflow: hidden !important;
  padding: 9mm 11mm 8mm !important;
  width: 210mm !important;
}

.pdf-report-paginated .pdf-page-content {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.pdf-report-paginated .pdf-new-model-header {
  margin: -1mm 0 5mm !important;
  min-height: 22mm !important;
  padding: 0 0 4mm !important;
}

.pdf-report-paginated .pdf-new-model-header .pdf-client-logo-box {
  min-height: 13mm !important;
  padding: 3.2mm 4mm !important;
}

.pdf-report-paginated .pdf-new-model-header .pdf-client-logo-box strong {
  font-size: 10px !important;
}

.pdf-report-paginated .pdf-new-model-header .pdf-client-logo-box span,
.pdf-report-paginated .pdf-new-model-header .pdf-live-header-main span,
.pdf-report-paginated .pdf-new-model-header .pdf-professional-lines {
  font-size: 7.4px !important;
}

.pdf-report-paginated .pdf-new-model-header .pdf-live-header-main strong {
  font-size: 15.5px !important;
}

.pdf-report-paginated .pdf-new-model-header .pdf-header-rule {
  margin-top: 2.5mm !important;
}

.pdf-report-paginated .pdf-new-patient-card,
.pdf-report-paginated .pdf-main-data-grid.pdf-new-patient-card {
  margin: 0 0 4mm !important;
  padding: 2.2mm 3mm !important;
}

.pdf-report-paginated .pdf-new-patient-card .pdf-info-row {
  gap: 4mm !important;
  min-height: 5.1mm !important;
}

.pdf-report-paginated .pdf-new-patient-card .pdf-info-item {
  font-size: 7.7px !important;
}

.pdf-report-paginated .pdf-exam-title {
  font-size: 12.8px !important;
  margin: 0 0 3.4mm !important;
  padding: 2mm 3.2mm !important;
}

.pdf-report-paginated .pdf-continuation-title {
  opacity: .92;
}

.pdf-report-paginated .pdf-live-section {
  margin: 0 0 3mm !important;
}

.pdf-report-paginated .pdf-live-section h3,
.pdf-report-paginated .pdf-image-page h3 {
  font-size: 8.5px !important;
  margin: 0 0 .9mm !important;
  padding: 1.5mm 3mm !important;
}

.pdf-report-paginated .pdf-section-body,
.pdf-report-paginated .pdf-live-section > p,
.pdf-report-paginated .pdf-live-section ul,
.pdf-report-paginated .pdf-live-table {
  font-size: 8.5px !important;
  line-height: 1.28 !important;
}

.pdf-report-paginated .pdf-section-body p,
.pdf-report-paginated .pdf-live-section > p {
  margin: 0 0 .72mm !important;
}

.pdf-report-paginated .pdf-live-table th,
.pdf-report-paginated .pdf-live-table td {
  font-size: 8px !important;
  padding: 3px 5px !important;
}

.pdf-report-paginated .pdf-diagnostic-impression ul {
  margin: 0 !important;
  padding: 1.2mm 3mm 1.2mm 6mm !important;
}

.pdf-report-paginated .pdf-diagnostic-impression li {
  margin: .5mm 0 !important;
}

.pdf-report-paginated .pdf-live-signature {
  margin: 4mm 0 2mm auto !important;
  max-width: 58mm !important;
}

.pdf-report-paginated .signature-placeholder {
  padding: 10mm 0 1.5mm !important;
}

.pdf-report-paginated .pdf-live-signature img {
  max-height: 22mm !important;
  max-width: 48mm !important;
}

.pdf-report-paginated .pdf-live-signature strong,
.pdf-report-paginated .pdf-live-signature span {
  font-size: 8px !important;
}

.pdf-report-paginated .pdf-live-footer {
  flex: 0 0 auto;
  font-size: 7.2px !important;
  margin-top: auto !important;
  padding-top: 2.2mm !important;
}

.pdf-report-paginated .pdf-images-grid {
  gap: 6mm !important;
}

.pdf-report-paginated .pdf-images-grid figure {
  min-height: 0 !important;
  padding: 2.5mm !important;
}

.pdf-report-paginated .pdf-images-grid.is-layout-8 img { height: 35mm !important; }
.pdf-report-paginated .pdf-images-grid.is-layout-6 img { height: 48mm !important; }
.pdf-report-paginated .pdf-images-grid.is-layout-4 img { height: 76mm !important; }
.pdf-report-paginated .pdf-images-grid.is-layout-2 img { height: 110mm !important; }
.pdf-report-paginated .pdf-images-grid.is-layout-1 img { height: 178mm !important; }

.pdf-export-host .pdf-report-paginated .pdf-text-page,
.pdf-export-host .pdf-report-paginated .pdf-image-page {
  box-shadow: none !important;
  margin: 0 !important;
}

/* Correção 2026-06-17-8: PDF A4 limpo, sem corte lateral e prévia encaixada */
.report-preview-panel .pdf-preview-scroll {
  overflow: auto !important;
  padding: 14px !important;
}
.report-preview-panel .pdf-preview-a4 {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  width: auto !important;
  min-height: auto !important;
  margin: 0 auto !important;
}
.pdf-report-paginated .pdf-text-page,
.pdf-report-paginated .pdf-image-page {
  contain: layout paint;
  overflow: hidden !important;
}
.pdf-report-paginated .pdf-new-model-header {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: minmax(34mm, 44mm) minmax(48mm, 1fr) minmax(34mm, 48mm) !important;
  column-gap: 5mm !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  background: #f7fbfb !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-client-logo-box {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 44mm !important;
  min-height: 13mm !important;
  display: grid !important;
  place-items: center !important;
  text-align: center !important;
  overflow: hidden !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-client-logo-box.has-logo .pdf-logo-fallback {
  display: none !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-logo-fallback {
  display: block !important;
  max-width: 100% !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-logo-fallback strong,
.pdf-report-paginated .pdf-new-model-header .pdf-logo-fallback span {
  display: block !important;
  white-space: normal !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-header-logo {
  display: block !important;
  max-width: 36mm !important;
  max-height: 13mm !important;
  object-fit: contain !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-live-header-main {
  justify-self: center !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-align: center !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-live-header-main strong {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-live-header-main span {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-professional-lines {
  align-self: center !important;
  box-sizing: border-box !important;
  display: grid !important;
  gap: .8mm !important;
  justify-self: stretch !important;
  min-width: 0 !important;
  max-width: 48mm !important;
  overflow: hidden !important;
  text-align: left !important;
  line-height: 1.15 !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-professional-lines div {
  display: flex !important;
  align-items: baseline !important;
  gap: 1.2mm !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-professional-lines strong,
.pdf-report-paginated .pdf-new-model-header .pdf-professional-lines span {
  display: inline !important;
  font-size: 7.2px !important;
  line-height: 1.15 !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-professional-lines strong {
  flex: 0 0 auto !important;
  color: var(--pdf-color, #083b5b) !important;
  font-weight: 900 !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-professional-lines span {
  border-bottom: 1px solid #77808c !important;
  color: #172033 !important;
  flex: 1 1 auto !important;
  min-width: 8mm !important;
  overflow: hidden !important;
  padding: 0 1mm .3mm !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-professional-lines em {
  display: none !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-header-rule {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}
.pdf-report-paginated .pdf-new-patient-card .pdf-info-row {
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .9fr) minmax(0, .9fr) !important;
  gap: 2.5mm !important;
}
.pdf-report-paginated .pdf-new-patient-card .pdf-info-item {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.pdf-report-paginated .pdf-new-patient-card .pdf-info-item span {
  display: inline !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.pdf-report-paginated .pdf-live-section h3,
.pdf-report-paginated .pdf-image-page h3 {
  box-sizing: border-box !important;
  max-width: 100% !important;
}
.pdf-report-paginated .pdf-section-body,
.pdf-report-paginated .pdf-live-section > p,
.pdf-report-paginated .pdf-live-section ul,
.pdf-report-paginated .pdf-live-table {
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
}
.pdf-export-host .pdf-report-paginated .pdf-text-page,
.pdf-export-host .pdf-report-paginated .pdf-image-page {
  box-shadow: none !important;
  margin: 0 !important;
}


/* Fix final: logo e assinatura sempre proporcionais, sem ícone quebrado */
.pdf-client-logo-box,
.pdf-new-model-header .pdf-client-logo-box,
.pdf-report-paginated .pdf-new-model-header .pdf-client-logo-box {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}
.pdf-client-logo-box.has-logo .pdf-logo-fallback {
  display: none !important;
}
.pdf-client-logo-box:not(.has-logo) .pdf-logo-fallback {
  display: block !important;
}
.pdf-header-logo,
.pdf-new-model-header .pdf-header-logo,
.pdf-report-paginated .pdf-new-model-header .pdf-header-logo {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 38mm !important;
  max-height: 14mm !important;
  object-fit: contain !important;
  object-position: center center !important;
  border: 0 !important;
}
.pdf-header-logo[hidden],
.pdf-header-logo.is-broken,
.pdf-signature-image[hidden],
.pdf-signature-image.is-broken {
  display: none !important;
}
.pdf-live-signature .pdf-signature-image,
.pdf-report-paginated .pdf-live-signature .pdf-signature-image {
  display: block !important;
  width: 48mm !important;
  height: 20mm !important;
  max-width: 48mm !important;
  max-height: 20mm !important;
  object-fit: contain !important;
  object-position: center center !important;
  margin: 0 auto 1.5mm !important;
  border: 0 !important;
  background: transparent !important;
}
.signature-upload-row img,
.settings-preview.signature-preview img,
#signaturePreview,
#settingsSignaturePreview {
  object-fit: contain !important;
  object-position: center center !important;
  max-width: 100% !important;
  max-height: 80px !important;
}


/* Correção 2026-06-17-9: logo/assinatura reais e achados de US sem quebrar em partes */
.pdf-report-paginated .pdf-text-page,
.pdf-report-paginated .pdf-image-page {
  padding: 7mm 10mm 7mm !important;
}
.pdf-report-paginated .pdf-new-model-header {
  min-height: 17mm !important;
  margin: 0 0 3mm !important;
  padding: 0 0 2mm !important;
  background: #f7fbfb !important;
  grid-template-columns: minmax(32mm, 42mm) minmax(48mm, 1fr) minmax(38mm, 46mm) !important;
  align-items: center !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-client-logo-box {
  background: transparent !important;
  min-height: 11mm !important;
  height: 14mm !important;
  max-height: 14mm !important;
  padding: 1mm 2mm !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-logo-fallback {
  display: none !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-header-logo {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 38mm !important;
  max-height: 12mm !important;
  object-fit: contain !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-live-header-main strong {
  font-size: 12.5px !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-live-header-main span,
.pdf-report-paginated .pdf-new-model-header .pdf-professional-lines strong,
.pdf-report-paginated .pdf-new-model-header .pdf-professional-lines span {
  font-size: 6.8px !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-professional-lines {
  gap: .45mm !important;
  max-width: 46mm !important;
}
.pdf-report-paginated .pdf-new-model-header .pdf-header-rule {
  margin-top: 1.4mm !important;
}
.pdf-report-paginated .pdf-new-patient-card,
.pdf-report-paginated .pdf-main-data-grid.pdf-new-patient-card {
  margin-bottom: 2.7mm !important;
  padding: 1.7mm 2.4mm !important;
}
.pdf-report-paginated .pdf-new-patient-card .pdf-info-row {
  min-height: 4.3mm !important;
  gap: 2.2mm !important;
}
.pdf-report-paginated .pdf-new-patient-card .pdf-info-item {
  font-size: 7px !important;
}
.pdf-report-paginated .pdf-exam-title {
  font-size: 11.6px !important;
  margin-bottom: 2.2mm !important;
  padding: 1.6mm 2.7mm !important;
}
.pdf-report-paginated .pdf-live-section {
  margin-bottom: 2mm !important;
}
.pdf-report-paginated .pdf-live-section h3,
.pdf-report-paginated .pdf-image-page h3 {
  font-size: 7.9px !important;
  padding: 1.15mm 2.5mm !important;
  margin-bottom: .55mm !important;
}
.pdf-report-paginated .pdf-section-body,
.pdf-report-paginated .pdf-live-section > p,
.pdf-report-paginated .pdf-live-section ul,
.pdf-report-paginated .pdf-live-table {
  font-size: 7.85px !important;
  line-height: 1.2 !important;
}
.pdf-report-paginated .pdf-section-body p,
.pdf-report-paginated .pdf-live-section > p {
  margin-bottom: .45mm !important;
}
.pdf-report-paginated .pdf-compact-findings.is-single-findings .pdf-section-body {
  columns: 1 !important;
}
.pdf-report-paginated .pdf-live-signature {
  margin-top: 3mm !important;
  max-width: 54mm !important;
}
.pdf-report-paginated .pdf-live-signature .signature-placeholder {
  display: none !important;
}
.pdf-report-paginated .pdf-live-signature .pdf-signature-image {
  width: auto !important;
  height: auto !important;
  max-width: 46mm !important;
  max-height: 16mm !important;
  object-fit: contain !important;
  object-position: center center !important;
}
.pdf-export-host img[data-pdf-image="logo"],
.pdf-export-host img[data-pdf-image="signature"] {
  break-inside: avoid !important;
}


/* Correção 2026-06-17-10: exportação PDF preserva wrapper A4, logo e assinatura */
.pdf-export-host .pdf-report-paginated .pdf-new-model-header {
  min-height: 20mm !important;
  padding: 5mm 8mm 4mm !important;
  display: grid !important;
  grid-template-columns: minmax(28mm, 42mm) minmax(50mm, 1fr) minmax(30mm, 42mm) !important;
  column-gap: 4mm !important;
  align-items: center !important;
}
.pdf-export-host .pdf-report-paginated .pdf-client-logo-box {
  width: 42mm !important;
  height: 16mm !important;
  max-width: 42mm !important;
  min-height: 16mm !important;
  border-radius: 3mm !important;
}
.pdf-export-host .pdf-report-paginated .pdf-logo-fallback strong {
  font-size: 7.2px !important;
  line-height: 1.1 !important;
}
.pdf-export-host .pdf-report-paginated .pdf-logo-fallback span {
  font-size: 5.4px !important;
  line-height: 1.1 !important;
}
.pdf-export-host .pdf-report-paginated .pdf-live-header-main strong {
  font-size: 11px !important;
}
.pdf-export-host .pdf-report-paginated .pdf-live-header-main span {
  font-size: 6.8px !important;
}
.pdf-export-host .pdf-report-paginated .pdf-professional-lines {
  display: grid !important;
  gap: .7mm !important;
  max-width: 42mm !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-align: left !important;
}
.pdf-export-host .pdf-report-paginated .pdf-professional-lines div {
  align-items: baseline !important;
  display: flex !important;
  gap: 1mm !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}
.pdf-export-host .pdf-report-paginated .pdf-professional-lines strong,
.pdf-export-host .pdf-report-paginated .pdf-professional-lines span {
  font-size: 6.8px !important;
  line-height: 1.05 !important;
}
.pdf-export-host .pdf-report-paginated .pdf-professional-lines strong {
  flex: 0 0 auto !important;
}
.pdf-export-host .pdf-report-paginated .pdf-professional-lines span {
  border-bottom: 1px solid #8a98aa !important;
  flex: 1 1 auto !important;
  min-width: 8mm !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.pdf-export-host .pdf-report-paginated .pdf-live-signature .signature-placeholder,
.pdf-export-host .pdf-report-paginated .signature-placeholder {
  display: none !important;
}
.pdf-export-host .pdf-report-paginated .pdf-live-signature {
  margin-top: 2mm !important;
}
.pdf-export-host .pdf-report-paginated .pdf-live-signature .pdf-signature-image {
  display: block !important;
  max-width: 46mm !important;
  max-height: 16mm !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  border: none !important;
}
.pdf-export-host .pdf-report-paginated .pdf-text-page,
.pdf-export-host .pdf-report-paginated .pdf-image-page {
  height: 297mm !important;
  max-height: 297mm !important;
  min-height: 297mm !important;
  overflow: hidden !important;
}

/* Fix 2026-06-18: signature block stays inside the A4 safe area in preview and export. */
.pdf-preview-a4 .pdf-live-signature,
.pdf-report-paginated .pdf-live-signature,
.pdf-report-modelo-enviado .pdf-live-signature,
.pdf-export-host .pdf-report-paginated .pdf-live-signature {
  align-self: stretch !important;
  box-sizing: border-box !important;
  display: flex !important;
  justify-content: flex-end !important;
  margin: 4mm 0 3mm 0 !important;
  max-width: none !important;
  min-width: 0 !important;
  overflow: visible !important;
  padding: 0 7mm 0 0 !important;
  text-align: center !important;
  width: 100% !important;
}

.pdf-preview-a4 .pdf-live-signature.is-center,
.pdf-report-paginated .pdf-live-signature.is-center,
.pdf-report-modelo-enviado .pdf-live-signature.is-center,
.pdf-export-host .pdf-report-paginated .pdf-live-signature.is-center {
  justify-content: center !important;
  padding-right: 0 !important;
}

.pdf-preview-a4 .pdf-live-signature .pdf-signature-box,
.pdf-report-paginated .pdf-live-signature .pdf-signature-box,
.pdf-report-modelo-enviado .pdf-live-signature .pdf-signature-box,
.pdf-export-host .pdf-report-paginated .pdf-live-signature .pdf-signature-box {
  border-top: 0 !important;
  box-sizing: border-box !important;
  display: grid !important;
  justify-items: center !important;
  margin: 0 !important;
  max-width: calc(100% - 2mm) !important;
  min-width: 0 !important;
  overflow: visible !important;
  padding: 0 !important;
  text-align: center !important;
  width: 62mm !important;
}

.pdf-preview-a4 .pdf-live-signature .pdf-signature-image,
.pdf-report-paginated .pdf-live-signature .pdf-signature-image,
.pdf-report-modelo-enviado .pdf-live-signature .pdf-signature-image,
.pdf-export-host .pdf-report-paginated .pdf-live-signature .pdf-signature-image {
  border: 0 !important;
  display: block !important;
  height: auto !important;
  margin: 0 auto 2mm !important;
  max-height: 18mm !important;
  max-width: 50mm !important;
  object-fit: contain !important;
  object-position: center center !important;
  width: auto !important;
}

.pdf-preview-a4 .pdf-live-signature .pdf-signature-line,
.pdf-report-paginated .pdf-live-signature .pdf-signature-line,
.pdf-report-modelo-enviado .pdf-live-signature .pdf-signature-line,
.pdf-export-host .pdf-report-paginated .pdf-live-signature .pdf-signature-line {
  border-top: 1px solid #8a98aa !important;
  height: 0 !important;
  margin: 1.5mm 0 1.2mm !important;
  max-width: none !important;
  padding: 0 !important;
  width: 100% !important;
}

.pdf-preview-a4 .pdf-live-signature strong,
.pdf-preview-a4 .pdf-live-signature span,
.pdf-report-paginated .pdf-live-signature strong,
.pdf-report-paginated .pdf-live-signature span,
.pdf-report-modelo-enviado .pdf-live-signature strong,
.pdf-report-modelo-enviado .pdf-live-signature span,
.pdf-export-host .pdf-report-paginated .pdf-live-signature strong,
.pdf-export-host .pdf-report-paginated .pdf-live-signature span {
  box-sizing: border-box !important;
  display: block !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: visible !important;
  text-align: center !important;
  text-overflow: clip !important;
  white-space: normal !important;
  width: 100% !important;
  word-break: break-word !important;
}

.pdf-preview-a4 .pdf-live-signature strong,
.pdf-report-paginated .pdf-live-signature strong,
.pdf-report-modelo-enviado .pdf-live-signature strong,
.pdf-export-host .pdf-report-paginated .pdf-live-signature strong {
  font-size: 8.4px !important;
  line-height: 1.25 !important;
}

.pdf-preview-a4 .pdf-live-signature span,
.pdf-report-paginated .pdf-live-signature span,
.pdf-report-modelo-enviado .pdf-live-signature span,
.pdf-export-host .pdf-report-paginated .pdf-live-signature span {
  font-size: 7.8px !important;
  line-height: 1.25 !important;
}

/* Cadastro de tutores/responsáveis - ajuste isolado */
.section-subtitle {
  margin: 6px 0 0;
  max-width: 760px;
  color: var(--gray-600);
  font-size: 0.95rem;
}

.split-panel-wide {
  grid-template-columns: minmax(340px, 520px) 1fr;
}

.entity-form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  background: var(--gray-50);
}

.entity-form-header strong {
  display: block;
  color: var(--blue-900);
  font-size: 1rem;
}

.entity-form-header span {
  display: block;
  margin-top: 3px;
  color: var(--gray-600);
  font-size: 0.86rem;
  font-weight: 600;
}

.tutor-form-enhanced .form-grid-two,
.clinica-form-enhanced .form-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field-full {
  grid-column: 1 / -1;
}

.entity-warning {
  padding: 12px 14px;
  border: 1px solid #f59e0b;
  border-radius: 14px;
  color: #92400e;
  background: #fffbeb;
  font-size: 0.9rem;
  font-weight: 700;
}

.table-panel-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 10px;
  border-bottom: 1px solid var(--gray-200);
}

.table-panel-header h2 {
  margin: 0 0 4px;
  color: var(--blue-900);
  font-size: 1.05rem;
}

.table-panel-header p {
  margin: 0;
  color: var(--gray-600);
  font-size: 0.88rem;
}

.entity-search-label {
  min-width: min(320px, 100%);
  color: var(--gray-700);
  font-size: 0.82rem;
}

.entity-search-input {
  min-height: 42px;
}

.tutor-table-panel .table-scroll {
  padding-top: 0;
}

@media (max-width: 980px) {
  .split-panel-wide,
  .tutor-form-enhanced .form-grid-two,
  .clinica-form-enhanced .form-grid-two {
    grid-template-columns: 1fr;
  }

  .table-panel-header {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Cadastro de pacientes + endereço do tutor - ajuste isolado */
.paciente-form-enhanced .form-grid-two,
.tutor-form-enhanced .form-grid-two,
.clinica-form-enhanced .form-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.paciente-table-panel .table-scroll,
.tutor-table-panel .table-scroll,
.clinica-table-panel .table-scroll {
  padding-top: 0;
}

.entity-info {
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  color: var(--blue-900);
  background: #eef6ff;
  font-size: 0.88rem;
  font-weight: 700;
}

.entity-info.is-error {
  border-color: #f59e0b;
  color: #92400e;
  background: #fffbeb;
}

#pacienteTutorSelect:invalid {
  color: var(--gray-500);
}

#pacienteTutorSelect option {
  color: var(--gray-900);
}

@media (max-width: 980px) {
  .paciente-form-enhanced .form-grid-two,
  .tutor-form-enhanced .form-grid-two,
  .clinica-form-enhanced .form-grid-two {
    grid-template-columns: 1fr;
  }
}


/* Guia da integração WhatsApp por usuário */
.whatsapp-help-box {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.whatsapp-help-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.whatsapp-help-heading h3 {
  margin: 2px 0 0;
  color: var(--blue-900);
  font-size: 1.05rem;
}

.whatsapp-help-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 999px;
  color: #075e54;
  background: #dcfce7;
  font-size: 0.76rem;
  font-weight: 800;
}

.whatsapp-help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.whatsapp-help-grid article {
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.whatsapp-help-grid strong {
  display: block;
  margin-bottom: 5px;
  color: var(--gray-900);
  font-size: 0.9rem;
}

.whatsapp-help-grid p,
.whatsapp-help-note {
  margin: 0;
  color: var(--gray-600);
  font-size: 0.84rem;
  line-height: 1.45;
}

.whatsapp-help-note {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-radius: 14px;
  color: #78350f;
  background: #fffbeb;
}

@media (max-width: 760px) {
  .whatsapp-help-heading {
    flex-direction: column;
  }
  .whatsapp-help-grid {
    grid-template-columns: 1fr;
  }
}

/* Dados iniciais do laudo - seleção inteligente isolada */
.smart-form-panel {
  position: relative;
  overflow: hidden;
}

.smart-form-panel::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--green-600), var(--blue-600));
  content: "";
}

.smart-heading {
  margin-left: 2px;
}

.smart-step {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  margin-bottom: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #0a7f4f;
  background: #eaf5ef;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.smart-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #dbe6ee;
  border-radius: 12px;
  background: #f8fbfd;
}

.smart-search-label {
  display: grid;
  gap: 7px;
  color: #092f48;
  font-weight: 800;
}

.smart-search-label input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c9d7e2;
  border-radius: 8px;
  padding: 12px 13px;
  font: inherit;
  color: #102536;
  background: #ffffff;
}

.smart-selected-card {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(46, 170, 95, 0.28);
  border-radius: 12px;
  background: #f0fbf5;
  color: #083b5b;
  font-size: 0.9rem;
  font-weight: 700;
}

.smart-selected-card strong {
  display: block;
  margin-bottom: 3px;
  color: #07324a;
}

.smart-selected-card span {
  display: inline-flex;
  margin-right: 12px;
  color: #526375;
  font-size: 0.84rem;
  font-weight: 700;
}

@media (max-width: 760px) {
  .smart-search-row {
    grid-template-columns: 1fr;
  }

  .smart-search-row .button {
    width: 100%;
    justify-content: center;
  }
}


.support-settings-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.15rem;
  margin: 1rem 0;
  border: 1px solid var(--border-color, #d7e4ee);
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fcff, #eef8f4);
  box-shadow: 0 12px 28px rgba(8, 59, 91, 0.08);
}

.support-settings-card h2 {
  margin: 0.15rem 0 0.25rem;
  color: var(--primary-color, #083b5b);
  font-size: 1.05rem;
}

.support-settings-card p {
  margin: 0;
  color: var(--text-muted, #587084);
  font-size: 0.92rem;
}

.support-settings-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.support-contact-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(8, 59, 91, 0.16);
  border-radius: 999px;
  background: #ffffff;
  color: var(--primary-color, #083b5b);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.support-contact-pill.is-muted {
  color: #6f8292;
  background: #f3f7fa;
  cursor: default;
}

@media (max-width: 760px) {
  .support-settings-card {
    align-items: stretch;
    flex-direction: column;
  }

  .support-settings-actions {
    justify-content: flex-start;
  }

  .support-contact-pill {
    width: 100%;
    white-space: normal;
  }
}

/* Fix 2026-06-18: downloaded PDF header, logo and signature match the live preview. */
.pdf-export-host .pdf-report-modelo-enviado .pdf-text-page,
.pdf-export-host .pdf-report-modelo-enviado .pdf-image-page {
  padding: 7mm 10mm 7mm !important;
}

.pdf-export-host .pdf-report-modelo-enviado .pdf-new-model-header,
.pdf-export-host .pdf-report-paginated .pdf-new-model-header,
.pdf-export-host .pdf-live-header,
.pdf-export-sheet .pdf-live-header {
  align-items: center !important;
  background: #f7fbfb !important;
  column-gap: 5mm !important;
  display: grid !important;
  gap: 0 5mm !important;
  grid-template-columns: minmax(32mm, 42mm) minmax(48mm, 1fr) minmax(38mm, 46mm) !important;
  margin: 0 0 3mm !important;
  min-height: 17mm !important;
  overflow: hidden !important;
  padding: 0 0 2mm !important;
}

.pdf-export-host .pdf-report-modelo-enviado .pdf-client-logo-box,
.pdf-export-host .pdf-report-paginated .pdf-client-logo-box,
.pdf-export-host .pdf-new-model-header .pdf-client-logo-box {
  align-self: center !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-sizing: border-box !important;
  color: var(--pdf-color, #083b5b) !important;
  height: 14mm !important;
  justify-self: start !important;
  max-height: 14mm !important;
  max-width: 42mm !important;
  min-height: 11mm !important;
  min-width: 0 !important;
  overflow: hidden !important;
  padding: 1mm 2mm !important;
  width: 100% !important;
}

.pdf-export-host .pdf-report-modelo-enviado .pdf-header-logo,
.pdf-export-host .pdf-report-paginated .pdf-header-logo,
.pdf-export-host .pdf-new-model-header .pdf-header-logo,
.pdf-export-host img[data-pdf-image="logo"] {
  display: block !important;
  height: auto !important;
  max-height: 12mm !important;
  max-width: 38mm !important;
  min-height: 0 !important;
  object-fit: contain !important;
  width: auto !important;
}

.pdf-export-host .pdf-report-modelo-enviado .pdf-live-header-main,
.pdf-export-host .pdf-report-paginated .pdf-live-header-main,
.pdf-export-host .pdf-new-model-header .pdf-live-header-main {
  justify-self: center !important;
  min-width: 0 !important;
  text-align: center !important;
}

.pdf-export-host .pdf-report-modelo-enviado .pdf-live-header-main strong,
.pdf-export-host .pdf-report-paginated .pdf-live-header-main strong,
.pdf-export-host .pdf-new-model-header .pdf-live-header-main strong {
  color: var(--pdf-color, #083b5b) !important;
  font-size: 12.5px !important;
  font-weight: 900 !important;
  line-height: 1.08 !important;
}

.pdf-export-host .pdf-report-modelo-enviado .pdf-live-header-main span,
.pdf-export-host .pdf-report-paginated .pdf-live-header-main span,
.pdf-export-host .pdf-new-model-header .pdf-live-header-main span {
  color: #667085 !important;
  font-size: 6.8px !important;
  line-height: 1.25 !important;
}

.pdf-export-host .pdf-report-modelo-enviado .pdf-professional-lines,
.pdf-export-host .pdf-report-paginated .pdf-professional-lines,
.pdf-export-host .pdf-new-model-header .pdf-professional-lines {
  align-self: center !important;
  color: var(--pdf-color, #083b5b) !important;
  display: grid !important;
  font-size: 6.8px !important;
  gap: .45mm !important;
  justify-self: stretch !important;
  line-height: 1.15 !important;
  max-width: 46mm !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-align: left !important;
}

.pdf-export-host .pdf-report-modelo-enviado .pdf-professional-lines div,
.pdf-export-host .pdf-report-paginated .pdf-professional-lines div,
.pdf-export-host .pdf-new-model-header .pdf-professional-lines div {
  align-items: baseline !important;
  display: flex !important;
  gap: 1.2mm !important;
  min-width: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

.pdf-export-host .pdf-report-modelo-enviado .pdf-professional-lines strong,
.pdf-export-host .pdf-report-paginated .pdf-professional-lines strong,
.pdf-export-host .pdf-new-model-header .pdf-professional-lines strong {
  display: inline !important;
  flex: 0 0 auto !important;
  font-size: 6.8px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
}

.pdf-export-host .pdf-report-modelo-enviado .pdf-professional-lines span,
.pdf-export-host .pdf-report-paginated .pdf-professional-lines span,
.pdf-export-host .pdf-new-model-header .pdf-professional-lines span {
  border-bottom: 1px solid #77808c !important;
  color: #172033 !important;
  display: inline !important;
  flex: 1 1 auto !important;
  font-size: 6.8px !important;
  line-height: 1.15 !important;
  min-width: 8mm !important;
  overflow: hidden !important;
  padding: 0 1mm .3mm !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.pdf-export-host .pdf-report-modelo-enviado .pdf-header-rule,
.pdf-export-host .pdf-report-paginated .pdf-header-rule,
.pdf-export-host .pdf-new-model-header .pdf-header-rule {
  background: linear-gradient(90deg, #119d7b 0 25%, var(--pdf-color, #083b5b) 25% 100%) !important;
  grid-column: 1 / -1 !important;
  height: 2px !important;
  margin-top: 1.4mm !important;
}

/* Correção 2026-06-19: botões de achados por órgão/exame no editor técnico */
.field-suggestion-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  flex: 1 1 260px;
}

.finding-suggestion-button {
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 6px 10px;
  background: #ffffff;
  color: var(--blue-900);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.finding-suggestion-button:hover,
.finding-suggestion-button:focus-visible {
  background: #eef7ff;
  border-color: #9ec7e8;
  outline: none;
  transform: translateY(-1px);
}

@media (max-width: 720px) {
  .field-suggestion-actions {
    justify-content: flex-start;
    width: 100%;
  }
}

/* Performance 2026-06-19: feedback rápido ao baixar/imprimir PDF. */
button.is-loading,
.button.is-loading,
.icon-button.is-loading {
  opacity: 0.72;
  pointer-events: none;
  cursor: progress;
}
button:disabled,
.button:disabled,
.icon-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Correção 2026-06-19: cabeçalho da prévia/PDF sem corte vertical. */
.pdf-report-paginated .pdf-new-model-header,
.pdf-export-host .pdf-report-paginated .pdf-new-model-header,
.pdf-export-host .pdf-report-modelo-enviado .pdf-new-model-header,
.pdf-export-host .pdf-live-header,
.pdf-export-sheet .pdf-live-header {
  min-height: 23mm !important;
  overflow: visible !important;
  padding: 1mm 0 2.5mm !important;
}

.pdf-report-paginated .pdf-new-model-header .pdf-client-logo-box,
.pdf-export-host .pdf-report-paginated .pdf-client-logo-box,
.pdf-export-host .pdf-report-modelo-enviado .pdf-client-logo-box,
.pdf-export-host .pdf-new-model-header .pdf-client-logo-box {
  height: 16mm !important;
  max-height: 16mm !important;
  min-height: 14mm !important;
}

.pdf-report-paginated .pdf-new-model-header .pdf-header-logo,
.pdf-export-host .pdf-report-paginated .pdf-header-logo,
.pdf-export-host .pdf-report-modelo-enviado .pdf-header-logo,
.pdf-export-host .pdf-new-model-header .pdf-header-logo {
  max-height: 14mm !important;
}

.pdf-report-paginated .pdf-new-model-header .pdf-live-header-main,
.pdf-export-host .pdf-report-paginated .pdf-live-header-main,
.pdf-export-host .pdf-report-modelo-enviado .pdf-live-header-main,
.pdf-export-host .pdf-new-model-header .pdf-live-header-main {
  align-self: center !important;
  overflow: visible !important;
}

.pdf-report-paginated .pdf-new-model-header .pdf-live-header-main strong,
.pdf-export-host .pdf-report-paginated .pdf-live-header-main strong,
.pdf-export-host .pdf-report-modelo-enviado .pdf-live-header-main strong,
.pdf-export-host .pdf-new-model-header .pdf-live-header-main strong {
  line-height: 1.2 !important;
  overflow: visible !important;
}

.pdf-report-paginated .pdf-new-model-header .pdf-live-header-main span,
.pdf-export-host .pdf-report-paginated .pdf-live-header-main span,
.pdf-export-host .pdf-report-modelo-enviado .pdf-live-header-main span,
.pdf-export-host .pdf-new-model-header .pdf-live-header-main span {
  line-height: 1.2 !important;
  overflow: visible !important;
}

.pdf-report-paginated .pdf-new-model-header .pdf-professional-lines,
.pdf-export-host .pdf-report-paginated .pdf-professional-lines,
.pdf-export-host .pdf-report-modelo-enviado .pdf-professional-lines,
.pdf-export-host .pdf-new-model-header .pdf-professional-lines {
  gap: .7mm !important;
  line-height: 1.2 !important;
  overflow: visible !important;
}

/* Correção 2026-06-23: evita texto fatiado no PDF gerado por html2canvas. */
.pdf-report-paginated .pdf-new-model-header,
.pdf-report-paginated .pdf-new-patient-card,
.pdf-report-paginated .pdf-new-patient-card .pdf-info-row,
.pdf-report-paginated .pdf-new-patient-card .pdf-info-item,
.pdf-report-paginated .pdf-new-patient-card .pdf-info-item strong,
.pdf-report-paginated .pdf-new-patient-card .pdf-info-item span,
.pdf-export-host .pdf-report-paginated .pdf-new-model-header,
.pdf-export-host .pdf-report-paginated .pdf-new-patient-card,
.pdf-export-host .pdf-report-paginated .pdf-new-patient-card .pdf-info-row,
.pdf-export-host .pdf-report-paginated .pdf-new-patient-card .pdf-info-item,
.pdf-export-host .pdf-report-paginated .pdf-new-patient-card .pdf-info-item strong,
.pdf-export-host .pdf-report-paginated .pdf-new-patient-card .pdf-info-item span {
  height: auto !important;
  overflow: visible !important;
}

.pdf-report-paginated .pdf-new-patient-card .pdf-info-row,
.pdf-export-host .pdf-report-paginated .pdf-new-patient-card .pdf-info-row {
  min-height: 5.8mm !important;
}

.pdf-report-paginated .pdf-new-patient-card .pdf-info-item,
.pdf-export-host .pdf-report-paginated .pdf-new-patient-card .pdf-info-item {
  line-height: 1.35 !important;
  padding-bottom: .6mm !important;
}

.pdf-report-paginated .pdf-new-patient-card .pdf-info-item strong,
.pdf-report-paginated .pdf-new-patient-card .pdf-info-item span,
.pdf-export-host .pdf-report-paginated .pdf-new-patient-card .pdf-info-item strong,
.pdf-export-host .pdf-report-paginated .pdf-new-patient-card .pdf-info-item span {
  line-height: 1.35 !important;
  overflow: visible !important;
}

/* Correção 2026-06-23: remove traços/sublinhados dos dados no laudo e na prévia. */
.pdf-new-model-header .pdf-professional-lines span,
.pdf-report-paginated .pdf-new-model-header .pdf-professional-lines span,
.pdf-export-host .pdf-report-paginated .pdf-professional-lines span,
.pdf-export-host .pdf-report-modelo-enviado .pdf-professional-lines span,
.pdf-export-host .pdf-new-model-header .pdf-professional-lines span,
.pdf-new-patient-card .pdf-info-item span,
.pdf-report-paginated .pdf-new-patient-card .pdf-info-item span,
.pdf-export-host .pdf-report-paginated .pdf-new-patient-card .pdf-info-item span,
.pdf-export-host .pdf-report-modelo-enviado .pdf-new-patient-card .pdf-info-item span {
  border-bottom: 0 !important;
  text-decoration: none !important;
}

.pdf-new-model-header .pdf-professional-lines span,
.pdf-report-paginated .pdf-new-model-header .pdf-professional-lines span,
.pdf-export-host .pdf-report-paginated .pdf-professional-lines span,
.pdf-export-host .pdf-report-modelo-enviado .pdf-professional-lines span,
.pdf-export-host .pdf-new-model-header .pdf-professional-lines span {
  padding-bottom: 0 !important;
}

.pdf-new-patient-card .pdf-info-item span,
.pdf-report-paginated .pdf-new-patient-card .pdf-info-item span,
.pdf-export-host .pdf-report-paginated .pdf-new-patient-card .pdf-info-item span,
.pdf-export-host .pdf-report-modelo-enviado .pdf-new-patient-card .pdf-info-item span {
  padding-left: 2px !important;
  padding-right: 0 !important;
}

/* Correção 2026-06-23: bloco Profissional/CRMV/Telefone legível no cabeçalho. */
.pdf-new-model-header .pdf-professional-lines,
.pdf-report-paginated .pdf-new-model-header .pdf-professional-lines,
.pdf-export-host .pdf-report-paginated .pdf-professional-lines,
.pdf-export-host .pdf-report-modelo-enviado .pdf-professional-lines,
.pdf-export-host .pdf-new-model-header .pdf-professional-lines {
  align-self: center !important;
  display: grid !important;
  gap: .9mm !important;
  justify-self: end !important;
  line-height: 1.25 !important;
  max-width: 54mm !important;
  min-width: 40mm !important;
  overflow: visible !important;
  text-align: left !important;
}

.pdf-new-model-header .pdf-professional-lines div,
.pdf-report-paginated .pdf-new-model-header .pdf-professional-lines div,
.pdf-export-host .pdf-report-paginated .pdf-professional-lines div,
.pdf-export-host .pdf-report-modelo-enviado .pdf-professional-lines div,
.pdf-export-host .pdf-new-model-header .pdf-professional-lines div {
  align-items: baseline !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  gap: 1.2mm !important;
  min-height: 3.6mm !important;
  overflow: visible !important;
  white-space: nowrap !important;
}

.pdf-new-model-header .pdf-professional-lines strong,
.pdf-new-model-header .pdf-professional-lines span,
.pdf-report-paginated .pdf-new-model-header .pdf-professional-lines strong,
.pdf-report-paginated .pdf-new-model-header .pdf-professional-lines span,
.pdf-export-host .pdf-report-paginated .pdf-professional-lines strong,
.pdf-export-host .pdf-report-paginated .pdf-professional-lines span,
.pdf-export-host .pdf-report-modelo-enviado .pdf-professional-lines strong,
.pdf-export-host .pdf-report-modelo-enviado .pdf-professional-lines span,
.pdf-export-host .pdf-new-model-header .pdf-professional-lines strong,
.pdf-export-host .pdf-new-model-header .pdf-professional-lines span {
  border-bottom: 0 !important;
  display: inline !important;
  font-size: 7.8px !important;
  line-height: 1.25 !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: 0 !important;
  text-decoration: none !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

/* Ajuste 2026-06-23: melhora legibilidade do texto e preserva fotos no laudo/PDF. */
.pdf-report-paginated .pdf-section-body,
.pdf-report-paginated .pdf-live-section > p,
.pdf-report-paginated .pdf-live-section ul,
.pdf-report-paginated .pdf-live-table,
.pdf-export-host .pdf-report-paginated .pdf-section-body,
.pdf-export-host .pdf-report-paginated .pdf-live-section > p,
.pdf-export-host .pdf-report-paginated .pdf-live-section ul,
.pdf-export-host .pdf-report-paginated .pdf-live-table {
  color: #182536 !important;
  font-size: 8.9px !important;
  font-weight: 500 !important;
  line-height: 1.34 !important;
}

.pdf-report-paginated .pdf-section-body strong,
.pdf-report-paginated .pdf-live-section p strong,
.pdf-export-host .pdf-report-paginated .pdf-section-body strong,
.pdf-export-host .pdf-report-paginated .pdf-live-section p strong {
  color: #102f44 !important;
  font-weight: 900 !important;
}

.pdf-report-paginated .pdf-live-section h3,
.pdf-report-paginated .pdf-image-page h3,
.pdf-export-host .pdf-report-paginated .pdf-live-section h3,
.pdf-export-host .pdf-report-paginated .pdf-image-page h3 {
  font-size: 8.9px !important;
  line-height: 1.22 !important;
}

.pdf-report-paginated .pdf-exam-title,
.pdf-export-host .pdf-report-paginated .pdf-exam-title {
  font-size: 12.8px !important;
  line-height: 1.2 !important;
}

.pdf-report-paginated .pdf-new-patient-card .pdf-info-item,
.pdf-export-host .pdf-report-paginated .pdf-new-patient-card .pdf-info-item {
  font-size: 7.8px !important;
  line-height: 1.34 !important;
}

.pdf-report-paginated .pdf-images-grid img,
.pdf-export-host .pdf-report-paginated .pdf-images-grid img {
  background: #ffffff !important;
  image-rendering: auto !important;
}

/* Ajuste 2026-06-24: imagens do laudo sem achatamento. */
.pdf-live-images img,
.pdf-report-paginated .pdf-images-grid img,
.pdf-export-host .pdf-live-images img,
.pdf-export-host .pdf-report-paginated .pdf-images-grid img {
  aspect-ratio: auto !important;
  height: var(--pdf-image-height, auto);
  max-height: 100% !important;
  max-width: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  width: 100% !important;
}

.pdf-report-paginated .pdf-images-grid.is-layout-8 img { --pdf-image-height: 35mm; height: 35mm !important; }
.pdf-report-paginated .pdf-images-grid.is-layout-6 img { --pdf-image-height: 48mm; height: 48mm !important; }
.pdf-report-paginated .pdf-images-grid.is-layout-4 img { --pdf-image-height: 76mm; height: 76mm !important; }
.pdf-report-paginated .pdf-images-grid.is-layout-2 img { --pdf-image-height: 110mm; height: 110mm !important; }
.pdf-report-paginated .pdf-images-grid.is-layout-1 img { --pdf-image-height: 178mm; height: 178mm !important; }


/* v13 — carregamento leve e painel administrativo */
.admin-page-subtitle { margin: .35rem 0 0; color: var(--muted, #667085); }
.admin-stat-card { min-height: 104px; display: grid; align-content: space-between; }
.admin-stat-card.is-success { border-color: rgba(20, 140, 90, .22); }
.admin-stat-card.is-warning { border-color: rgba(217, 140, 0, .25); }
.admin-stat-card.is-danger { border-color: rgba(196, 55, 55, .25); }
.admin-stat-card.is-skeleton span,
.admin-stat-card.is-skeleton strong,
.admin-skeleton-row span,
.admin-attention-skeleton { display: block; border-radius: 8px; background: linear-gradient(90deg, #edf1f5 25%, #f7f9fb 40%, #edf1f5 65%); background-size: 400% 100%; animation: medvetSkeleton 1.2s ease-in-out infinite; }
.admin-stat-card.is-skeleton span { width: 55%; height: 12px; }
.admin-stat-card.is-skeleton strong { width: 35%; height: 28px; }
.admin-skeleton-row td { padding: 1rem; }
.admin-skeleton-row span { width: 100%; height: 22px; }
@keyframes medvetSkeleton { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.admin-attention-panel { margin: 1.25rem 0; padding: 1.1rem 1.25rem; border: 1px solid var(--border, #e6ebf0); border-radius: 16px; background: #fff; }
.admin-attention-list { display: flex; flex-wrap: wrap; gap: .7rem; list-style: none; padding: 0; margin: .8rem 0 0; }
.admin-attention-list li { margin: 0; }
.admin-attention-button { display: flex; gap: .55rem; align-items: center; border: 1px solid #e2e8f0; border-radius: 10px; padding: .65rem .8rem; background: #fff; color: inherit; cursor: pointer; text-align: left; }
.admin-attention-button:hover { border-color: #7fb4d8; background: #f7fbff; }
.admin-attention-button strong { color: var(--primary, #0a5f99); font-size: 1.05rem; }
.admin-attention-skeleton { width: 230px; height: 43px; }
.admin-users-heading { align-items: flex-end; gap: 1rem; }
.admin-table-filters { display: flex; gap: .65rem; align-items: center; flex-wrap: wrap; }
.admin-table-filters input { min-width: 250px; }
.admin-row-actions { min-width: 315px; }
.table-subtext { display: block; margin-top: .2rem; color: var(--muted, #667085); font-size: .8rem; }
@media (max-width: 760px) {
  .admin-table-filters { width: 100%; }
  .admin-table-filters input, .admin-table-filters select { width: 100%; min-width: 0; }
  .admin-users-heading { align-items: stretch; }
  .admin-attention-list { display: grid; grid-template-columns: 1fr; }
  .admin-attention-button { width: 100%; }
}


#dashboardStats [data-stat].is-dashboard-skeleton { display: inline-block; width: 42px; height: 26px; border-radius: 7px; color: transparent; background: linear-gradient(90deg, #edf1f5 25%, #f7f9fb 40%, #edf1f5 65%); background-size: 400% 100%; animation: medvetSkeleton 1.2s ease-in-out infinite; }
.dashboard-skeleton-row td { padding: .85rem 1rem; }
.dashboard-skeleton-row span { display: block; width: 100%; height: 20px; border-radius: 7px; background: linear-gradient(90deg, #edf1f5 25%, #f7f9fb 40%, #edf1f5 65%); background-size: 400% 100%; animation: medvetSkeleton 1.2s ease-in-out infinite; }

#examSpecificFields [data-ultrasound-organ][hidden] {
  display: none !important;
}


/* Visualização somente leitura de laudo salvo */
.laudo-viewer-modal[hidden] {
  display: none;
}

.laudo-viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
}

.laudo-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 27, 43, 0.58);
}

.laudo-viewer-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1180px, 100%);
  max-height: min(92vh, 1000px);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: calc(var(--radius) + 4px);
  background: #fff;
  box-shadow: 0 24px 70px rgba(4, 27, 43, 0.28);
}

.laudo-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.laudo-viewer-header h2 {
  margin: 3px 0 0;
  color: var(--blue-900);
  font-size: 1.2rem;
}

.laudo-viewer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.laudo-viewer-content {
  overflow: auto;
  padding: 26px;
  background: #eaf1f5;
}

.laudo-viewer-content .pdf-sheet {
  margin: 0 auto;
}

body.laudo-viewer-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .laudo-viewer-modal {
    padding: 8px;
  }

  .laudo-viewer-dialog {
    width: 100%;
    max-height: calc(100vh - 16px);
    border-radius: var(--radius);
  }

  .laudo-viewer-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .laudo-viewer-actions {
    width: 100%;
    justify-content: stretch;
  }

  .laudo-viewer-actions .button {
    flex: 1;
  }

  .laudo-viewer-content {
    padding: 12px;
  }
}


/* v22 — imagens dos laudos: ampliar em tela e preservar renderização no PDF */
img[data-report-image],
img[data-image-zoom] {
  cursor: zoom-in;
}

.report-image-lightbox {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 12000;
}

.report-image-lightbox[hidden] {
  display: none;
}

.report-image-lightbox-backdrop {
  background: rgba(5, 15, 26, 0.76);
  inset: 0;
  position: absolute;
}

.report-image-lightbox-dialog {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 48px);
  max-width: min(1120px, calc(100vw - 48px));
  position: relative;
  width: fit-content;
  z-index: 1;
}

.report-image-lightbox-dialog img {
  background: #101820;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
  display: block;
  max-height: calc(100vh - 116px);
  max-width: min(1120px, calc(100vw - 48px));
  object-fit: contain;
}

.report-image-lightbox-dialog p {
  color: #ffffff;
  font-size: 0.9rem;
  margin: 0;
  max-width: 100%;
  text-align: center;
}

.report-image-lightbox-close {
  align-items: center;
  background: #ffffff;
  border: 0;
  border-radius: 999px;
  color: #0b3857;
  cursor: pointer;
  display: inline-flex;
  font-size: 1.5rem;
  height: 38px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: -14px;
  top: -14px;
  width: 38px;
  z-index: 2;
}

body.report-image-lightbox-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .report-image-lightbox {
    padding: 14px;
  }
  .report-image-lightbox-dialog,
  .report-image-lightbox-dialog img {
    max-width: calc(100vw - 28px);
  }
  .report-image-lightbox-dialog img {
    max-height: calc(100vh - 88px);
  }
  .report-image-lightbox-close {
    right: -4px;
    top: -4px;
  }
}


/* V23: indica que as imagens anexadas possuem link para o arquivo original no PDF baixado. */
.pdf-image-open-hint {
  display: block;
  margin-top: 2px;
  color: #2b6a9a;
  font-size: 0.72em;
  font-weight: 700;
}

.pdf-export-host .pdf-image-open-hint {
  color: #2b6a9a !important;
}


.auth-verification-note {
  margin: 0.85rem 0 0;
  color: var(--gray-600);
  font-size: 0.85rem;
  line-height: 1.45;
}

/* v26 — preservar proporção das imagens no laudo e no PDF */
.image-item img,
.report-images-grid img,
.report-images-list img,
img[data-image-zoom],
img[data-report-image] {
  object-fit: contain !important;
  object-position: center center !important;
  background: #f4f7fa !important;
}

.image-item {
  align-items: start !important;
}

.image-item img {
  width: 130px !important;
  height: 96px !important;
  max-width: 100% !important;
  border-radius: 8px !important;
}

.pdf-live-images,
.pdf-images-grid {
  align-items: start;
}

.pdf-live-images figure,
.pdf-report-paginated .pdf-images-grid figure,
.pdf-export-host .pdf-report-paginated .pdf-images-grid figure,
.pdf-images-grid figure {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

.pdf-live-images img,
.pdf-export-host .pdf-live-images img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 220px !important;
  object-fit: contain !important;
  object-position: center center !important;
  margin: 0 auto !important;
  display: block !important;
}

.pdf-images-grid img,
.pdf-report-paginated .pdf-images-grid img,
.pdf-export-host .pdf-report-paginated .pdf-images-grid img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  margin: 0 auto !important;
  display: block !important;
}

.pdf-images-grid.is-layout-8 img,
.pdf-report-paginated .pdf-images-grid.is-layout-8 img,
.pdf-export-host .pdf-report-paginated .pdf-images-grid.is-layout-8 img { max-height: 35mm !important; }

.pdf-images-grid.is-layout-6 img,
.pdf-report-paginated .pdf-images-grid.is-layout-6 img,
.pdf-export-host .pdf-report-paginated .pdf-images-grid.is-layout-6 img { max-height: 48mm !important; }

.pdf-images-grid.is-layout-4 img,
.pdf-report-paginated .pdf-images-grid.is-layout-4 img,
.pdf-export-host .pdf-report-paginated .pdf-images-grid.is-layout-4 img { max-height: 76mm !important; }

.pdf-images-grid.is-layout-2 img,
.pdf-report-paginated .pdf-images-grid.is-layout-2 img,
.pdf-export-host .pdf-report-paginated .pdf-images-grid.is-layout-2 img { max-height: 110mm !important; }

.pdf-images-grid.is-layout-1 img,
.pdf-report-paginated .pdf-images-grid.is-layout-1 img,
.pdf-export-host .pdf-report-paginated .pdf-images-grid.is-layout-1 img { max-height: 178mm !important; }

@media (max-width: 720px) {
  .image-item img {
    width: 100% !important;
    height: 180px !important;
  }
}

/* v26 — preservar proporção das imagens no laudo e no PDF */
.image-item img,
.report-images-grid img,
.report-images-list img,
img[data-image-zoom],
img[data-report-image] {
  object-fit: contain !important;
  object-position: center center !important;
  background: #f4f7fa !important;
}

.image-item {
  align-items: start !important;
}

.image-item img {
  width: 130px !important;
  height: 96px !important;
  max-width: 100% !important;
  border-radius: 8px !important;
}

.pdf-live-images,
.pdf-images-grid {
  align-items: start;
}

.pdf-live-images figure,
.pdf-report-paginated .pdf-images-grid figure,
.pdf-export-host .pdf-report-paginated .pdf-images-grid figure,
.pdf-images-grid figure {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

.pdf-live-images img,
.pdf-export-host .pdf-live-images img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 220px !important;
  object-fit: contain !important;
  object-position: center center !important;
  margin: 0 auto !important;
  display: block !important;
}

.pdf-images-grid img,
.pdf-report-paginated .pdf-images-grid img,
.pdf-export-host .pdf-report-paginated .pdf-images-grid img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  margin: 0 auto !important;
  display: block !important;
}

.pdf-images-grid.is-layout-8 img,
.pdf-report-paginated .pdf-images-grid.is-layout-8 img,
.pdf-export-host .pdf-report-paginated .pdf-images-grid.is-layout-8 img { max-height: 35mm !important; }

.pdf-images-grid.is-layout-6 img,
.pdf-report-paginated .pdf-images-grid.is-layout-6 img,
.pdf-export-host .pdf-report-paginated .pdf-images-grid.is-layout-6 img { max-height: 48mm !important; }

.pdf-images-grid.is-layout-4 img,
.pdf-report-paginated .pdf-images-grid.is-layout-4 img,
.pdf-export-host .pdf-report-paginated .pdf-images-grid.is-layout-4 img { max-height: 76mm !important; }

.pdf-images-grid.is-layout-2 img,
.pdf-report-paginated .pdf-images-grid.is-layout-2 img,
.pdf-export-host .pdf-report-paginated .pdf-images-grid.is-layout-2 img { max-height: 110mm !important; }

.pdf-images-grid.is-layout-1 img,
.pdf-report-paginated .pdf-images-grid.is-layout-1 img,
.pdf-export-host .pdf-report-paginated .pdf-images-grid.is-layout-1 img { max-height: 178mm !important; }

@media (max-width: 720px) {
  .image-item img {
    width: 100% !important;
    height: 180px !important;
  }
}


/* v30 — contatos oficiais e fluxo de tutor */
.site-footer .footer-contact-link {
  color: inherit;
  text-decoration: none;
}

.site-footer .footer-contact-link:hover,
.site-footer .footer-contact-link:focus-visible {
  color: var(--white);
  text-decoration: underline;
}

.subscription-contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 0;
  padding: 20px 22px;
  border: 1px solid rgba(8, 59, 91, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f5fbff, #f2fbf7);
  box-shadow: var(--soft-shadow);
}

.subscription-contact-card h2 {
  margin: 6px 0;
  color: var(--blue-900);
  font-size: 1.2rem;
}

.subscription-contact-card p {
  margin: 0;
  color: var(--gray-600);
}

.subscription-contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.subscription-contact-links a {
  display: grid;
  gap: 3px;
  min-width: 220px;
  padding: 11px 14px;
  border: 1px solid rgba(8, 59, 91, 0.15);
  border-radius: 12px;
  background: var(--white);
  color: var(--blue-900);
  text-decoration: none;
}

.subscription-contact-links a:hover,
.subscription-contact-links a:focus-visible {
  border-color: var(--green-600);
  box-shadow: 0 7px 18px rgba(8, 59, 91, 0.12);
}

.subscription-contact-links span {
  color: var(--gray-600);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.subscription-contact-links strong {
  font-size: 0.96rem;
}

@media (max-width: 760px) {
  .subscription-contact-card {
    align-items: stretch;
    flex-direction: column;
  }

  .subscription-contact-links {
    justify-content: stretch;
  }

  .subscription-contact-links a {
    min-width: 0;
    width: 100%;
  }
}
