/* ─────────────────────────────────────────────────────────────────────────
   Toledo Locação — Sistema visual
   Paleta dourada/champanhe sobre off-white, com sidebar grafite (V2 Boutique).
   Tokens em CSS variables; Bootstrap continua disponível como fallback.
   ───────────────────────────────────────────────────────────────────────── */

:root {
  /* Marca */
  --gold-700:        #8a6a2c;   /* dourado escuro (texto, foco) */
  --gold-600:        #a07f3a;   /* dourado padrão da logo */
  --gold-500:        #b8954a;   /* dourado claro (acento) */
  --gold-100:        #ede2c8;   /* dourado pálido (bg suave) */
  --gold-50:         #f7efdc;   /* dourado lavado (highlight) */

  /* Neutros — paleta papel */
  --paper:           #faf6ef;   /* fundo principal off-white */
  --paper-2:         #f3ede1;   /* fundo alternativo */
  --paper-3:         #ebe3d2;   /* divisores suaves */

  /* Sidebar grafite */
  --ink-900:         #1c1a17;   /* sidebar / texto display */
  --ink-800:         #2a2622;
  --ink-700:         #3a342d;
  --ink-600:         #4a4239;
  --ink-500:         #6b6359;   /* texto secundário */
  --ink-400:         #8a8276;   /* texto muted */
  --ink-300:         #b9b1a1;   /* placeholders */
  --ink-200:         #d8d0bf;   /* bordas */
  --ink-100:         #e8e1d0;

  /* Estados */
  --success:         #4a6b3a;
  --success-bg:      #e7ead8;
  --danger:          #8b2e2e;
  --danger-bg:       #f5e6e2;

  /* Tipografia */
  --serif:           'Fraunces', 'Source Serif 4', Georgia, serif;
  --sans:            'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:            'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* Espaço & raio */
  --r-sm:            6px;
  --r-md:            8px;
  --r-lg:            12px;

  /* Sombras (suaves, papel) */
  --shadow-sm:       0 1px 2px rgba(28, 26, 23, .04);
  --shadow-md:       0 2px 8px rgba(28, 26, 23, .06);
  --shadow-lg:       0 12px 36px rgba(28, 26, 23, .10);

  /* Densidade */
  --gap:             20px;
  --pad:             24px;
}

/* ── Dark mode ─────────────────────────────────────────────────────────── */
:root[data-theme="dark"] {
  --paper:           #14110d;
  --paper-2:         #1c1814;
  --paper-3:         #251f18;
  --ink-900:         #f0e9d8;
  --ink-800:         #e6dec9;
  --ink-700:         #d4cab2;
  --ink-600:         #b9b1a1;
  --ink-500:         #968d7c;
  --ink-400:         #756d5d;
  --ink-300:         #5a5347;
  --ink-200:         #3a342d;
  --ink-100:         #2a2622;
  --gold-50:         #2a2316;
  --gold-100:        #3a311d;
  --shadow-sm:       0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md:       0 2px 8px rgba(0, 0, 0, .35);
  --shadow-lg:       0 12px 36px rgba(0, 0, 0, .5);
}

/* ── Reset & base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Proteção dos logos da marca: bloqueia drag, seleção e right-click ── */
.brand-logo img,
.mark-logo img,
.brand img,
img[src*="logo-toledo"] {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: none;
}
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-800);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Tipografia utilitária ─────────────────────────────────────────────── */
.serif    { font-family: var(--serif); font-weight: 500; letter-spacing: .005em; }
.sans     { font-family: var(--sans); }
.mono     { font-family: var(--mono); }
.uppercase{ text-transform: uppercase; letter-spacing: .14em; }
.eyebrow  { font-family: var(--sans); font-size: 11px; font-weight: 600;
            text-transform: uppercase; letter-spacing: .18em; color: var(--ink-500); }

/* ── App layout (sidebar + main) ───────────────────────────────────────── */
.app {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────────────────────── */
.sidebar {
  background: var(--ink-900);
  color: var(--ink-100);
  padding: 36px 32px 28px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar .brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar .brand-logo {
  width: 140px;
  height: 90px;
  background: var(--paper);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  flex-shrink: 0;
}
.sidebar .brand-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.sidebar .brand-tag {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .28em;
  color: var(--gold-500);
  margin: 0;
}
.sidebar .stepper-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--ink-400);
  margin-bottom: 18px;
}

