/* ==========================================================================
   Design System V2 — Utilitários e componentes globais
   Arquivo reescrito (limpo) carregado exclusivamente pelo chassi V2
   (templates/V2/base/base_public.html). Consome tokens de v2-tokens.css.

   Blocos (use Ctrl+F):
     1. Base / reset pontual
     2. Skip link + foco acessível
     3. Breadcrumb + page banner + page shell
     4. Containers, section-head, eyebrow
     5. Scroll reveal + filtros daltonismo
     6. Subcards (grid PNTP/hubs)
     7. Painéis, prosa, toolbar, campos, badges, empty, pager
     8. Tabs, definition-list grid, info-grid, file-list, next-links
     9. Cards genéricos, KPI cards, timeline, links utilitários
    10. Legal pages, TOC, sitemap helpers
    11. Service & service-card, council-grid
    12. Motion reduce + utilidades finais
   ========================================================================== */

/* =========================================================================
   1) Base pontual V2
   ========================================================================= */
html { scroll-behavior: smooth; }

body.v2 {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Bootstrap 5.3 (carregado pelo partial head da V1) define
     --bs-heading-color com tom escuro e aplica `color: var(--bs-heading-color)`
     em h1..h6. Isso quebrava heróis/banners do V2 onde o fundo é escuro.
     Neutralizamos aqui para que os títulos voltem a herdar a cor do
     container onde estão (hero, page-banner, seções claras/escuras). */
  --bs-heading-color: inherit;
}

body.v2 h1,
body.v2 h2,
body.v2 h3,
body.v2 h4,
body.v2 h5,
body.v2 h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
  font-weight: 800;
  color: inherit;
}

body.v2 img,
body.v2 svg { max-width: 100%; }

body.v2 [x-cloak] { display: none !important; }

.v2-main { min-height: 60vh; }

/* =========================================================================
   2) Skip link + foco acessível
   ========================================================================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.v2-skip-link {
  position: absolute;
  top: -40px;
  left: 1rem;
  z-index: 1000;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: 0.5rem 0.85rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 700;
  transition: top 150ms var(--ease-out-quint);
}
.v2-skip-link:focus-visible { top: 0.5rem; }

body.v2 :focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
  border-radius: 0.25rem;
}

/* =========================================================================
   3) Breadcrumb + page banner + page shell
   ========================================================================= */
.v2-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: hsl(var(--primary-foreground) / 0.85);
  margin-bottom: 0.75rem;
}
.v2-breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}
.v2-breadcrumb li { display: inline-flex; align-items: center; gap: 0.35rem; }
.v2-breadcrumb a {
  color: hsl(var(--primary-foreground) / 0.85);
  text-decoration: none;
}
.v2-breadcrumb a:hover,
.v2-breadcrumb a:focus-visible { color: hsl(var(--primary-foreground)); text-decoration: underline; }
.v2-breadcrumb__sep { color: hsl(var(--primary-foreground) / 0.5); }
.v2-breadcrumb [aria-current="page"] { color: hsl(var(--primary-foreground)); font-weight: 600; }

.v2-page-banner {
  position: relative;
  background-color: hsl(var(--primary));
  background-image: none;
  color: hsl(var(--primary-foreground));
  padding: 2.5rem 0 2.25rem;
  overflow: hidden;
  isolation: isolate;
}
.v2-page-banner__glow {
  position: absolute;
  inset: auto -20% -40% -20%;
  height: 180%;
  background: radial-gradient(ellipse at center, hsl(var(--accent) / 0.25) 0%, transparent 60%);
  z-index: -1;
  filter: blur(40px);
}
.v2-page-banner__inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.v2-page-banner__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: hsl(var(--primary-foreground) / 0.14);
  border: 1px solid hsl(var(--primary-foreground) / 0.3);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: max-content;
}
.v2-page-banner__title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
  line-height: 1.15;
  margin: 0;
  color: hsl(var(--primary-foreground));
  text-shadow: 0 2px 12px rgb(0 0 0 / 0.35);
}
.v2-page-banner__note {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  color: hsl(var(--primary-foreground) / 0.92);
  max-width: 72ch;
}
.v2-page-banner__freshness {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.85rem 0 0;
  padding: 0.35rem 0.75rem;
  width: max-content;
  background: hsl(var(--primary-foreground) / 0.12);
  border: 1px solid hsl(var(--primary-foreground) / 0.18);
  border-radius: 999px;
  color: hsl(var(--primary-foreground) / 0.92);
  font-size: 0.8125rem;
  font-weight: 600;
}
.v2-page-banner__freshness-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: hsl(var(--success));
  box-shadow: 0 0 8px hsl(var(--success) / 0.6);
}
.v2-page-banner__freshness-label {
  color: hsl(var(--primary-foreground) / 0.78);
  font-weight: 500;
}
.v2-page-banner__freshness-time {
  color: hsl(var(--primary-foreground));
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.v2-legal-basis {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 1.5rem;
  padding: 0.85rem 1rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  color: hsl(var(--muted-foreground));
  box-shadow: var(--shadow-card);
}
.v2-legal-basis__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  color: hsl(var(--primary));
}
.v2-legal-basis__text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
}
.v2-legal-basis__label {
  color: hsl(var(--foreground));
  font-weight: 800;
}
.v2-legal-basis__content { color: hsl(var(--muted-foreground)); }
.v2-legal-basis--expanded {
  display: block;
  padding: 0;
  overflow: hidden;
}
.v2-legal-basis__expanded-body { padding: 1.25rem 1.5rem; }
.v2-legal-basis__heading {
  display: flex;
  align-items: center;
  margin: 0 0 1rem;
  color: hsl(var(--foreground));
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
}
.v2-legal-basis__compliance {
  padding: 0.85rem 1.5rem;
  background: hsl(var(--muted) / 0.5);
  border-top: 1px solid hsl(var(--border));
}

/* Compatibilidade: páginas V2 antigas ainda renderizam Base Legal com
   footers/divs utilitários. Estes seletores mantêm o visual canônico sem
   exigir migração integral de todos os templates em uma única alteração. */
