/* =========================================================
   Controle Legislativo · Câmara Municipal de Anhanguera
   Paleta tirada do brasão: azul do escudo + dourado da coroa
   ========================================================= */
:root {
    --azul: #1673d9;
    --azul-claro: #3b95f2;
    --azul-escuro: #0b2a5b;
    --marinho: #06162f;
    --ouro: #f5cf3c;
    --ouro-escuro: #d9a514;
    --fundo: #eef3fb;
    --superficie: #ffffff;
    --borda: #dde5f1;
    --texto: #12233f;
    --texto-suave: #5d6f8c;
    --raio: 18px;
    --sombra: 0 10px 30px -12px rgba(11, 42, 91, .25);
    --sombra-forte: 0 24px 50px -18px rgba(11, 42, 91, .45);
    --bs-primary: var(--azul);
    --bs-primary-rgb: 22, 115, 217;
    --bs-body-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --bs-body-color: var(--texto);
    --bs-link-color: var(--azul);
}

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }

body {
    background:
        radial-gradient(1200px 500px at 100% -10%, rgba(22, 115, 217, .10), transparent 60%),
        radial-gradient(900px 400px at -10% 110%, rgba(245, 207, 60, .12), transparent 60%),
        var(--fundo);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--bs-body-font-family);
}
main.conteudo { flex: 1; }

/* ---------- Ícones animados ---------- */
.ic { display: inline-block; transform-origin: 50% 50%; }
a:hover .ic-pular, button:hover .ic-pular, .ic-pular.ic-loop { animation: ic-pular .7s ease; }
a:hover .ic-tremer, button:hover .ic-tremer { animation: ic-tremer .6s ease; }
a:hover .ic-voar, button:hover .ic-voar { animation: ic-voar .7s ease; }
a:hover .ic-virar, button:hover .ic-virar { animation: ic-virar .8s ease; }
a:hover .ic-girar, button:hover .ic-girar { animation: ic-girar .8s ease; }
a:hover .ic-engrenagem, .dropdown-toggle.show .ic-engrenagem { animation: ic-girar 1.2s linear infinite; }
.ic-loop.ic-pular { animation: ic-pular 2.6s ease-in-out infinite; }
.ic-loop.ic-tremer { animation: ic-tremer 3s ease-in-out infinite; }
.ic-loop.ic-voar { animation: ic-flutuar 3s ease-in-out infinite; }
.ic-loop.ic-virar { animation: ic-virar 4s ease-in-out infinite; }
.ic-loop.ic-girar { animation: ic-girar 6s linear infinite; }
.ic-loop.ic-escrever { animation: ic-escrever 2.4s ease-in-out infinite; }
.ic-loop.ic-ampulheta { animation: ic-ampulheta 3s ease-in-out infinite; }
.ic-pulsar { animation: ic-pulsar 2s ease-in-out infinite; }

@keyframes ic-pular { 0%, 100% { transform: translateY(0) } 30% { transform: translateY(-5px) scale(1.08) } 55% { transform: translateY(0) scale(.96) } 75% { transform: translateY(-2px) } }
@keyframes ic-tremer { 0%, 60%, 100% { transform: rotate(0) } 10% { transform: rotate(-14deg) scale(1.1) } 20% { transform: rotate(12deg) scale(1.1) } 30% { transform: rotate(-8deg) } 40% { transform: rotate(6deg) } 50% { transform: rotate(-2deg) } }
@keyframes ic-voar { 0% { transform: translate(0) } 40% { transform: translate(8px, -8px) rotate(-10deg); opacity: 0 } 41% { transform: translate(-8px, 8px); opacity: 0 } 100% { transform: translate(0); opacity: 1 } }
@keyframes ic-flutuar { 0%, 100% { transform: translateY(0) rotate(0) } 50% { transform: translateY(-4px) rotate(-6deg) } }
@keyframes ic-virar { 0%, 100% { transform: perspective(200px) rotateY(0) } 50% { transform: perspective(200px) rotateY(180deg) } }
@keyframes ic-girar { to { transform: rotate(360deg) } }
@keyframes ic-escrever { 0%, 100% { transform: translate(0) rotate(0) } 25% { transform: translate(3px, 1px) rotate(-8deg) } 50% { transform: translate(-2px, 2px) rotate(4deg) } 75% { transform: translate(2px, -1px) rotate(-4deg) } }
@keyframes ic-ampulheta { 0%, 40% { transform: rotate(0) } 50%, 90% { transform: rotate(180deg) } 100% { transform: rotate(360deg) } }
@keyframes ic-pulsar { 0%, 100% { transform: scale(1) } 50% { transform: scale(1.18) } }

