:root {
  /* Marca Nuno Teixeira / Nuvipama — dourado + laranja (alinhado ao site de referência) */
  --brand-gold: #9a8648;
  --brand-gold-dark: #7a6a38;
  --brand-gold-mid: #b8a56a;
  --brand-gold-light: #d4c896;
  --brand-gold-glow: rgba(184, 165, 106, 0.42);
  --brand-orange: #e46912;
  --brand-orange-dark: #c2410c;
  --brand-orange-glow: rgba(228, 105, 18, 0.42);

  --navy-950: #0a1628;
  --navy-900: #0f2744;
  --navy-800: #152a45;
  --navy-700: #1e3a5f;
  --green-500: #22c55e;
  --green-400: #4ade80;
  --green-glow: rgba(34, 197, 94, 0.45);
  --surface: #ffffff;
  --bg-page: #f4f2ec;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e8e4dc;
  --radius: 14px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(15, 39, 68, 0.06);
  --shadow-md: 0 12px 40px rgba(15, 39, 68, 0.1);
  --shadow-pill: 0 4px 24px rgba(15, 39, 68, 0.08);
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-page);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-gold-dark);
}

a:hover {
  color: var(--brand-gold);
}

/* —— Top nav (referência Grupo Nuvipama) —— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, var(--brand-gold-mid) 0%, var(--brand-gold) 100%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.site-nav__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 1.25rem;
}

.site-nav__link {
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.45rem 0.65rem;
  border: none;
  background: transparent;
  color: #1a1a1a;
  cursor: pointer;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  display: inline-block;
}

.site-nav__link:hover {
  background: rgba(0, 0, 0, 0.08);
}

.site-nav__link[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* —— Hero referência —— */
.hero-ref {
  position: relative;
  min-height: min(58vh, 520px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem 3.5rem;
  background:
    linear-gradient(180deg, rgba(10, 22, 40, 0.72) 0%, rgba(10, 22, 40, 0.5) 100%),
    url("https://images.unsplash.com/photo-1565008576549-57569a49371d?auto=format&fit=crop&w=1920&q=80") center/cover no-repeat;
  color: #fff;
  text-align: center;
}

.hero-ref--douro {
  background:
    linear-gradient(180deg, rgba(10, 22, 40, 0.72) 0%, rgba(10, 22, 40, 0.5) 100%),
    url("https://images.unsplash.com/photo-1565008576549-57569a49371d?auto=format&fit=crop&w=1920&q=80") center/cover no-repeat;
}

.hero-ref__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.hero-ref__inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  width: 100%;
}

.hero-ref__title {
  margin: 0 0 2rem;
  font-size: clamp(1.65rem, 4.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hero-ref__brand {
  color: var(--brand-gold-light);
  display: inline-block;
}

.hero-ref__cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

.hero-ref__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 1.1rem 1.5rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--brand-gold-light) 0%, var(--brand-gold-mid) 100%);
  color: #1a1a1a;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s, box-shadow 0.2s;
}

.hero-ref__card strong {
  font-size: 1.05rem;
  font-weight: 700;
}

.hero-ref__card span {
  font-size: 0.82rem;
  margin-top: 0.2rem;
  opacity: 0.85;
}

.hero-ref__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
}

/* —— Página consulta documentos —— */
.consulta-page {
  padding: 2.5rem 1.25rem 3.5rem;
}

.consulta-page__head {
  max-width: 520px;
  margin: 0 auto 2rem;
  text-align: center;
}

.consulta-page__head h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--navy-900);
}

.consulta-page__head p {
  margin: 0;
  color: var(--muted);
}