body.v2 footer:has(.fa-scale-balanced),
body.v2 .legal-footer,
body.v2 .mt-8.text-xs:has(> p.font-bold:first-child) {
  margin-top: 1.5rem;
  padding: 0.85rem 1rem;
  background: hsl(var(--card)) !important;
  border: 1px solid hsl(var(--border)) !important;
  border-radius: var(--radius-lg);
  color: hsl(var(--muted-foreground)) !important;
  box-shadow: var(--shadow-card);
  text-align: left !important;
}
body.v2 footer:has(.fa-scale-balanced) p,
body.v2 .legal-footer,
body.v2 .mt-8.text-xs:has(> p.font-bold:first-child) p {
  margin: 0;
  color: hsl(var(--muted-foreground)) !important;
  font-size: 0.8125rem;
  line-height: 1.55;
}
body.v2 footer:has(.fa-scale-balanced) .fa-scale-balanced {
  color: hsl(var(--primary)) !important;
}
body.v2 .mt-8.text-xs:has(> p.font-bold:first-child) > p:first-child {
  margin-bottom: 0.2rem;
  color: hsl(var(--foreground)) !important;
  font-weight: 800;
}

.v2-page-shell { padding: 1.75rem 0 3rem; }

/*
 * Compatibilidade com páginas V2 ainda baseadas em templates V1 que usam
 * `.container` Bootstrap por dentro do shell. O `v2-container` já provê
 * largura, padding e centralização — neutraliza o container interno para
 * evitar padding duplo e largura reduzida (1140px dentro de 1400px).
 */
.v2-page-shell .container,
.v2-page-shell .container-fluid,
.v2-page-shell .container-sm,
.v2-page-shell .container-md,
.v2-page-shell .container-lg,
.v2-page-shell .container-xl,
.v2-page-shell .container-xxl {
  width: 100%;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  margin-left: 0;
  margin-right: 0;
}

.v2-page-surface {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1.25rem;
  box-shadow: 0 24px 48px -36px rgb(15 23 42 / 0.22);
  padding: 1.25rem 1.25rem 1.5rem;
}
.v2-editable-surface { position: relative; }
.v2-page-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2rem 0 3rem;
}
.v2-stack-section { margin-top: 1.5rem; }
@media (min-width: 768px) {
  .v2-page-body { padding: 2.5rem 0 3.5rem; }
}
@media (min-width: 1024px) {
  .v2-page-body { padding: 3rem 0 4rem; }
}

/* =========================================================================
   4) Containers, section-head, eyebrow
   ========================================================================= */
.v2-container {
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 768px) {
  .v2-container { padding-left: 2rem; padding-right: 2rem; }
}

.v2-section-head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.v2-section-head--between {
  flex-direction: row;
  align-items: flex-end;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}
.v2-section-head__title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.1vw, 1.9rem);
  line-height: 1.15;
  margin: 0;
  color: hsl(var(--foreground));
}
.v2-section-head__subtitle {
  margin: 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 72ch;
}
.v2-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
  color: hsl(var(--primary));
  margin: 0 0 0.25rem;
}

/* =========================================================================
   5) Scroll reveal + filtros daltonismo
   ========================================================================= */
