:root {
  --ink: #0a1c24;
  --moss: #0b4a57;
  --accent: #c45c26;
  --navy: #011725;
  --lime: #bcf51d;
  --teal: #2bb9bd;
  --sand: #e3f0f1;
  --mist: #f3f8f9;
  --sidebar-w: 15.5rem;
}

body {
  color: var(--ink);
}

.provisional-banner {
  background: repeating-linear-gradient(
    -45deg,
    #fff3cd,
    #fff3cd 12px,
    #ffe8a3 12px,
    #ffe8a3 24px
  );
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---- Acessibilidade e foco ---- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 50;
  background: var(--moss);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
}
.skip-link:focus { top: 1rem; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Portal do cliente ---- */
.tabular { font-variant-numeric: tabular-nums; }

.field-input {
  margin-top: 0.25rem;
  width: 100%;
  min-height: 44px;
  border-radius: 0.5rem;
  border: 1px solid rgba(11, 74, 87, 0.25);
  background: #fff;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field-input:focus { border-color: var(--moss); box-shadow: 0 0 0 3px rgba(11, 74, 87, 0.15); outline: none; }
.was-validated .field-input:invalid { border-color: #b42318; }
.field-error { display: none; margin-top: 0.25rem; font-size: 0.875rem; color: #b42318; }
.was-validated .field-input:invalid + .field-error { display: block; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.btn-primary { background: var(--moss); color: #fff; }
.btn-primary:hover { background: #083a45; }
.btn-ghost { border: 1px solid rgba(11, 74, 87, 0.25); background: #fff; color: var(--moss); }
.btn-ghost:hover { background: #e3f0f1; }
.btn svg { width: 1.125rem; height: 1.125rem; flex-shrink: 0; }

.spinner { display: none; }
.is-loading .spinner { display: inline-block; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Termo exibido no portal (reaproveita _termo.html do PDF) */
.termo-portal .termo h2 { display: none; }
.termo-portal .termo h3 { margin-top: 1rem; font-weight: 700; color: var(--moss); }
.termo-portal .termo p { margin-top: 0.5rem; line-height: 1.6; }
.termo-portal .termo .meta { font-size: 0.85rem; color: rgba(15, 28, 23, 0.65); }
.termo-portal .termo .sign { display: none; }

@media print {
  header, footer, .no-print, .skip-link { display: none !important; }
  body { background: #fff; }
}
.was-validated input[type="checkbox"]:invalid + span .field-error { display: block; }

/* ---- Identidade Vet Connection (apresentação comercial 2027) ---- */
.brand-dark {
  background: radial-gradient(120% 80% at 85% 0%, #03465a 0%, transparent 55%),
              linear-gradient(160deg, #012535 0%, #011725 60%, #000d15 100%);
  color: #fff;
}
.brand-wave { position: relative; overflow: hidden; }
.brand-wave::after {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -60px; height: 140px;
  background: radial-gradient(60% 100% at 30% 100%, rgba(188,245,29,.35), transparent 70%),
              radial-gradient(60% 100% at 80% 100%, rgba(43,185,189,.35), transparent 70%);
  pointer-events: none;
}
.title-dot::after { content: "."; color: var(--lime); }
.on-light .title-dot::after { color: #6f9a0b; }
.brand-rule { height: 3px; width: 72px; border-radius: 9999px; background: linear-gradient(90deg, var(--lime), var(--teal)); }
.date-chip { display: inline-grid; place-items: center; min-width: 2.75rem; height: 2.5rem; border-radius: .5rem; font-weight: 800; font-size: 1.25rem; padding: 0 .4rem; }
.btn-lime { background: var(--lime); color: #011725; }
.btn-lime:hover { background: #a9e10c; }
.btn-outline-light { border: 1px solid rgba(255,255,255,.35); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.1); }
.glass-card { background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); border: 1px solid rgba(124,214,222,.25); border-radius: 1.25rem; }

/* Tabela "Simulação de investimento" — mesma estrutura da planilha do modelo Qualittas */
.simulacao { width: 100%; border-collapse: collapse; font-size: .9rem; }
.simulacao caption { caption-side: top; background: #1f3864; color: #fff; font-weight: 700; text-transform: uppercase; padding: .6rem .75rem; border-radius: .75rem .75rem 0 0; letter-spacing: .02em; }
.simulacao th { background: #c6efce; font-weight: 700; text-transform: uppercase; font-size: .75rem; padding: .5rem .6rem; color: #0a1c24; }
.simulacao td { padding: .6rem; border-bottom: 1px solid #e3e8e6; vertical-align: top; }
.simulacao .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.simulacao tfoot td { border: 0; font-weight: 700; }
.simulacao .row-total td { background: #ccffcc; }
.simulacao .row-total td.valor { background: #dde9f5; font-size: 1.1rem; }
.simulacao .row-mod td { background: #dde9f5; }
.simulacao .row-mod td.valor { background: #bdd7ee; font-size: 1.05rem; }
.condicoes-box { background: #c5e0b4; border-radius: 0 0 .75rem .75rem; padding: .9rem 1rem; font-size: .9rem; font-style: italic; }
@media (max-width: 640px) {
  .simulacao.itens thead { display: none; }
  .simulacao.itens tbody tr { display: grid; grid-template-columns: 1fr auto; gap: .15rem .75rem; padding: .6rem; border-bottom: 1px solid #e3e8e6; }
  .simulacao.itens tbody td { border: 0; padding: 0; }
  .simulacao.itens tbody td.desc { grid-column: 1 / -1; font-weight: 600; }
  .simulacao.itens tbody td[data-label]::before { content: attr(data-label) " "; color: #5b6b73; font-size: .75rem; }
}
@media (max-width: 640px) {
  .simulacao.itens tbody td.tot { grid-column: 1 / -1; text-align: right; font-weight: 700; }
}

/* ---- Shell operacional (PDR-006 / ADR-026) ---- */
.vc-shell {
  display: flex;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, #dcf0f1, transparent 42%),
    linear-gradient(180deg, #f7fbfb, #eef5f6);
}
.vc-nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.vc-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(1, 23, 37, 0.45);
}
.vc-sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-w);
  min-height: 100vh;
  flex-shrink: 0;
  background: linear-gradient(180deg, #012535 0%, #011725 55%, #000d15 100%);
  color: #fff;
  padding: 1.25rem 0.9rem;
}
.vc-sidebar-brand { padding: 0 0.5rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.vc-sidebar-product {
  margin-top: 0.55rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.vc-nav { display: flex; flex-direction: column; gap: 0.2rem; padding: 1rem 0; flex: 1; }
.vc-nav-section {
  margin: 0.85rem 0.5rem 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.vc-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border-radius: 0.55rem;
  color: rgba(255,255,255,0.82);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}
.vc-nav-link svg { width: 1.15rem; height: 1.15rem; flex-shrink: 0; opacity: 0.85; }
.vc-nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.vc-nav-link.is-active {
  background: rgba(188, 245, 29, 0.14);
  color: var(--lime);
}
.vc-nav-link.is-active svg { opacity: 1; }
.vc-sidebar-foot {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 0.85rem;
}
.vc-sidebar-user {
  padding: 0 0.75rem 0.4rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vc-nav-logout {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
}
.vc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vc-topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid rgba(11, 74, 87, 0.1);
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(8px);
}
.vc-topbar-title { font-size: 0.85rem; font-weight: 600; color: rgba(10,28,36,0.55); }
.vc-menu-btn {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 0.5rem;
  border: 1px solid rgba(11, 74, 87, 0.2);
  background: #fff;
  cursor: pointer;
}
.vc-menu-btn svg { width: 1.25rem; height: 1.25rem; }
.vc-content { padding: 1.5rem 1.25rem 2.5rem; max-width: 72rem; width: 100%; margin: 0 auto; }

/* Padronização global da área autenticada (sem reescrever cada input) */
.vc-content input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.vc-content select,
.vc-content textarea {
  margin-top: 0.25rem;
  width: 100%;
  min-height: 44px;
  border-radius: 0.5rem;
  border: 1px solid rgba(11, 74, 87, 0.25);
  background: #fff;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.vc-content textarea { min-height: 5rem; }
.vc-content input:focus,
.vc-content select:focus,
.vc-content textarea:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(11, 74, 87, 0.15);
  outline: none;
}
.vc-content input[type="checkbox"],
.vc-content input[type="radio"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--moss);
}
.vc-content label { color: rgba(10, 28, 36, 0.78); }
.vc-section {
  border: 1px solid var(--sand);
  border-radius: 0.85rem;
  background: rgba(255,255,255,0.92);
  padding: 1.25rem;
}
.vc-section + .vc-section { margin-top: 1rem; }
.vc-section-title {
  font-family: "Poppins", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--moss);
  margin-bottom: 0.35rem;
}
.vc-sticky-bar {
  position: sticky;
  bottom: 0.5rem;
  z-index: 10;
  border: 1px solid rgba(11, 74, 87, 0.2);
  border-radius: 0.85rem;
  background: rgba(243, 248, 249, 0.96);
  backdrop-filter: blur(8px);
  padding: 1.1rem 1.25rem;
  box-shadow: 0 8px 24px rgba(1, 23, 37, 0.08);
}
.vc-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.vc-empty { padding: 2rem 1rem; text-align: center; color: rgba(10,28,36,0.45); }
.vc-save-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(11, 74, 87, 0.08);
  color: var(--moss);
  font-size: 0.8rem;
  font-weight: 600;
}
.vc-page-title { font-family: "Poppins", sans-serif; font-size: 1.75rem; font-weight: 700; color: var(--moss); line-height: 1.2; }
.vc-page-lead { margin-top: 0.25rem; font-size: 0.875rem; color: rgba(10,28,36,0.55); }
.vc-card {
  border: 1px solid var(--sand);
  border-radius: 0.85rem;
  background: rgba(255,255,255,0.88);
}
.vc-table { width: 100%; text-align: left; font-size: 0.875rem; }
.vc-table thead { background: rgba(227,240,241,0.65); color: rgba(10,28,36,0.7); }
.vc-table th, .vc-table td { padding: 0.75rem 0.85rem; }
.vc-table tbody tr { border-top: 1px solid rgba(227,240,241,0.9); }
.vc-table tbody tr:hover { background: rgba(243,248,249,0.8); }
.vc-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: 0.15rem 0.55rem;
  border-radius: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--sand);
  color: var(--moss);
}
.vc-stat {
  display: block;
  border: 1px solid var(--sand);
  border-radius: 0.85rem;
  background: rgba(255,255,255,0.88);
  padding: 0.85rem;
  font-size: 0.875rem;
  color: inherit;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.vc-stat:hover { border-color: rgba(11,74,87,0.35); box-shadow: 0 1px 0 rgba(11,74,87,0.06); }
.vc-stat strong { display: block; margin-top: 0.15rem; font-size: 1.25rem; color: var(--ink); }
.vc-toast {
  border: 1px solid rgba(11, 74, 87, 0.2);
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
}

@media (max-width: 767px) {
  .vc-shell { display: block; }
  .vc-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: 8px 0 24px rgba(0,0,0,0.2);
  }
  .vc-nav-toggle:checked ~ .vc-sidebar { transform: translateX(0); }
  .vc-nav-toggle:checked ~ .vc-nav-backdrop { display: block; }
  .vc-menu-btn { display: grid; }
  .vc-content { padding: 1.1rem 1rem 2rem; }
}

@media print {
  .vc-sidebar, .vc-topbar, .vc-menu-btn, .vc-nav-backdrop { display: none !important; }
  .vc-shell, .vc-main { display: block; }
  .vc-content { max-width: none; padding: 0; }
}
