/* =====================================================
   assets/style.css - Estilos do Mapeamento Tributário
   ===================================================== */

*, *::before, *::after { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

:root {
    --navy:      #15304B;
    --navy-d:    #0E2136;
    --navy-l:    #1D3D5E;
    --navy-xd:   #071420;

    --gold:      #C7A148;
    --gold-l:    #E8C06A;
    --gold-d:    #A0803A;
    
    --dourado:   var(--gold);
    --dourado-claro: var(--gold-l);

    --white:     #FFFFFF;
    --silver:    #E5E7EB;
    --muted:     #8A98AA;

    --bg-dark:   #0C1D2E;
    --bg-card:   #162840;

    --ff-primary: 'Verdana', 'Geneva', sans-serif;
    --transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

html { 
    scroll-behavior: smooth; 
}

body { 
    font-family: var(--ff-primary); 
    background: var(--bg-dark); 
    color: var(--silver); 
    min-height: 100vh; 
    overflow-x: hidden; 
}

body::before {
    content: ''; 
    position: fixed; 
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% -5%, rgba(199,161,72,.13) 0%, transparent 55%),
                linear-gradient(160deg, #0a1826 0%, #15304B 45%, #122840 100%);
    z-index: 0; 
    pointer-events: none;
}

body::after {
    content: ''; 
    position: fixed; 
    inset: 0;
    background-image: linear-gradient(rgba(199,161,72,.035) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(199,161,72,.035) 1px, transparent 1px);
    background-size: 56px 56px; 
    z-index: 0; 
    pointer-events: none;
}

.wrap { 
    position: relative; 
    z-index: 1; 
    max-width: 880px; 
    margin: 0 auto; 
    padding: 0 20px 80px; 
}

/* ── HEADER ── */
header { 
    text-align: center; 
    padding: 60px 0 40px; 
}

.logo-main {
    margin-bottom: 32px;
}

.logo-main img {
    height: 120px;
    width: auto;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

.badge { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    background: rgba(199,161,72,.12); 
    border: 1px solid rgba(199,161,72,.25); 
    border-radius: 100px; 
    padding: 6px 20px; 
    font-size: 10px; 
    font-weight: 700; 
    letter-spacing: 2px; 
    text-transform: uppercase; 
    color: var(--gold); 
    margin-bottom: 28px; 
}

.badge i { 
    width: 6px; 
    height: 6px; 
    border-radius: 50%; 
    background: var(--dourado-claro); 
    display: inline-block; 
    animation: blink 2s ease-in-out infinite; 
}

@keyframes blink { 
    0%,100%{ opacity:1 } 
    50%{ opacity:.35 } 
}

h1 { 
    font-family: var(--ff-primary); 
    font-size: clamp(2.3rem, 5.5vw, 3.8rem); 
    font-weight: 700; 
    line-height: 1.08; 
    color: var(--white); 
    letter-spacing: -.5px; 
    margin-bottom: 18px; 
}

h1 em { 
    color: var(--gold); 
    font-style: italic;
    font-weight: 400;
    display: block; 
}

.lead { 
    font-size: 14.5px; 
    color: rgba(255,255,255,.52); 
    font-weight: 300; 
    max-width: 500px; 
    margin: 0 auto; 
    line-height: 1.75; 
}

.hr-deco { 
    display: flex; 
    align-items: center; 
    gap: 16px; 
    margin: 44px 0 38px; 
}

.hr-deco::before,
.hr-deco::after { 
    content: ''; 
    flex: 1; 
    height: 1px; 
    background: linear-gradient(90deg, transparent, rgba(199,161,72,.3), transparent); 
}

.hr-deco span { 
    width: 30px; 
    height: 30px; 
    border-radius: 50%; 
    border: 1px solid rgba(199,161,72,.3); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 13px; 
    color: var(--dourado); 
}

/* ── CARD ── */
.card { 
    background: rgba(255,255,255,.04); 
    border: 1px solid rgba(255,255,255,.09); 
    border-radius: 22px; 
    padding: 42px; 
    backdrop-filter: blur(12px); 
    position: relative; 
    overflow: hidden; 
}

.card::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0; 
    height: 2px; 
    background: linear-gradient(90deg, transparent, var(--dourado), transparent); 
}

.section-title { 
    font-family: var(--ff-primary); 
    font-size: 1.25rem; 
    font-weight: 700; 
    color: var(--gold-l); 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin-bottom: 26px; 
}

.section-title::before { 
    content: ''; 
    width: 3px; 
    height: 18px; 
    background: var(--dourado); 
    border-radius: 2px; 
}

/* ── EMPRESA ── */
.grid2 { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 16px; 
    margin-bottom: 36px; 
}

@media(max-width:580px){
    .grid2{ grid-template-columns:1fr }
    .card{ padding:24px }
}

.field { 
    display: flex; 
    flex-direction: column; 
    gap: 6px; 
}

.field.span2 { 
    grid-column: 1/-1; 
}

label { 
    font-size: 10.5px; 
    font-weight: 500; 
    letter-spacing: 1.8px; 
    text-transform: uppercase; 
    color: rgba(255,255,255,.4); 
}

input[type=text], 
input[type=date], 
input[type=email] { 
    background: rgba(255,255,255,.06); 
    border: 1px solid rgba(255,255,255,.12); 
    border-radius: 10px; 
    padding: 14px 18px; 
    color: var(--white); 
    font-family: var(--ff-primary); 
    font-size: 14px; 
    transition: var(--transition); 
    width: 100%; 
}

input[type=text]:focus, 
input[type=date]:focus, 
input[type=email]:focus { 
    outline: none; 
    border-color: var(--dourado); 
    background: rgba(199,161,72,.08); 
    box-shadow: 0 0 0 3px rgba(199,161,72,.12); 
}

input::placeholder { 
    color: rgba(255,255,255,.18); 
}

/* ── SEPARADOR ── */
.sep { 
    height: 1px; 
    margin: 24px 0; 
    background: linear-gradient(90deg, transparent, rgba(199,161,72,.18), transparent); 
}

/* ── PROGRESS ── */
.progress-wrap { 
    margin-bottom: 30px; 
}

.prog-meta { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-size: 11px; 
    color: rgba(255,255,255,.38); 
    letter-spacing: 1px; 
    text-transform: uppercase; 
    margin-bottom: 8px; 
}

.prog-bar { 
    height: 3px; 
    background: rgba(255,255,255,.07); 
    border-radius: 2px; 
    overflow: hidden; 
}

.prog-fill { 
    height: 100%; 
    width: 0%; 
    border-radius: 2px; 
    background: linear-gradient(90deg, var(--dourado), var(--dourado-claro)); 
    transition: width .4s ease; 
}

/* ── PERGUNTA ── */
.perg-bloco { 
    margin-bottom: 24px; 
}

.perg-num { 
    font-size: 10px; 
    font-weight: 500; 
    letter-spacing: 2px; 
    text-transform: uppercase; 
    color: var(--dourado); 
    margin-bottom: 5px; 
}

.perg-txt { 
    font-size: 13.5px; 
    color: rgba(255,255,255,.82); 
    margin-bottom: 11px; 
    line-height: 1.55; 
}

/* ── SIM / NÃO (apenas duas opções) ── */
.tgl-group { 
    display: flex; 
    gap: 8px; 
}

.tgl {
    flex: 1; 
    padding: 11px 10px; 
    border: 1px solid rgba(255,255,255,.13); 
    border-radius: 8px;
    background: rgba(255,255,255,.04); 
    color: rgba(255,255,255,.4);
    font-family: var(--ff-primary); 
    font-size: 12px; 
    font-weight: 500;
    cursor: pointer; 
    transition: all .2s; 
    letter-spacing: .3px; 
    white-space: nowrap;
}

.tgl:hover { 
    border-color: rgba(199,161,72,.4); 
    color: rgba(255,255,255,.75); 
    background: rgba(255,255,255,.07); 
}

/* SIM — dourado vibrante */
.tgl.yes {
    background: linear-gradient(135deg, rgba(199,161,72,.35), rgba(244,197,66,.2));
    border-color: var(--dourado);
    color: var(--dourado-claro);
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(199,161,72,.25), inset 0 1px 0 rgba(255,255,255,.1);
    text-shadow: 0 0 12px rgba(244,197,66,.5);
}

/* NÃO — branco nítido */
.tgl.no {
    background: linear-gradient(135deg, rgba(255,255,255,.15), rgba(255,255,255,.08));
    border-color: rgba(255,255,255,.6);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(255,255,255,.2);
}

/* NÃO SEI — azul-cinza com traço tracejado */
.tgl.skip {
    background: rgba(100,140,180,.12);
    border: 1.5px dashed rgba(120,170,220,.45);
    color: #90b8d8;
    font-weight: 600;
    font-style: italic;
    box-shadow: 0 0 0 2px rgba(100,160,210,.1);
}

/* ── SEGMENTO ── */
.seg-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(155px,1fr)); 
    gap: 8px; 
}

