/* =========================
   ASB / SVH / SVB - CSS FINAL (sem duplicidades / sem sobreposição indevida)
   ========================= */

/* ===== GLOBAL (evita flicker por variação da scrollbar) ===== */
html {
  scrollbar-gutter: stable !important;
  overflow-y: scroll !important;
}

/* =========================
   BASE / TOKENS
   ========================= */
:root {
  --asb-font-sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  --asb-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* escala tipográfica responsiva */
  --asb-text-xs: clamp(0.80rem, 0.78rem + 0.15vw, 0.88rem);
  --asb-text-sm: clamp(0.875rem, 0.85rem + 0.20vw, 0.95rem);
  --asb-text-md: clamp(0.95rem, 0.92rem + 0.25vw, 1.05rem);
  --asb-text-lg: clamp(1.05rem, 0.98rem + 0.35vw, 1.2rem);
  --asb-text-xl: clamp(1.2rem, 1.05rem + 0.70vw, 1.55rem);

  --asb-leading: 1.48;
  --asb-leading-tight: 1.18;

  --asb-letter: -0.01em;
  --asb-letter-title: -0.02em;
}

/* =========================
   PAGE BASE
   ========================= */
.asb-body {
  color: #0f172a;

  font-family: var(--asb-font-sans);
  font-size: var(--asb-text-md);
  line-height: var(--asb-leading);
  letter-spacing: var(--asb-letter);
  font-weight: 500;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;

  background-image: url("/public/assets/images/bg-main-white-preserve-lines.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.asb-main {
  padding-top: 18px;
  padding-bottom: 30px;
}

.asb-muted {
  color: rgba(15, 23, 42, 0.66);
  font-weight: 500;
}

/* =========================
   EMPTY STATE
   ========================= */
.asb-empty {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.05);
  padding: 44px 18px;
  text-align: center;
}

.asb-empty-icon i {
  font-size: 2.4rem;
  color: #94a3b8;
}

.asb-empty-title {
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-top: 10px;
  margin-bottom: 6px;
  color: #0f172a;
}

/* =========================
   HEADER (SVH) - branco sticky
   ========================= */
.svh-header {
  position: sticky;
  top: 0;
  z-index: 0;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  will-change: padding;
  margin-bottom: 30px;
}

/* Container */
.svh-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  transition: padding .18s ease;
}

.svh-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.svh-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Logo e textos */
.svh-logo {
  height: 58px;
  transition: height .18s ease;
}

.svh-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.svh-entidade {
  margin: 0;
  font-family: "PT Sans", sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 30px;
  line-height: 25px;
  color: rgb(81, 76, 76);
}

.svh-subtitle {
  padding-top: 2px;
  color: #6b7280;
  font-size: 14px;
}

/* Barra vermelha abaixo */
.svh-redbar {
  height: 10px;
  background: #d43f46;
  transition: height .18s ease;
}

/* ===== DESKTOP (>= 769px): shrink via transform (sem reflow) ===== */
@media (min-width: 769px) {
  .svh-container { transition: none !important; }

  .svh-inner {
    transition: transform .18s ease !important;
    transform-origin: left center;
    will-change: transform;
  }

  .svh-header.svh-shrink .svh-container { padding: 16px 20px !important; }
  .svh-header.svh-shrink .svh-logo { height: 58px !important; }
  .svh-header.svh-shrink .svh-entidade { font-size: 30px !important; }
  .svh-header.svh-shrink .svh-subtitle { font-size: 13px !important; }

  .svh-header.svh-shrink .svh-inner { transform: scale(0.88) !important; }
}

/* ===== MOBILE (<= 768px): shrink real ===== */
@media (max-width: 768px) {
  /* sem animação no mobile */
  .svh-container,
  .svh-logo,
  .svh-entidade,
  .svh-subtitle,
  .svh-inner,
  .svh-redbar {
    transition: none !important;
  }

  /* mantém os valores do shrink como "padrão visual" */
  .svh-container { padding: 10px 16px !important; }
  .svh-logo { height: 42px !important; }
  .svh-entidade { font-size: 24px !important; }
  .svh-subtitle { font-size: 12px !important; }

  .svh-inner {
    transform-origin: left center;
    will-change: transform;
    transform: scale(0.84) !important;
  }
}

/* =========================
   HERO (SVB)
   ========================= */
.svb-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 14px 0 18px 0;
}

.svb-hero-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0;
}

.svb-accent {
  width: 10px;
  height: 26px;
  border-radius: 0px;
  background: #d43f46;
  margin-top: 4px;
  flex: 0 0 auto;
}

.svb-titlewrap {
  min-width: 0;
  width: 100%;
}

.svb-titleline {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.svb-title {
  margin: 0;
  font-family: "PT Sans", sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 25px;
  line-height: 25px;
  color: rgb(81, 76, 76);
  white-space: nowrap;
}

.svb-line {
  height: 1px;
  background: rgba(0,0,0,.18);
  flex: 1 1 auto;
  min-width: 40px;
}

.svb-subtitle {
  margin-top: 6px;
  color: #6b7280;
  font-size: 14px;
}

.svb-hero-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.svb-count {
  padding: 6px 12px;
  border-radius: 1px;
  background: #f3f4f6;
  border: 1px solid rgba(0,0,0,.08);
  color: #111827;
  font-weight: 700;
  font-size: 14px;
}

.svb-btn-refresh { white-space: nowrap; }

#btnRefresh {
  border-radius: 1px !important;
  height: 34px !important;
}

