:root {
  --bg: #0a0a0a;           /* Preto ~95% */
  --surface: #151515;      /* Cinza escuro */
  --surface-2: #1c1c1e;    /* Cinza escuro (Apple like) */
  --border: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255, 255, 255, 0.05);
  --text: rgba(255, 255, 255, 0.85); /* Branco 85% */
  --text-muted: rgba(255, 255, 255, 0.5);
  --text-dim: rgba(255, 255, 255, 0.3);
  --accent: #ffffff;
  --accent-dim: rgba(255, 255, 255, 0.05);
  --focus-ring: rgba(255, 255, 255, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  /* Removed scroll-behavior: smooth to prevent conflict with instant SPA navigation */
  font-size: 16px;
}

/* ══════════════════════════════
   CUSTOM SCROLLBAR
══════════════════════════════ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  border: 3px solid var(--bg);
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
  border: 3px solid var(--bg);
  background-clip: padding-box;
}

/* Perfect responsive global scale */
@media (min-width: 768px) {
  html {
    font-size: 14px; /* Simulates ~87% browser zoom globally */
  }
}

@media (min-width: 1024px) {
  html {
    font-size: 13.5px; /* Simulates ~84% browser zoom globally */
  }
}

@media (min-width: 1400px) {
  html {
    font-size: 13px; /* Simulates ~81% browser zoom globally */
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  width: 100%;
  cursor: none;
}

/* ══════════════════════════════
   CUSTOM CURSOR (GSAP)
══════════════════════════════ */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 6px; height: 6px;
  background-color: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px rgba(255,255,255,0.8);
}

.cursor-trail {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.02);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), height 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.3s ease, border-color 0.3s ease;
}

.cursor-trail.active {
  width: 64px; height: 64px;
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
}

@media (pointer: coarse) {
  body { cursor: auto; }
  .cursor-dot, .cursor-trail { display: none !important; }
}

/* Lucide Icons vertical align */
i[data-lucide] {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
}

/* ── UTILITY ── */
.hidden { display: none !important; }

.screen { 
  display: none; 
  width: 100%;
  min-height: 100vh; 
  opacity: 0; 
  overflow-x: hidden;
}

.screen.active { display: block; opacity: 1; }

/* ══════════════════════════════
   LANDING
══════════════════════════════ */
#screen-landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  position: relative;
  overflow: hidden;
}

/* Subtle ambient glow */
#screen-landing::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60vw;
  height: 60vw;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.land-inner {
  max-width: 50rem;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
}

.logo-wrapper {
  margin-bottom: 1.5rem;
}

.main-logo {
  height: auto;
  max-height: 120px;
  width: auto;
  max-width: 100%;
  opacity: 1;
  filter: drop-shadow(0 0 30px rgba(255,255,255,0.12));
}

.land-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 100px;
  padding: 0.4rem 1.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
}

.land-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.land-title em {
  color: var(--text-muted);
  font-style: normal;
  font-weight: 400;
}

.land-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 42.5rem;
  margin: 0 auto;
}

.choice-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 1.5rem;
  cursor: pointer;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.5s ease, border-color 0.5s ease;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  will-change: transform, box-shadow;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  z-index: 1;
}

img,
.project-image,
.card-image {
  border-radius: 24px;
  overflow: hidden;
  opacity: 1 !important;
  background: transparent;
  object-fit: cover;
  width: 100%;
}

.hero-image {
  border-radius: 0 0 24px 24px;
  overflow: hidden;
  opacity: 1 !important;
  background: transparent;
  object-fit: cover;
  width: 100%;
}

.card-image {
  height: 180px;
  margin-bottom: 1.5rem;
}

.main-logo, .fhdr-meta img {
  border-radius: 0;
  opacity: 1 !important;
}

.choice-card > * {
  position: relative;
  z-index: 2;
}

/* Linear-style glowing border pseudo-element */
.choice-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

/* Background soft glow */
.choice-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.1);
  filter: blur(80px);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: -1;
}

.choice-card:hover {
  transform: translateY(-8px) scale(1.02);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 255, 255, 0.05);
}

.choice-card:hover::before {
  opacity: 1;
  background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.05) 100%);
}

.choice-card:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.5);
}