.seg { 
    padding: 10px 12px; 
    border: 1px solid rgba(255,255,255,.13); 
    border-radius: 8px; 
    background: rgba(255,255,255,.04); 
    color: rgba(255,255,255,.45); 
    font-family: var(--ff-primary); 
    font-size: 12px; 
    font-weight: 500; 
    cursor: pointer; 
    transition: all .18s; 
    text-align: center; 
}

.seg:hover { 
    border-color: rgba(199,161,72,.38); 
    color: rgba(255,255,255,.8); 
}

.seg.on { 
    background: linear-gradient(135deg, rgba(199,161,72,.35), rgba(244,197,66,.2)); 
    border-color: var(--dourado); 
    color: var(--dourado-claro); 
    font-weight: 700; 
    box-shadow: 0 0 0 2px rgba(199,161,72,.25); 
}

/* ── BOTÃO GERAR ── */
.btn-gerar { 
    width: 100%; 
    padding: 20px; 
    margin-top: 36px; 
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-d) 100%); 
    border: none; 
    border-radius: 12px; 
    color: var(--navy-d); 
    font-family: var(--ff-primary); 
    font-size: 14px; 
    font-weight: 700; 
    letter-spacing: 1.5px; 
    text-transform: uppercase; 
    cursor: pointer; 
    transition: var(--transition); 
    position: relative; 
    overflow: hidden; 
    box-shadow: 0 8px 30px rgba(199,161,72,0.3);
}