.consulta-page__layout {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.consulta-page__login .hero__login-card {
  margin: 0;
}

.consulta-page__preview {
  min-width: 0;
}

.consulta-page__preview .doc-preview {
  margin-top: 0;
  min-height: min(70vh, 680px);
}

.consulta-page__preview .doc-preview__content {
  min-height: min(62vh, 600px);
}

.consulta-page__preview .doc-preview iframe {
  min-height: min(62vh, 600px);
  height: min(62vh, 600px);
}

@media (min-width: 1100px) {
  .consulta-page__preview .doc-preview {
    min-height: min(74vh, 760px);
  }

  .consulta-page__preview .doc-preview__content,
  .consulta-page__preview .doc-preview iframe {
    min-height: min(68vh, 700px);
    height: min(68vh, 700px);
  }
}

.consulta-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--navy-800);
}

.consulta-back:hover {
  color: var(--brand-gold-dark);
}

@media (max-width: 900px) {
  .consulta-page__layout {
    grid-template-columns: 1fr;
  }

  .consulta-page__preview .doc-preview {
    min-height: 440px;
  }

  .consulta-page__preview .doc-preview__content,
  .consulta-page__preview .doc-preview iframe {
    min-height: min(52vh, 480px);
    height: min(52vh, 480px);
  }
}

.doc-preview--below-hero {
  margin-top: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
}

.doc-preview--below-hero[hidden] {
  display: none !important;
}

/* —— Secções de conteúdo —— */
.page-sections {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}

.page-section {
  display: none;
}

.page-section.active {
  display: block;
}

.page-section__title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}

.page-section__intro {
  margin: -0.5rem 0 1.5rem;
  color: var(--muted);
  font-size: 1rem;
}

.prose {
  max-width: 720px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
}

.prose p {
  margin: 0 0 1rem;
}

.prose__lead {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy-800);
}

.prose h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.1rem;
  color: var(--navy-900);
}

.prose ul {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.contact-block {
  margin: 1.25rem 0;
}

.contact-block dt {
  font-weight: 700;
  color: var(--navy-900);
  margin-top: 0.85rem;
}

.contact-block dt:first-child {
  margin-top: 0;
}

.contact-block dd {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

/* —— WhatsApp flutuante —— */
.whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25d366;
  color: #fff;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
  transition: transform 0.15s, box-shadow 0.2s;
}

.whatsapp-float:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.55);
  color: #fff;
}

.whatsapp-float:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

/* —— Top header (legado) —— */
.top-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.top-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  max-width: min(100%, 22rem);
}

.brand__logo {
  height: 48px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.brand__title {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  color: var(--brand-gold);
  text-transform: none;
}

.brand__sub {
  font-size: 0.78rem;
  font-weight: 500;
  color: #8a7d5c;
  letter-spacing: 0.03em;
}

@media (max-width: 560px) {
  .brand__logo {
    height: 42px;
    max-width: 124px;
  }

  .brand__title {
    font-size: 0.92rem;
  }

  .brand__sub {
    font-size: 0.72rem;
  }
}

@media (max-width: 380px) {
  .brand__text {
    display: none;
  }

  .brand__logo {
    max-width: 168px;
    height: 46px;
  }
}

/* —— Tab pills —— */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.tabs button {
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
  background: rgba(255, 255, 255, 0.95);
  color: var(--navy-900);
  box-shadow: var(--shadow-pill);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.tabs button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(228, 105, 18, 0.15);
}

.tabs button[aria-selected="true"] {
  background: linear-gradient(180deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 22px var(--brand-orange-glow);
}

.tabs button[aria-selected="false"] {
  color: var(--navy-800);
}

.tabs button[aria-selected="false"]:hover {
  color: var(--brand-orange-dark);
  border-color: rgba(228, 105, 18, 0.35);
}

/* Link externo (Imobiliária) — mesmo estilo de pill que os separadores inativos */
.tabs .tabs__pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
  background: rgba(255, 255, 255, 0.95);
  color: var(--navy-800);
  box-shadow: var(--shadow-pill);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.tabs .tabs__pill-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(228, 105, 18, 0.15);
  color: var(--brand-orange-dark);
  border-color: rgba(228, 105, 18, 0.35);
}

.tabs .tabs__pill-link:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

/* —— Main & panels —— */
.main {
  min-height: 50vh;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.wrap--section {
  padding-top: 2rem;
  padding-bottom: 3.5rem;
}

/* —— Hero —— */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem 4rem;
  background:
    linear-gradient(115deg, rgba(10, 22, 40, 0.92) 0%, rgba(15, 39, 68, 0.88) 45%, rgba(30, 58, 95, 0.82) 100%),
    url("https://images.unsplash.com/photo-1545324418-cc1a3fa10c00?auto=format&fit=crop&w=1920&q=75") center/cover no-repeat;
  color: #fff;
}

.hero__split {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  align-items: center;
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
}

.hero__accent {
  color: var(--brand-gold-light);
  text-shadow: 0 0 36px rgba(212, 200, 150, 0.35);
}

.hero__lead {
  margin: 0 0 1.75rem;
  font-size: 1.05rem;
  opacity: 0.92;
  line-height: 1.6;
  max-width: 520px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* —— Hero Login Card —— */
.hero__login-card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.14);
  color: var(--text);
  position: relative;
  z-index: 1;
}