.steps { list-style: none; padding: 0; margin: 0 0 auto; display: flex; flex-direction: column; gap: 4px; }
.step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink-300);
  transition: background .18s ease, color .18s ease;
  background: transparent;
  border: none;
  text-align: left;
  width: 100%;
  font-family: var(--sans);
}
.step:hover { background: rgba(255,255,255,.04); color: var(--paper); }
.step .step-num {
  font-family: var(--serif);
  font-style: normal;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  width: 28px;
  flex-shrink: 0;
  color: var(--ink-400);
  transition: color .18s ease;
}
.step .step-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.step .step-title {
  font-size: 14px;
  font-weight: 500;
  color: inherit;
}
.step .step-desc {
  font-size: 11px;
  color: var(--ink-400);
  font-weight: 400;
}
.step.is-active {
  background: rgba(184, 149, 74, .12);
  color: var(--paper);
}
.step.is-active .step-num {
  color: var(--gold-500);
  font-style: normal;
  font-weight: 600;
}
.step.is-done {
  color: var(--ink-200);
}
.step.is-done .step-num {
  color: var(--gold-600);
}
.step.is-done .step-num::before {
  content: "✓";
  font-family: var(--sans);
  font-style: normal;
}
.step.is-done .step-num-text { display: none; }

.sidebar-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sidebar-footer .meta {
  font-size: 10px;
  color: var(--ink-400);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.sidebar-footer a {
  color: var(--ink-300);
  text-decoration: none;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sidebar-footer a:hover { color: var(--gold-500); }

/* ── Main area ─────────────────────────────────────────────────────────── */
.main {
  background: var(--paper);
  padding: 44px 56px 64px;
  position: relative;
  min-width: 0;
}
.main-inner {
  max-width: 880px;
  margin: 0 auto;
}
.main-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--paper-3);
}
.main-header .step-counter {
  font-family: var(--serif);
  font-style: normal;
  font-size: 14px;
  color: var(--gold-600);
  margin-bottom: 8px;
  letter-spacing: .04em;
}
.main-header h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 38px;
  line-height: 1.1;
  margin: 0;
  color: var(--ink-900);
  letter-spacing: -.02em;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
}
.main-header .subtitle {
  font-size: 14px;
  color: var(--ink-500);
  margin: 8px 0 0;
  max-width: 56ch;
}
.main-header .right-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

/* progress bar (horizontal sob o título) */
.progress-rail {
  height: 2px;
  background: var(--paper-3);
  border-radius: 2px;
  overflow: hidden;
  margin-top: -1px;
  margin-bottom: 28px;
}
.progress-rail .fill {
  height: 100%;
  background: var(--gold-500);
  width: 0;
  transition: width .35s cubic-bezier(.4, 0, .2, 1);
}

/* ── Cards / sections ──────────────────────────────────────────────────── */
.section-card {
  background: var(--paper);
  border: 1px solid var(--paper-3);
  border-radius: var(--r-lg);
  padding: 32px 36px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.section-card + .section-card { margin-top: 0; }
.section-card .section-eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin: 0 0 6px;
}
.section-card .section-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  font-variation-settings: 'opsz' 80;
  letter-spacing: -.01em;
  line-height: 1.2;
  color: var(--ink-900);
  margin: 0 0 20px;
}
.section-card .section-divider {
  height: 1px;
  background: var(--paper-3);
  margin: 0 0 20px;
}