@keyframes v2-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
@keyframes v2-fade-right {
  from { opacity: 0; transform: translateX(-18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes v2-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.v2-reveal {
  opacity: 0;
  will-change: transform, opacity;
}
.v2-reveal.is-in-view {
  animation: v2-fade-up 600ms var(--ease-out-quint) forwards;
}
.v2-reveal[data-direction="left"].is-in-view {
  animation: v2-fade-right 600ms var(--ease-out-quint) forwards;
}
.v2-reveal[data-direction="fade"].is-in-view {
  animation: v2-fade-in 600ms var(--ease-out-quint) forwards;
}

html[data-colorblind="protanopia"]  { filter: url(#v2-filter-protanopia); }
html[data-colorblind="deuteranopia"] { filter: url(#v2-filter-deuteranopia); }
html[data-colorblind="tritanopia"]  { filter: url(#v2-filter-tritanopia); }

/* =========================================================================
   6) Subcards (hubs de transparência, PNTP, navegação)
   ========================================================================= */
.v2-subcards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 0.5rem 0 1.5rem;
}
.v2-subcard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.2rem 1.2rem 1.45rem;
  background: linear-gradient(180deg, hsl(var(--card)) 0%, hsl(var(--background)) 100%);
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  text-decoration: none;
  color: hsl(var(--foreground));
  overflow: hidden;
  box-shadow: 0 18px 30px -30px rgb(15 23 42 / 0.24);
  transition:
    transform var(--duration-fast) var(--ease-out-quint),
    border-color var(--duration-fast) var(--ease-out-quint),
    box-shadow var(--duration-fast) var(--ease-out-quint);
}
.v2-subcard::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background-color: hsl(var(--primary));
}
.v2-subcard:hover,
.v2-subcard:focus-visible {
  transform: translateY(-2px);
  border-color: hsl(var(--primary) / 0.28);
  box-shadow: 0 24px 34px -24px hsl(var(--primary) / 0.25);
}
.v2-subcard__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background-color: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
}
.v2-subcard__badge {
  align-self: flex-start;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background-color: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.v2-subcard__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  line-height: 1.3;
}
.v2-subcard__desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
}
.v2-subcard__arrow {
  align-self: flex-end;
  color: hsl(var(--primary));
  transition: transform var(--duration-base) var(--ease-out-quint);
  margin-top: auto;
}
.v2-subcard:hover .v2-subcard__arrow,
.v2-subcard:focus-visible .v2-subcard__arrow {
  transform: translateX(0.25rem);
}

.v2-subcard--green::before { background-color: hsl(var(--success)); }
.v2-subcard--green .v2-subcard__icon,
.v2-subcard--green .v2-subcard__badge { background-color: hsl(var(--success) / 0.12); }
.v2-subcard--green .v2-subcard__icon,
.v2-subcard--green .v2-subcard__arrow,
.v2-subcard--green .v2-subcard__badge { color: hsl(var(--success)); }
.v2-subcard--gold::before { background-color: hsl(var(--gold)); }
.v2-subcard--gold .v2-subcard__icon,
.v2-subcard--gold .v2-subcard__badge { background-color: hsl(var(--gold) / 0.16); }
.v2-subcard--gold .v2-subcard__icon,
.v2-subcard--gold .v2-subcard__arrow,
.v2-subcard--gold .v2-subcard__badge { color: hsl(var(--gov-gold)); }
.v2-subcard--red::before { background-color: hsl(var(--danger)); }
.v2-subcard--red .v2-subcard__icon,
.v2-subcard--red .v2-subcard__badge { background-color: hsl(var(--danger) / 0.12); }
.v2-subcard--red .v2-subcard__icon,
.v2-subcard--red .v2-subcard__arrow,
.v2-subcard--red .v2-subcard__badge { color: hsl(var(--danger)); }
.v2-subcard--neutral::before { background-color: hsl(var(--muted-foreground)); }
.v2-subcard--neutral .v2-subcard__icon,
.v2-subcard--neutral .v2-subcard__badge { background-color: hsl(var(--muted)); }
.v2-subcard--neutral .v2-subcard__icon,
.v2-subcard--neutral .v2-subcard__arrow,
.v2-subcard--neutral .v2-subcard__badge { color: hsl(var(--muted-foreground)); }

/* =========================================================================
   7) Painéis, prosa, toolbar, campos, badges, empty, pager
   ========================================================================= */
.v2-panel {
  background: linear-gradient(180deg, hsl(var(--card)) 0%, hsl(var(--background)) 100%);
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 1.125rem 1.25rem;
  box-shadow: 0 18px 36px -28px rgb(15 23 42 / 0.18);
}
.v2-panel + .v2-panel { margin-top: 1rem; }
.v2-panel--accent {
  border-color: hsl(var(--primary) / 0.18);
  background: linear-gradient(180deg, hsl(var(--primary) / 0.06) 0%, hsl(var(--card)) 100%);
}
.v2-panel__title {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  margin: 0 0 0.7rem;
  color: hsl(var(--primary));
  font-weight: 700;
}
.v2-panel__title--spaced { margin-top: 0.75rem; }

.v2-prose { color: hsl(var(--foreground)); line-height: 1.72; font-size: 1rem; }
.v2-prose > *:first-child { margin-top: 0; }
.v2-prose > *:last-child { margin-bottom: 0; }
.v2-prose p { margin: 0 0 1rem; }
.v2-prose h2,
.v2-prose h3,
.v2-prose h4 { margin: 1.4rem 0 0.6rem; color: hsl(var(--foreground)); }
.v2-prose ul,
.v2-prose ol { padding-left: 1.2rem; margin: 0.25rem 0 1rem; }
.v2-prose li + li { margin-top: 0.25rem; }
.v2-prose a { color: hsl(var(--primary)); text-decoration: underline; text-underline-offset: 2px; }
.v2-prose a:hover { color: hsl(var(--primary) / 0.85); }
.v2-prose img { max-width: 100%; height: auto; border-radius: 0.875rem; }
.v2-prose blockquote {
  margin: 1rem 0;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 4px solid hsl(var(--accent));
  color: hsl(var(--muted-foreground));
  font-style: italic;
}

.v2-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.05rem;
  background: linear-gradient(180deg, hsl(var(--card)) 0%, hsl(var(--background)) 100%);
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.45);
  margin-bottom: 1rem;
}
.v2-toolbar__search {
  flex: 1 1 280px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 0.875rem;
  padding: 0.7rem 0.9rem;
}
.v2-toolbar__search svg { color: hsl(var(--muted-foreground)); flex-shrink: 0; }
.v2-toolbar__search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: hsl(var(--foreground));
  font-size: 0.9375rem;
  min-width: 0;
}
.v2-toolbar__search input::placeholder { color: hsl(var(--muted-foreground)); }

.v2-select,
.v2-field select,
.v2-field input[type="text"],
.v2-field input[type="search"],
.v2-field input[type="email"],
.v2-field input[type="tel"],
.v2-field input[type="url"],
.v2-field input[type="number"],
.v2-field input[type="date"],
.v2-field input[type="file"],
.v2-field textarea {
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 0.875rem;
  padding: 0.7rem 0.9rem;
  color: hsl(var(--foreground));
  font-size: 0.9375rem;
  width: 100%;
  font: inherit;
}
.v2-field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.9rem; }
.v2-field label { font-size: 0.85rem; font-weight: 600; color: hsl(var(--foreground)); }
.v2-field__hint { font-size: 0.8rem; color: hsl(var(--muted-foreground)); }
.v2-field textarea { resize: vertical; min-height: 120px; }
body.v2 .form-input,
body.v2 .form-select,
body.v2 .form-textarea {
  width: 100%;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  padding: 0.6rem 0.75rem;
  color: hsl(var(--foreground));
  font: inherit;
}
.v2-select:focus-visible,
.v2-field select:focus-visible,
.v2-field input:focus-visible,
.v2-field textarea:focus-visible,
body.v2 .form-input:focus-visible,
body.v2 .form-select:focus-visible,
body.v2 .form-textarea:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 1px;
  border-color: hsl(var(--primary));
}

.v2-alert {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--foreground));
}
.v2-alert--success {
  border-color: hsl(var(--success) / 0.32);
  background: hsl(var(--success) / 0.1);
  color: hsl(var(--success));
}
.v2-alert--danger {
  border-color: hsl(var(--danger) / 0.32);
  background: hsl(var(--danger) / 0.1);
  color: hsl(var(--danger));
}
.v2-alert--warning {
  border-color: hsl(var(--warning) / 0.32);
  background: hsl(var(--warning) / 0.1);
  color: hsl(var(--warning));
}
.v2-alert__label {
  color: hsl(var(--muted-foreground));
}