.btn-gerar:hover { 
    background-position: right center; 
    transform: translateY(-2px); 
    box-shadow: 0 10px 32px rgba(199,161,72,.38); 
}

.btn-gerar:active { 
    transform: translateY(0); 
}

.btn-gerar::after { 
    content: ''; 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent); 
    transform: translateX(-100%); 
    transition: transform .5s; 
}

.btn-gerar:hover::after { 
    transform: translateX(100%); 
}

/* ── LOADING OVERLAY ── */
#loading-overlay {
    display: none;
    position: fixed; 
    inset: 0; 
    z-index: 9999;
    background: linear-gradient(160deg, #070f1a 0%, #0d1f31 50%, #0a1620 100%);
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    padding: 32px;
}

#loading-overlay.show { 
    display: flex; 
}

.ld-inner { 
    text-align: center; 
    max-width: 560px; 
    width: 100%; 
}

.ld-icon {
    width: 80px; 
    height: 80px; 
    margin: 0 auto 36px;
    position: relative;
}

.ld-ring {
    position: absolute; 
    inset: 0; 
    border-radius: 50%;
    border: 2px solid transparent;
}

.ld-ring-1 {
    border-top-color: var(--dourado);
    border-right-color: rgba(199,161,72,.3);
    animation: spin 1.4s linear infinite;
}

.ld-ring-2 {
    inset: 10px;
    border-bottom-color: var(--dourado-claro);
    border-left-color: rgba(244,197,66,.2);
    animation: spin 2s linear infinite reverse;
}

.ld-ring-3 {
    inset: 20px;
    border-top-color: rgba(199,161,72,.6);
    animation: spin 2.8s linear infinite;
}

.ld-dot {
    position: absolute; 
    inset: 0; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 22px;
    animation: pulse-icon 1.8s ease-in-out infinite;
}

@keyframes spin { 
    from{ transform:rotate(0deg) } 
    to{ transform:rotate(360deg) } 
}

@keyframes pulse-icon { 
    0%,100%{ opacity:.7; transform:scale(.92) } 
    50%{ opacity:1; transform:scale(1) } 
}

.ld-title {
    font-family: var(--ff-primary);
    font-size: 1.7rem; 
    font-weight: 600;
    color: var(--branco); 
    margin-bottom: 10px; 
    line-height: 1.2;
}

.ld-title span { 
    color: var(--dourado); 
}