.hlc__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--navy-700), var(--navy-900));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 6px 20px rgba(15, 39, 68, 0.3);
}

.hlc__title {
  margin: 0 0 0.3rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}

.hlc__sub {
  margin: 0 0 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.hlc__form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.hlc__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hlc__field label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy-800);
}

.hlc__field input {
  font: inherit;
  font-size: 0.92rem;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.hlc__field input:focus {
  outline: none;
  border-color: var(--brand-gold-mid);
  box-shadow: 0 0 0 3px rgba(184, 165, 106, 0.22);
  background: #fff;
}

.hlc__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.8rem 1.25rem;
  margin-top: 0.25rem;
  border: none;
  border-radius: 12px;
  font: inherit;
  font-size: 0.93rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(180deg, var(--brand-gold-mid) 0%, var(--brand-gold) 100%);
  color: #fff;
  box-shadow: 0 4px 18px var(--brand-gold-glow);
  transition: transform 0.15s, box-shadow 0.2s;
}

.hlc__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--brand-gold-glow);
}

.hlc__note a {
  color: var(--brand-gold-dark);
  font-weight: 600;
  text-decoration: none;
}

.hlc__note a:hover {
  text-decoration: underline;
}

.hlc__note {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 1rem 0 0;
  font-size: 0.73rem;
  color: var(--muted);
  justify-content: center;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn--hero {
  background: linear-gradient(180deg, #f97316 0%, var(--brand-orange) 45%, var(--brand-orange-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 24px var(--brand-orange-glow), 0 2px 8px rgba(0, 0, 0, 0.12);
}

.btn--hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--brand-orange-glow);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn--primary {
  background: linear-gradient(180deg, var(--brand-gold-mid) 0%, var(--brand-gold) 100%);
  color: #fff;
  box-shadow: 0 4px 18px var(--brand-gold-glow);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 26px var(--brand-gold-glow);
  background: linear-gradient(180deg, var(--brand-gold-light) 0%, var(--brand-gold-mid) 100%);
}

.btn--wide {
  width: 100%;
  max-width: 100%;
}

/* —— Features —— */
.features {
  padding: 2.5rem 0 1rem;
}

.features__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 700;
  color: var(--navy-900);
  text-align: center;
  letter-spacing: -0.02em;
}

.features__subtitle {
  margin: 0 auto 2rem;
  max-width: 520px;
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.feature-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.35rem 1.15rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.feature-card__icon--green {
  background: rgba(228, 105, 18, 0.12);
  color: var(--brand-orange-dark);
}

.feature-card__icon--navy {
  background: rgba(30, 58, 95, 0.12);
  color: var(--navy-700);
}

.feature-card__h {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-900);
}

.feature-card__p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

/* —— Section headers —— */
.section-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-head__badge {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-head__badge--navy {
  background: rgba(30, 58, 95, 0.12);
  color: var(--navy-700);
}

.section-head__badge--green {
  background: rgba(228, 105, 18, 0.14);
  color: var(--brand-orange-dark);
}

.section-head__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}