/* ---------- Botões ---------- */
.btn { border-radius: 12px; font-weight: 600; }
.btn-primary {
    --bs-btn-bg: var(--azul); --bs-btn-border-color: var(--azul);
    --bs-btn-hover-bg: #0f62bd; --bs-btn-hover-border-color: #0f62bd;
    background-image: linear-gradient(135deg, var(--azul-claro), var(--azul) 55%, #0f5fb8);
    box-shadow: 0 8px 18px -8px rgba(22, 115, 217, .7);
}
.btn-outline-secondary { --bs-btn-color: var(--texto-suave); --bs-btn-border-color: var(--borda); background: var(--superficie); }
.btn-outline-secondary:hover { --bs-btn-hover-bg: #f2f6fc; --bs-btn-hover-color: var(--azul); --bs-btn-hover-border-color: var(--azul-claro); }
.btn-ouro {
    color: var(--marinho); border: 0;
    background: linear-gradient(135deg, #ffe377, var(--ouro) 45%, var(--ouro-escuro));
    box-shadow: 0 10px 24px -10px rgba(217, 165, 20, .9);
}
.btn-ouro:hover { color: var(--marinho); transform: translateY(-1px); }
.btn-vidro { color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(8px); }
.btn-vidro:hover { color: #fff; background: rgba(255, 255, 255, .22); }
.btn-brilho { position: relative; overflow: hidden; isolation: isolate; }
.btn-brilho::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
    transform: translateX(-120%); transition: transform .7s ease;
}
.btn-brilho:hover::after { transform: translateX(120%); }

/* ---------- Navbar ---------- */
.navbar-camara {
    background: linear-gradient(100deg, var(--marinho), var(--azul-escuro) 55%, #0f4a9a);
    box-shadow: 0 6px 24px -10px rgba(6, 22, 47, .7);
    padding-block: .55rem;
}
.navbar-camara::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--ouro), transparent);
    background-size: 200% 100%; animation: brilho-linha 6s linear infinite;
}
@keyframes brilho-linha { from { background-position: 200% 0 } to { background-position: -200% 0 } }
.marca { display: flex; align-items: center; gap: .65rem; }
.marca-brasao {
    width: 44px; height: 44px; border-radius: 50%; padding: 2px; flex: none;
    background: conic-gradient(from 0deg, var(--ouro), #fff6c9, var(--ouro-escuro), var(--ouro));
    box-shadow: 0 0 18px rgba(245, 207, 60, .45);
    transition: transform .5s cubic-bezier(.3, 1.6, .5, 1);
}
.marca:hover .marca-brasao { transform: rotate(-12deg) scale(1.08); }
.marca-brasao img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; clip-path: circle(48%); background: var(--azul); }
.marca-texto { display: flex; flex-direction: column; line-height: 1.1; }
.marca-texto strong { font-size: 1rem; letter-spacing: .01em; }
.marca-texto small { font-size: .7rem; color: var(--ouro); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.menu-principal .nav-link {
    position: relative; color: rgba(255, 255, 255, .78); font-weight: 600; font-size: .9rem;
    padding: .5rem .8rem !important; border-radius: 10px; transition: color .2s, background .2s;
}
.menu-principal .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.menu-principal .nav-link::after {
    content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .15rem; height: 2px; border-radius: 2px;
    background: var(--ouro); transform: scaleX(0); transition: transform .35s cubic-bezier(.6, 0, .2, 1);
}
.menu-principal .nav-link.dropdown-toggle::after { border: 0; margin: 0; vertical-align: 0; }
.menu-principal .nav-link.active { color: #fff; }
.menu-principal .nav-link.active::after, .menu-principal .nav-link:hover::after { transform: scaleX(1); }
.menu-principal .nav-link.active .ic { color: var(--ouro); }
.avatar {
    display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, var(--ouro), var(--ouro-escuro)); color: var(--marinho); font-weight: 800; margin-right: .35rem;
}
.usuario-menu { color: #fff !important; }
.dropdown-menu-camara {
    border: 1px solid var(--borda); border-radius: 14px; padding: .4rem; box-shadow: var(--sombra-forte);
    animation: cair .25s cubic-bezier(.2, .9, .3, 1.2);
}
.dropdown-menu-camara .dropdown-item { border-radius: 9px; font-weight: 500; padding: .5rem .75rem; }
.dropdown-menu-camara .dropdown-item:hover { background: #eef4fd; color: var(--azul); }
@keyframes cair { from { opacity: 0; transform: translateY(-8px) scale(.97) } }

/* ---------- Avisos (toasts) ---------- */
.toasts { position: fixed; top: 84px; right: 18px; z-index: 1090; display: grid; gap: .7rem; width: min(400px, calc(100vw - 32px)); }
.pagina-login .toasts { top: 18px; }
.toast-camara {
    position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: .85rem; padding: .95rem 1rem 1.05rem;
    border-radius: 16px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px); box-shadow: var(--sombra-forte);
    border: 1px solid color-mix(in srgb, var(--cor-toast) 25%, transparent);
    animation: toast-entra .6s cubic-bezier(.2, 1.3, .4, 1);
}
.toast-icone {
    flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; color: #fff;
    background: linear-gradient(135deg, color-mix(in srgb, var(--cor-toast) 70%, #fff), var(--cor-toast));
    box-shadow: 0 8px 16px -8px var(--cor-toast);
}
.toast-icone .ic { animation-delay: .35s; animation-duration: .8s; animation-iteration-count: 1; }
.toast-texto { flex: 1; min-width: 0; padding-top: .05rem; }
.toast-texto strong { display: block; font-size: .95rem; color: var(--texto); }
.toast-texto span { display: block; font-size: .85rem; color: var(--texto-suave); line-height: 1.45; margin-top: .1rem; }
.toast-fechar { flex: none; border: 0; background: none; color: #9aa8bd; padding: .15rem .3rem; border-radius: 8px; line-height: 1; }
.toast-fechar:hover { color: var(--texto); background: #eef2f8; }
.toast-tempo { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--cor-toast); transform-origin: left; animation: toast-tempo var(--duracao, 6s) linear forwards; }
.toast-camara:hover .toast-tempo { animation-play-state: paused; }
.toast-success { --cor-toast: #2f9e57; }
.toast-danger { --cor-toast: #e5484d; }
.toast-warning { --cor-toast: #e09b12; }
.toast-info { --cor-toast: var(--azul); }
.toast-camara.saindo { animation: toast-sai .4s ease forwards; }
@keyframes toast-entra { from { opacity: 0; transform: translateX(70px) scale(.92) } }
@keyframes toast-sai { to { opacity: 0; transform: translateX(70px) scale(.95) } }
@keyframes toast-tempo { to { transform: scaleX(0) } }

/* Aviso fixo dentro da página */
.aviso-fixo { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: 16px; margin-bottom: 1rem; border: 1px solid; }
.aviso-fixo > i { font-size: 1.4rem; }
.aviso-fixo strong { display: block; }
.aviso-fixo span { font-size: .9rem; }
.aviso-danger { background: #fff0f0; border-color: #f6c4c6; color: #9b1c21; }

/* Janela de confirmação */
.confirmar-fundo {
    position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 16px;
    background: rgba(6, 22, 47, .55); backdrop-filter: blur(4px); animation: fundo-entra .25s ease;
}
.confirmar-caixa {
    width: min(420px, 100%); background: var(--superficie); border-radius: 22px; padding: 1.8rem 1.6rem 1.4rem; text-align: center;
    box-shadow: 0 40px 80px -20px rgba(6, 22, 47, .6); animation: caixa-entra .45s cubic-bezier(.2, 1.3, .4, 1);
}
.confirmar-icone {
    width: 72px; height: 72px; margin: 0 auto 1rem; border-radius: 22px; display: grid; place-items: center; font-size: 2rem; color: #fff;
    background: linear-gradient(135deg, #ff8a8e, #e5484d); box-shadow: 0 16px 30px -12px #e5484d;
}
.confirmar-icone i { animation: ic-tremer 1.2s ease-in-out infinite; }
.confirmar-caixa.tipo-aviso .confirmar-icone { background: linear-gradient(135deg, #ffe377, var(--ouro-escuro)); box-shadow: 0 16px 30px -12px var(--ouro-escuro); }
.confirmar-caixa h2 { font-size: 1.3rem; font-weight: 800; margin: 0 0 .4rem; }
.confirmar-caixa p { color: var(--texto-suave); margin: 0 0 1.4rem; }
.confirmar-botoes { display: flex; gap: .6rem; }
.confirmar-botoes .btn { flex: 1; padding: .7rem; }
.btn-perigo { color: #fff; border: 0; background: linear-gradient(135deg, #ff6b70, #d93a40); box-shadow: 0 10px 20px -10px #e5484d; }
.btn-perigo:hover { color: #fff; filter: brightness(1.05); }
.confirmar-fundo.saindo { animation: fundo-sai .2s ease forwards; }
@keyframes fundo-entra { from { opacity: 0 } }
@keyframes fundo-sai { to { opacity: 0 } }
@keyframes caixa-entra { from { opacity: 0; transform: translateY(20px) scale(.92) } }

/* Campos com erro e botões carregando */
.form-control.is-invalid, .form-select.is-invalid { animation: ic-tremer .45s ease; background-image: none; }
.invalid-feedback { font-weight: 600; }
.invalid-feedback::before { content: "\f332"; font-family: "bootstrap-icons"; margin-right: .3rem; vertical-align: -1px; }
.btn.carregando { pointer-events: none; opacity: .85; }
.btn .girando { display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ic-girar .7s linear infinite; vertical-align: -2px; margin-right: .4rem; }

/* ---------- Hero do painel ---------- */
.hero-camara {
    position: relative; overflow: hidden; border-radius: 26px; color: #fff; isolation: isolate;
    background: linear-gradient(120deg, var(--marinho), var(--azul-escuro) 60%, #0f4a9a);
    box-shadow: var(--sombra-forte);
}
.hero-fundo {
    position: absolute; inset: -40px; z-index: -2; background-size: cover; background-position: center;
    filter: blur(28px) saturate(1.4) brightness(.55); transform: scale(1.1); opacity: .9;
}
.hero-camara::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(600px 300px at 15% 20%, rgba(22, 115, 217, .55), transparent 70%),
        linear-gradient(90deg, rgba(6, 22, 47, .92) 0%, rgba(6, 22, 47, .55) 55%, rgba(6, 22, 47, .2));
}
.luzes { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero-grade { display: grid; grid-template-columns: 1fr auto; gap: 2rem; padding: 2.2rem 2.4rem 1.2rem; align-items: center; }
.hero-texto { display: flex; gap: 1.6rem; align-items: center; }
.hero-selo, .login-selo { position: relative; flex: none; width: 128px; height: 128px; display: grid; place-items: center; }
.hero-selo img, .login-selo img {
    width: 86%; height: 86%; border-radius: 50%; object-fit: cover; clip-path: circle(48%);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .15), 0 18px 40px -10px rgba(0, 0, 0, .6);
    animation: selo-flutua 6s ease-in-out infinite;
}
.selo-anel {
    position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0 15%, var(--ouro) 25%, transparent 35% 60%, #fff3b0 72%, transparent 82%);
    -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%, #000 66%, transparent 67%);
    mask: radial-gradient(circle, transparent 60%, #000 61%, #000 66%, transparent 67%);
    animation: ic-girar 7s linear infinite; filter: drop-shadow(0 0 6px var(--ouro));
}
.selo-anel::after {
    content: ""; position: absolute; inset: -6px; border-radius: 50%;
    border: 1px dashed rgba(245, 207, 60, .35); animation: ic-girar 30s linear infinite reverse;
}
@keyframes selo-flutua { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }
.hero-data { margin: 0 0 .3rem; color: var(--ouro); font-weight: 600; font-size: .85rem; }
.hero-titulo { font-size: clamp(1.7rem, 3.2vw, 2.7rem); font-weight: 800; letter-spacing: -.02em; margin: 0 0 .3rem; line-height: 1.1; }
.hero-sub { color: rgba(255, 255, 255, .75); margin: 0 0 1.1rem; }
.hero-acoes { display: flex; flex-wrap: wrap; gap: .6rem; }
.hero-foto { perspective: 900px; }
.moldura {
    position: relative; width: 230px; aspect-ratio: 526 / 585; border-radius: 20px; overflow: hidden;
    border: 3px solid rgba(245, 207, 60, .7); transform-style: preserve-3d;
    box-shadow: 0 0 0 8px rgba(255, 255, 255, .06), 0 30px 60px -15px rgba(0, 0, 0, .7), 0 0 40px rgba(245, 207, 60, .25);
}
.moldura img { width: 100%; height: 100%; object-fit: cover; animation: ken-burns 18s ease-in-out infinite alternate; }
.moldura::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, .28), transparent 45%);
}
.moldura-legenda {
    position: absolute; left: 10px; bottom: 10px; font-size: .72rem; font-weight: 700; padding: .3rem .6rem; border-radius: 99px;
    background: rgba(6, 22, 47, .7); backdrop-filter: blur(6px); color: var(--ouro);
}
@keyframes ken-burns { from { transform: scale(1) } to { transform: scale(1.14) translate(-2%, 2%) } }
.hero-proximos {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: .6rem;
    background: rgba(255, 255, 255, .12); border-top: 1px solid rgba(255, 255, 255, .12);
}
.proximo { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.6rem; background: rgba(6, 22, 47, .45); backdrop-filter: blur(6px); }
.proximo > i { font-size: 1.6rem; color: var(--ouro); }
.proximo small { display: block; color: rgba(255, 255, 255, .65); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.proximo strong { font-size: 1.35rem; font-weight: 800; letter-spacing: .02em; font-variant-numeric: tabular-nums; }

/* ---------- Cartões do painel ---------- */
.cartao-modulo {
    position: relative; display: flex; flex-direction: column; gap: .2rem; padding: 1.4rem 1.4rem 1.1rem;
    border-radius: var(--raio); background: var(--superficie); color: var(--texto); text-decoration: none; overflow: hidden;
    border: 1px solid var(--borda); box-shadow: var(--sombra); transition: box-shadow .3s;
    transform-style: preserve-3d;
}
.cartao-modulo::before {
    content: ""; position: absolute; inset: 0 0 auto; height: 5px;
    background: linear-gradient(90deg, var(--cor-modulo), color-mix(in srgb, var(--cor-modulo) 40%, #fff));
}
.cartao-modulo:hover { box-shadow: var(--sombra-forte); color: var(--texto); }
.cartao-brilho {
    position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--cor-modulo) 18%, transparent), transparent 70%);
}
.cartao-modulo:hover .cartao-brilho { opacity: 1; }
.cartao-icone {
    position: absolute; right: 1.2rem; top: 1.2rem; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
    font-size: 1.6rem; color: #fff; transform: translateZ(30px);
    background: linear-gradient(135deg, color-mix(in srgb, var(--cor-modulo) 70%, #fff), var(--cor-modulo));
    box-shadow: 0 12px 24px -10px var(--cor-modulo);
}
.cartao-titulo { color: var(--texto-suave); font-weight: 600; font-size: .88rem; padding-right: 64px; }
.cartao-numero { font-size: 2.8rem; font-weight: 800; line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; transform: translateZ(20px); }
.cartao-rodape { font-size: .8rem; color: var(--texto-suave); display: flex; align-items: center; gap: .2rem; }
.cartao-rodape i { font-size: 1.2rem; color: var(--cor-modulo); transition: transform .3s; }
.cartao-modulo:hover .cartao-rodape i { transform: translateX(5px); }

/* ---------- Painéis / listas ---------- */
.painel { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra); overflow: hidden; }
.painel-cabecalho { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.2rem; font-weight: 700; border-bottom: 1px solid var(--borda); background: linear-gradient(180deg, #fbfcff, #f4f7fc); }
.painel-cabecalho .ic { font-size: 1.15rem; }
.painel-lista a { display: flex; gap: .8rem; align-items: center; padding: .7rem 1.2rem; color: var(--texto); text-decoration: none; border-bottom: 1px solid #eef2f8; transition: background .2s, padding .25s; }
.painel-lista a:hover { background: #f4f8fe; padding-left: 1.5rem; }
.painel-lista .etiqueta { flex: none; font-size: .75rem; font-weight: 700; padding: .25rem .55rem; border-radius: 8px; background: #fff1e0; color: #b4600b; }
.painel-lista .texto { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vazio { padding: 1.3rem; color: var(--texto-suave); text-align: center; }
.linha-tempo { padding: .5rem 0; }
.linha-tempo a { position: relative; display: flex; gap: .9rem; padding: .6rem 1.2rem; text-decoration: none; color: var(--texto); }
.linha-tempo a:not(:last-child)::before { content: ""; position: absolute; left: calc(1.2rem + 17px); top: 2.8rem; bottom: -.4rem; width: 2px; background: #e6ecf5; }
.linha-tempo a:hover { background: #f6f9fe; }
.linha-tempo .ponto {
    flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; z-index: 1;
    background: var(--cor-modulo); box-shadow: 0 6px 14px -6px var(--cor-modulo);
}
.linha-tempo .corpo { min-width: 0; flex: 1; }

/* ---------- Cabeçalho das páginas ---------- */
.cabecalho-pagina { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 1.3rem; }
.cabecalho-pagina h1 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.cabecalho-pagina p { margin: 0; color: var(--texto-suave); font-size: .88rem; }
.icone-pagina {
    width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; color: #fff; flex: none;
    background: linear-gradient(135deg, color-mix(in srgb, var(--cor-modulo, var(--azul)) 65%, #fff), var(--cor-modulo, var(--azul)));
    box-shadow: 0 12px 24px -10px var(--cor-modulo, var(--azul));
}
.btn-voltar {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--superficie);
    border: 1px solid var(--borda); color: var(--texto); text-decoration: none; transition: transform .2s, color .2s;
}
.btn-voltar:hover { transform: translateX(-3px); color: var(--azul); }

.filtros { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); padding: .8rem 1rem 1rem; box-shadow: var(--sombra); margin-bottom: 1rem; }
.filtros .form-label { font-weight: 600; color: var(--texto-suave); }
.form-control, .form-select { border-radius: 11px; border-color: var(--borda); }
.form-control:focus, .form-select:focus { border-color: var(--azul-claro); box-shadow: 0 0 0 4px rgba(22, 115, 217, .14); }
.form-label { font-weight: 600; font-size: .88rem; }

/* ---------- Tabelas ---------- */
.tabela-casca { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra); }
.tabela-modulo { --bs-table-hover-bg: #f3f8ff; }
.tabela-modulo thead th {
    background: linear-gradient(180deg, var(--cor-modulo, #6c757d), color-mix(in srgb, var(--cor-modulo, #6c757d) 82%, #000));
    color: #fff; white-space: nowrap; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em;
    border: 0; padding: .8rem .75rem;
}
.tabela-modulo tbody td { padding: .65rem .75rem; border-color: #eef2f8; }
.tabela-modulo tbody tr[data-href] { cursor: pointer; transition: transform .2s; }
.tabela-modulo tbody tr[data-href]:hover td:first-child { box-shadow: inset 4px 0 0 var(--cor-modulo, var(--azul)); }
.tabela-modulo tbody td:first-child { font-weight: 700; }
.tabela-modulo .badge { font-weight: 600; padding: .4em .7em; border-radius: 99px; }
.vazio-tabela { text-align: center; color: var(--texto-suave); padding: 2.8rem 1rem !important; }
.vazio-tabela > i { display: block; font-size: 2.4rem; color: #b9c6da; margin-bottom: .4rem; }
.vazio-tabela strong { display: block; color: var(--texto); font-size: 1.05rem; }
.vazio-tabela span { display: block; font-size: .9rem; }
.linha-cancelada td { text-decoration: line-through; color: #999; }
.linha-cancelada td .badge { text-decoration: none; }
.pagination .page-link { border-radius: 9px !important; margin: 0 2px; border: 0; }

/* ---------- Formulário ---------- */
.cartao-form {
    position: relative; background: var(--superficie); border: 1px solid var(--borda); border-radius: 22px;
    padding: 1.8rem; box-shadow: var(--sombra); overflow: hidden;
}
.cartao-form::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--cor-modulo), var(--ouro)); }
.input-group > input[type=number] { min-width: 4.5rem; }
.btn-proximo { color: var(--ouro-escuro) !important; font-weight: 700; }
.btn-proximo:hover { background: #fff8dc !important; }
.campo-destaque { animation: destaque 1s ease; }
@keyframes destaque { 0% { box-shadow: 0 0 0 0 rgba(245, 207, 60, .9) } 100% { box-shadow: 0 0 0 12px rgba(245, 207, 60, 0) } }

/* ---------- Quadro por vereador ---------- */
.quadro { table-layout: fixed; min-width: 760px; }
.quadro th, .quadro td { text-align: center; font-size: .85rem; padding: .25rem; height: 1.9rem; border-color: #e6ecf5; }
.quadro thead tr:last-child th { background: var(--azul-escuro); color: #fff; font-size: .75rem; letter-spacing: .04em; }
.quadro thead tr:last-child th a { color: #fff !important; }
.quadro thead tr:last-child th a:hover { color: var(--ouro) !important; }
.faixa-quadro { color: #fff; font-weight: 800; letter-spacing: .05em; padding: .7rem !important; }
.item-quadro { text-decoration: none; font-weight: 700; display: block; border-radius: 6px; transition: transform .15s, background .15s; }
.item-quadro.ind { color: #0b6a8a; }
.item-quadro.req { color: #9a6200; background: #fff3cd; }
.item-quadro:hover { background: #e6f0ff; transform: scale(1.12); }

/* ---------- Login ---------- */
.pagina-login { background: var(--marinho); }
.login-tela { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 100vh; }
.login-vitrine { position: relative; overflow: hidden; display: flex; align-items: flex-end; isolation: isolate; color: #fff; }
.login-foto {
    position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center 30%;
    animation: ken-burns 22s ease-in-out infinite alternate;
}
.login-vitrine::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(0deg, rgba(6, 22, 47, .95) 0%, rgba(6, 22, 47, .35) 45%, rgba(6, 22, 47, .15) 100%),
        linear-gradient(90deg, transparent 70%, rgba(6, 22, 47, .9));
}
.login-vitrine-texto { padding: 3rem 3.2rem; max-width: 640px; }
.login-vitrine-texto h1 { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; margin: .9rem 0 .8rem; }
.login-vitrine-texto p { color: rgba(255, 255, 255, .8); font-size: 1.05rem; margin: 0; }
.login-chip { display: inline-block; padding: .4rem .8rem; border-radius: 99px; font-size: .78rem; font-weight: 700; color: var(--ouro); background: rgba(245, 207, 60, .12); border: 1px solid rgba(245, 207, 60, .35); }
.login-lado {
    display: grid; place-items: center; padding: 2rem;
    background:
        radial-gradient(500px 300px at 80% 0%, rgba(22, 115, 217, .35), transparent 70%),
        radial-gradient(400px 300px at 0% 100%, rgba(245, 207, 60, .12), transparent 70%),
        linear-gradient(160deg, #0a2147, var(--marinho));
}
.login-caixa { width: min(400px, 100%); text-align: center; color: #fff; }
.login-selo { width: 150px; height: 150px; margin: 0 auto 1rem; }
.login-titulo { font-weight: 800; letter-spacing: -.02em; margin: 0; }
.login-sub { color: rgba(255, 255, 255, .6); margin-bottom: 1.6rem; }
.login-form {
    text-align: left; padding: 1.6rem; border-radius: 22px;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(14px);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
}
.campo-flutuante { position: relative; margin-bottom: 1rem; }
.campo-flutuante > i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, .5); transition: color .2s; }
.campo-flutuante input {
    width: 100%; height: 3.4rem; padding: 1.2rem 2.8rem .35rem 2.8rem; border-radius: 14px; color: #fff; font-weight: 500;
    background: rgba(6, 22, 47, .55); border: 1px solid rgba(255, 255, 255, .15); outline: none; transition: border-color .2s, box-shadow .2s;
}
.campo-flutuante input:focus { border-color: var(--ouro); box-shadow: 0 0 0 4px rgba(245, 207, 60, .15); }
.campo-flutuante input:focus ~ i, .campo-flutuante:focus-within > i { color: var(--ouro); }
.campo-flutuante label {
    position: absolute; left: 2.8rem; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, .55);
    pointer-events: none; transition: all .2s ease; font-weight: 500;
}
.campo-flutuante input:focus + label, .campo-flutuante input:not(:placeholder-shown) + label { top: .85rem; font-size: .7rem; color: var(--ouro); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.campo-flutuante input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 40px #0b2244 inset; }
.ver-senha { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: rgba(255, 255, 255, .55); padding: .4rem; }
.ver-senha:hover { color: var(--ouro); }
.alerta-erro { display: flex; gap: .5rem; align-items: center; padding: .7rem .9rem; border-radius: 12px; margin-bottom: 1rem; background: rgba(229, 72, 77, .15); border: 1px solid rgba(229, 72, 77, .4); color: #ffb3b5; font-weight: 600; animation: ic-tremer .5s; }
.login-rodape { margin-top: 1.6rem; color: rgba(255, 255, 255, .45); font-size: .8rem; }
.login-rodape img { border-radius: 50%; vertical-align: -4px; }

/* Escolha do operador */
.login-operadores { display: grid; gap: .8rem; }
.operador {
    display: flex; align-items: center; gap: 1rem; width: 100%; padding: 1rem 1.1rem; border-radius: 18px; text-align: left;
    color: #fff; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(14px);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6); transition: transform .25s, border-color .25s, background .25s;
}
.operador:hover, .operador:focus-visible { transform: translateY(-3px); border-color: var(--ouro); background: rgba(245, 207, 60, .1); outline: none; }
.operador-icone {
    width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font-size: 1.45rem; flex: none;
    color: var(--marinho); background: linear-gradient(135deg, #ffe377, var(--ouro) 45%, var(--ouro-escuro));
}
.operador:hover .ic-pular { animation: ic-pular .7s ease; }
.operador-nome { flex: 1; font-weight: 700; font-size: 1.1rem; }
.operador-seta { font-size: 1.8rem; color: var(--ouro); transition: transform .25s; }
.operador:hover .operador-seta { transform: translateX(5px); }
.login-dica { margin-top: 1.2rem; color: rgba(255, 255, 255, .5); font-size: .8rem; }

/* Modo administrador */
.selo-admin { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 99px; font-size: .75rem; font-weight: 700; color: var(--marinho); background: var(--ouro); margin-right: .5rem; }
.selo-admin i { animation: ic-pulsar 2s ease-in-out infinite; }

/* ---------- Rodapé ---------- */
.rodape { display: flex; justify-content: center; align-items: center; gap: .5rem; padding: 1.2rem; color: var(--texto-suave); font-size: .8rem; }
.rodape img { border-radius: 50%; object-fit: cover; }

/* Estados iniciais das animações (só quando o JS está ativo) */
.js [data-hero], .js [data-entrar] { opacity: 0; }

/* ---------- Responsivo ---------- */
@media (max-width: 991.98px) {
    .hero-grade { grid-template-columns: 1fr; padding: 1.6rem; }
    .hero-foto { display: none; }
    .hero-proximos { grid-template-columns: 1fr; }
    .login-tela { grid-template-columns: 1fr; }
    .login-vitrine { min-height: 34vh; }
    .login-vitrine-texto { padding: 1.6rem; }
    .login-vitrine-texto p { display: none; }
}
@media (max-width: 575.98px) {
    .hero-texto { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .hero-selo { width: 96px; height: 96px; }
    .marca-texto small { display: none; }
}
@media (max-width: 1199.98px) {
    .navbar-camara .navbar-collapse { padding: .8rem 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .toast-tempo { display: none; }
    .js [data-hero], .js [data-entrar] { opacity: 1; }
}

/* ---------- Impressão ---------- */
.print-only { display: none; }
.cabecalho-impressao { text-align: center; margin-bottom: .5rem; }
.cabecalho-impressao .faixa { color: #fff; font-weight: 700; padding: .3rem; margin: .25rem 0; }
@media print {
    @page { size: A4; margin: 12mm; }
    body { background: #fff; }
    .no-print, .navbar, .alert, .rodape, .toasts { display: none !important; }
    .print-only { display: block !important; }
    main { padding: 0 !important; }
    .js [data-hero], .js [data-entrar] { opacity: 1 !important; transform: none !important; }
    .tabela-casca { box-shadow: none; border: 0; }
    .table { font-size: 10pt; }
    .table-responsive { overflow: visible; }
    .badge { border: 0; color: #000 !important; background: transparent !important; padding: 0; font-weight: normal; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; animation: none !important; }
}

/* ---------- Aplicativo (PWA) ---------- */
[hidden] { display: none !important; }
.btn-instalar-login {
    margin-top: .8rem; display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1.1rem; border-radius: 12px;
    font-weight: 700; font-size: .9rem; color: var(--ouro); background: rgba(245, 207, 60, .1); border: 1px solid rgba(245, 207, 60, .4);
    transition: background .2s, transform .2s;
}
.btn-instalar-login:hover { background: rgba(245, 207, 60, .2); transform: translateY(-1px); }
.btn-instalar-login:hover .ic-pular { animation: ic-pular .7s ease; }

/* Aberto como aplicativo instalado: respeita a área da barra de status em celulares */
@media (display-mode: standalone) {
    .navbar-camara { padding-top: max(.55rem, env(safe-area-inset-top)); }
    .login-lado { padding-top: max(2rem, env(safe-area-inset-top)); }
}