.v2-toolbar__btn,
.v2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  min-height: 2.6rem;
  border-radius: 9999px;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 700;
  font-size: 0.875rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform var(--duration-fast) var(--ease-out-quint),
    background-color var(--duration-fast) var(--ease-out-quint),
    border-color var(--duration-fast) var(--ease-out-quint),
    box-shadow var(--duration-fast) var(--ease-out-quint);
  box-shadow: 0 10px 22px -16px hsl(var(--primary) / 0.65);
}
.v2-btn--primary { background-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.v2-btn--secondary { background-color: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }
.v2-btn--outline {
  background-color: transparent;
  color: hsl(var(--primary));
  border-color: hsl(var(--primary) / 0.35);
}
.v2-btn--danger { background-color: hsl(var(--danger)); color: hsl(var(--danger-foreground)); }
.v2-toolbar__btn:hover,
.v2-toolbar__btn:focus-visible,
.v2-btn:hover,
.v2-btn:focus-visible {
  transform: translateY(-1px);
  background-color: hsl(var(--primary) / 0.92);
}
.v2-toolbar__btn--ghost,
.v2-btn--ghost {
  background-color: hsl(var(--card));
  color: hsl(var(--primary));
  border-color: hsl(var(--primary) / 0.22);
  box-shadow: none;
}
.v2-toolbar__btn--ghost:hover,
.v2-toolbar__btn--ghost:focus-visible,
.v2-btn--ghost:hover,
.v2-btn--ghost:focus-visible {
  background-color: hsl(var(--primary) / 0.06);
}

.v2-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background-color: hsl(var(--primary) / 0.08);
  color: hsl(var(--primary));
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
}
a.v2-badge:hover,
a.v2-badge:focus-visible { background-color: hsl(var(--primary) / 0.16); }

.v2-empty {
  text-align: center;
  padding: 2.4rem 1.25rem;
  color: hsl(var(--muted-foreground));
  background: linear-gradient(180deg, hsl(var(--card)) 0%, hsl(var(--background)) 100%);
  border: 1px dashed hsl(var(--border));
  border-radius: 1rem;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.4);
}
.v2-empty p { margin: 0.25rem 0; }
.v2-empty__suggestions {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.75rem;
}

.v2-pager {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.v2-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(180deg, hsl(var(--card)) 0%, hsl(var(--background)) 100%);
  border: 1px solid hsl(var(--border));
  border-radius: 0.85rem;
  box-shadow: 0 18px 30px -32px rgb(15 23 42 / 0.18);
}

.v2-pagination__summary {
  margin: 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
}

.v2-pagination__summary strong {
  color: hsl(var(--foreground));
  font-weight: 700;
}

.v2-pagination__controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.v2-pagination__button,
.v2-pagination__link,
.v2-pagination__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.48rem 0.75rem;
  border-radius: 0.65rem;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.v2-pagination__button,
.v2-pagination__link {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.v2-pagination__button:hover,
.v2-pagination__button:focus-visible,
.v2-pagination__link:hover,
.v2-pagination__link:focus-visible {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.v2-pagination__button.is-disabled {
  cursor: not-allowed;
  opacity: 0.46;
  background: hsl(var(--muted) / 0.45);
  color: hsl(var(--muted-foreground));
}

.v2-pagination__status {
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}

@media (max-width: 720px) {
  .v2-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .v2-pagination__summary { text-align: center; }
  .v2-pagination__controls { justify-content: center; }
}

/* =========================================================================
   8) Tabs, definition-list grid, info-grid, file-list, next-links
   ========================================================================= */
.v2-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 1px solid hsl(var(--border));
  margin-bottom: 1rem;
}
.v2-tab {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 0.8rem 1rem;
  color: hsl(var(--muted-foreground));
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9375rem;
}
.v2-tab:hover,
.v2-tab:focus-visible { color: hsl(var(--foreground)); }
.v2-tab.is-active {
  color: hsl(var(--primary));
  border-bottom-color: hsl(var(--primary));
}
.v2-tabs__panel {
  width: 100%;
  padding: 1.25rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.v2-dl-grid,
.v2-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin: 0.25rem 0 1rem;
}
.v2-dl-grid > div,
.v2-info-grid > div {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.875rem;
  padding: 0.8rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.v2-dl-grid dt,
.v2-info-grid dt,
.v2-info-grid__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(var(--muted-foreground));
  font-weight: 700;
}
.v2-dl-grid dd,
.v2-info-grid dd,
.v2-info-grid__value {
  margin: 0;
  color: hsl(var(--foreground));
  font-weight: 500;
}
.v2-dl {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
}
.v2-dl dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: hsl(var(--muted-foreground)); font-weight: 700; }
.v2-dl dd { margin: 0 0 0.35rem; color: hsl(var(--foreground)); font-weight: 500; }

.v2-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.v2-file-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.85rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
}
.v2-file-list li::before {
  content: "";
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 0.25rem;
  background:
    linear-gradient(135deg, hsl(var(--primary) / 0.18), hsl(var(--primary) / 0.05));
  border: 1px solid hsl(var(--primary) / 0.22);
}
.v2-file-list a {
  color: hsl(var(--primary));
  font-weight: 600;
  text-decoration: none;
}
.v2-file-list a:hover,
.v2-file-list a:focus-visible { text-decoration: underline; }

.v2-next-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0;
  list-style: none;
}
.v2-next-links li { margin: 0; }
.v2-next-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.875rem;
  color: hsl(var(--foreground));
  text-decoration: none;
  font-weight: 600;
  transition:
    transform var(--duration-fast) var(--ease-out-quint),
    border-color var(--duration-fast) var(--ease-out-quint),
    box-shadow var(--duration-fast) var(--ease-out-quint);
}
.v2-next-links a::after { content: "→"; color: hsl(var(--primary)); font-weight: 700; }
.v2-next-links a:hover,
.v2-next-links a:focus-visible {
  transform: translateY(-1px);
  border-color: hsl(var(--primary) / 0.24);
  box-shadow: 0 18px 30px -24px hsl(var(--primary) / 0.2);
}

/* =========================================================================
   9) Cards, KPI, timeline, links utilitários
   ========================================================================= */
.v2-card {
  background: linear-gradient(180deg, hsl(var(--card)) 0%, hsl(var(--background)) 100%);
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 18px 30px -32px rgb(15 23 42 / 0.16);
  transition:
    transform var(--duration-fast) var(--ease-out-quint),
    border-color var(--duration-fast) var(--ease-out-quint),
    box-shadow var(--duration-fast) var(--ease-out-quint);
}
.v2-card--link:hover,
.v2-card--link:focus-visible {
  transform: translateY(-2px);
  border-color: hsl(var(--primary) / 0.24);
  box-shadow: 0 22px 34px -28px hsl(var(--primary) / 0.2);
}
.v2-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
  display: grid;
  place-items: center;
}
.v2-card__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  line-height: 1.3;
}
.v2-card__desc {
  margin: 0.1rem 0 0;
  font-size: 0.9rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.55;
}