.ld-frase {
    font-size: 14px; 
    color: rgba(255,255,255,.55); 
    font-weight: 300;
    line-height: 1.7; 
    min-height: 48px;
    transition: opacity .4s ease;
    margin-bottom: 36px;
    max-width: 420px; 
    margin-left: auto; 
    margin-right: auto;
}

.ld-frase.fade { 
    opacity: 0; 
}

.ld-bar-wrap { 
    margin-bottom: 14px; 
}

.ld-bar-track { 
    height: 3px; 
    background: rgba(255,255,255,.07); 
    border-radius: 2px; 
    overflow: hidden; 
}

.ld-bar-fill {
    height: 100%; 
    width: 0%; 
    border-radius: 2px;
    background: linear-gradient(90deg, var(--dourado), var(--dourado-claro));
    transition: width .35s ease;
}

.ld-bar-label {
    display: flex; 
    justify-content: space-between;
    font-size: 10px; 
    letter-spacing: 1.5px; 
    text-transform: uppercase;
    color: rgba(255,255,255,.3); 
    margin-bottom: 8px;
}

.ld-etapas {
    display: flex; 
    justify-content: center; 
    gap: 20px; 
    margin-top: 28px; 
    flex-wrap: wrap;
}

.ld-etapa {
    display: flex; 
    align-items: center; 
    gap: 7px;
    font-size: 11px; 
    color: rgba(255,255,255,.25); 
    letter-spacing: .5px;
    transition: color .4s, opacity .4s;
    opacity: .4;
}

.ld-etapa.done { 
    color: var(--dourado); 
    opacity: 1; 
}

.ld-etapa.active { 
    color: rgba(255,255,255,.7); 
    opacity: 1; 
}

.ld-etapa-dot {
    width: 6px; 
    height: 6px; 
    border-radius: 50%;
    background: currentColor; 
    flex-shrink: 0;
    transition: background .4s;
}

.ld-etapa.active .ld-etapa-dot { 
    animation: blink 1s infinite; 
}

.ld-etapa.done .ld-etapa-dot { 
    background: var(--dourado); 
    animation: none; 
}

/* ── RELATÓRIO ── */
#relatorio { 
    display: none; 
    margin-top: 52px; 
    animation: rise .8s ease; 
}

@keyframes rise { 
    from{ opacity:0; transform:translateY(32px) } 
    to{ opacity:1; transform:none } 
}

.rel-head { 
    background: linear-gradient(135deg, rgba(199,161,72,.14), rgba(199,161,72,.04)); 
    border: 1px solid rgba(199,161,72,.28); 
    border-radius: 20px 20px 0 0; 
    padding: 38px 42px 30px; 
    position: relative; 
    overflow: hidden; 
}

.rel-head::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0; 
    height: 3px; 
    background: linear-gradient(90deg, var(--dourado), var(--dourado-claro), var(--dourado)); 
}

.rel-head::after { 
    content: 'RELATÓRIO'; 
    position: absolute; 
    right: 28px; 
    top: 50%; 
    transform: translateY(-50%); 
    font-family: var(--ff-primary); 
    font-size: 5.5rem; 
    font-weight: 700; 
    color: rgba(199,161,72,.055); 
    letter-spacing: 10px; 
    pointer-events: none; 
    white-space: nowrap; 
}

.rel-title { 
    font-family: var(--ff-primary); 
    font-size: 1.9rem; 
    font-weight: 600; 
    color: var(--branco); 
    margin-bottom: 4px; 
}

.rel-meta { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 28px; 
    margin-top: 18px; 
}

.rm-item { 
    display: flex; 
    flex-direction: column; 
    gap: 3px; 
}

.rm-lbl { 
    font-size: 10px; 
    letter-spacing: 1.8px; 
    text-transform: uppercase; 
    color: rgba(255,255,255,.38); 
}

.rm-val { 
    font-size: 14px; 
    font-weight: 500; 
    color: var(--dourado-claro); 
}

/* ── CONTADORES ── */
.counters { 
    display: grid; 
    grid-template-columns: repeat(3,1fr); 
    background: rgba(255,255,255,.03); 
    border: 1px solid rgba(199,161,72,.18); 
    border-top: none; 
}

@media(max-width:560px){
    .counters{ grid-template-columns:1fr }
}

.ctr { 
    padding: 26px; 
    text-align: center; 
    border-right: 1px solid rgba(199,161,72,.12); 
}

.ctr:last-child { 
    border-right: none; 
}

