/* css/theme.css — tema GLOBAL CalcBrasil */

:root{
  --bg0:#06121c;
  --bg1:#071a28;
  --bg2:#0b2f46;

  --txt: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);

  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.08);
  --border: rgba(255,255,255,.12);

  --accent:#38bdf8;
  --accent2:#22c55e;
  --warn:#f59e0b;
  --danger:#ef4444;

  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --r: 18px;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--txt);

  /* FUNDO AZUL GLOBAL (tela inteira) */
  background:
    radial-gradient(900px 520px at 45% 18%, rgba(56,189,248,.22), transparent 60%),
    radial-gradient(700px 500px at 85% 55%, rgba(34,197,94,.10), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg2));

  /* garante que o fundo sempre ocupa a tela toda */
  min-height: 100vh;
  background-attachment: fixed;
}

/* ===== Header GLOBAL ===== */
header{
  position:sticky; top:0; z-index:20;
  backdrop-filter: blur(10px);
  background: rgba(2,10,16,.60);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.topbar{
  width:100%;
  padding: 12px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  font-weight: 950;
  letter-spacing:.2px;
  white-space: nowrap;
}

.brand .logo{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  background: rgba(56,189,248,.14);
  border: 1px solid rgba(56,189,248,.25);
  box-shadow: var(--shadow);
  font-size: 18px;
}

nav{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}

nav a{
  color: var(--muted);
  text-decoration:none;
  font-weight: 850;
  padding: 10px 12px;
  border-radius: 12px;
  transition: .18s;
}
nav a:hover{
  color: var(--txt);
  background: rgba(255,255,255,.06);
}

/* ===== Layout GLOBAL ===== */
.page{
  width:100%;
  padding: 16px 18px 32px;
  min-height: calc(100vh - 70px);
}
.container{
  width: min(1700px, 100%);
  margin: 0 auto;
  padding-bottom: 28px;
  position: relative;
}

/* glow premium por trás do conteúdo (igual em todas as páginas) */
.container::before{
  content:"";
  position:absolute;
  inset: -120px -40px -220px -40px;
  background: radial-gradient(900px 520px at 45% 35%, rgba(56,189,248,.18), transparent 60%);
  pointer-events:none;
  z-index:0;
}
.container > *{
  position: relative;
  z-index: 1;
}

/* ===== Footer GLOBAL ===== */
footer{
  margin-top: 14px;
  padding: 14px 16px;
  text-align:center;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,.10);
  background: rgba(2,10,16,.60);
  border-radius: 18px;
}

/* ===== Mobile: header menor ===== */
@media (max-width: 860px){
  .topbar{ padding: 10px 14px; }
  .brand .logo{ width:36px; height:36px; border-radius: 12px; }
  nav a{ padding: 8px 10px; }
}
/* ===== FIX: tira espaço estranho à esquerda dos títulos ===== */
h1, h2, h3,
.hero h1,
.card .hd h2{
  padding-left: 0 !important;
  margin-left: 0 !important;
  text-indent: 0 !important;
}

/* se algum CSS estiver desenhando "bolinha/linha" antes do título */
h1::before, h2::before, h3::before,
.hero h1::before,
.card .hd h2::before{
  content: none !important;
  display: none !important;
}
.hero > div:first-child,
.hero .text{
  padding-left: 0 !important;
  margin-left: 0 !important;
}



/* ===== FIX DEFINITIVO: tira recuo à esquerda do bloco do título ===== */

/* o recuo está no container do texto (não no h1) */
.hero,
.hero > div,
.hero > div:first-child,
.hero .text,
.card .hd,
.card .bd{
  padding-left: 0 !important;
  margin-left: 0 !important;
  text-indent: 0 !important;
}

/* mantém o padding original do hero (sem empurrar só o lado esquerdo) */
.hero{
  padding: 18px !important; /* ajuste se você usa outro valor */
}

/* garante que títulos e parágrafos não herdem nada */
.hero h1, .hero p,
.card .hd h2{
  padding-left: 0 !important;
  margin-left: 0 !important;
  text-indent: 0 !important;
}