.v2-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.v2-kpi,
.v2-kpi-card {
  position: relative;
  background: linear-gradient(180deg, hsl(var(--card)) 0%, hsl(var(--background)) 100%);
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 1rem 1.05rem 1.1rem;
  box-shadow: 0 18px 30px -32px rgb(15 23 42 / 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.v2-kpi::before,
.v2-kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: hsl(var(--primary));
}
.v2-kpi-card--green::before { background: hsl(var(--gov-green)); }
.v2-kpi-card--gold::before  { background: hsl(var(--gov-gold)); }
.v2-kpi-card--primary::before { background: hsl(var(--primary)); }
.v2-kpi__label,
.v2-kpi-card__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: hsl(var(--muted-foreground));
}
.v2-kpi__value,
.v2-kpi-card__value {
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: hsl(var(--primary));
  font-weight: 800;
  line-height: 1.05;
}
.v2-kpi__unit { font-size: 0.8125rem; color: hsl(var(--muted-foreground)); }
.v2-kpi__ref  { font-size: 0.75rem; color: hsl(var(--muted-foreground)); font-style: italic; margin-top: 0.2rem; }
.v2-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.v2-lead {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: hsl(var(--foreground));
}

.v2-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  position: relative;
  padding-left: 1.25rem;
  border-left: 2px solid hsl(var(--border));
}
.v2-timeline li {
  position: relative;
  padding: 0.1rem 0 0.1rem 0.25rem;
}
.v2-timeline li::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 0.45rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: hsl(var(--primary));
  box-shadow: 0 0 0 4px hsl(var(--primary) / 0.12);
}
.v2-timeline__date {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(var(--muted-foreground));
  font-weight: 700;
  margin-bottom: 0.15rem;
}
.v2-timeline__title {
  font-weight: 600;
  color: hsl(var(--foreground));
}
.v2-timeline__user {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-left: 0.35rem;
}
.v2-response-meta {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  margin: 0.5rem 0 0;
  font-style: italic;
}

.v2-link {
  color: hsl(var(--primary));
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-fast) var(--ease-out-quint);
}
.v2-link:hover,
.v2-link:focus-visible { border-bottom-color: hsl(var(--primary) / 0.45); }
.v2-link--btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: hsl(var(--primary) / 0.08);
  border: 1px solid hsl(var(--primary) / 0.2);
  font-size: 0.8125rem;
}
.v2-link--btn:hover,
.v2-link--btn:focus-visible {
  background: hsl(var(--primary) / 0.14);
  border-bottom-color: transparent;
}

/* Status badges reutilizados em várias páginas */
.v2-badge--open,
.v2-badge--scheduled,
.v2-badge--answered,
.v2-badge--completed { background: hsl(var(--success) / 0.15); color: hsl(var(--success)); }
.v2-badge--processing,
.v2-badge--in_progress { background: hsl(var(--primary) / 0.15); color: hsl(var(--primary)); }
.v2-badge--received { background: hsl(var(--warning) / 0.15); color: hsl(var(--warning)); }
.v2-badge--closed,
.v2-badge--result { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
.v2-badge--danger { background: hsl(var(--danger) / 0.15); color: hsl(var(--danger)); }

/* =========================================================================
   10) Legal pages, TOC e sitemap helpers
   ========================================================================= */
.v2-legal-page { display: flex; flex-direction: column; gap: 1rem; }
.v2-legal-page__meta { font-size: 0.85rem; color: hsl(var(--muted-foreground)); }

.v2-toc {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.875rem;
  padding: 0.85rem 1rem;
}
.v2-toc ol { margin: 0; padding-left: 1.1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.2rem 1rem; }
.v2-toc a { color: hsl(var(--primary)); text-decoration: none; }
.v2-toc a:hover { text-decoration: underline; }

.v2-sitemap { display: flex; flex-direction: column; gap: 1rem; }
.v2-sitemap__quicklinks { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.v2-sitemap__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.v2-sitemap__section {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 1rem 1.1rem 1.15rem;
}
.v2-sitemap__section ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.2rem; }
.v2-sitemap__section a { color: hsl(var(--foreground)); text-decoration: none; }
.v2-sitemap__section a:hover,
.v2-sitemap__section a:focus-visible { color: hsl(var(--primary)); text-decoration: underline; }

/* =========================================================================
   11) Service/service-card, srv-cat, council-grid, etc.
   ========================================================================= */
.v2-services-grid,
.v2-srv-cat-grid,
.v2-council-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.v2-service-card {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(180deg, hsl(var(--card)) 0%, hsl(var(--background)) 100%);
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 18px 30px -32px rgb(15 23 42 / 0.18);
  transition:
    transform var(--duration-fast) var(--ease-out-quint),
    border-color var(--duration-fast) var(--ease-out-quint),
    box-shadow var(--duration-fast) var(--ease-out-quint);
}
.v2-service-card:hover,
.v2-service-card:focus-visible {
  transform: translateY(-2px);
  border-color: hsl(var(--primary) / 0.24);
  box-shadow: 0 22px 34px -28px hsl(var(--primary) / 0.2);
}
.v2-service-card__icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 0.6rem;
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  line-height: 0;
}
.v2-service-card__icon svg {
  display: block;
  width: 24px;
  height: 24px;
}
.v2-service-card__body { display: flex; flex-direction: column; gap: 0.3rem; }
.v2-service-card__title { margin: 0; font-family: var(--font-heading); font-size: 1rem; font-weight: 700; line-height: 1.3; color: hsl(var(--foreground)); }
.v2-service-card__desc { margin: 0; font-size: 0.9rem; color: hsl(var(--muted-foreground)); line-height: 1.5; }
.v2-service-card__meta { display: flex; justify-content: space-between; align-items: center; margin-top: 0.35rem; font-size: 0.8125rem; color: hsl(var(--muted-foreground)); }
.v2-service-card__link { color: hsl(var(--primary)); font-weight: 600; }