.ctr-n { 
    font-family: var(--ff-primary); 
    font-size: 3rem; 
    font-weight: 700; 
    color: var(--dourado); 
    line-height: 1; 
    margin-bottom: 6px; 
}

.ctr-l { 
    font-size: 10.5px; 
    letter-spacing: 1px; 
    text-transform: uppercase; 
    color: rgba(255,255,255,.44); 
}

/* ── GRUPOS ── */
.grupos { 
    border: 1px solid rgba(199,161,72,.18); 
    border-top: none; 
    border-radius: 0 0 20px 20px; 
    overflow: hidden; 
}

.grupo { 
    border-bottom: 1px solid rgba(255,255,255,.055); 
}

.grupo:last-child { 
    border-bottom: none; 
}

.ghead { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 20px 32px; 
    cursor: pointer; 
    background: rgba(255,255,255,.02); 
    transition: background .2s; 
    user-select: none; 
}

.ghead:hover { 
    background: rgba(199,161,72,.055); 
}

.gnome { 
    font-family: var(--ff-primary); 
    font-size: 1.1rem; 
    font-weight: 600; 
    color: var(--branco); 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

.gtag { 
    font-family: var(--ff-primary); 
    font-size: 10px; 
    font-weight: 500; 
    letter-spacing: 1.5px; 
    text-transform: uppercase; 
    background: rgba(199,161,72,.14); 
    border: 1px solid rgba(199,161,72,.28); 
    color: var(--dourado); 
    padding: 3px 10px; 
    border-radius: 100px; 
}

.gcnt { 
    font-size: 12px; 
    color: var(--dourado); 
    font-weight: 600; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.garr { 
    font-size: 9px; 
    color: rgba(255,255,255,.35); 
    transition: transform .3s; 
}

.grupo.open .garr { 
    transform: rotate(180deg); 
}

.gbody { 
    max-height: 0; 
    overflow: hidden; 
    transition: max-height .4s ease; 
}

.grupo.open .gbody { 
    max-height: 1200px; 
}

.olist { 
    padding: 6px 32px 20px; 
}

.oitem { 
    display: flex; 
    align-items: flex-start; 
    gap: 12px; 
    padding: 9px 0; 
    border-bottom: 1px solid rgba(255,255,255,.04); 
    animation: fadeIn .3s ease both; 
}

.oitem:last-child { 
    border-bottom: none; 
}

@keyframes fadeIn { 
    from{ opacity:0; transform:translateX(-8px) } 
    to{ opacity:1; transform:none } 
}

.obullet { 
    width: 5px; 
    height: 5px; 
    border-radius: 50%; 
    background: var(--dourado); 
    margin-top: 7px; 
    flex-shrink: 0; 
}

.oname { 
    font-size: 13.5px; 
    color: rgba(255,255,255,.78); 
    line-height: 1.5; 
}

/* ── RESUMO TABELA ── */
.resumo { 
    margin-top: 30px; 
    background: rgba(255,255,255,.03); 
    border: 1px solid rgba(199,161,72,.18); 
    border-radius: 14px; 
    overflow: hidden; 
}

.resumo-head { 
    padding: 15px 24px; 
    background: rgba(199,161,72,.09); 
    border-bottom: 1px solid rgba(199,161,72,.18); 
    font-size: 10.5px; 
    letter-spacing: 2px; 
    text-transform: uppercase; 
    color: var(--dourado); 
    font-weight: 500; 
}

.rrow { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 12px 24px; 
    border-bottom: 1px solid rgba(255,255,255,.04); 
    transition: background .2s; 
}

.rrow:last-child { 
    border-bottom: none; 
}

.rrow:hover { 
    background: rgba(199,161,72,.045); 
}

.rname { 
    font-size: 13px; 
    color: rgba(255,255,255,.68); 
}

.rnum { 
    font-family: var(--ff-primary); 
    font-size: 1.4rem; 
    font-weight: 600; 
    color: var(--dourado); 
}

/* ── GRÁFICO DONUT ── */
.chart-wrap { 
    margin-top: 30px; 
    background: rgba(255,255,255,.03); 
    border: 1px solid rgba(199,161,72,.18); 
    border-radius: 14px; 
    overflow: hidden; 
}

.chart-head { 
    padding: 15px 24px; 
    background: rgba(199,161,72,.09); 
    border-bottom: 1px solid rgba(199,161,72,.18); 
    font-size: 10.5px; 
    letter-spacing: 2px; 
    text-transform: uppercase; 
    color: var(--dourado); 
    font-weight: 500; 
}

.chart-body { 
    display: flex; 
    align-items: center; 
    gap: 32px; 
    padding: 28px 32px; 
    flex-wrap: wrap; 
    justify-content: center; 
}

.donut-svg-wrap { 
    flex-shrink: 0; 
    position: relative; 
    width: 220px; 
    height: 220px; 
}

.donut-center { 
    position: absolute; 
    inset: 0; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    pointer-events: none; 
}

.donut-total-n { 
    font-family: var(--ff-primary); 
    font-size: 2.8rem; 
    font-weight: 700; 
    color: var(--dourado); 
    line-height: 1; 
}

.donut-total-l { 
    font-size: 9px; 
    letter-spacing: 1.5px; 
    text-transform: uppercase; 
    color: rgba(255,255,255,.4); 
    margin-top: 4px; 
    text-align: center; 
}

.chart-legend { 
    flex: 1; 
    min-width: 220px; 
}

.leg-item { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    padding: 8px 10px; 
    border-bottom: 1px solid rgba(255,255,255,.04); 
    border-radius: 7px; 
    margin: 0 -10px; 
    transition: all .18s; 
    cursor: default; 
}

.leg-item:last-child { 
    border-bottom: none; 
}

.leg-item:hover, 
.leg-item.highlighted { 
    background: rgba(199,161,72,.07); 
}

.leg-item.dimmed { 
    opacity: .35; 
}

.leg-dot { 
    width: 11px; 
    height: 11px; 
    border-radius: 3px; 
    flex-shrink: 0; 
    transition: transform .2s; 
}

.leg-item:hover .leg-dot { 
    transform: scale(1.3); 
}

.leg-name { 
    font-size: 11.5px; 
    color: rgba(255,255,255,.7); 
    flex: 1; 
    line-height: 1.3; 
}

.leg-vals { 
    text-align: right; 
    flex-shrink: 0; 
}

.leg-n { 
    font-family: var(--ff-primary); 
    font-size: 1.15rem; 
    font-weight: 600; 
    color: var(--dourado); 
    line-height: 1; 
}

.leg-pct { 
    font-size: 10.5px; 
    color: rgba(255,255,255,.38); 
    font-weight: 500; 
}

/* ── Tooltip do donut ── */
#donut-tooltip {
    display: none; 
    position: fixed; 
    z-index: 999;
    background: rgba(10,22,36,.96); 
    border: 1px solid rgba(199,161,72,.4);
    border-radius: 10px; 
    padding: 12px 16px; 
    pointer-events: none;
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
    min-width: 180px;
}

#donut-tooltip.show { 
    display: block; 
}