/* remove qualquer enfeite que esteja “ocupando espaço” antes do texto */
.hero::before,
.hero > div::before,
.hero h1::before,
.card .hd::before,
.card .hd h2::before{
  content: none !important;
  display: none !important;
}
/* ===================================== */
/* ====== SISTEMA GLOBAL DE ADS ======== */
/* ===================================== */

/* Banner premium (acima da dobra) */
/* ============================= */
/* ===== BANNER TOP HEADER ===== */
/* ============================= */

.ad-box{
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* versão grande (728x90 ou responsivo) */
.ad-box.large{
  margin: 18px auto 10px auto;
  padding: 18px;
  max-width: 1200px;

  background: rgba(255,255,255,0.05);
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 18px;

  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

/* texto interno */
.ad-box small{
  font-size: 13px;
  font-weight: 600;
  opacity: .8;
}

/* some no mobile se quiser */
@media (max-width: 768px){
  .ad-box.large{
    padding: 14px;
  }
}

/* ===== Corrige espaço vazio e garante fundo até o último footer ===== */
/* ===== Fix: fundo até depois do último footer (todas as páginas) ===== */







/* =========================================================
   MOBILE UI — layout diferente, mesmas funções/ids
   (cole no FINAL do theme.css)
========================================================= */

@media (max-width: 820px){

  /* Layout geral mais compacto */
  .page{ padding: 10px 12px 84px; } /* espaço para a bottom bar */
  .container{ padding-bottom: 0; }

  /* Header menor e mais “clean” */
  header{ position: sticky; top: 0; }
  .topbar{
    padding: 10px 12px;
    gap: 10px;
  }
  .brand .logo{
    width: 34px; height: 34px;
    border-radius: 12px;
    font-size: 16px;
    box-shadow: none;
  }
  .brand{ gap: 10px; font-weight: 950; }
  nav{
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  nav::-webkit-scrollbar{ display:none; }
  nav a{
    padding: 8px 10px;
    font-weight: 900;
    border-radius: 999px;
    white-space: nowrap;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
  }

  /* Hero vira bloco compacto */
  .hero{
    padding: 12px;
    gap: 10px;
    flex-direction: column;
    align-items: flex-start;
  }
  .hero h1{ font-size: 20px; }
  .hero p{ font-size: 13px; max-width: 100%; }
  .hero .hero-actions{
    width: 100%;
    display: flex;
    gap: 10px;
  }
  .hero .hero-actions .btn{
    flex: 1;
    justify-content: center;
  }

  /* Dashboard vira 1 coluna */
  .dash{
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .card{ min-height: auto; }

  /* Em mobile, inputs viram “accordions” */
  .m-accordion{
    border-radius: var(--r);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.05);
  }
  .m-accordion details{
    border: 0;
    margin: 0;
  }
  .m-accordion summary{
    list-style: none;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 10px;
    padding: 12px 12px;
    background: rgba(255,255,255,.06);
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-weight: 950;
  }
  .m-accordion summary::-webkit-details-marker{ display:none; }
  .m-accordion summary .hint{
    font-size: 12px;
    color: var(--muted);
    font-weight: 850;
  }
  .m-accordion .acc-body{
    padding: 12px;
    display: grid;
    gap: 10px;
  }

  /* Grid de campos vira 1 coluna */
  .grid{ grid-template-columns: 1fr !important; gap: 10px; }
  .field{ padding: 10px; border-radius: 16px; }

  /* Ações tradicionais somem (pra não duplicar); usamos bottom bar */
  .actions{ display:none !important; }

  /* KPIs viram carrossel horizontal */
  .kpis{
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 82%;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .kpis::-webkit-scrollbar{ display:none; }
  .kpi{ min-height: 86px; }

  /* Tabela: fica recolhida por padrão */
  .chart{ padding: 12px; }
  .m-collapse{
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255,255,255,.05);
  }
  .m-collapse .m-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding: 12px;
    background: rgba(255,255,255,.06);
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-weight: 950;
  }
  .m-collapse .m-body{
    display:none;
    padding: 12px;
  }
  .m-collapse.open .m-body{ display:block; }

  /* Bottom action bar fixa (principal diferença do mobile) */
  .m-bottom-bar{
    position: fixed;
    left: 0; right: 0; bottom: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(2,10,16,.72);
    border-top: 1px solid rgba(255,255,255,.10);
    backdrop-filter: blur(10px);
    z-index: 999;
    display: flex;
    gap: 10px;
  }
  .m-bottom-bar .btn{
    flex: 1;
    justify-content: center;
    padding: 14px 14px;
    border-radius: 16px;
  }

  /* Ads “estratégicos” sem quebrar layout */
  .ad-slot{
    border-radius: 16px;
    padding: 12px;
    background: rgba(255,255,255,.05);
    border: 1px dashed rgba(255,255,255,.16);
  }
  .ad-slot.small{ padding: 10px; }
  .ad-slot .tag{ font-weight: 950; color: var(--accent); }
  .ad-slot .hint{ font-size: 12px; color: var(--muted); }

  /* Footer compacto */
  footer{
    margin-top: 12px;
    padding: 12px;
    border-radius: 16px;
  }
}










:root{
  --hdr-h: 44px;
  --hdr-ad-h: 52px; /* ajuste conforme seu banner */
}

/* Header fino e fixo */
.site-header{
  position: sticky;
  top: 0;
  z-index: 9999;
  background: rgba(6,18,28,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.header-row{
  height: var(--hdr-h);
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 0 12px;
}

.brand-link{
  text-decoration:none;
  color: rgba(255,255,255,.92);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .2px;
}

.header-nav{
  display:flex;
  gap: 10px;
  align-items:center;
}

.nav-item{
  font-size: 12px;
  color: rgba(255,255,255,.78);
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  text-decoration:none;
}

.nav-item.is-active{
  color: rgba(255,255,255,.95);
  border-color: rgba(56,189,248,.45);
  background: rgba(56,189,248,.12);
}

/* Anúncio “grudado” no header */
.header-ad{
  height: var(--hdr-ad-h);
  display:flex;
  align-items:center;
  justify-content:center;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
}

/* garante que o conteúdo não fica embaixo do header */
body{
  scroll-padding-top: calc(var(--hdr-h) + var(--hdr-ad-h) + 10px);
}

/* ===== FIX: fundo azul ocupando a tela inteira ===== */
html, body {
  height: 100%;
}

html {
  /* Coloca o background no html para nunca "cortar" */
  background: radial-gradient(
      900px 520px at 45% 18%,
      rgba(56, 189, 248, 0.22),
      transparent 60%
    ),
    linear-gradient(180deg, var(--bg0), var(--bg2));
}

body {
  min-height: 100vh;
  background: transparent; /* evita duplicar/bugar o fundo */
}

/* garante que a página sempre preencha a viewport */
.page {
  min-height: calc(100vh - 70px); /* header ~70px */
}

/* evita "buraco" no final por padding/margem */
.container {
  min-height: 100%;
}
body, .page, .container {
  background: transparent !important;
}
/* ===== FUNDO GLOBAL FIXO EM TELA INTEIRA ===== */

html {
  height: 100%;
  background: radial-gradient(
      900px 520px at 45% 18%,
      rgba(56, 189, 248, 0.22),
      transparent 60%
    ),
    linear-gradient(180deg, #06121c, #0b2f46);
}

body {
  min-height: 100vh;
  margin: 0;
  background: transparent; /* IMPORTANTÍSSIMO */
}
/* =========================================================
   CALCBRASIL — FUNDO GLOBAL (NUNCA CORTA)
   Cole no FINAL do theme.css
   ========================================================= */

:root{
  --bg0:#06121c;
  --bg2:#0b2f46;
  --bgRadial: radial-gradient(900px 520px at 45% 18%, rgba(56,189,248,.22), transparent 60%);
  --bgLinear: linear-gradient(180deg, var(--bg0), var(--bg2));
}

html{
  min-height: 100%;
  background: var(--bgRadial), var(--bgLinear);
  background-repeat: no-repeat;
  background-size: cover;
}

body{
  min-height: 100vh;
  margin: 0;
  background: transparent; /* impede “cinza/branco” cobrindo o fundo */
}

/* wrappers comuns não podem pintar por cima */
.page, .container, main, .wrap, section{
  background: transparent !important;
}

/* evita bug de “corte” por overflow horizontal */
html, body{
  overflow-x: hidden;
}

/* (opcional) se você usa blur/backdrop no header */
header{
  background: rgba(2,10,16,.60);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
}