.v2-srv-cat {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  text-decoration: none;
  color: hsl(var(--foreground));
  transition: transform var(--duration-fast) var(--ease-out-quint), border-color var(--duration-fast) var(--ease-out-quint);
}
.v2-srv-cat:hover,
.v2-srv-cat:focus-visible { transform: translateY(-2px); border-color: hsl(var(--primary) / 0.28); }
.v2-srv-cat__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.6rem;
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
  display: grid;
  place-items: center;
}
.v2-srv-list { list-style: none; margin: 0.5rem 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.v2-srv-item {
  padding: 0.85rem 1rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.v2-srv-item__meta { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.8125rem; color: hsl(var(--muted-foreground)); }

.v2-service-detail { display: flex; flex-direction: column; gap: 1.25rem; }
.v2-service-detail__header { display: flex; flex-direction: column; gap: 0.5rem; }
.v2-service-detail__title { margin: 0; font-family: var(--font-heading); font-size: clamp(1.4rem, 2vw, 1.85rem); line-height: 1.2; color: hsl(var(--foreground)); }
.v2-service-detail__lede { margin: 0; color: hsl(var(--muted-foreground)); font-size: 1rem; line-height: 1.6; }
.v2-service-detail__meta { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.85rem; color: hsl(var(--muted-foreground)); }
.v2-service-detail__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 1024px) {
  .v2-service-detail__grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .v2-service-detail__side { position: sticky; top: 1rem; align-self: start; display: flex; flex-direction: column; gap: 0.75rem; }
}
.v2-service-detail__main { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.v2-service-detail__side { display: flex; flex-direction: column; gap: 0.75rem; }

/* Hero figure (reusada em páginas institucionais) */
.v2-hero-figure {
  margin: 0 0 1rem;
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
  box-shadow: 0 24px 40px -34px rgb(15 23 42 / 0.24);
}
.v2-hero-figure img {
  width: 100%;
  display: block;
  aspect-ratio: 21/9;
  object-fit: cover;
}
.v2-hero-figure figcaption {
  padding: 0.5rem 0.9rem;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  background: hsl(var(--muted) / 0.5);
}

/* Transparency layout wrapper (base_transparency.html) */
.v2-transparency-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding: 1.5rem 0 2.5rem;
}
@media (min-width: 1024px) {
  .v2-transparency-layout { grid-template-columns: 280px minmax(0, 1fr); }
}

/* Home: licitacoes */
.v2-bidding {
  padding: 4rem 0;
  background-color: hsl(var(--secondary));
}
.v2-bidding__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
  .v2-bidding__head { flex-direction: row; align-items: center; }
}
.v2-bidding__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.2vw, 1.875rem);
  line-height: 1.2;
  margin: 0;
  color: hsl(var(--foreground));
}
.v2-bidding__lead {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin: 0.25rem 0 0;
}
.v2-bidding__actions {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.v2-bidding__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  border: 1px solid hsl(var(--primary));
  color: hsl(var(--primary));
  background-color: transparent;
  transition: background-color var(--duration-fast) var(--ease-out-quint), color var(--duration-fast) var(--ease-out-quint);
}
.v2-bidding__cta:hover,
.v2-bidding__cta:focus-visible {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.v2-bidding__cta--primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
}
.v2-bidding__cta--primary:hover,
.v2-bidding__cta--primary:focus-visible {
  background-color: hsl(var(--primary) / 0.9);
  color: hsl(var(--primary-foreground));
}
.v2-bidding__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.v2-bidding__row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  transition: box-shadow var(--duration-fast) var(--ease-out-quint), border-color var(--duration-fast) var(--ease-out-quint);
}
@media (min-width: 768px) {
  .v2-bidding__row { flex-direction: row; align-items: center; gap: 1.5rem; }
}
.v2-bidding__row:hover,
.v2-bidding__row:focus-visible {
  box-shadow: 0 10px 20px -10px rgb(0 0 0 / 0.15);
  border-color: hsl(var(--primary) / 0.2);
}
.v2-bidding__row-main { flex: 1; min-width: 0; }
.v2-bidding__row-title {
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.4;
  margin: 0;
  color: hsl(var(--foreground));
  transition: color var(--duration-fast) var(--ease-out-quint);
}
.v2-bidding__row:hover .v2-bidding__row-title,
.v2-bidding__row:focus-visible .v2-bidding__row-title {
  color: hsl(var(--primary));
}
.v2-bidding__row-number {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin: 0.25rem 0 0;
}
.v2-bidding__row-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.v2-bidding__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}
.v2-bidding__pill--type {
  background-color: hsl(var(--primary) / 0.08);
  color: hsl(var(--primary));
  border: 1px solid hsl(var(--primary) / 0.1);
}
.v2-bidding__pill--status {
  background-color: hsl(var(--accent) / 0.1);
  color: hsl(var(--accent));
}
.v2-bidding__pill--date {
  background-color: hsl(var(--secondary));
  color: hsl(var(--muted-foreground));
}
.v2-bidding__row-chev {
  color: hsl(var(--muted-foreground));
  transition: color var(--duration-fast) var(--ease-out-quint);
}
.v2-bidding__row:hover .v2-bidding__row-chev,
.v2-bidding__row:focus-visible .v2-bidding__row-chev {
  color: hsl(var(--primary));
}
.v2-bidding__footer {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
@media (min-width: 768px) {
  .v2-bidding__footer { flex-direction: row; align-items: center; }
}
.v2-bidding__footer-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin: 0;
  color: hsl(var(--foreground));
}
.v2-bidding__footer-desc {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin: 0.125rem 0 0;
}
.v2-bidding__footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: hsl(var(--primary));
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
}
.v2-bidding__footer-link:hover,
.v2-bidding__footer-link:focus-visible {
  text-decoration: underline;
}

/* =========================================================================
   12) Motion reduce + utilidades
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .v2-reveal { opacity: 1 !important; animation: none !important; }
}

/* Utilidades pontuais usadas nos templates */
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }

/* =========================================================================
   Compatibilidade controlada para miolos V2 ainda migrados de V1/Bootstrap
   ========================================================================= */
body.v2 .card {
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}
body.v2 .card-body { padding: 1.25rem; }
body.v2 .btn-gray,
body.v2 .btn-outline-primary,
body.v2 .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.25rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid hsl(var(--primary) / 0.24);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 700;
  transition:
    transform var(--duration-fast) var(--ease-out-quint),
    background-color var(--duration-fast) var(--ease-out-quint),
    border-color var(--duration-fast) var(--ease-out-quint);
}
body.v2 .btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
body.v2 .btn-gray,
body.v2 .btn-outline-primary {
  background: hsl(var(--card));
  color: hsl(var(--primary));
}
body.v2 .btn-gray:hover,
body.v2 .btn-gray:focus-visible,
body.v2 .btn-outline-primary:hover,
body.v2 .btn-outline-primary:focus-visible,
body.v2 .btn-primary:hover,
body.v2 .btn-primary:focus-visible {
  transform: translateY(-1px);
  background: hsl(var(--primary) / 0.08);
  border-color: hsl(var(--primary) / 0.36);
}
body.v2 .btn-primary:hover,
body.v2 .btn-primary:focus-visible {
  background: hsl(var(--primary) / 0.92);
}

/* Compatibilidade DS V2 para templates grandes ainda com utilitários Tailwind legados. */
body.v2 .input_forms,
body.v2 .input-form {
  width: 100%;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  padding: 0.6rem 0.75rem;
  color: hsl(var(--foreground));
  font: inherit;
}
body.v2 .bidding_titles {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 800;
  color: hsl(var(--foreground));
}
body.v2 .paper {
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}
body.v2 .badge-base {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  background: hsl(var(--primary) / 0.1);
  border: 1px solid hsl(var(--primary) / 0.22);
  color: hsl(var(--primary));
  font-size: 0.75rem;
  font-weight: 700;
}
body.v2 .text-gray-300,
body.v2 .text-gray-400,
body.v2 .text-gray-500,
body.v2 .text-gray-600,
body.v2 .text-gray-700,
body.v2 .text-slate-400,
body.v2 .text-slate-500,
body.v2 .text-slate-600,
body.v2 .text-muted-foreground {
  color: hsl(var(--muted-foreground));
}
body.v2 .text-gray-800,
body.v2 .text-gray-900,
body.v2 .text-slate-800,
body.v2 .text-slate-900,
body.v2 .text-foreground {
  color: hsl(var(--foreground));
}
body.v2 .text-blue-500,
body.v2 .text-blue-600,
body.v2 .text-blue-700,
body.v2 .text-blue-800,
body.v2 .text-blue-900,
body.v2 .text-sky-500,
body.v2 .text-sky-600,
body.v2 .text-indigo-500,
body.v2 .text-indigo-600,
body.v2 .text-violet-500,
body.v2 .text-violet-600,
body.v2 .text-primary {
  color: hsl(var(--primary));
}
body.v2 .text-emerald-500,
body.v2 .text-emerald-600,
body.v2 .text-emerald-700,
body.v2 .text-emerald-800,
body.v2 .text-green-500,
body.v2 .text-green-600,
body.v2 .text-green-700,
body.v2 .text-green-800 {
  color: hsl(var(--success));
}
body.v2 .text-amber-500,
body.v2 .text-amber-600,
body.v2 .text-amber-700,
body.v2 .text-amber-800,
body.v2 .text-orange-500,
body.v2 .text-orange-600,
body.v2 .text-yellow-500 {
  color: hsl(var(--warning));
}
body.v2 .text-red-400,
body.v2 .text-red-500,
body.v2 .text-red-600,
body.v2 .text-red-700,
body.v2 .text-red-800,
body.v2 .text-rose-500,
body.v2 .text-rose-600,
body.v2 .text-pink-500,
body.v2 .text-pink-600 {
  color: hsl(var(--danger));
}
body.v2 .bg-white,
body.v2 .bg-gray-50,
body.v2 .bg-gray-100,
body.v2 .bg-slate-50,
body.v2 .bg-slate-100 {
  background-color: hsl(var(--card));
}
body.v2 .bg-gray-200,
body.v2 .bg-gray-700,
body.v2 .bg-gray-800,
body.v2 .bg-gray-900,
body.v2 .bg-slate-200,
body.v2 .bg-slate-800,
body.v2 .bg-muted {
  background-color: hsl(var(--muted));
}
body.v2 .bg-blue-50,
body.v2 .bg-blue-100,
body.v2 .bg-blue-400\/30,
body.v2 .bg-blue-500,
body.v2 .bg-blue-600,
body.v2 .bg-sky-50,
body.v2 .bg-sky-100,
body.v2 .bg-indigo-500,
body.v2 .bg-violet-500 {
  background-color: hsl(var(--primary) / 0.12);
}
body.v2 .bg-emerald-50,
body.v2 .bg-emerald-100,
body.v2 .bg-emerald-500,
body.v2 .bg-green-50,
body.v2 .bg-green-100,
body.v2 .bg-green-400\/30,
body.v2 .bg-green-500 {
  background-color: hsl(var(--success) / 0.12);
}
body.v2 .bg-amber-50,
body.v2 .bg-amber-100,
body.v2 .bg-amber-500,
body.v2 .bg-orange-500,
body.v2 .bg-yellow-50,
body.v2 .bg-yellow-100 {
  background-color: hsl(var(--warning) / 0.12);
}
body.v2 .bg-red-50,
body.v2 .bg-red-100,
body.v2 .bg-red-500,
body.v2 .bg-red-600,
body.v2 .bg-rose-50,
body.v2 .bg-rose-100,
body.v2 .bg-rose-500,
body.v2 .bg-pink-500 {
  background-color: hsl(var(--danger) / 0.12);
}
body.v2 .border-gray-100,
body.v2 .border-gray-200,
body.v2 .border-gray-300,
body.v2 .border-gray-600,
body.v2 .border-gray-700,
body.v2 .border-slate-200,
body.v2 .border-border {
  border-color: hsl(var(--border));
}
body.v2 .border-blue-200,
body.v2 .border-blue-400,
body.v2 .border-blue-500,
body.v2 .border-primary\/20 {
  border-color: hsl(var(--primary) / 0.28);
}
body.v2 .border-emerald-200,
body.v2 .border-green-200 {
  border-color: hsl(var(--success) / 0.28);
}
body.v2 .border-amber-200,
body.v2 .border-yellow-200 {
  border-color: hsl(var(--warning) / 0.28);
}
body.v2 .border-red-200,
body.v2 .border-red-500,
body.v2 .border-rose-200 {
  border-color: hsl(var(--danger) / 0.28);
}