.tt-nome { 
    font-size: 11px; 
    color: rgba(255,255,255,.6); 
    letter-spacing: .5px; 
    margin-bottom: 4px; 
}

.tt-num { 
    font-family: var(--ff-primary); 
    font-size: 1.6rem; 
    font-weight: 700; 
    color: var(--dourado); 
    line-height: 1; 
}

.tt-pct { 
    font-size: 12px; 
    color: rgba(255,255,255,.5); 
    margin-top: 2px; 
}

.tt-bar { 
    height: 3px; 
    background: rgba(255,255,255,.08); 
    border-radius: 2px; 
    margin-top: 8px; 
    overflow: hidden; 
}

.tt-bar-fill { 
    height: 100%; 
    border-radius: 2px; 
}

/* ── WHATSAPP BUTTON ── */
.whatsapp-container {
    margin: 24px auto 16px;
    display: flex;
    justify-content: center;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 32px;
    background: linear-gradient(145deg, #1f3a4f, #15304b);
    border: 1px solid rgba(37, 211, 102, 0.4);
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.whatsapp-btn:hover {
    transform: translateY(-3px);
    border-color: var(--whatsapp);
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.25);
    background: linear-gradient(145deg, #1e405f, #1a3450);
}

.whatsapp-icon {
    width: 40px;
    height: 40px;
    background: rgba(37, 211, 102, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--whatsapp);
    transition: all 0.3s;
}

.whatsapp-btn:hover .whatsapp-icon {
    background: rgba(37, 211, 102, 0.25);
    transform: scale(1.05);
}

.whatsapp-text {
    display: flex;
    flex-direction: column;
}

.whatsapp-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--dourado-claro);
    letter-spacing: 0.5px;
}