.card-ico {
  font-size: 2rem;
  margin-bottom: 1.25rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.choice-card:hover .card-ico {
  transform: translateY(-5px) scale(1.05);
  background: linear-gradient(145deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.02) 100%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 15px 40px rgba(255, 255, 255, 0.1);
}

.card-ttl {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.card-dsc {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s;
}

.choice-card:hover .card-cta {
  background: #fff;
  color: #000;
  gap: 0.8rem;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.land-trust {
  margin-top: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.trust-item {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ══════════════════════════════
   FORM HEADER (sticky)
══════════════════════════════ */
.form-hdr {
  background: rgba(10, 10, 10, 0.7);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.fhdr-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.fhdr-sub {
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

.fhdr-ttl {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.btn-back {
  background: transparent;
  border: none;
  color: var(--text);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 100px;
  transition: background 0.2s;
}

.btn-back:hover {
  background: var(--surface);
}

/* ══════════════════════════════
   FORM BODY
══════════════════════════════ */
.form-body {
  max-width: 56.25rem;
  margin: 0 auto;
  padding: 0 1.5rem 6rem;
}

.form-hero {
  text-align: center;
  padding: 0;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}

.hero-image {
  height: 240px;
  width: 100%;
  object-fit: cover;
  border-radius: 0 0 24px 24px;
  margin-bottom: 2rem;
  opacity: 1 !important;
  margin-top: -1.5rem; /* Pull image exactly to the top */
}

.form-hero > * {
  position: relative;
  z-index: 2;
}

.fhero-sub {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.fhero-ttl {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

/* SECTIONS */
.fsec {
  margin-bottom: 3.5rem;
  will-change: transform, opacity;
}

.sec-hdr {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0 1rem 0;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid var(--border);
}

.sec-hdr i {
  color: var(--text-muted);
}

/* FIELDS */
.fg {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fg label, .flabel {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.fgrid { display: grid; gap: 1.25rem; }
.c2 { grid-template-columns: 1fr 1fr; }
.c3 { grid-template-columns: 1fr 1fr 1fr; }
.s2 { grid-column: span 2; }

input[type=text], input[type=email], input[type=tel], input[type=number], textarea, select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: #fff;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  width: 100%;
  border-radius: 12px;
  transition: all 0.2s;
  -webkit-appearance: none;
}

input::placeholder, textarea::placeholder {
  color: var(--text-dim);
}

input:focus, textarea:focus, select:focus {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 3px var(--focus-ring);
  background: var(--surface-2);
}

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

/* PFX / SFX inputs */
.pfx, .sfx {
  display: flex;
  align-items: stretch;
}

.pfx-lbl, .sfx-lbl {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  font-weight: 500;
}

.pfx-lbl {
  border-right: none;
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.pfx input {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  flex: 1;
}

.sfx-lbl {
  border-left: none;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.sfx input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  flex: 1;
}

/* TWO-COL LAYOUT */
.tcol {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

/* SIDE BOX */
.sbox {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
}

.sbox-ttl {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1.25rem;
}

/* EXPENSE TABLES */
.exp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.exp-tbl {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.exp-thead {
  display: grid;
  grid-template-columns: 1fr 130px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.exp-thead div {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.exp-row {
  display: grid;
  grid-template-columns: 1fr 130px;
  border-bottom: 1px solid var(--border-light);
}

.exp-row:last-child {
  border-bottom: none;
}

.exp-row.tot {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

.exp-lbl {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text);
  display: flex;
  align-items: center;
}

.exp-row.tot .exp-lbl {
  font-weight: 600;
  color: #fff;
}

.exp-inp {
  border-left: 1px solid var(--border-light);
  display: flex;
  align-items: center;
}

.exp-inp input {
  background: transparent;
  border: none;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  width: 100%;
  color: #fff;
  border-radius: 0;
}

.exp-inp input:focus {
  background: var(--surface-2);
  box-shadow: none;
}

.exp-row.empty { min-height: 44px; }

/* DEBT TABLE */
.debt-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: transparent;
}

.dtbl {
  width: 100%;
  border-collapse: collapse;
}

.dtbl th {
  background: var(--surface);
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.dtbl td {
  border-bottom: 1px solid var(--border-light);
  padding: 0;
}

.dtbl tr:last-child td {
  border-bottom: none;
}

.dtbl td.lc {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  min-width: 200px;
}

.dtbl tr.tot td {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

.dtbl tr.tot td.lc {
  font-weight: 600;
  color: #fff;
}

.dtbl td input {
  background: transparent;
  border: none;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  width: 100%;
  min-width: 120px;
  color: #fff;
  border-radius: 0;
}

.dtbl td input:focus {
  background: var(--surface-2);
  box-shadow: none;
}

/* YES/NO */
.yn-list {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.yn-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  gap: 1.5rem;
}

.yn-item:last-child {
  border-bottom: none;
}

.yn-q {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

.yn-opts {
  display: flex;
  gap: 1.5rem;
  flex-shrink: 0;
}

.yn-opts label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 400;
}

/* Custom Checkbox/Radio */
input[type=checkbox], input[type=radio] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--text-muted);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

input[type=radio] {
  border-radius: 50%;
}

input[type=checkbox]:checked, input[type=radio]:checked {
  background: #fff;
  border-color: #fff;
}

input[type=checkbox]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 8px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

input[type=radio]:checked::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 7px;
  height: 7px;
  background: #000;
  border-radius: 50%;
}

/* CHECKBOXES GRID */
.cbgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.cbitem {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.cbitem span {
  font-size: 0.9rem;
  color: var(--text);
}

/* VICE ROWS */
.vice-block {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.vice-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
}

.vice-row:last-child {
  border-bottom: none;
}

.vice-lbl {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  min-width: 220px;
  border-right: 1px solid var(--border-light);
  cursor: pointer;
}

.vice-lbl span {
  font-size: 0.9rem;
  color: var(--text);
}

.vice-val {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem;
  flex: 1;
}

.vice-val span {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.vice-val input {
  max-width: 140px;
  padding: 0.5rem 0.75rem;
}

/* VALIDATION */
.invalid {
  border-color: #ff4d4d !important;
  box-shadow: 0 0 10px rgba(255, 77, 77, 0.2) !important;
  animation: shake 0.4s ease;
}

.yn-opts.invalid {
  border-radius: 8px;
  padding: 4px;
  border: 1px solid #ff4d4d !important;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.err-msg {
  color: #ff4d4d;
  font-size: 0.75rem;
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.form-footer {
  text-align: center;
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

.copy-footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2rem;
  opacity: 0.6;
}

.btn-submit {
  background: #fff;
  color: #000;
  border: none;
  padding: 1rem 3rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(255,255,255,0.1);
}

@keyframes spin { 100% { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

.f-tagline {
  margin-top: 2rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ══════════════════════════════
   RESPONSIVE (Screen Only - Preserves Desktop for PDF)
══════════════════════════════ */
@media screen and (max-width: 768px) {
  .choice-grid { grid-template-columns: 1fr; }
  .tcol { grid-template-columns: 1fr; }
  .c2, .c3 { grid-template-columns: 1fr; }
  .s2 { grid-column: span 1; }
  .exp-grid { grid-template-columns: 1fr; }
  .vice-row { flex-direction: column; align-items: stretch; }
  .vice-lbl { border-right: none; border-bottom: 1px solid var(--border-light); }
  .vice-val { padding: 1rem 1.25rem; }
}

@media screen and (max-width: 480px) {
  /* Hide table headers completely to save space */
  .exp-thead { display: none; }
  
  /* Stack Gastos columns */
  .exp-row { 
    display: flex; 
    flex-direction: column; 
    padding: 0.75rem 0; 
  }
  .exp-lbl { 
    padding: 0.25rem 1rem 0.5rem; 
    font-weight: 600; 
    color: var(--text-muted); 
  }
  .exp-inp { 
    border-left: none; 
    border-top: 1px solid var(--border-light); 
    width: 100%; 
  }
  .exp-inp input { 
    padding: 0.75rem 1rem; 
  }
  .exp-row.empty { display: none; }
  
  /* Stack Debt Table (dtbl) columns */
  .dtbl thead { display: none; }
  .dtbl tbody tr { 
    display: flex; 
    flex-direction: column; 
    border-bottom: 2px solid var(--border); 
    padding-bottom: 1rem; 
    margin-bottom: 1rem; 
  }
  .dtbl tbody td { 
    display: flex; 
    flex-direction: column; 
    border-bottom: none; 
    padding: 0.5rem 1rem; 
  }
  .dtbl tbody td::before {
    content: attr(data-label);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
  }
  .dtbl td.lc { 
    font-weight: 700; 
    font-size: 1rem; 
    color: var(--accent); 
    padding-bottom: 0.25rem; 
  }
  .dtbl td.lc::before {
    display: none;
  }
  .dtbl td input { 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    margin-top: 0.25rem; 
  }

  .land-title { font-size: 2.2rem; }
  .form-hdr { padding: 1rem; }
  .form-body { padding: 0 1rem 4rem; }
}

.pdf-final-logo {
  display: none;
}

.generating-pdf .cursor-dot,
.generating-pdf .cursor-trail {
  display: none !important;
}

.generating-pdf::-webkit-scrollbar,
.generating-pdf *::-webkit-scrollbar {
  display: none !important;
}
.generating-pdf {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

#pdf-render { display: none; }

/* PRINT MODE */
@media print {
  @page {
    size: A4 landscape;
    margin: 12mm !important;
  }
  
  /* Esconde TUDO da página nativamente (Isolamento Absoluto) */
  body * {
    visibility: hidden !important;
  }
  
  /* Torna visível APENAS o clone e seus filhos */
  #pdf-render, #pdf-render * {
    visibility: visible !important;
  }
  
  /* Reset do Body para Landscape Premium */
  body, html { 
    background: #0a0a0a !important; 
    color: #fff !important; 
    font-size: 10pt !important; 
    line-height: 1.4 !important;
    -webkit-print-color-adjust: exact; 
    print-color-adjust: exact; 
    padding: 0; 
    margin: 0;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 297mm !important; /* Landscape width */
    position: relative;
    overflow: visible !important;
    height: auto !important;
  }
  
  /* Posiciona o clone no topo absoluto da folha de impressão */
  #pdf-render { 
    display: block !important; 
    position: absolute !important;
    left: 0;
    top: 0;
    width: 100%; 
    height: auto;
    padding: 10px 0 40px;
    margin: 0;
  }
  
  #pdf-render .form-hdr { display: flex !important; margin-bottom: 2rem !important; padding: 1rem 0 !important; }
  
  :root {
    --bg: #0a0a0a;
    --surface: rgba(255, 255, 255, 0.05);
    --surface-2: rgba(255, 255, 255, 0.02);
    --border: rgba(255, 255, 255, 0.15);
    --border-light: rgba(255, 255, 255, 0.08);
    --text: #fff;
    --text-muted: #888;
    --text-dim: #666;
    --accent: #fff;
    --focus-ring: transparent;
  }
  
  .screen.active { display: block !important; height: auto !important; min-height: 0 !important; }
  
  /* Layout Elegante de 2 Colunas com respiro horizontal (Landscape) */
  .form-body { 
    padding: 0 !important; 
    max-width: 100%; 
    margin: 0; 
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 40px;
    row-gap: 2rem;
  }
  
  /* Tipografia e Espaçamento Premium no PDF */
  .pdf-text-val, .pdf-check-val {
    display: inline-block;
    padding: 4px 8px;
    margin-top: 4px;
    color: #fff;
    font-weight: 600;
    width: 100%;
    border-bottom: 1px dashed rgba(255,255,255,0.2);
    word-wrap: break-word;
    white-space: pre-wrap;
    font-size: 10pt;
  }
  
  /* QUEBRAS DE PÁGINA INTELIGENTES */
  .fsec { 
    page-break-inside: avoid; 
    break-inside: avoid;
    opacity: 1 !important; 
    transform: none !important; 
    margin-bottom: 0.5rem !important; 
    padding: 0.5rem !important; 
    border-color: rgba(255, 255, 255, 0.15); 
  }

  /* Faz seções com Tabelas de Dívidas ocuparem as duas colunas inteiras */
  .fsec:has(.dtbl) {
    grid-column: 1 / -1;
  }
  
  .sec-hdr { margin-bottom: 1rem !important; padding-bottom: 0.5rem !important; font-size: 11pt !important; border-bottom: 1px solid rgba(255,255,255,0.1); }
  
  /* Hero Image no topo */
  .form-hero { grid-column: span 2; border: none; padding: 0; margin-bottom: 1rem !important; background: none; }
  .fhero-ttl { color: #fff; margin-bottom: 1rem !important; font-size: 16pt !important; }
  .hero-image { height: 200px !important; margin-bottom: 1rem !important; margin-top: -1rem !important; border-radius: 0 !important; }
  
  /* Tabelas com espaçamento luxuoso */
  .dtbl th, .exp-thead div { background: rgba(255, 255, 255, 0.05); color: #fff; padding: 6px 10px !important; font-size: 9pt !important; }
  .dtbl td, .exp-row { border-color: rgba(255, 255, 255, 0.1); padding: 6px 10px !important; font-size: 9pt !important; min-height: 0 !important; }
  .exp-inp { border-left-color: rgba(255, 255, 255, 0.1); }
  .exp-lbl { padding: 6px 10px !important; }
  .dtbl td.lc { padding: 6px 10px !important; min-width: 0 !important; }

  /* Elementos internos */
  .fg { gap: 0.25rem !important; margin-bottom: 0.5rem !important; }
  .sbox { padding: 1.5rem !important; margin-bottom: 0 !important; border: 1px solid rgba(255,255,255,0.1) !important; background: transparent !important; }
  .sbox-ttl { margin-bottom: 1rem !important; font-size: 10pt !important; }
  .vice-lbl { padding: 6px 10px !important; min-width: 0 !important; border-right-color: rgba(255,255,255,0.1) !important; }
  .vice-val { padding: 6px 10px !important; }
  .yn-item { padding: 6px !important; gap: 0.5rem !important; border-bottom-color: rgba(255,255,255,0.1) !important; }

  /* FOOTER FIXO (IMPRIME EM TODAS AS PÁGINAS) */
  .pdf-footer-logo {
    position: fixed !important;
    bottom: -5px;
    left: 0;
    width: 100%;
    text-align: center;
  }
  
  .pdf-footer-logo img {
    height: 40px;
    width: 160px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    -webkit-filter: brightness(0) invert(1);
    opacity: 0.9;
  }
}