.section-head__lead {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: 640px;
}

.intro-box {
  margin: 0 0 1.75rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
}

/* —— Cards —— */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 1.75rem;
}

.card--condo {
  padding: 1.75rem;
}

.card--form {
  padding: 1.75rem 1.5rem;
}

/* —— Condomínio —— */
.form-grid {
  display: grid;
  gap: 1rem;
}

.form-grid--condo {
  max-width: 520px;
}

.form-row--year {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1.25rem;
}

.form-row__field {
  flex: 1 1 180px;
  min-width: 0;
}

.field-example {
  flex: 0 0 auto;
  padding-bottom: 0.45rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 480px) {
  .form-row--year {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .field-example {
    padding-bottom: 0;
    margin-top: -0.35rem;
  }
}

/* Erro dentro do iframe (documento.php) */
.doc-error-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(165deg, #f1f5f9 0%, #e8edf3 100%);
}

.doc-error-page {
  max-width: 420px;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.doc-error-page__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 48px;
}

.doc-error-page__title {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy-900);
}

.doc-error-page__text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.55;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--navy-900);
}

label .hint {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.82rem;
}

input,
select,
textarea {
  font: inherit;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-gold-mid);
  box-shadow: 0 0 0 3px rgba(184, 165, 106, 0.28);
  background: #fff;
}

select {
  cursor: pointer;
  appearance: auto;
}

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

.form-actions {
  margin-top: 0.35rem;
}

.doc-preview {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 420px;
  background: #e8edf3;
  display: flex;
  flex-direction: column;
}

.doc-preview__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.doc-preview__toolbar-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.doc-preview__toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.doc-preview__action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--brand-gold-dark);
  background: rgba(184, 165, 106, 0.15);
  border: 1px solid rgba(154, 134, 72, 0.3);
  transition: background 0.15s, color 0.15s;
}

.doc-preview__action:hover {
  background: rgba(184, 165, 106, 0.25);
  color: var(--brand-gold);
}

.doc-preview__action[hidden] {
  display: none !important;
}

.doc-preview__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.doc-preview__close:hover {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.35);
  background: #fef2f2;
}

.doc-preview__close:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

.doc-preview__content {
  flex: 1;
  min-height: 360px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.doc-placeholder {
  margin: 0;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* hidden deve sobrepor display:flex / block (senão o placeholder ou iframe ficam visíveis em duplicado) */
.doc-placeholder[hidden],
.doc-preview__toolbar[hidden],
.doc-open-wrap[hidden] {
  display: none !important;
}

.doc-preview iframe#doc-frame[hidden] {
  display: none !important;
}

.doc-preview iframe {
  width: 100%;
  flex: 1;
  min-height: min(68vh, 680px);
  height: min(68vh, 680px);
  border: 0;
  display: block;
}

.doc-open-wrap {
  margin: 0;
  padding: 0.65rem 1rem;
  text-align: center;
  font-size: 0.88rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.doc-open-wrap a {
  color: var(--brand-gold-dark);
  font-weight: 600;
}

.doc-open-wrap__sep {
  margin: 0 0.5rem;
  color: var(--muted);
}

.doc-open-wrap__download {
  text-decoration: none;
}

.doc-open-wrap__download:hover {
  text-decoration: underline;
}

/* —— Seguros layout —— */
.seguros-layout {
  display: grid;
  grid-template-columns: 1fr min(320px, 100%);
  gap: 1.5rem;
  align-items: start;
}

.seguros-aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.side-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.side-card--contact {
  background: linear-gradient(165deg, #f8fafc 0%, #fff 100%);
}

.side-card__title {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-900);
}

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.65rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

.check-list li:last-child {
  margin-bottom: 0;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  background: var(--brand-gold-mid);
  box-shadow: 0 0 0 3px var(--brand-gold-glow);
}

/* —— Orçamento / formulário —— */
.page-section--orcamento .page-section__title {
  color: var(--brand-gold-dark);
}

.card--orcamento {
  border-color: rgba(184, 165, 106, 0.35);
  box-shadow: 0 8px 32px rgba(154, 134, 72, 0.1);
}

.page-section--orcamento .side-card {
  border-color: rgba(184, 165, 106, 0.25);
  background: linear-gradient(165deg, #faf8f3 0%, #fff 100%);
}

.page-section--orcamento .side-card__title {
  color: var(--brand-gold-dark);
}

.form-motivos {
  margin: 0;
  padding: 0;
  border: none;
}

.form-motivos legend {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--navy-900);
  margin-bottom: 0.35rem;
  padding: 0;
}

.form-motivos__hint {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
}

.form-motivos__options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.form-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--navy-800);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.form-check:has(input:checked) {
  border-color: var(--brand-gold-mid);
  background: rgba(212, 200, 150, 0.2);
  box-shadow: 0 0 0 2px rgba(184, 165, 106, 0.2);
}

.form-check input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--brand-gold);
  cursor: pointer;
}