.whatsapp-subtitle {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.3px;
}

/* ── BOTÃO IMPRIMIR ── */
.btn-print { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
    margin: 28px auto 0; 
    padding: 14px 32px; 
    background: transparent; 
    border: 1px solid rgba(199,161,72,.38); 
    border-radius: 10px; 
    color: var(--dourado); 
    font-family: var(--ff-primary); 
    font-size: 12.5px; 
    font-weight: 500; 
    letter-spacing: 1.2px; 
    text-transform: uppercase; 
    cursor: pointer; 
    transition: all .2s; 
}

.btn-print:hover { 
    background: rgba(199,161,72,.1); 
    border-color: var(--dourado); 
}

/* ── FOOTER ── */
footer { 
    text-align: center; 
    padding: 48px 0 20px; 
    color: rgba(255,255,255,.18); 
    font-size: 11.5px; 
    letter-spacing: .8px; 
}

footer a:hover {
    color: var(--dourado-claro) !important;
}

/* ── IMPRESSÃO ── */
@media print {
    @page { 
        size: A4; 
        margin: 12mm 14mm; 
    }
    
    * { 
        -webkit-print-color-adjust: exact !important; 
        print-color-adjust: exact !important; 
    }
    
    html, body { 
        background: #0d1f31 !important; 
        color: #fff !important; 
    }
    
    body::before, body::after { 
        display: none !important; 
    }
    
    header, .card, .btn-gerar, footer, #loading-overlay, .whatsapp-container { 
        display: none !important; 
    }
    
    .wrap { 
        padding: 0 !important; 
        max-width: 100% !important; 
    }
    
    #relatorio { 
        display: block !important; 
        margin-top: 0 !important; 
        animation: none !important; 
    }
    
    .rel-head { 
        background: #1a3a5c !important; 
        border-radius: 10px 10px 0 0 !important; 
        padding: 20px 24px 16px !important; 
    }
    
    .rel-head::after { 
        display: none; 
    }
    
    .rel-title { 
        font-size: 1.4rem !important; 
    }
    
    .counters { 
        page-break-inside: avoid; 
    }
    
    .ctr-n { 
        font-size: 2rem !important; 
    }
    
    .gbody { 
        max-height: none !important; 
        overflow: visible !important; 
    }
    
    .garr { 
        display: none; 
    }
    
    .ghead { 
        padding: 12px 20px !important; 
        cursor: default !important; 
    }
    
    .olist { 
        padding: 4px 20px 12px !important; 
    }
    
    .oitem { 
        padding: 5px 0 !important; 
        animation: none !important; 
    }
    
    .chart-body { 
        padding: 16px 20px !important; 
        gap: 20px !important; 
    }
    
    .donut-svg-wrap { 
        width: 160px !important; 
        height: 160px !important; 
    }
    
    .rrow { 
        padding: 8px 20px !important; 
    }
    
    .rname { 
        font-size: 11px !important; 
    }
    
    .rnum { 
        font-size: 1.1rem !important; 
    }
    
    .rel-head, .counters, .chart-wrap, .grupo, .resumo { 
        page-break-inside: avoid; 
    }
    
    .btn-print, #donut-tooltip { 
        display: none !important; 
    }
    
    .oname { 
        font-size: 10.5px !important; 
        line-height: 1.3 !important; 
    }
}

/* ── NOTIFICAÇÕES (TOAST) ── */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    min-width: 300px;
    max-width: 450px;
    background: rgba(14, 33, 54, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(199, 161, 72, 0.4);
    border-radius: 12px;
    padding: 16px 20px;
    color: #fff;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    animation: toast-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.3s ease;
}

.toast.error { border-color: rgba(239, 68, 68, 0.6); }
.toast.success { border-color: rgba(16, 185, 129, 0.6); }
.toast.info { border-color: rgba(199, 161, 72, 0.6); }

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.toast-msg {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    font-family: var(--ff-primary);
}

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    line-height: 1;
    transition: 0.2s;
}

.toast-close:hover { color: #fff; }

@keyframes toast-in {
    from { opacity: 0; transform: translateX(40px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to { opacity: 0; transform: translateX(10px) scale(0.9); }
}

.toast.fade-out {
    animation: toast-out 0.3s ease forwards;
}