/* responsivo hero */
@media (max-width: 768px) {
  .svb-hero { flex-direction: column; align-items: stretch; }
  .svb-title { font-size: 20px; white-space: normal; }
  .svb-line { display: none; }
  .svb-hero-right { justify-content: flex-start; }
}

/* =========================
   CARDS (ASB)
   ========================= */
.asb-card {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 4px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.05);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;

  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.asb-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.05);
  border-color: rgba(15, 23, 42, 0.14);
}

.asb-card-head {
  padding: 14px 14px 10px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

/* estrutura do título do card */
.asb-card-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

/* barra lateral */
.asb-card-accent {
  width: 3px;
  height: 26px;
  background: #5a6368;
  flex: 0 0 auto;
  transition: height .18s ease;
}

/* título */
.asb-card-title {
  margin: 0;
  cursor: default;

  font-family: "Montserrat", sans-serif;
  font-style: normal;
  font-weight: 600;

  font-size: 16px;
  line-height: 25px;
  color: #d43f46;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* efeito ao passar mouse */
.asb-card-title-wrap:hover .asb-card-accent { height: 34px; }
.asb-card:hover .asb-card-accent { height: 34px; }

.asb-card-body {
  padding: 0 14px 14px 14px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Período */
.mount {
  font-family: var(--asb-font-sans);
  font-weight: 500;
  font-style: normal;
  font-size: var(--asb-text-sm);
  line-height: var(--asb-leading);
  letter-spacing: var(--asb-letter);
  color: rgb(124,124,124);

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

.asb-period-line {
  color: #334155;
  font-weight: 600;
  font-size: var(--asb-text-sm);
}

.asb-actions {
  margin-top: auto;
  padding-top: 14px;
}

/* botão principal de votação */
.asb-btn-go {
  border-radius: 1px !important;
  height: 34px;
  line-height: 32px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
}

.asb-btn-go.btn-primary {
  background: #5a6368;
  border-color: #5a6368;
}

.asb-btn-go.btn-primary:hover {
  background: #d43f46;
  border-color: #d43f46;
}

.asb-btn-go.btn-secondary[disabled] {
  border-radius: 1px !important;
  height: 34px;
  background: #e5e7eb;
  border-color: #e5e7eb;
  color: #6b7280;
}

/* Badges (status) */
.asb-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 2px;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0;
  border: 1px solid transparent;
  white-space: nowrap;
}

.asb-badge-open {
  background: rgba(16, 185, 129, 0.16);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.30);
}

.asb-badge-soon {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.30);
}

.asb-badge-closed {
  background: rgba(100, 116, 139, 0.16);
  color: #475569;
  border-color: rgba(100, 116, 139, 0.28);
}

/* =========================
   FOOTER DE AJUDA (card branco)
   ========================= */
.asb-footer {
  margin-top: 14px;
  padding-bottom: 0px;
}

.asb-footer-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 4px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.05);
  padding: 16px 18px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.asb-footer-left { min-width: 260px; }

.asb-footer-title {
  margin: 0;
  font-family: "PT Sans", sans-serif;
  font-style: normal;
  font-weight: 500;

  font-size: 20px;
  line-height: 28px;
  color: rgb(81, 76, 76);

  margin-bottom: 4px;
}

.asb-footer-text {
  color: rgba(15, 23, 42, 0.70);
  font-weight: 500;
  font-size: var(--asb-text-sm);
}

/* =========================
   FOOTER PRINCIPAL (barra escura)
   ========================= */
.asb-site-footer {
  margin-top: 5px;
  background: #5a6368;
  color: #fff;
  padding: 26px 0 22px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.asb-footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}

.asb-footer-brand { max-width: 520px; }

.asb-footer-desc {
  font-size: 0.92rem;
  opacity: 0.85;
}

.asb-footer-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.asb-footer-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.asb-footer-badge {
  background: rgba(241, 245, 249, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.10);
  color: rgba(15, 23, 42, 0.84);
  border-radius: 2px;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0;
  padding: 6px 10px;
  white-space: nowrap;
}

.asb-footer-copy {
  grid-column: 1 / -1;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.82rem;
  opacity: 0.8;
}

.asb-footer-dot {
  margin: 0 6px;
  opacity: 0.55;
}

/* responsivo footer principal */
@media (max-width: 768px) {
  .asb-footer-grid { grid-template-columns: 1fr; }
  .asb-footer-right { align-items: flex-start; }
  .asb-footer-badges { justify-content: flex-start; }
}

/* =========================
   RESPONSIVO GERAL (mobile pequeno)
   ========================= */
@media (max-width: 575.98px) {
  .asb-main { padding-top: 14px; }

  .asb-body {
    background-attachment: scroll;
    font-size: var(--asb-text-sm);
    line-height: 1.5;
  }
}
/* =========================================================
   STICKY FOOTER (home assembleias)
   deixa o footer principal colado no fim da tela
   ========================================================= */

html, body{
  height: 100%;
}

body.asb-body{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* seu conteúdo (container) ocupa o espaço restante */
main.asb-main{
  flex: 1 0 auto;
}

/* footer principal (barra escura) vai pro fim */
footer.asb-site-footer{
  margin-top: auto; /* substitui o margin-top: 5px */
}