/* ── Form controls ─────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 8px; }
.field-row { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; margin-bottom: 22px; }
.field-row:last-child { margin-bottom: 0; }
.col-12 { grid-column: span 12; }
.col-9  { grid-column: span 9; }
.col-8  { grid-column: span 8; }
.col-7  { grid-column: span 7; }
.col-6  { grid-column: span 6; }
.col-5  { grid-column: span 5; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }
.col-2  { grid-column: span 2; }

label, .form-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin: 0;
}
.required-star { color: var(--gold-600); margin-left: 2px; }

input[type="text"], input[type="email"], input[type="number"],
input[type="password"], input[type="date"], select, textarea {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink-900);
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-bottom: 1.5px solid var(--ink-300);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  min-height: 50px;
  width: 100%;
  transition: border-color .15s, background .15s, box-shadow .15s;
  outline: none;
}
input::placeholder { color: var(--ink-300); font-weight: 400; }
input:hover:not(:disabled):not([readonly]),
select:hover:not(:disabled), textarea:hover:not(:disabled) {
  border-color: var(--ink-300);
  border-bottom-color: var(--gold-500);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold-500);
  background: var(--paper-2);
  box-shadow: 0 0 0 3px rgba(184, 149, 74, .15);
}
input[readonly] {
  background: var(--paper-2);
  color: var(--ink-500);
  cursor: default;
}
.form-text {
  font-size: 12.5px;
  color: var(--ink-400);
  font-style: normal;
  font-family: var(--serif);
  margin-top: 4px;
  line-height: 1.4;
}

/* select arrow */
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%23a07f3a' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* CEP search button */
.input-group { display: flex; gap: 0; }
.input-group input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-cep {
  background: var(--ink-900);
  color: var(--paper);
  border: 1px solid var(--ink-900);
  border-bottom: 1.5px solid var(--ink-900);
  border-left: none;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 0 22px;
  min-height: 50px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background .18s, color .18s;
}
.btn-cep:hover { background: var(--gold-700); border-color: var(--gold-700); }
.btn-cep:disabled { opacity: .5; cursor: not-allowed; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all .18s;
  background: transparent;
  color: inherit;
}
.btn-primary {
  background: var(--ink-900);
  color: var(--paper);
  border-color: var(--ink-900);
}
.btn-primary:hover { background: var(--gold-700); border-color: var(--gold-700); color: var(--paper); }
.btn-gold {
  background: var(--gold-600);
  color: var(--paper);
  border-color: var(--gold-600);
}
.btn-gold:hover { background: var(--gold-700); border-color: var(--gold-700); }
.btn-ghost {
  background: transparent;
  color: var(--ink-700);
  border-color: var(--ink-200);
}
.btn-ghost:hover { color: var(--ink-900); border-color: var(--ink-700); background: var(--paper-2); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.btn-icon {
  width: 36px; height: 36px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  color: var(--ink-500);
  border: 1px solid var(--paper-3);
  cursor: pointer;
}
.btn-icon:hover { color: var(--gold-700); border-color: var(--gold-500); }

/* ── Wizard nav (footer of main) ───────────────────────────────────────── */
.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--paper-3);
}
.wizard-nav .step-info {
  font-family: var(--serif);
  font-style: normal;
  color: var(--ink-500);
  font-size: 14px;
}
.wizard-nav .step-info strong {
  color: var(--ink-900);
  font-weight: 600;
  font-style: normal;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.wizard-nav .nav-buttons { display: flex; gap: 12px; }

/* ── Alert ─────────────────────────────────────────────────────────────── */
.alert-erro {
  background: var(--danger-bg);
  border-left: 3px solid var(--danger);
  padding: 16px 20px;
  border-radius: var(--r-sm);
  margin-bottom: 24px;
  color: var(--danger);
  font-size: 14px;
}
.alert-erro strong { font-weight: 700; }

/* ── Review (last step) ────────────────────────────────────────────────── */
.review {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.review-block {
  border: 1px solid var(--paper-3);
  border-radius: var(--r-lg);
  padding: 22px 26px;
  background: var(--paper);
}
.review-block .block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.review-block .block-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink-900);
  margin: 0;
}
.review-block .edit-link {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-700);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--sans);
}
.review-block .edit-link:hover { color: var(--ink-900); }

.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 28px;
}
.review-grid .row-full { grid-column: span 2; }
.review-grid dt {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin: 0 0 3px;
}
.review-grid dd {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink-900);
  margin: 0;
  word-break: break-word;
}
.review-grid dd.empty {
  color: var(--ink-300);
  font-style: normal;
  font-size: 14px;
}

.review-summary {
  background: var(--ink-900);
  color: var(--paper);
  border-radius: var(--r-lg);
  padding: 28px 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.review-summary .key {
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin: 0 0 6px;
}
.review-summary .val {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--paper);
  margin: 0;
}

/* ── Mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
    padding: 24px 22px;
  }
  .sidebar .brand { margin-bottom: 20px; padding-bottom: 18px; }
  .steps {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    margin-bottom: 0;
    padding-bottom: 6px;
  }
  .step { flex-shrink: 0; min-width: 180px; padding: 8px 12px; }
  .sidebar-footer { margin-top: 18px; padding-top: 14px; }
  .main { padding: 28px 22px 48px; }
  .main-header h1 { font-size: 28px; }
  .field-row { grid-template-columns: 1fr; }
  .col-12, .col-9, .col-8, .col-6, .col-5, .col-4, .col-3, .col-2 {
    grid-column: span 1;
  }
  .review-summary { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
  .review-grid .row-full { grid-column: span 1; }
}

/* ── Login ─────────────────────────────────────────────────────────────── */
.login-page {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
}
.login-aside {
  background: var(--ink-900);
  color: var(--paper);
  padding: 64px 64px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-aside::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 30%, rgba(184, 149, 74, .12), transparent 60%);
  pointer-events: none;
}
.login-aside .brand-mark {
  display: flex; align-items: center; gap: 18px;
  position: relative; z-index: 1;
}
.login-aside .brand-mark .mark-logo {
  width: 110px; height: 76px;
  background: var(--paper);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex; align-items: center; justify-content: center;
}
.login-aside .brand-mark .mark-logo img {
  max-width: 100%; max-height: 100%; object-fit: contain;
}
.login-aside .brand-mark .mark-tag {
  font-size: 10px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin: 0;
  max-width: 180px;
  line-height: 1.7;
}
.login-aside .quote {
  position: relative;
  z-index: 1;
  max-width: 520px;
}
.login-aside .quote .mark {
  font-family: var(--serif);
  font-size: 96px;
  line-height: 1;
  color: var(--gold-600);
  margin-bottom: -20px;
}
.login-aside .quote p {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  font-variation-settings: 'opsz' 144;
  letter-spacing: -.01em;
  line-height: 1.25;
  color: var(--paper);
  margin: 0 0 18px;
}
.login-aside .quote cite {
  font-style: normal;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.login-aside .meta-foot {
  position: relative;
  z-index: 1;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-500);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login-form-side {
  background: var(--paper);
  padding: 64px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}
.login-form-side .form-wrap {
  max-width: 380px;
  width: 100%;
  margin: 0 auto;
}
.login-form-side .eyebrow { margin-bottom: 16px; color: var(--gold-700); }
.login-form-side h1 {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 500;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  letter-spacing: -.02em;
  margin: 0 0 12px;
  color: var(--ink-900);
}
.login-form-side .lead {
  font-size: 15px;
  color: var(--ink-500);
  margin: 0 0 36px;
  font-family: var(--serif);
  font-style: normal;
  font-size: 17px;
}
.login-form-side .login-fields { display: flex; flex-direction: column; gap: 18px; }
.login-form-side .login-foot {
  margin-top: 28px;
  font-size: 11px;
  color: var(--ink-400);
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
}

@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-aside { padding: 32px 28px; min-height: 280px; }
  .login-aside .quote p { font-size: 22px; }
  .login-form-side { padding: 40px 28px; }
}

/* ── Result ────────────────────────────────────────────────────────────── */
.result-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 360px;
}
.result-preview {
  background: var(--paper-2);
  padding: 40px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-right: 1px solid var(--paper-3);
}
.result-preview .preview-head {
  width: 100%;
  max-width: 720px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.result-preview .preview-head .label {
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.result-preview .preview-head .filename {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-700);
}
.pdf-frame {
  width: 100%;
  max-width: 720px;
  flex: 1;
  background: #fff;
  border: 1px solid var(--paper-3);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.pdf-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.result-side {
  background: var(--paper);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.result-side .brand {
  display: flex; gap: 12px; align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--paper-3);
}
.result-side .brand .brand-logo {
  width: 96px; height: 64px;
  background: var(--paper-2);
  border-radius: 8px;
  padding: 6px 10px;
  display: flex; align-items: center; justify-content: center;
}
.result-side .brand .brand-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.result-side .brand .brand-text { line-height: 1.4; }
.result-side .brand .brand-text small {
  font-size: 9px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-700);
  display: block;
}

.result-side .badge-success {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--success); font-weight: 600;
}
.result-side .badge-success .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--success);
}
.result-side h1 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  color: var(--ink-900);
  margin: 8px 0 6px;
  line-height: 1.15;
}
.result-side .lead {
  font-family: var(--serif);
  font-style: normal;
  font-size: 15px;
  color: var(--ink-500);
  margin: 0;
}
.tenant-card {
  background: var(--paper-2);
  border-left: 2px solid var(--gold-500);
  padding: 14px 18px;
  border-radius: 4px;
}
.tenant-card .label {
  font-size: 9px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-500); margin: 0 0 4px;
}
.tenant-card .name {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink-900);
  margin: 0;
}