.v2-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  text-decoration: none;
  transition:
    transform var(--duration-fast) var(--ease-out-quint),
    border-color var(--duration-fast) var(--ease-out-quint),
    background-color var(--duration-fast) var(--ease-out-quint);
}
.v2-social-link--featured { grid-column: span 2 / span 2; }
@media (min-width: 640px) {
  .v2-social-link--featured { grid-column: span 1 / span 1; }
}
.v2-social-link:hover,
.v2-social-link:focus-visible {
  transform: translateY(-1px);
  border-color: hsl(var(--primary) / 0.28);
  background: hsl(var(--primary) / 0.04);
}
.v2-social-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  flex-shrink: 0;
}
.v2-social-link__action {
  margin-left: auto;
  white-space: nowrap;
  color: hsl(var(--primary));
  font-size: 0.75rem;
  font-weight: 700;
}
.v2-social-link:hover .v2-social-link__action,
.v2-social-link:focus-visible .v2-social-link__action {
  text-decoration: underline;
}

.v2-contact-skip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: var(--radius-lg);
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.v2-contact-skip a { --tw-ring-color: hsl(var(--accent)); }

.v2-contact { display: flex; flex-direction: column; gap: 1.25rem; }
.v2-contact__grid {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 320px);
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 900px) {
  .v2-contact__grid { grid-template-columns: 1fr; }
}
.v2-contact__main,
.v2-contact__side { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 901px) {
  .v2-contact__side { position: sticky; top: 8.5rem; }
}
.v2-channels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.65rem;
}
.v2-channel {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.05rem;
  background: linear-gradient(180deg, hsl(var(--card)) 0%, hsl(var(--background)) 100%);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: inherit;
  transition:
    border-color var(--duration-fast) var(--ease-out-quint),
    transform var(--duration-fast) var(--ease-out-quint),
    box-shadow var(--duration-fast) var(--ease-out-quint);
  box-shadow: 0 16px 28px -30px rgb(15 23 42 / 0.2);
}
.v2-channel:hover,
.v2-channel:focus-visible {
  border-color: hsl(var(--primary) / 0.28);
  transform: translateY(-1px);
  box-shadow: 0 20px 32px -28px hsl(var(--primary) / 0.22);
}
.v2-channel__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.v2-channel strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: hsl(var(--foreground));
}
.v2-channel span {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}
.v2-address {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-style: normal;
  line-height: 1.5;
  font-size: 0.9375rem;
  color: hsl(var(--foreground));
}
.v2-socials {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.v2-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.9rem;
  border-radius: 9999px;
  background: hsl(var(--primary) / 0.08);
  color: hsl(var(--primary));
  text-decoration: none;
  font-weight: 600;
}
.v2-socials a:hover,
.v2-socials a:focus-visible {
  background: hsl(var(--primary) / 0.14);
}
.v2-contact-info {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-lg);
  background: hsl(var(--muted));
}
.v2-contact-info__icon,
.v2-quick-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.1);
}
.v2-contact-info__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
}
.v2-quick-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: hsl(var(--foreground));
  transition: background-color var(--duration-fast) var(--ease-out-quint), color var(--duration-fast) var(--ease-out-quint);
}
.v2-quick-link:hover,
.v2-quick-link:focus-visible {
  background: hsl(var(--primary) / 0.06);
  color: hsl(var(--primary));
}
.v2-quick-link__icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-sm);
}
.v2-quick-link__arrow {
  margin-left: auto;
  color: hsl(var(--muted-foreground));
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out-quint);
}
.v2-quick-link:hover .v2-quick-link__arrow,
.v2-quick-link:focus-visible .v2-quick-link__arrow {
  opacity: 1;
}

.v2-ombuds-success {
  display: grid;
  place-items: center;
  padding: 2rem 0;
}
.v2-success-card {
  max-width: 620px;
  width: 100%;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-2xl);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  box-shadow: 0 12px 40px -20px hsl(var(--primary) / 0.25);
}
.v2-success-card__icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: hsl(var(--success) / 0.14);
  color: hsl(var(--success));
  display: grid;
  place-items: center;
}
.v2-success-card__title {
  font-family: var(--font-heading);
  font-size: 1.625rem;
  margin: 0;
  color: hsl(var(--foreground));
}
.v2-success-card__desc {
  margin: 0;
  color: hsl(var(--muted-foreground));
  line-height: 1.55;
}
.v2-success-card__protocol {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: hsl(var(--primary) / 0.08);
  border: 1px dashed hsl(var(--primary) / 0.4);
  border-radius: var(--radius-lg);
  width: 100%;
}
.v2-success-card__protocol-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: hsl(var(--primary));
}
.v2-success-card__protocol-code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  letter-spacing: 0.04em;
}
.v2-success-card__meta {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
}
.v2-success-card__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.25rem;
}

.v2-stat-tabs {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: fit-content;
  padding: 0.2rem;
  border-radius: var(--radius-lg);
  background: hsl(var(--secondary));
  color: hsl(var(--muted-foreground));
}
.v2-stat-tabs button {
  cursor: pointer;
  font-size: 0.875rem;
  padding: 0.5rem 0.65rem;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: inherit;
}
.v2-stat-tabs button.active {
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  font-weight: 700;
  border: 1px solid hsl(var(--border));
}
.v2-stat-summary {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: hsl(var(--primary) / 0.08);
  color: hsl(var(--primary));
  font-weight: 700;
}

.v2-error-icon {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.5rem;
  padding: 1rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--danger) / 0.12);
  color: hsl(var(--danger));
}