.form-check span {
  user-select: none;
}

.contact-dl {
  margin: 0;
  font-size: 0.9rem;
}

.contact-dl dt {
  font-weight: 600;
  color: var(--navy-900);
  margin-top: 0.65rem;
}

.contact-dl dt:first-child {
  margin-top: 0;
}

.contact-dl dd {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.contact-dl a {
  word-break: break-word;
}

/* —— Messages —— */
.msg {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.92rem;
}

.msg.ok {
  background: #f5f9ef;
  color: #4a5f2e;
  border: 1px solid rgba(184, 165, 106, 0.45);
}

.msg.err {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* —— Login card (Área do condomínio no index) —— */
.login-bg {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem;
  background:
    linear-gradient(135deg, rgba(10, 22, 40, 0.96) 0%, rgba(15, 39, 68, 0.92) 50%, rgba(30, 58, 95, 0.88) 100%),
    url("https://images.unsplash.com/photo-1545324418-cc1a3fa10c00?auto=format&fit=crop&w=1920&q=75") center/cover no-repeat;
}

.login-center {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.login-card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28), 0 4px 16px rgba(0, 0, 0, 0.12);
  text-align: center;
}

.login-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--navy-700), var(--navy-900));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 8px 24px rgba(15, 39, 68, 0.3);
}

.login-card__title {
  margin: 0 0 0.4rem;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}

.login-card__sub {
  margin: 0 0 2rem;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.login-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.login-form__field label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--navy-800);
}

.login-form__field input {
  font: inherit;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-form__field input:focus {
  outline: none;
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(228, 105, 18, 0.16);
  background: #fff;
}

.login-form__submit {
  margin-top: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  gap: 0.5rem;
  border-radius: 12px;
}

.login-card__note {
  margin: 1.5rem 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
}

/* —— Footer —— */
.site-footer {
  margin-top: auto;
  padding: 2rem 1.25rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
}

.site-footer a {
  font-weight: 600;
}

/* —— Responsive —— */
@media (max-width: 960px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .hero__split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero__inner {
    text-align: center;
  }

  .hero__lead {
    max-width: 100%;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__login-card {
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .site-nav__inner {
    gap: 0.25rem 0.75rem;
  }

  .site-nav__link {
    font-size: 0.82rem;
    padding: 0.35rem 0.45rem;
  }

  .hero-ref__cards {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-ref__card {
    min-width: 0;
    width: 100%;
  }

  .whatsapp-float {
    right: 1rem;
    bottom: 1rem;
    width: 52px;
    height: 52px;
  }

  .top-header__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .tabs {
    justify-content: stretch;
  }

  .tabs button,
  .tabs .tabs__pill-link {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 0.8rem;
    padding: 0.5rem 0.65rem;
  }

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

  .hero {
    padding: 2.25rem 1rem 3rem;
  }

  .hero__split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero__login-card {
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
  }

  .section-head {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