.download-stack { display: flex; flex-direction: column; gap: 10px; }
.btn-download {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  text-decoration: none;
  border: 1px solid var(--paper-3);
  background: var(--paper);
  transition: border-color .18s, background .18s, transform .12s;
}
.btn-download:hover {
  border-color: var(--gold-500);
  background: var(--paper-2);
  transform: translateY(-1px);
}
.btn-download .file-icon {
  width: 40px; height: 48px;
  border-radius: 4px;
  background: var(--gold-50);
  color: var(--gold-700);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--gold-100);
}
.btn-download .file-meta { flex: 1; min-width: 0; }
.btn-download .file-meta .ftype {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-500); font-weight: 600; margin: 0 0 2px;
}
.btn-download .file-meta .fname {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink-900);
  margin: 0;
  line-height: 1.2;
  word-break: break-word;
}
.btn-download .arrow {
  color: var(--gold-700);
  font-family: var(--sans);
  font-weight: 600;
}

/* ── Botão WhatsApp + form inline ─────────────────────────────────────── */
.btn-whatsapp {
  width: 100%;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.btn-whatsapp .icon-whatsapp {
  background: #25d366;
  color: #fff;
  border-color: #1da851;
  font-size: 22px;
  font-weight: 400;
}
.btn-whatsapp:hover { border-color: #25d366; }

.whatsapp-form {
  background: var(--paper-2);
  border: 1px solid var(--paper-3);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-top: -4px;
}
.whatsapp-form label {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-500);
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}
.whatsapp-input-row {
  display: flex;
  gap: 8px;
}
.whatsapp-input-row input {
  flex: 1;
  min-width: 0;
}
.btn-wp-send {
  background: #25d366;
  color: #fff;
  border: 1px solid #1da851;
  border-radius: var(--r-sm);
  padding: 10px 18px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s;
}
.btn-wp-send:hover { background: #1da851; }
.whatsapp-hint {
  font-size: 11px;
  color: var(--ink-400);
  font-style: italic;
  margin: 8px 0 0;
  font-family: var(--serif);
}

.result-side .new-link {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--paper-3);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-500);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.result-side .new-link:hover { color: var(--gold-700); }

@media (max-width: 1000px) {
  .result-page { grid-template-columns: 1fr; }
  .result-preview { padding: 24px; }
  .pdf-frame { min-height: 60vh; }
  .result-side { padding: 28px 24px; border-top: 1px solid var(--paper-3); }
}

/* ── Theme toggle ──────────────────────────────────────────────────────── */
.theme-toggle {
  position: relative;
  width: 48px;
  height: 26px;
  border-radius: 13px;
  background: var(--paper-3);
  border: 1px solid var(--paper-3);
  cursor: pointer;
  padding: 0;
  transition: background .2s;
}
.theme-toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: var(--gold-600);
  border-radius: 50%;
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
}
:root[data-theme="dark"] .theme-toggle { background: var(--ink-700); }
:root[data-theme="dark"] .theme-toggle::after {
  transform: translateX(22px);
  background: var(--gold-500);
}

/* ── Tweaks panel ──────────────────────────────────────────────────────── */
.tweaks-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 280px;
  background: var(--paper);
  border: 1px solid var(--paper-3);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  z-index: 1000;
  display: none;
}
.tweaks-panel.is-open { display: block; }
.tweaks-panel h4 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 14px;
  color: var(--ink-900);
}
.tweaks-panel .tweak-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--paper-3);
}
.tweaks-panel .tweak-row:last-child { border-bottom: 0; }
.tweaks-panel .tweak-row label {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-500);
}

/* ── Pages with single column (login, result) shouldn't show wizard
       chrome. Just helpers. ────────────────────────────────────────────── */
[hidden] { display: none !important; }

/* ── Step transitions ──────────────────────────────────────────────────── */
.step-panel {
  animation: fadeIn .35s ease;
}
.step-panel[hidden] { display: none !important; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
