:root {
    /* Paleta base (Dark Mode) */
    --bg-fundo: #0f172a;
    --cor-texto: #e2e8f0;
    --cor-primaria: #38bdf8;
    --cor-primaria-hover: #0ea5e9;
    --bg-escuro: #090d16;
    --bg-sidebar: #1e293b;
    --branco: #ffffff;

    /* VariÃ¡veis semÃ¢nticas (superfÃ­cies, bordas, textos) */
    --superficie: #1e293b;
    /* cards, modais, painÃ©is */
    --superficie-2: #0f172a;
    /* inputs, fundos internos */
    --superficie-3: #334155;
    /* hover, elementos elevados */
    --borda: #334155;
    /* bordas padrÃ£o */
    --borda-suave: rgba(51, 65, 85, 0.5);
    --texto-secundario: #94a3b8;
    /* textos de apoio */
    --texto-terciario: #64748b;
    /* textos discretos */
    --texto-suave: #cbd5e1;
    /* textos mÃ©dios */
    --sombra-card: 0 20px 50px rgba(0, 0, 0, 0.45);
    --sombra-suave: 0 8px 20px rgba(0, 0, 0, 0.25);
    --sombra-hover: 0 16px 40px rgba(0, 0, 0, 0.35);
    --overlay: rgba(9, 13, 22, 0.8);
    --glass: rgba(30, 41, 59, 0.7);
    --glass-borda: rgba(51, 65, 85, 0.7);
    --hover-fundo: rgba(255, 255, 255, 0.05);
    --perigo: #ef4444;
    --perigo-suave: rgba(239, 68, 68, 0.12);
    --sucesso: #10b981;
    --aviso: #f59e0b;
}

body.light-mode {
    /* Paleta base (Light Mode) */
    --bg-fundo: #eef2f7;
    --cor-texto: #1e293b;
    --cor-primaria: #0284c7;
    --cor-primaria-hover: #0369a1;
    --bg-escuro: #dbe3ee;
    --bg-sidebar: #ffffff;
    --branco: #0f172a;

    /* VariÃ¡veis semÃ¢nticas (Light Mode) */
    --superficie: #ffffff;
    --superficie-2: #f8fafc;
    --superficie-3: #e2e8f0;
    --borda: #cbd5e1;
    --borda-suave: rgba(203, 213, 225, 0.7);
    --texto-secundario: #475569;
    --texto-terciario: #64748b;
    --texto-suave: #334155;
    --sombra-card: 0 20px 50px rgba(15, 23, 42, 0.12);
    --sombra-suave: 0 8px 20px rgba(15, 23, 42, 0.08);
    --sombra-hover: 0 16px 40px rgba(15, 23, 42, 0.14);
    --overlay: rgba(15, 23, 42, 0.45);
    --glass: rgba(255, 255, 255, 0.75);
    --glass-borda: rgba(203, 213, 225, 0.8);
    --hover-fundo: rgba(15, 23, 42, 0.05);
    --perigo: #dc2626;
    --perigo-suave: rgba(220, 38, 38, 0.08);
    --sucesso: #059669;
    --aviso: #d97706;
}

/* ========================= */
/* TIMELINE DE TERMOS DE USO */
/* ========================= */

.termos-container {
    display: flex;
    max-width: 1200px;
    margin: 40px auto;
    background: transparent;
    gap: 50px;
    padding: 0 20px;
}

.termos-page-wrapper {
    min-height: 80vh;
    display: block;
    padding-bottom: 20px;
}

.termos-sidebar {
    width: 30%;
    position: relative;
    display: flex;
}

.linha-branca {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #FFFFFF;
}

.indicador-bola {
    position: absolute;
    right: -7px;
    top: 20px;
    width: 16px;
    height: 16px;
    background-color: #00b4d8;
    border-radius: 50%;
    transition: top 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 2;
    box-shadow: 0 0 10px rgba(0, 180, 216, 0.6);
}

.termos-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.menu-item {
    padding: 20px 0;
    text-align: right;
    color: #888;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.95rem;
    width: fit-content;
    align-self: flex-end;
}

.menu-item:hover,
.menu-item.active {
    color: #FFFFFF;
}

.termos-content {
    width: 70%;
    display: flex;
    flex-direction: column;
}

.termos-subtitle {
    color: #00b4d8;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.termos-title {
    color: #FFFFFF;
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.termos-title-mobile,
.nav-seta-mobile {
    display: none;
}

/* Container de rolagem com efeito de Fade (Masking) */
.termos-scroll-area {
    /* Define a altura mÃ¡xima para alinhar com o tamanho da linha branca lateral */
    max-height: 480px;
    overflow-y: auto;
    padding-right: 20px;
    padding-top: 15px;
    /* Respiro extra pro fade inicial */
    padding-bottom: 25px;
    /* Respiro extra pro fade final */

    /* 1. Oculta a barra de rolagem no Firefox e IE/Edge */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* 3. Oculta a barra de rolagem no Chrome/Safari/Edge (Chromium) */
.termos-scroll-area::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.topico-texto h2 {
    color: #FFFFFF;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.topico-texto p,
.topico-texto ul {
    color: #ccc;
    line-height: 1.7;
    margin-bottom: 15px;
    text-align: justify;
}

.topico-texto ul {
    padding-left: 20px;
}

.topico-texto li {
    margin-bottom: 10px;
}

/* BLINDAGEM DO DESKTOP: Oculta qualquer navegaÃ§Ã£o mobile em telas maiores que 768px */
@media (min-width: 769px) {

    #nav-mobile-termos,
    #titulo-mobile,
    .termos-title-mobile,
    .nav-seta-mobile,
    #btn-prev-mobile,
    #btn-next-mobile {
        display: none !important;
    }
}

.topico-texto {
    display: block;
    animation: fadeInTerms 0.35s ease;
}

.topico-texto:not(.active) {
    display: none;
}

@keyframes fadeInTerms {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.light-mode .termos-title {
    color: var(--cor-texto);
}

body.light-mode .menu-item {
    color: var(--texto-secundario);
}

body.light-mode .menu-item:hover,
body.light-mode .menu-item.active {
    color: var(--cor-primaria);
}

body.light-mode .topico-texto p,
body.light-mode .topico-texto li {
    color: var(--texto-suave);
}

body.light-mode .topico-texto h2 {
    color: var(--cor-texto);
}

body.light-mode .termos-subtitle {
    color: var(--cor-primaria);
}

body.light-mode .linha-branca {
    background-color: var(--branco);
}

body.light-mode .indicador-bola {
    background-color: var(--cor-primaria);
}

body.light-mode .termos-scroll-area::-webkit-scrollbar-track {
    background: var(--superficie-2);
}

body.light-mode .termos-scroll-area::-webkit-scrollbar-thumb {
    background: var(--cor-primaria);
}

@media (max-width: 900px) {
    .termos-container {
        flex-direction: column;
        gap: 24px;
    }

    .termos-sidebar,
    .termos-content {
        width: 100%;
    }

    .termos-sidebar {
        border-right: none;
    }

    .linha-branca {
        display: none;
    }

    .termos-menu {
        padding-right: 0;
    }

    .menu-item {
        text-align: left;
    }
}

body.light-mode .btn-primario {
    color: #ffffff !important;
}

body.light-mode .btn-secundario:hover {
    color: #ffffff !important;
}

body.light-mode .nav-btn.ativo {
    color: #ffffff !important;
}

body.light-mode .fab-suporte {
    color: #ffffff !important;
}

body.light-mode .chat-suporte-input button {
    color: #ffffff !important;
}

body.light-mode .modal-box,
body.light-mode .manager-painel,
body.light-mode .tabela-container {
    background-color: var(--superficie);
    border-color: var(--borda);
}

body.light-mode .tabela-produtos th {
    background-color: var(--superficie-2);
    border-bottom-color: var(--borda);
    color: var(--texto-secundario);
}

body.light-mode .tabela-produtos td {
    border-bottom-color: var(--borda);
}

body.light-mode input,
body.light-mode select {
    background-color: var(--superficie-2);
    color: var(--cor-texto);
    border-color: var(--borda);
}

body.light-mode select,
body.light-mode input[type="text"],
body.light-mode input[type="number"],
body.light-mode input[type="email"],
body.light-mode input[type="password"] {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border-color: var(--borda) !important;
}

body.light-mode .tabela-produtos tr:hover td {
    background-color: var(--hover-fundo);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-tap-highlight-color: transparent !important;
}

*:focus,
*:active {
    outline: none !important;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    overflow-x: hidden;
}

body {
    background-color: var(--bg-fundo);
    color: var(--cor-texto);
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.preload * {
    transition: none !important;
}

body.preload *,
body.preload *::before,
body.preload *::after {
    transition: none !important;
    animation: none !important;
}

.hidden {
    display: none !important;
}

body,
.sidebar,
.top-bar,
.manager-painel,
.tabela-container,
.modal-box,
.tabela-produtos th,
.tabela-produtos td,
input,
select,
.theme-switch,
.switch-handle {
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, width 0.3s ease, padding 0.3s ease, flex-basis 0.3s ease !important;
}

button {
    border: none;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
}

.btn-primario {
    background-color: var(--cor-primaria);
    color: var(--bg-escuro);
    padding: 12px 20px;
    width: 100%;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.btn-primario:hover {
    background-color: var(--cor-primaria-hover);
}

.btn-primario.esta-carregando {
    opacity: 0.8;
    cursor: wait;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.spinner-loading {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: girar-spinner 0.7s linear infinite;
}

@keyframes girar-spinner {
    to {
        transform: rotate(360deg);
    }
}

.btn-secundario {
    background-color: transparent;
    border: 2px solid var(--cor-primaria);
    color: var(--cor-primaria);
    padding: 10px 20px;
    font-size: 1rem;
}

.btn-secundario:hover {
    background-color: var(--cor-primaria);
    color: var(--bg-escuro);
}

.btn-novo {
    width: auto;
    padding: 10px 20px;
    font-size: 0.95rem;
}

/* Botões do Modal de Conclusão de Venda do PDV */
.modal-sucesso-botoes {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.btn-modal-pdv {
    height: 44px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

#btn-imprimir-comprovante {
    white-space: nowrap !important;
}

/* ============ UTILITÃRIOS SEMÃ‚NTICOS (Design System interno) ============ */
/* Cores de texto que respondem ao tema claro/escuro */
.texto-secundario {
    color: var(--texto-secundario);
}

.texto-terciario {
    color: var(--texto-terciario);
}

.texto-perigo {
    color: var(--perigo);
}

.texto-sucesso {
    color: var(--sucesso);
}

.texto-aviso {
    color: var(--aviso);
}

.texto-primaria {
    color: var(--cor-primaria);
}

.texto-branco {
    color: var(--branco);
}

/* Badges de status (pill) */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}

.badge-perigo {
    color: var(--perigo);
    background: var(--perigo-suave);
}

.badge-sucesso {
    color: var(--sucesso);
    background: rgba(16, 185, 129, 0.12);
}

.badge-aviso {
    color: var(--aviso);
    background: rgba(245, 158, 11, 0.12);
}

.badge-primaria {
    color: var(--cor-primaria);
    background: rgba(56, 189, 248, 0.12);
}

.badge-neutro {
    color: var(--texto-secundario);
    background: var(--hover-fundo);
}

.badge-novo {
    color: #ffffff !important;
    background: #06b6d4 !important;
}

.badge-info {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

body.light-mode .badge-sucesso {
    background: rgba(5, 150, 105, 0.1);
}

body.light-mode .badge-aviso {
    background: rgba(217, 119, 6, 0.1);
}

body.light-mode .badge-primaria {
    background: rgba(2, 132, 199, 0.1);
}

body.light-mode .badge-novo {
    color: #ffffff !important;
    background: #0891b2 !important;
}

body.light-mode .badge-info {
    color: #0284c7;
    background: rgba(2, 132, 199, 0.12);
    border: 1px solid rgba(2, 132, 199, 0.25);
}

/* Badge discreta e elegante para produtos excedentes (+X itens) no extrato */
.badge-mais-itens {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(14, 165, 233, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    margin-left: 6px;
    vertical-align: middle;
    white-space: nowrap;
    cursor: help;
    transition: all 0.2s ease;
}

.badge-mais-itens:hover {
    background: rgba(14, 165, 233, 0.22);
    border-color: rgba(56, 189, 248, 0.45);
    color: #7dd3fc;
}

body.light-mode .badge-mais-itens,
body.light-theme .badge-mais-itens,
[data-theme="light"] .badge-mais-itens {
    background: #e0f2fe !important;
    color: #0284c7 !important;
    border-color: #bae6fd !important;
}

body.light-mode .badge-mais-itens:hover,
body.light-theme .badge-mais-itens:hover,
[data-theme="light"] .badge-mais-itens:hover {
    background: #bae6fd !important;
    color: #0369a1 !important;
    border-color: #7dd3fc !important;
}

/* Truncamento Geométrico para Tabelas */
.td-truncado {
    max-width: 300px;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    vertical-align: middle;
}

.tabela-acoes-container {
    display: flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}

/* Botões de ação compactos (tabelas e listas) */
.btn-acao {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.15s ease, background-color 0.2s ease;
}

.btn-acao:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-acao-sucesso {
    background: var(--sucesso);
    color: #ffffff;
}

.btn-acao-perigo {
    background: var(--perigo);
    color: #ffffff;
}

.btn-acao-neutro,
.btn-acao-cinza {
    background: var(--superficie-3);
    color: var(--cor-texto);
    text-decoration: none;
}

.btn-acao-cinza:hover {
    filter: brightness(1.15);
}

.btn-acao-primaria,
.btn-acao-primario,
.btn-acao-azul {
    background: var(--cor-primaria);
    color: #ffffff;
}

.btn-abrir-chamado-notif {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 600;
}

/* Estado Desabilitado (Dark Mode Padrão) */
button.btn-chamado-desabilitado,
.btn-chamado-desabilitado {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    background-color: #334155 !important;
    border: 1px solid #475569 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    opacity: 0.65;
    pointer-events: none; /* Bloqueio absoluto de cliques */
    box-shadow: none !important;
    transform: none !important;
}

.btn-chamado-desabilitado svg,
.btn-chamado-desabilitado i,
.btn-chamado-desabilitado span,
.btn-chamado-desabilitado .icone-cadeado {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    margin: 0 !important;
    line-height: 1 !important;
    flex-shrink: 0;
}

/* Fallback para o Tema Claro (Light Mode) */
body.light-theme button.btn-chamado-desabilitado,
body.light-mode button.btn-chamado-desabilitado,
[data-theme="light"] button.btn-chamado-desabilitado {
    background-color: #e2e8f0 !important;
    border: 1px solid #cbd5e1 !important;
    color: #94a3b8 !important;
}

/* Inputs e selects padronizados (substituem estilos inline) */
.input-padrao {
    padding: 14px;
    border: 1px solid var(--borda);
    border-radius: 8px;
    outline: none;
    font-size: 1rem;
    width: 100%;
    background: var(--superficie-2);
    color: var(--cor-texto);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-padrao:focus {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

/* Links de aÃ§Ã£o em tabelas */
.btn-editar,
.link-editar,
.link-excluir {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    min-height: 32px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
}

.btn-editar,
.link-editar {
    border: 1px solid rgba(56, 189, 248, 0.45);
    background: rgba(56, 189, 248, 0.14);
    color: var(--cor-primaria);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn-editar:hover,
.link-editar:hover {
    background: rgba(56, 189, 248, 0.28);
    border-color: var(--cor-primaria);
    transform: translateY(-1px);
}

.link-excluir {
    border: 1px solid rgba(248, 113, 113, 0.45);
    background: rgba(248, 113, 113, 0.14);
    color: var(--perigo);
}

.link-excluir:hover {
    background: rgba(248, 113, 113, 0.25);
    border-color: var(--perigo);
}

/* Linhas clicÃ¡veis de tabela */
.linha-clicavel {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.linha-clicavel:hover td {
    background-color: var(--hover-fundo);
}

/* Divisores e bordas suaves */
.borda-suave {
    border-color: var(--borda);
}

.divisor-suave {
    border-top: 1px solid var(--borda);
}

/* ============ SUPER LANDING PAGE ============ */
.landing-page {
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, var(--bg-escuro) 0%, var(--bg-fundo) 45%, var(--bg-sidebar) 100%);
    color: var(--branco);
    overflow-x: hidden;
}

.landing-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 40px;
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--borda-suave);
}

.landing-logo,
.landing-footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.landing-logo {
    color: var(--branco);
    text-decoration: none;
}

.landing-logo i,
.landing-footer-logo i {
    color: var(--cor-primaria);
    font-size: 1.6rem;
}

.landing-logo span,
.landing-footer-logo span {
    color: var(--cor-primaria);
}

.landing-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    color: var(--branco);
    cursor: pointer;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
}

.landing-theme-toggle:hover {
    background-color: var(--hover-fundo);
}

.landing-theme-toggle>span {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* HERO */
.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 40px;
}

.hero-texto {
    animation: fadeInUp 0.7s ease-out both;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.12);
    color: var(--cor-primaria);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.hero-texto h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
}

.hero-texto h1 span {
    color: var(--cor-primaria);
}

.hero-subtitulo {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--texto-secundario);
    max-width: 560px;
    margin-bottom: 32px;
}

.btn-cta {
    width: auto;
    padding: 15px 28px;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero-stat strong {
    font-size: 1.35rem;
    color: var(--branco);
    font-weight: 800;
}

.hero-stat span {
    font-size: 0.85rem;
    color: var(--texto-secundario);
}

/* CARD DE LOGIN (GLASSMORPHISM) */
.hero-card {
    position: relative;
    animation: fadeInUp 0.7s ease-out 0.15s both;
}

.hero-card-glow {
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.4), rgba(245, 158, 11, 0.2));
    filter: blur(24px);
    opacity: 0.5;
    z-index: 0;
}

.hero-card-conteudo {
    position: relative;
    z-index: 1;
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-borda);
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: var(--sombra-card);
}

.hero-card-topo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--cor-primaria);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.hero-card-topo i {
    font-size: 1.5rem;
}

.hero-card-conteudo h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.hero-card-conteudo>p {
    color: var(--texto-secundario);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.hero-card-conteudo form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.campo-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--texto-secundario);
    margin-top: 8px;
}

.hero-card-conteudo input {
    padding: 14px;
    border: 1px solid var(--borda);
    border-radius: 10px;
    outline: none;
    font-size: 1rem;
    width: 100%;
    background: var(--superficie-2);
    color: var(--cor-texto);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-card-conteudo input:focus {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.hero-card-conteudo .btn-primario {
    margin-top: 16px;
}

.hero-card-conteudo .link-texto {
    text-align: center;
    margin-top: 16px;
}

/* SEÃ‡Ã•ES */
.landing-secao {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 40px;
}

.legal-page {
    flex: 1;
    width: 100%;
}

.secao-titulo {
    text-align: center;
    margin-bottom: 50px;
}

.secao-kicker {
    display: inline-block;
    color: var(--cor-primaria);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.secao-titulo h2 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.sobre-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.sobre-card,
.stack-card,
.feature-card {
    background: var(--superficie);
    border: 1px solid var(--borda);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--sombra-suave);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.sobre-card i,
.stack-card i,
.feature-card i {
    font-size: 2rem;
    color: var(--cor-primaria);
    margin-bottom: 16px;
    display: block;
}

.sobre-card h3,
.stack-card h3,
.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.sobre-card p,
.stack-card p,
.feature-card p {
    color: var(--texto-secundario);
    line-height: 1.6;
    font-size: 0.95rem;
}

.sobre-card strong,
.stack-card strong {
    color: var(--branco);
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.sobre-card:hover,
.stack-card:hover,
.feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--cor-primaria);
    box-shadow: var(--sombra-hover);
}

/* RODAPE */
.landing-footer {
    border-top: 1px solid #334155;
    background: #1e293b;
    color: #ffffff;
    padding: 56px 40px 24px;
}

.landing-footer i {
    color: #e0f2fe;
}

.landing-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.landing-footer-brand {
    display: flex;
    align-items: flex-start;
}

.landing-footer-logo {
    font-size: 1.8rem;
}

.landing-footer-coluna {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.landing-footer-coluna h3 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 4px;
}

.landing-footer-coluna a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.landing-footer-coluna a:hover {
    color: #ffffff;
}

.landing-footer-bottom {
    max-width: 1200px;
    margin: 44px auto 0;
    padding-top: 20px;
    border-top: 1px solid #475569;
    color: #cbd5e1;
    font-size: 0.85rem;
    text-align: center;
}

/* ANIMAÃ‡Ã•ES DE ENTRADA */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.landing-secao {
    animation: fadeInUp 0.7s ease-out both;
}

.landing-footer {
    animation: fadeIn 0.7s ease-out both;
}

.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: var(--overlay);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    padding: 16px;
    box-sizing: border-box;
    overflow-y: auto;
}

.modal-box {
    background: var(--superficie);
    color: var(--cor-texto);
    padding: 35px;
    border-radius: 16px;
    width: 400px;
    max-width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: center;
    box-shadow: var(--sombra-card);
    border: 1px solid var(--borda);
    box-sizing: border-box;
    margin: auto;
}

.modal-box h2 {
    color: var(--branco);
    font-size: 1.5rem;
}

.modal-box input {
    padding: 14px;
    border: 1px solid var(--borda);
    border-radius: 8px;
    outline: none;
    font-size: 1rem;
    width: 100%;
    background: var(--superficie-2);
    color: var(--cor-texto);
}

.modal-box input:focus {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

/* =============================================================================
   UX: Wrapper e Toggle de Senha (Show/Hide Password)
   ============================================================================= */
.campo-senha-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.campo-senha-wrapper input {
    width: 100%;
    padding-right: 44px !important;
    box-sizing: border-box;
}

.btn-toggle-senha {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--texto-terciario);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
    border-radius: 6px;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
    z-index: 2;
}

.btn-toggle-senha:hover {
    color: var(--cor-primaria);
    background: rgba(56, 189, 248, 0.1);
}

.btn-toggle-senha:focus-visible {
    outline: 2px solid var(--cor-primaria);
    outline-offset: 1px;
}

.form-produto {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.select-com-seta {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #94a3b8 50%), linear-gradient(135deg, #94a3b8 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 42px !important;
    cursor: pointer;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, transform 0.15s ease;
}

.select-com-seta:hover {
    border-color: #38bdf8;
}

.select-com-seta:focus {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.select-com-seta option {
    background-color: var(--superficie-2);
    color: var(--cor-texto);
    padding: 10px;
}

body.light-mode .select-com-seta option {
    background-color: #ffffff;
    color: #1e293b;
}

.link-texto {
    color: var(--cor-primaria);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 5px;
}

.link-texto:hover {
    text-decoration: underline;
}

.btn-fechar-modal {
    background: none;
    color: #f87171;
    font-size: 0.9rem;
    margin-top: 5px;
    font-weight: 600;
}

/* ÃREA DO SISTEMA */
#app-area {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.top-bar {
    background-color: var(--bg-sidebar);
    height: 75px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    border-bottom: 1px solid var(--borda);
}

.menu-esquerdo {
    display: flex;
    align-items: center;
    gap: 18px;
}

.menu-esquerdo h2 {
    color: var(--branco);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

#btn-menu {
    background: none;
    font-size: 1.6rem;
    color: var(--branco);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
}

#btn-menu:hover {
    background: var(--hover-fundo);
}

.perfil-usuario {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--branco);
}

.foto-perfil {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--cor-primaria);
    object-fit: cover;
}

.foto-perfil.foto-perfil-admin {
    border: 2px solid #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

/* Avatar Container e Fallback (Inicial do Nome) */
.avatar-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.avatar-inicial {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #00d2ff;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    text-transform: uppercase;
    user-select: none;
    line-height: 1;
}

.avatar-inicial.foto-perfil-admin,
.avatar-img.foto-perfil-admin {
    border: 2px solid #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

.avatar-inicial-topbar {
    background-color: #0ea5e9;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-weight: bold;
}

/* Wrapper do avatar de perfil (âncora para lixeira, sem overflow:hidden para não cortar a lixeira) */
.avatar-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    box-sizing: border-box;
}

.avatar-wrapper .avatar-upload-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: none !important;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Imagem e Bolinha da Inicial com corte perfeito 1:1 */
.avatar-wrapper img,
.avatar-wrapper .avatar-inicial {
    width: 150px !important;
    height: 150px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
}

/* Bordas dinâmicas de avatar por nível de acesso (Role-based UI) */
/* Modo Lojista (is_admin = 0) */
.perfil-lojista img,
.perfil-lojista .avatar-inicial {
    border: 4px solid #0ea5e9 !important; /* Azul Ciano */
}
.perfil-lojista .btn-remover-foto {
    border: 2px solid #0ea5e9 !important;
}

/* Modo Administrador (is_admin = 1) */
.perfil-admin img,
.perfil-admin .avatar-inicial {
    border: 4px solid #f59e0b !important; /* Dourado / Amber */
}
.perfil-admin .btn-remover-foto {
    border: 2px solid #f59e0b !important;
}

/* Esfericidade Perfeita da Lixeira */
.btn-remover-foto {
    position: absolute;
    bottom: 5px; /* Ajuste para não sair totalmente do círculo de 150px */
    right: 5px;
    width: 36px !important;  /* Largura igual */
    height: 36px !important; /* a Altura */
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0;
    background-color: #991b1b !important; /* Vermelho escuro sólido mantido inalterado */
    color: #ffffff !important;
    cursor: pointer;
    font-size: 1.15rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    transition: background-color 0.2s ease !important;
    transform: none !important;
    z-index: 20;
}

.btn-remover-foto:hover {
    background-color: #7f1d1d !important;
    transform: none !important;
}

.btn-remover-foto:active {
    transform: none !important;
}

/* Padronização simétrica dos botões de preview (peso primário) */
.botoes-preview-foto {
    display: flex !important;
    gap: 16px !important;
    width: 100% !important;
    margin-top: 16px;
}

.botoes-preview-foto button,
.botoes-preview-foto .btn,
.botoes-preview-foto .btn-primario,
.botoes-preview-foto .btn-secundario {
    flex: 1 !important; /* Divide 50% / 50% */
    height: 48px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    border-radius: 8px !important;
    background-color: var(--primary-color, #0ea5e9) !important;
    color: #ffffff !important;
    border: none !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    gap: 8px !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    margin: 0 !important;
    transition: background-color 0.2s ease !important;
}

.botoes-preview-foto button:hover,
.botoes-preview-foto .btn:hover,
.botoes-preview-foto .btn-primario:hover,
.botoes-preview-foto .btn-secundario:hover {
    background-color: var(--primary-hover, #0284c7) !important;
    color: #ffffff !important;
    border: none !important;
}

/* Botão de confirmação de remoção de foto no modal */
.btn-remover-foto-confirmar {
    background-color: #ef4444 !important;
    border: 1px solid #ef4444 !important;
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-remover-foto-confirmar:hover {
    background-color: #dc2626 !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4) !important;
}

.btn-remover-foto-confirmar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


.btn-config-perfil {
    background: transparent;
    color: var(--texto-secundario);
    padding: 6px;
    font-size: 1.2rem;
}

.btn-config-perfil:hover {
    color: var(--cor-primaria);
    background: var(--hover-fundo);
}

.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* SIDEBAR */
.sidebar {
    background-color: var(--bg-sidebar);
    width: 250px;
    flex: 0 0 250px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 25px 0 0 0;
    border-right: 1px solid var(--borda);
    overflow: hidden;
    white-space: nowrap;
}

.sidebar.fechada {
    width: 0;
    flex-basis: 0;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 15px;
}

.sidebar-bottom-actions {
    margin-top: auto;
    height: 54px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-mode .sidebar-bottom-actions {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar-bottom-actions a {
    width: 100%;
    text-decoration: none;
}

.theme-switch {
    width: 48px;
    height: 24px;
    background-color: #334155;
    border-radius: 12px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch-handle {
    width: 18px;
    height: 18px;
    background-color: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.light-mode .switch-handle {
    transform: translateX(24px);
}

body.light-mode .theme-switch {
    background-color: #cbd5e1;
}

.btn-tema,
#btn-tema,
#btn-tema-landing,
#btn-tema-sidebar {
    flex-shrink: 0;
}

#sidebar .btn-tema,
#sidebar #btn-tema,
#sidebar #btn-tema-sidebar {
    min-width: 220px;
}

.btn-tema>span,
#btn-tema>span,
.theme-switch,
#theme-switch,
#theme-switch-landing,
#theme-switch-sidebar {
    flex-shrink: 0;
}

.nav-btn,
.btn-deslogar {
    background: transparent;
    color: var(--texto-secundario);
    padding: 12px 15px;
    text-align: left;
    font-size: 0.95rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    font-weight: 500;
    outline: none !important;
    border: none;
    -webkit-tap-highlight-color: transparent;
}

#btn-chamados {
    justify-content: space-between;
    padding-right: 15px;
}

.nav-item-label {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.nav-btn i,
.btn-deslogar i {
    font-size: 1.2rem;
}

.nav-btn:hover {
    background-color: var(--hover-fundo);
    color: var(--branco);
}

.nav-btn.ativo {
    background-color: var(--cor-primaria);
    color: var(--bg-escuro);
    font-weight: 700;
}

.btn-deslogar {
    color: #f87171;
}

.btn-deslogar:hover {
    background-color: var(--perigo-suave);
    color: var(--perigo);
}

.content {
    flex: 1;
    min-height: 0;
    min-width: 0;
    padding: 35px;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: var(--bg-fundo);
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
    /* Flex column para que margin-top:auto no footer funcione corretamente */
    display: flex;
    flex-direction: column;
}

.view-section {
    flex-grow: 1;
}

.content::-webkit-scrollbar {
    width: 6px;
}

.content::-webkit-scrollbar-track {
    background: transparent;
}

.content::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 3px;
}

.faq-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-lista details {
    border: 1px solid var(--borda);
    border-radius: 12px;
    padding: 18px 20px;
    background: var(--superficie-2);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.faq-lista details:hover {
    border-color: var(--superficie-3);
}

.faq-lista details[open] {
    border-color: var(--cor-primaria);
}

.faq-lista summary {
    cursor: pointer;
    color: var(--branco);
    font-weight: 600;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.faq-lista summary::-webkit-details-marker {
    display: none;
}

.faq-lista summary::after {
    content: '+';
    color: var(--cor-primaria);
    font-size: 1.3rem;
    font-weight: 700;
    transition: transform 0.2s ease;
}

.faq-lista details[open] summary::after {
    transform: rotate(45deg);
}

.faq-lista details p {
    color: var(--texto-secundario);
    line-height: 1.6;
    margin: 14px 0 0;
}

.suporte-form input,
.suporte-form textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--borda);
    border-radius: 8px;
    outline: none;
    font: inherit;
    background: var(--superficie-2);
    color: var(--cor-texto);
}

.suporte-form textarea {
    resize: vertical;
}

.suporte-form input:focus,
.suporte-form textarea:focus {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

body.light-mode .faq-lista details {
    background: var(--superficie-2);
    border-color: var(--borda);
}

body.light-mode .faq-lista details[open] {
    border-color: var(--cor-primaria);
}

body.light-mode .suporte-form input,
body.light-mode .suporte-form textarea {
    background: var(--superficie);
    color: var(--cor-texto);
    border-color: var(--borda);
}

/* FAB E CHAT FLUTUANTE DE SUPORTE */
.fab-suporte {
    position: fixed;
    right: 24px;
    bottom: 64px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--cor-primaria);
    color: var(--bg-escuro);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: var(--sombra-suave);
    z-index: 9999;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fab-suporte:hover {
    transform: translateY(-3px);
    box-shadow: var(--sombra-hover);
}

/* Backdrop Focus (Foco/Desfoque) para o modo expandido do chat */
.chat-suporte-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.chat-suporte-overlay.ativo {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.chat-suporte {
    position: fixed;
    right: 24px;
    bottom: 92px;
    width: 340px;
    max-width: calc(100vw - 32px);
    height: 460px;
    max-height: calc(100vh - 120px);
    transform: translate(0, 0);
    transition: all 0.3s ease;
    background: var(--superficie);
    border: 1px solid var(--borda);
    border-radius: 16px;
    box-shadow: var(--sombra-card);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
}

/* Modo Expandido do Chat de Suporte */
.chat-suporte.chat-expandido {
    right: 50% !important;
    bottom: 50% !important;
    transform: translate(50%, 50%) !important;
    width: 800px !important;
    height: 85vh !important;
    max-width: 95vw !important;
    max-height: 90vh !important;
    border-radius: 20px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

body.light-mode .chat-suporte.chat-expandido {
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.chat-suporte-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--borda);
    color: var(--branco);
    font-weight: 600;
    transition: padding 0.3s ease;
}

.chat-suporte.chat-expandido .chat-suporte-header {
    padding: 16px 22px;
}

.chat-suporte-header-acoes {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.chat-suporte-header button {
    background: none;
    border: none;
    color: var(--texto-secundario);
    cursor: pointer;
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    padding: 0;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.chat-suporte-header button:hover {
    color: var(--branco);
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.08);
}

.chat-suporte-header button:active {
    transform: scale(0.95);
}

body.light-mode .chat-suporte-header button:hover {
    color: var(--cor-texto);
    background-color: rgba(0, 0, 0, 0.08);
}

.chat-suporte-mensagens {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--superficie-2);
    /* Elemento 03 — Oculta scrollbar visual, mantém scroll nativo */
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: padding 0.3s ease, gap 0.3s ease;
}

.chat-suporte.chat-expandido .chat-suporte-mensagens {
    padding: 20px 24px;
    gap: 14px;
}

.chat-suporte.chat-expandido .chat-bolha {
    max-width: 72%;
    padding: 12px 18px;
    font-size: 0.95rem;
    border-radius: 14px;
}

.chat-suporte.chat-expandido .chat-suporte-input {
    padding: 16px 20px;
    gap: 12px;
}

.chat-suporte.chat-expandido .chat-suporte-input textarea {
    min-height: 52px;
    font-size: 0.95rem;
}

.chat-suporte.chat-expandido .chat-suporte-input button {
    padding: 0 20px;
    font-size: 1.25rem;
}

.chat-suporte.chat-expandido .btn-encerrar-chamado {
    max-width: 320px;
    align-self: center;
    margin: 0 20px 16px;
    padding: 12px;
}

.chat-suporte-mensagens::-webkit-scrollbar {
    display: none;
}

.chat-suporte-input {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--borda);
    background: var(--bg-sidebar);
}

.chat-suporte-input input,
.chat-suporte-input textarea {
    flex: 1;
    height: 48px;
    min-height: 48px;
    padding: 12px 15px;
    border: 1px solid var(--borda);
    border-radius: 8px;
    outline: none;
    background: var(--superficie-2);
    color: var(--cor-texto);
    font: inherit;
    line-height: 1.4;
    resize: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-suporte-input input:focus {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

/* Oculta a barra de rolagem do campo de mensagem do chat flutuante (mantÃ©m o scroll nativo) */
.chat-suporte-input textarea {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.chat-suporte-input textarea::-webkit-scrollbar {
    display: none;
}

.chat-suporte-input button {
    background: var(--cor-primaria);
    color: var(--bg-escuro);
    border: none;
    border-radius: 8px;
    padding: 0 16px;
    cursor: pointer;
    font-size: 1.2rem;
}

.chat-encerrado-aviso {
    margin: 0 12px 12px;
    padding: 10px 15px;
    border: 1px solid rgba(239, 68, 68, 0.45);
    border-radius: 8px;
    background: var(--perigo-suave);
    color: var(--perigo);
    text-align: center;
    font-weight: 700;
}

.btn-encerrar-chamado {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    vertical-align: middle !important;
    width: calc(100% - 24px);
    margin: 0 12px 12px;
    padding: 10px;
    background: var(--perigo-suave);
    color: var(--perigo);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease;
}

.btn-encerrar-chamado i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1 !important;
    margin: 0 !important;
}

.btn-encerrar-chamado:hover {
    background: #ef4444;
    color: #fff;
}

/* FORMULÃRIO DO CHAT ADMIN */
#form-resposta-admin {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    background: var(--superficie);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--borda);
    margin-top: 10px;
}

/* INPUT DE RESPOSTA DO ADMIN (CENTRAL DE CHAMADOS) */
#resposta-admin-texto {
    flex-grow: 1;
    padding: 12px 16px;
    border: 1px solid var(--borda);
    border-radius: 8px;
    outline: none;
    background: var(--bg-fundo);
    color: var(--cor-texto);
    font: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    height: 48px;
    min-height: 48px;
    max-height: 120px;
    resize: none;
    overflow-y: auto;
    line-height: 1.5;
    /* Elemento 02 â€” Oculta scrollbar visual, mantÃ©m scroll nativo */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#resposta-admin-texto::-webkit-scrollbar {
    display: none;
}

#resposta-admin-texto:focus {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

#form-resposta-admin .btn-primario {
    flex-shrink: 0;
    width: auto !important;
    height: 48px;
    padding: 0 24px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 600;
}

body.light-mode #resposta-admin-texto,
body.light-mode .chat-suporte-input textarea {
    background: var(--superficie-2);
    color: var(--cor-texto);
    border-color: var(--borda);
}

.chat-bolha {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.chat-bolha:not(.chat-digitando):not(.sem-animacao) {
    animation: entradaMensagem 0.28s ease-out both;
}

@keyframes entradaMensagem {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-bolha-nome {
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 4px;
    opacity: 0.7;
}

.chat-bolha-texto {
    word-wrap: break-word;
}

.chat-usuario {
    align-self: flex-end;
    background: var(--cor-primaria);
    color: var(--bg-escuro);
    border-bottom-right-radius: 4px;
}

.chat-admin {
    align-self: flex-start;
    background: var(--superficie-3);
    color: var(--cor-texto);
    border-bottom-left-radius: 4px;
}

.chat-vazio {
    text-align: center;
    color: var(--texto-secundario);
    padding: 20px;
    font-size: 0.9rem;
}

/* INDICADOR "DIGITANDO..." COM BOLINHAS ANIMADAS */
.chat-digitando {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-digitando-bolinhas {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 0;
}

.chat-digitando-bolinhas span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    animation: bolinha-pulsar 1.2s infinite ease-in-out;
}

.chat-digitando-bolinhas span:nth-child(1) {
    animation-delay: 0s;
}

.chat-digitando-bolinhas span:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-digitando-bolinhas span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bolinha-pulsar {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* BADGE DE MENSAGENS NÃƒO LIDAS NO FAB */
.fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
    border: 2px solid var(--bg-escuro);
    z-index: 1001;
}

/* BADGE DE NOTIFICAÃ‡Ã•ES NO MENU LATERAL */
.nav-badge {
    margin-left: auto;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
    flex-shrink: 0;
}

body.light-mode .chat-suporte {
    background: var(--superficie);
    border-color: var(--borda);
}

body.light-mode .chat-suporte-header {
    background: var(--bg-sidebar);
    border-color: var(--borda);
    color: var(--branco);
}

body.light-mode .chat-suporte-mensagens {
    background: var(--superficie-2);
}

body.light-mode .chat-suporte-input {
    background: var(--bg-sidebar);
    border-color: var(--borda);
}

body.light-mode .chat-suporte-input input {
    background: var(--superficie-2);
    color: var(--cor-texto);
    border-color: var(--borda);
}

body.light-mode .chat-admin {
    background: var(--superficie-3);
    color: var(--cor-texto);
}

body.light-mode .chat-usuario {
    background: var(--cor-primaria);
    color: #ffffff;
}

body.light-mode .chat-vazio {
    color: var(--texto-terciario);
}

body.light-mode .chat-bolha-nome {
    opacity: 0.6;
}

/* FUNDO DO CHAT DO ADMIN (CENTRAL DE CHAMADOS) */
.chat-admin-mensagens {
    background: var(--superficie-2);
    border: 1px solid var(--borda);
    /* Elemento 01 â€” Oculta scrollbar visual, mantÃ©m scroll nativo */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.chat-admin-mensagens::-webkit-scrollbar {
    display: none;
}

body.light-mode .chat-admin-mensagens {
    background: var(--superficie-2);
    border-color: var(--borda);
}

/* MODAL DE SUSPENSÃƒO (bloqueio do chat) */
.modal-suspensao {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-suspensao-box {
    background: var(--superficie);
    border: 1px solid var(--borda);
    border-radius: 16px;
    padding: 35px 30px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: var(--sombra-card);
}

.modal-suspensao-icone {
    font-size: 3rem;
    color: var(--perigo);
    margin-bottom: 15px;
}

.modal-suspensao-box h3 {
    color: var(--branco);
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.modal-suspensao-box p {
    color: var(--texto-suave);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.modal-suspensao-timer {
    color: var(--aviso);
    font-weight: 700;
}

.modal-suspensao-timer strong {
    font-size: 1.4rem;
    color: var(--aviso);
}

body.light-mode .modal-suspensao-box {
    background: var(--superficie);
    border-color: var(--borda);
}

body.light-mode .modal-suspensao-box h3 {
    color: var(--branco);
}

body.light-mode .modal-suspensao-box p {
    color: var(--texto-secundario);
}

.landing-footer {
    width: 100%;
    margin-top: auto;
}

/* PAINEL ORÃ‡AMENTO (ESTILO MANAGER) */
.manager-painel {
    background: var(--superficie);
    border: 1px solid var(--borda);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--sombra-suave);
}

.manager-titulo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--branco);
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 4px solid var(--cor-primaria);
    padding-left: 12px;
}

.manager-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    align-items: center;
    gap: 30px;
}

.manager-bloco {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.manager-bloco h4 {
    color: var(--texto-secundario);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.manager-bloco .valor-destaque {
    font-size: 1.8rem;
    font-weight: 800;
}

.valor-vermelho {
    color: var(--perigo);
}

.valor-verde {
    color: var(--sucesso);
}

/* CONTAINER DO GRÃFICO DE ROSCA */
.grafico-rosca-box {
    position: relative;
    height: 260px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CABEÃ‡ALHO DE CONTEÃšDO E TABELA */
.header-conteudo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.header-conteudo h3 {
    font-size: 1.5rem;
    color: var(--branco);
    font-weight: 700;
}

.tabela-container {
    background-color: var(--superficie);
    border-radius: 14px;
    padding: 10px;
    border: 1px solid var(--borda);
    overflow-x: auto;
}

.tabela-produtos {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.tabela-produtos th {
    background-color: var(--superficie-2);
    padding: 16px 20px;
    color: var(--texto-secundario);
    font-weight: 600;
    border-bottom: 1px solid var(--borda);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.tabela-produtos td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--borda);
    color: var(--cor-texto);
    vertical-align: middle;
    font-size: 0.95rem;
}

.tabela-produtos tr:hover td {
    background-color: var(--hover-fundo);
}

.tabela-produtos tr:last-child td {
    border-bottom: none;
}

.tabela-produtos-acoes td:last-child {
    display: flex;
    gap: 8px;
    align-items: center;
    align-content: center;
    flex-wrap: wrap;
}

.tabela-extrato {
    table-layout: fixed;
}

.tabela-extrato th,
.tabela-extrato td {
    display: table-cell;
    text-align: left;
}

.tabela-extrato th:nth-child(1),
.tabela-extrato td:nth-child(1) {
    width: 16%;
}

.tabela-extrato th:nth-child(2),
.tabela-extrato td:nth-child(2) {
    width: 38%;
}

.tabela-extrato th:nth-child(3),
.tabela-extrato td:nth-child(3) {
    width: 14%;
    text-align: center;
}

.tabela-extrato th:nth-child(4),
.tabela-extrato td:nth-child(4) {
    width: 16%;
    text-align: right;
}

.tabela-extrato th:nth-child(5),
.tabela-extrato td:nth-child(5) {
    width: 16%;
    white-space: nowrap;
}

/* LOGS GERAIS (AUDITORIA POR USUÃRIO) */
.auditoria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.auditoria-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--superficie-2);
    border: 1px solid var(--borda);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s, transform 0.2s;
    color: var(--cor-texto);
}

.auditoria-card:hover {
    border-color: var(--cor-primaria);
    transform: translateY(-2px);
}

.auditoria-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--cor-primaria);
    color: #090d16;
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auditoria-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.auditoria-info strong {
    color: var(--branco);
    font-size: 0.95rem;
}

.auditoria-info span {
    color: var(--texto-secundario);
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auditoria-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--texto-secundario);
}

.badge-admin {
    color: var(--cor-primaria);
    font-weight: bold;
    background: rgba(56, 189, 248, 0.12);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
}

.badge-usuario {
    color: var(--texto-secundario);
    font-weight: bold;
    background: var(--hover-fundo);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
}

body.light-mode .badge-admin {
    background: rgba(2, 132, 199, 0.1);
}

.auditoria-seta {
    color: var(--texto-terciario);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.auditoria-card:hover .auditoria-seta {
    color: var(--cor-primaria);
}

.auditoria-item {
    background: var(--superficie-2);
    border: 1px solid var(--borda);
    border-radius: 10px;
    padding: 12px 14px;
}

.auditoria-item-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.auditoria-item-topo strong {
    color: var(--cor-primaria);
    font-size: 0.9rem;
}

.auditoria-item-topo span {
    color: var(--texto-terciario);
    font-size: 0.75rem;
    white-space: nowrap;
}

.auditoria-item p {
    color: var(--cor-texto);
    font-size: 0.85rem;
    margin: 0;
}

body.light-mode .auditoria-card,
body.light-mode .auditoria-item {
    background: var(--superficie);
    border-color: var(--borda);
}

body.light-mode .auditoria-info strong {
    color: var(--branco);
}

body.light-mode .auditoria-item p {
    color: var(--cor-texto);
}

/* ============ RESPONSIVIDADE UNIVERSAL (MOBILE-FIRST / MULTI-DEVICE) ============ */

/* Wrappers de tabelas com rolagem horizontal fluida */
.tabela-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Touch targets confortÃ¡veis e prevenÃ§Ã£o de zoom automÃ¡tico em inputs */
@media (max-width: 768px) {

    input,
    select,
    textarea {
        font-size: 16px !important;
    }
    .nav-btn,
    .btn-deslogar,
    .link-texto {
        min-height: 44px;
    }

    .btn-primario,
    .btn-secundario {
        min-height: 48px;
    }
}

/* ===== TABLETS E SMARTPHONES (<= 768px) ===== */
@media (max-width: 768px) {

    /* Landing page */
    .landing-nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 20px;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 50px 20px;
    }

    .hero-texto h1 {
        font-size: 2.2rem;
    }

    .hero-subtitulo {
        font-size: 1rem;
    }

    .hero-stats {
        gap: 24px;
    }

    .hero-card-conteudo {
        padding: 30px 24px;
    }

    .landing-secao {
        padding: 50px 20px;
    }

    .secao-titulo h2 {
        font-size: 1.7rem;
    }

    .sobre-grid {
        grid-template-columns: 1fr;
    }

    .stack-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .landing-footer {
        padding: 40px 20px 20px;
    }

    .landing-footer-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 30px;
        text-align: center;
    }

    .landing-footer-coluna {
        align-items: center;
        gap: 14px;
    }

    .landing-footer a {
        color: inherit !important;
        text-decoration: none !important;
    }

    /* Top bar */
    .top-bar {
        height: 64px;
        padding: 0 16px;
    }

    .menu-esquerdo h2 {
        font-size: 1.1rem;
    }

    .perfil-usuario>span {
        display: none;
    }

    /* Sidebar vira menu retrÃ¡til (overlay) */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
        max-width: 85vw;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    }

    .sidebar.aberta {
        transform: translateX(0);
    }

    .sidebar.fechada {
        width: 280px;
        max-width: 85vw;
        flex-basis: auto;
        padding: 25px 15px;
    }

    /* Overlay escuro atrÃ¡s da sidebar */
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 999;
    }

    .content {
        padding: 20px 16px;
    }

    /* Modais ocupam largura segura */
    .modal-box {
        width: calc(100vw - 30px);
        max-width: 420px;
        padding: 28px 22px;
    }

    .modal-box[style*="width"] {
        width: calc(100vw - 30px) !important;
    }

    /* Chat flutuante ocupa largura segura */
    .chat-suporte {
        right: 10px;
        bottom: 80px;
        width: calc(100vw - 20px);
        max-width: 400px;
    }

    .fab-suporte {
        right: 16px;
        bottom: 20px;
    }

    /* Tabelas em cards verticais */
    .tabela-container {
        border-radius: 12px;
    }

    .tabela-produtos {
        min-width: 600px;
    }

    /* Menu de termos mobile: esconder o menu antigo e o tÃ­tulo estÃ¡tico */
    .termos-menu,
    .termos-title {
        display: none !important;
    }

    .termos-title-mobile {
        display: block;
        font-size: 1.8rem;
        margin-bottom: 20px;
        color: var(--text-color, #1a1a1a);
    }

    body.light-mode #titulo-mobile {
        color: #1a1a1a !important;
    }

    body:not(.light-mode) #titulo-mobile {
        color: #ffffff !important;
    }

    .termos-content {
        position: relative;
    }

    .termos-scroll-area {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .topico-texto h2 {
        display: none !important;
    }

    .nav-seta-mobile {
        display: block;
        position: fixed !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        background: transparent;
        border: none;
        font-size: 1.2rem !important;
        padding: 10px;
        color: var(--text-color, #333) !important;
        z-index: 9999;
    }

    body.light-mode .nav-seta-mobile {
        color: #1a1a1a !important;
    }

    body:not(.light-mode) .nav-seta-mobile {
        color: #ffffff !important;
    }

    .nav-seta-mobile:active {
        color: #00b4d8;
    }

    #btn-prev-mobile {
        left: 10px !important;
    }

    #btn-next-mobile {
        right: 10px !important;
    }
}

/* ===== SMARTPHONES PEQUENOS (<= 480px) ===== */
@media (max-width: 480px) {
    .hero-texto h1 {
        font-size: 1.8rem;
    }

    .hero-stats {
        gap: 16px;
    }

    .hero-stat strong {
        font-size: 1.3rem;
    }

    .stack-grid {
        grid-template-columns: 1fr;
    }

    .secao-titulo h2 {
        font-size: 1.5rem;
    }

    .landing-logo,
    .landing-footer-logo {
        font-size: 1.2rem;
    }

    .landing-theme-toggle>span {
        display: none;
    }

    .landing-footer-grid {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 16px 12px;
    }

    .modal-box {
        padding: 24px 18px;
        width: 100%;
        max-height: 90dvh;
    }

    .chat-suporte {
        height: calc(100vh - 100px);
        max-height: none;
    }
}

/* ============ ESTÃ‰TICA "LANDING PAGE" APLICADA AO PAINEL INTERNO ============ */
/* Replica o visual chique/profissional da tela inicial (gradiente + glassmorphism
   + glow + hover elevado + animaÃ§Ãµes de entrada) em todas as abas do sistema. */

/* 1) Fundo com gradiente (igual Ã  landing page) */
#app-area {
    background: linear-gradient(160deg, var(--bg-escuro) 0%, var(--bg-fundo) 45%, var(--bg-sidebar) 100%);
}

.content {
    background: linear-gradient(160deg, var(--bg-escuro) 0%, var(--bg-fundo) 45%, var(--bg-sidebar) 100%);
}

/* 2) Glassmorphism na top-bar, sidebar e footer */
.top-bar,
.sidebar {
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-color: var(--glass-borda);
}

/* 3) PainÃ©is com glow suave + borda translÃºcida + hover elevado */
.manager-painel,
.tabela-container,
.modal-box,
.modal-suspensao-box,
.faq-lista details,
.auditoria-card,
.auditoria-item {
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-borda);
    box-shadow: var(--sombra-card);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.manager-painel:hover,
.auditoria-card:hover {
    transform: translateY(-4px);
    border-color: var(--cor-primaria);
    box-shadow: var(--sombra-hover);
}

/* 4) Glow decorativo atrÃ¡s dos painÃ©is principais (como o hero-card-glow) */
.manager-painel {
    position: relative;
}

.manager-painel::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(245, 158, 11, 0.08));
    filter: blur(18px);
    opacity: 0.35;
    z-index: -1;
    pointer-events: none;
}

/* 5) Tabelas: cabeÃ§alho translÃºcido e linhas com hover suave */
.tabela-produtos th {
    background: var(--glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* 6) AnimaÃ§Ãµes de entrada nas views (como a landing page) */
.view-section:not(.hidden) {
    animation: fadeInUp 0.5s ease-out both;
}

/* 7) BotÃµes de navegaÃ§Ã£o com transiÃ§Ã£o mais rica */
.nav-btn,
.btn-deslogar {
    transition: color 0.1s ease, transform 0.15s ease;
}

.nav-btn:hover {
    transform: translateX(3px);
}

/* 8) Chat flutuante e FAB com glassmorphism */
.chat-suporte {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-borda);
}

.chat-suporte-header,
.chat-suporte-input {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.fab-suporte {
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15), var(--sombra-hover);
}

/* 9) Ajuste fino no light mode para manter o contraste do glassmorphism */
body.light-mode .manager-painel,
body.light-mode .tabela-container,
body.light-mode .modal-box,
body.light-mode .modal-suspensao-box {
    background: var(--glass);
    border-color: var(--glass-borda);
}

/* ============ REFINAMENTO UI/UX ============ */

/* 10) Scrollbars customizadas: finas, modernas e sutis (tema dark/light) */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--borda) transparent;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--borda);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--texto-terciario);
    background-clip: padding-box;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* 11) Logo compacta: reduz o espaÃ§amento entre "Estoque" e "Flex" */
.landing-logo,
.landing-footer-logo {
    gap: 8px;
    letter-spacing: -1px;
}

.landing-logo span,
.landing-footer-logo span {
    margin-left: -2px;
}

/* Logo na navbar do painel interno (mesma identidade da landing) */
.logo-app {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--branco);
    cursor: pointer;
}

.logo-app i {
    color: var(--cor-primaria);
    font-size: 1.5rem;
}

.logo-app span {
    color: var(--cor-primaria);
    margin-left: 0;
}

.logo-app .logo-texto {
    display: inline-flex;
    align-items: center;
    color: inherit;
    margin-left: 0;
}

.logo-app .logo-texto span {
    margin-left: 0;
}

/* Padrão no Tema Escuro */
.logo-text-primary,
.logo-app .logo-text-primary {
    color: #ffffff; /* Ou var(--text-primary) */
    transition: color 0.3s ease;
}

/* Exceção no Tema Claro */
body.light-theme .logo-text-primary,
body.light-mode .logo-text-primary,
[data-theme="light"] .logo-text-primary {
    color: #0f172a !important; /* Tom chumbo escuro para alto contraste */
}

.text-cyan {
    color: var(--cor-primaria, #38bdf8) !important;
}

/* Padronização do Botão "Salvar Alterações" (Clonagem do Menu Ativo) */
.btn-salvar-perfil {
    background: var(--cor-primaria) !important;
    background-color: var(--cor-primaria) !important;
    color: var(--bg-escuro) !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    transform: none !important;
    transition: background-color 0.2s ease !important;
}
.btn-salvar-perfil:hover {
    background-color: var(--cor-primaria-hover) !important;
    box-shadow: none !important;
    transform: none !important;
}

body.light-theme .btn-salvar-perfil,
body.light-mode .btn-salvar-perfil {
    background-color: var(--cor-primaria) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}
body.light-theme .btn-salvar-perfil:hover,
body.light-mode .btn-salvar-perfil:hover {
    background-color: var(--cor-primaria-hover) !important;
    box-shadow: none !important;
    transform: none !important;
}

/* 12) Destaque de estoque zerado (linha/quantidade em vermelho) */
.estoque-zerado {
    color: var(--perigo) !important;
    font-weight: 800 !important;
}

tr.linha-esgotada td {
    background: var(--perigo-suave) !important;
}

tr.linha-esgotada td.estoque-zerado {
    color: var(--perigo) !important;
}

/* 13) PadronizaÃ§Ã£o de modais: overlay translÃºcido + glassmorphism em todos */
.modal-overlay {
    background: var(--overlay);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-box {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-borda);
    box-shadow: var(--sombra-card);
}

/* 14) Campos de formulÃ¡rio alinhados (Editar Perfil e demais modais) */
.campo-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.campo-form label {
    margin-bottom: 2px;
}

.campo-form input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--borda);
    background: var(--superficie-2);
    color: var(--cor-texto);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.campo-form input:focus {
    outline: none;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

/* 15) Modal de Editar Perfil: altura limitada com rolagem interna */
#modal-perfil .modal-box {
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
}

#modal-perfil .modal-cabecalho {
    flex-shrink: 0;
    padding: 24px 30px 20px 30px;
    background: var(--superficie);
    border-bottom: 1px solid var(--borda);
    margin-bottom: 0 !important;
    z-index: 10;
}

#modal-perfil .modal-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 30px 30px 30px;
}

/* 16) Estoque crÃ­tico (acima de 0, mas <= estoque mÃ­nimo): destaque AMARELO */
.estoque-critico {
    color: #f59e0b !important;
    font-weight: 800 !important;
}

tr.linha-critica td {
    background: rgba(245, 158, 11, 0.12) !important;
}

tr.linha-critica td.estoque-critico {
    color: #f59e0b !important;
}

/* ============ POLIMENTO FINAL: AUDITORIA / UI-UX ============ */

/* 17) Modal "Editar Produto" (pÃ¡gina standalone): glassmorphism idÃªntico ao "Novo Produto" */
body .modal-overlay .modal-box {
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-borda);
    box-shadow: var(--sombra-card);
}

body.light-mode .modal-overlay .modal-box {
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--glass-borda);
    color: var(--cor-texto);
}

body.light-mode .modal-overlay .modal-box h2 {
    color: var(--cor-texto);
}

body.light-mode .modal-overlay .modal-box input {
    background: #ffffff;
    color: #1e293b;
    border-color: var(--borda);
}

#modal-usuario {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

#modal-usuario .modal-box {
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    margin: auto;
    overflow-y: auto;
    box-sizing: border-box;
}

/* 18) Modal "Gerenciar UsuÃ¡rios": centralizaÃ§Ã£o perfeita + fundo limpo (sem blur pesado) */
#modal-usuario.modal-suspensao {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--overlay);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

#modal-usuario .modal-suspensao-box {
    background: var(--superficie);
    border: 1px solid var(--borda);
    border-radius: 16px;
    box-shadow: var(--sombra-card);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
    margin: auto;
    padding: 25px;
}

body.light-mode #modal-usuario .modal-suspensao-box {
    background: #ffffff;
    border-color: var(--borda);
}

/* 19) HistÃ³rico de Atividades: Timeline vertical moderna */
#auditoria-lista {
    overflow-x: hidden;
}

.auditoria-timeline {
    position: relative;
    padding: 0 0 2px 24px;
}

.auditoria-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--cor-primaria);
    border-radius: 2px;
}

.auditoria-item {
    position: relative;
    z-index: 1;
    background: var(--superficie-2);
    border: 1px solid var(--borda);
    border-radius: 10px;
    padding: 12px 14px 12px 16px;
    margin-bottom: 10px;
}

.auditoria-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 16px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--cor-primaria);
    border: 2px solid var(--superficie);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.auditoria-item-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.auditoria-item-topo strong {
    color: var(--cor-primaria);
    font-size: 0.9rem;
}

.auditoria-item-topo span {
    color: var(--texto-terciario);
    font-size: 0.75rem;
    white-space: nowrap;
}

.auditoria-item p {
    color: var(--cor-texto);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.5;
}

body.light-mode .auditoria-item {
    background: #ffffff;
    border-color: var(--borda);
}

body.light-mode .auditoria-item::before {
    border-color: #ffffff;
}

body.light-mode .auditoria-item p {
    color: var(--cor-texto);
}

/* 20) Extrato: padronizaÃ§Ã£o da cor do "Valor Total" (mesma cor de texto padrÃ£o) */
.extrato-valor {
    color: var(--cor-texto);
    font-weight: 600;
}

body.light-mode .extrato-valor {
    color: #1e293b;
}

/* ==========================================================================
   Banner de Cookies (Glassmorphism)
   ========================================================================== */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    right: 24px;
    max-width: 440px;
    z-index: 99999;
    padding: 18px 22px;
    border-radius: 14px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 32px 0 rgba(0, 0, 0, 0.37);
    color: #e2e8f0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: block;
}

/* Suporte ao tema claro */
body.light-mode .cookie-banner {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 32px 0 rgba(0, 0, 0, 0.12);
    color: #1e293b;
}

.cookie-banner.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    display: none;
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cookie-content p {
    font-size: 0.875rem;
    line-height: 1.45;
    margin: 0;
}

.cookie-link {
    color: #38bdf8;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.cookie-link:hover {
    color: #7dd3fc;
}

.btn-cookie-accept {
    align-self: flex-end;
    padding: 7px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    background: #0284c7;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-cookie-accept:hover {
    background: #0369a1;
}

.btn-cookie-accept:active {
    transform: scale(0.98);
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .cookie-banner {
        bottom: 16px;
        left: 16px;
        right: 16px;
        max-width: none;
    }
}

/* ==========================================================================
   RESPONSIVIDADE DASHBOARD E TABELAS (MOBILE-FIRST POLISH)
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. ProteÃ§Ã£o de Tabelas (Extrato, Produtos, Chamados) */
    /* Cria um scroll horizontal nativo apenas para a tabela, sem quebrar a tela */
    .tabela-container {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    /* 2. ReorganizaÃ§Ã£o de GrÃ¡ficos e Cards */
    /* Transforma grids horizontais em colunas empilhadas */
    .manager-grid {
        display: flex;
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }

    /* Ajuste especÃ­fico para o Donut Chart nÃ£o espremer */
    .grafico-rosca-box,
    canvas {
        max-width: 100% !important;
        height: auto !important;
        margin: 0 auto;
    }

    /* 3. RodapÃ© Oficial na Ãrea Logada (Mobile) */
    .landing-footer .landing-footer-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 24px;
        text-align: center;
    }

    .landing-footer .landing-footer-coluna {
        align-items: center;
    }

    .landing-footer-bottom {
        text-align: center;
    }
}

/* ==========================================================================
   SCROLLBAR PERSONALIZADA GLOBAL (Tabelas, Sidebar, ConteÃºdo)
   ========================================================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.5);
}

/* ==========================================================================
   CORREÃ‡ÃƒO DO RODAPÃ‰ NA ÃREA LOGADA (FLUXO NATURAL DENTRO DO .content)
   ========================================================================== */

/* O rodapÃ© logado fica dentro do main.content (Ãºnico elemento com overflow-y:auto).
   Isso o mantÃ©m no fluxo de scroll normal, sem jamais ser cortado pelo
   overflow:hidden do #app-area ou .main-container. */
.content-footer {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    width: auto !important;
    /* Empurra para o fim quando o conteÃºdo for menor que a tela */
    margin-top: auto !important;
    /* EspaÃ§amento interno */
    padding: 40px 35px 24px !important;
    /* Glassmorphism consistente com a landing page */
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    /* Garante que nunca flutue sobre outros elementos */
    z-index: 10 !important;
    clear: both !important;
    /* Anula espaÃ§amento do .content pai (35px de padding) */
    margin-left: -35px !important;
    margin-right: -35px !important;
    margin-bottom: -35px !important;
}

@media (max-width: 768px) {
    .content-footer {
        padding: 24px 16px !important;
        margin-top: 32px !important;
        margin-left: -15px !important;
        margin-right: -15px !important;
        margin-bottom: -15px !important;
    }

    .content-footer .landing-footer-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
        text-align: center !important;
    }

    .content-footer .landing-footer-coluna {
        align-items: center !important;
    }

    .content-footer .landing-footer-bottom {
        text-align: center !important;
        margin-top: 16px !important;
    }
}

/* ==========================================================================
   PONTO 1 â€” CORREÃ‡ÃƒO DE OVERSCROLL (Fundo piscando ao rolar rÃ¡pido)
   ========================================================================== */
html,
body {
    background-color: #0f172a;
}

body.light-mode {
    background-color: #f1f5f9;
}

/* ==========================================================================
   PONTO 2 â€” RODAPÃ‰ LOGADO SEMPRE ESCURO (Mesmo no Light Mode)
   ========================================================================== */
.content-footer,
.content .landing-footer {
    background: rgba(15, 23, 42, 0.92) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.content-footer .landing-footer-bottom,
.content-footer .landing-footer-coluna a,
.content-footer .landing-footer-coluna h3 {
    color: #94a3b8 !important;
}

.content-footer .landing-footer-logo,
.content-footer .landing-footer-logo span {
    color: #f8fafc !important;
}

.content-footer .landing-footer-coluna h3 {
    color: #f8fafc !important;
}

.content-footer .landing-footer-coluna a:hover {
    color: #38bdf8 !important;
}

/* ==========================================================================
   PONTO 4 â€” ESPAÃ‡AMENTO ENTRE ÃšLTIMO CARD E RODAPÃ‰
   ========================================================================== */
/* O gap jÃ¡ existe no view-inicio (25px). Adicionamos padding-bottom no .content
   para dar respiro antes do rodapÃ© quando hÃ¡ pouco conteÃºdo. */
.content > .view-section {
    padding-bottom: 32px;
    flex-shrink: 0; /* nao encolhe no flex column; scroll fica so no .content */
}

/* ==========================================================================
   PONTO 3 â€” LAYOUT DO CARD DE ORÃ‡AMENTO (Desktop: herda .manager-grid)
   Desktop: os wrappers .orcamento-left / .orcamento-right sÃ£o transparentes.
   ========================================================================== */
.orcamento-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 0; /* manager-titulo jÃ¡ tem margin-bottom */
}

.orcamento-subtitulo {
    font-size: 0.75rem;
    font-weight: normal;
}

/* No desktop, os wrappers nÃ£o alteram o layout do manager-grid */
/* .orcamento-body mantÃ©m o comportamento do manager-grid existente */

.orcamento-left,
.orcamento-right {
    display: contents; /* InvisÃ­vel para o grid: filhos participam diretamente */
}

/* ==========================================================================
   PONTO 3 â€” LAYOUT MOBILE DO GRÃFICO DE ORÃ‡AMENTO (< 768px)
   Wireframe: TÃ­tulo | SubtÃ­tulo / [Esq: GrÃ¡fico] [Dir: Valores]
   ========================================================================== */
@media (max-width: 768px) {
    /* Header: tÃ­tulo e subtÃ­tulo empilhados verticalmente */
    .orcamento-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 16px;
    }

    .orcamento-header .manager-titulo {
        margin-bottom: 0;
        border-left: 3px solid var(--cor-primaria);
        padding-left: 12px;
    }

    .orcamento-subtitulo {
        padding-left: 15px;
        font-size: 0.78rem;
    }

    /* Corpo: 2 colunas lado a lado */
    .orcamento-body {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 12px !important;
    }

    /* Lado ESQUERDO â€” GrÃ¡fico (ocupa ~55% da largura) */
    .orcamento-left {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 55% !important;
        flex-shrink: 0 !important;
    }

    .orcamento-left .grafico-rosca-box {
        width: 100% !important;
    }

    .orcamento-left canvas {
        width: 100% !important;
        height: auto !important;
    }

    /* Lado DIREITO â€” Valores monetÃ¡rios empilhados (ocupa ~40% da largura) */
    .orcamento-right {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-end !important;
        text-align: right !important;
        gap: 20px !important;
        width: 40% !important;
        flex-shrink: 0 !important;
    }

    .orcamento-right .manager-bloco {
        width: 100%;
        text-align: right;
        padding: 0;
        background: transparent;
        box-shadow: none;
    }

    .orcamento-right .valor-destaque {
        font-size: 1.1rem;
    }
}

/* ==========================================================================
   1. CORREÃ‡ÃƒO DA TABELA DE EXTRATO (ESPAÃ‡AMENTO E CORTE DE DATA)
   ========================================================================== */
.tabela-extrato th:nth-child(1),
.tabela-extrato td:nth-child(1),
table th:first-child, table td:first-child {
    min-width: 170px !important; 
    padding-right: 30px !important;
}

.tabela-extrato th:nth-child(2),
.tabela-extrato td:nth-child(2) {
    min-width: 220px !important;
    white-space: normal !important;
}

.tabela-extrato th:last-child,
.tabela-extrato td:last-child {
    padding-right: 40px !important;
    min-width: 160px !important;
    white-space: nowrap !important;
}

.linha-clicavel {
    cursor: pointer;
    transition: background 0.2s;
}
.linha-clicavel:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   2. FIX TEXTOS INVISÃVEIS NO MODO CLARO
   ========================================================================== */
body.light-mode .orcamento-right p,
body.light-mode .orcamento-right span,
body.light-mode .orcamento-left span {
    color: #475569 !important;
    font-weight: 500 !important;
}

/* ==========================================================================
   3. MOBILE: GRÃFICO DE ORÃ‡AMENTO (ALINHAMENTO EXTREMO)
   ========================================================================== */
@media (max-width: 768px) {
    /* --- A. TELA DE VENDAS (PDV) --- */
    .pdv-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 20px !important;
    }
    .pdv-grid > div {
        width: 100% !important;
        margin: 0 !important;
    }

    /* --- B. VISÃƒO GERAL DO ORÃ‡AMENTO --- */
    .orcamento-header {
        display: flex;
        flex-direction: column;
        align-items: flex-start !important;
        text-align: left !important;
        margin-bottom: 20px;
    }

    .orcamento-left {
        order: 1 !important;
        width: 52% !important;
        display: flex;
        flex-direction: column;
        justify-content: space-between !important;
        align-items: flex-start !important; 
        height: 100%;
    }

    .orcamento-left canvas {
        max-width: 120% !important;
        transform: scale(1.15);
        transform-origin: left top;
        margin-bottom: 20px;
    }
    
    .orcamento-right {
        order: 2 !important; 
        width: 45% !important;
        display: flex;
        flex-direction: column;
        align-items: flex-start !important;
        text-align: left !important;
        gap: 20px;
    }

    .orcamento-left .manager-bloco {
        margin-top: auto !important;
        align-items: flex-start !important;
        text-align: left !important;
        width: 100% !important;
        padding-left: 5px;
    }
}

/* Estilo do BotÃ£o Fechar Modal EdiÃ§Ã£o */
.btn-fechar-modal {
    width: 100%;
    padding: 12px !important;
    border-radius: 8px !important;
    font-weight: bold !important;
    background-color: #334155 !important;
    color: #e2e8f0 !important;
}

/* BotÃ£o Fechar Conversa no painel de chat admin â€” tamanho reduzido */
#painel-chat-admin .btn-fechar-modal {
    width: auto !important;
    padding: 6px 16px !important;
    font-size: 0.82rem !important;
}

/* BotÃ£o Encerrar chamado no painel de chat admin â€” tamanho reduzido */
#btn-fechar-chamado {
    width: auto !important;
    padding: 8px 18px !important;
    font-size: 0.85rem !important;
}

/* SweetAlert2 â€” Tema escuro (se body nÃ£o tem light-mode) */
body:not(.light-mode) .swal2-popup {
    background: var(--superficie) !important;
    color: var(--cor-texto) !important;
    border: 1px solid var(--borda) !important;
}
body:not(.light-mode) .swal2-title {
    color: var(--cor-texto) !important;
}
body:not(.light-mode) .swal2-html-container {
    color: var(--texto-secundario) !important;
}
body:not(.light-mode) .swal2-cancel {
    background-color: var(--superficie-3) !important;
    color: var(--cor-texto) !important;
}
body:not(.light-mode) .swal2-icon.swal2-warning {
    border-color: var(--aviso) !important;
    color: var(--aviso) !important;
}

/* Z-index global para Toast / Swal (Garantir sobreposiÃ§Ã£o a modais 10001) */
.swal2-container {
    z-index: 10005 !important;
}

/* ==========================================================================
   MODAL OTP â€” Layout compacto, centralizado e sem espaÃ§o excessivo
   Todas as regras sÃ£o escopadas em #modal-otp para nÃ£o afetar outros modais.
   ========================================================================== */

#modal-perfil .modal-box {
    background: var(--superficie);
    border: 1px solid var(--borda);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.perfil-fieldset {
    border: 1px solid var(--borda);
    border-radius: 12px;
    padding: 20px;
    background: var(--bg-fundo);
    margin-bottom: 20px;
}

.perfil-legend {
    padding: 0 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--cor-primaria);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.avatar-upload-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
    border: 3px solid var(--superficie);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background: var(--nav-bg);
}

.avatar-preview-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    font-size: 3rem;
    color: var(--texto-secundario);
}

.avatar-edit-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.avatar-upload-wrapper:hover .avatar-edit-overlay {
    opacity: 1;
}

.avatar-upload-wrapper input[type=file] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.mt-3 {
    margin-top: 1.5rem !important;
}

/* 1. Reduz padding do card e gap entre os filhos diretos */
#modal-otp .modal-box {
    padding: 28px 35px !important;
    gap: 10px !important;
}

/* 2. BotÃ£o "Confirmar cÃ³digo" â€” sem gap extra abaixo */
#form-verificar-otp {
    gap: 12px !important;
}
#form-verificar-otp .btn-primario {
    margin-bottom: 0 !important;
}

/* 3. Form do reenvio: neutraliza o margin-top inline do HTML e colapsa */
#form-reenviar-otp {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    display: flex !important;
    justify-content: center !important;
}

/* 4. Ghost Button "Reenviar cÃ³digo": centralizado, compacto, link suave */
#btn-reenviar-otp {
    display: block !important;
    width: fit-content !important;
    margin: 2px auto 2px auto !important;
    text-align: center !important;
    background: transparent !important;
    border: none !important;
    color: #38bdf8 !important;
    font-size: 0.9rem !important;
    padding: 2px 6px !important;
    box-shadow: none !important;
    text-decoration: underline !important;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    border-radius: 6px;
}

#btn-reenviar-otp:hover:not(:disabled) {
    color: #7dd3fc !important;
    background: rgba(56, 189, 248, 0.08) !important;
    text-decoration: none !important;
}

#btn-reenviar-otp:disabled {
    color: #64748b !important;
    text-decoration: none !important;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 5. BotÃ£o "Cancelar": sem margem extra no topo */
#modal-otp .btn-fechar-modal {
    margin-top: 0 !important;
}

/* ==========================================================================
   PÃGINAS LEGAIS (Termos / Privacidade) â€” CORREÃ‡ÃƒO DE SCROLL DUPLO
   O overflow-x:hidden em html/body/.landing-page forÃ§a overflow-y:auto
   computado, criando barras de rolagem aninhadas. Aqui usamos 'clip' (nÃ£o cria
   scroll container) e deixamos sÃ³ o viewport rolar.
   ========================================================================== */
html:has(body.pagina-legal),
body.pagina-legal {
    height: auto;
    overflow-x: clip;
    overflow-y: visible;
}

body.pagina-legal .landing-page {
    min-height: 0;
    flex: 1 0 auto;
    overflow: visible;
    overflow-x: clip;
}

body.pagina-legal .termos-page-wrapper {
    min-height: 0;
}

body.pagina-legal .footer-logado-estatico {
    margin-top: auto;
    flex-shrink: 0;
}


/* ==========================================================================
   MODAIS DE PRODUTO (Cadastro e Edicao)
   ========================================================================== */
.modal-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}
.modal-form-group label {
    margin-bottom: 0px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--cor-texto-secundario, #94a3b8);
}
.modal-form-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--borda);
    background: var(--superficie-2);
    color: var(--cor-texto);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.modal-form-group input:focus {
    outline: none;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

/* EstabilizaÃ§Ã£o: topo rente Ã  janela (sem barra/margem acima do cabeÃ§alho) */
html,
body {
    margin: 0;
    padding: 0;
}

body > #app-area {
    margin: 0;
    flex-shrink: 0;
}

#app-area > .top-bar:first-child {
    margin-top: 0;
}

/* =============================================================================
   Indicadores Visuais de Formulários (Obrigatório vs Opcional)
   ============================================================================= */
.label-obrigatorio {
    color: #ef4444 !important;
    margin-left: 2px;
    font-weight: bold;
}

.label-opcional {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 400;
    margin-left: 6px;
}

body.light-mode .label-opcional,
body.light-theme .label-opcional {
    color: #64748b;
}

/* =============================================================================
   Botão de Confirmar Exclusão Definitiva (Modal de Exclusão)
   ============================================================================= */
.btn-confirmar-exclusao {
    background-color: transparent !important;
    border: 1px solid #ef4444 !important;
    color: #f87171 !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease !important;
    transform: none !important;
    cursor: pointer;
}
.btn-confirmar-exclusao:hover {
    background-color: #ef4444 !important;
    border: 1px solid #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4) !important;
    transform: none !important; /* Remove o salto */
    margin: 0; /* Previne pulos */
}
.btn-confirmar-exclusao:active {
    border: 1px solid #ef4444 !important;
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.3) !important;
    transform: none !important; /* Remove o salto */
}
.btn-confirmar-exclusao:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-fechar-modal-x {
    user-select: none;
    line-height: 1;
}

.btn-fechar-modal-x:hover {
    color: #f8fafc !important;
    transform: scale(1.15);
}

/* =============================================================================
   Tema Claro na Tabela de Vendas / Ações
   ============================================================================= */
body.light-theme .tabela-vendas .btn-acao-venda,
body.light-mode .tabela-vendas .btn-acao-venda,
body.light-theme td.coluna-acoes button,
body.light-mode td.coluna-acoes button,
body.light-theme td.coluna-acoes a,
body.light-mode td.coluna-acoes a,
[data-theme="light"] .tabela-vendas .btn-acao-venda,
[data-theme="light"] td.coluna-acoes button,
[data-theme="light"] td.coluna-acoes a {
  background-color: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0284c7 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

body.light-theme .tabela-vendas .btn-acao-venda:hover,
body.light-mode .tabela-vendas .btn-acao-venda:hover,
body.light-theme td.coluna-acoes button:hover,
body.light-mode td.coluna-acoes button:hover,
body.light-theme td.coluna-acoes a:hover,
body.light-mode td.coluna-acoes a:hover,
[data-theme="light"] .tabela-vendas .btn-acao-venda:hover,
[data-theme="light"] td.coluna-acoes button:hover,
[data-theme="light"] td.coluna-acoes a:hover {
  background-color: #e0f2fe !important;
  border-color: #38bdf8 !important;
  color: #0369a1 !important;
}

/* =============================================================================
   Estrutura e Polimento da Tabela de Movimentações / Extrato
   ============================================================================= */
.tabela-movimentacoes {
    width: 100% !important;
    table-layout: auto !important;
    border-collapse: collapse !important;
}
.tabela-movimentacoes th.col-acoes,
.tabela-movimentacoes td.col-acoes {
    width: 90px !important;
    text-align: center !important;
    white-space: nowrap !important;
    padding-right: 16px !important;
}
/* Agrupamento perfeito dos botões de ação */
.acoes-extrato {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}
/* Estilo da Linha Cancelada e Badge */
.linha-cancelada {
    opacity: 0.65;
}
.badge-cancelada {
    background-color: rgba(148, 163, 184, 0.15) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(148, 163, 184, 0.3) !important;
}
/* --- BOTÃO LIXEIRA NA TABELA --- */
.btn-cancelar-mov {
  width: 32px; height: 32px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.25); color: #ef4444; cursor: pointer; transition: all 0.2s ease;
  box-sizing: border-box;
}
.btn-cancelar-mov svg { width: 16px; height: 16px; pointer-events: none; }
.btn-cancelar-mov:hover { background: rgba(239, 68, 68, 0.22); border-color: #ef4444; }

body.light-theme .btn-cancelar-mov,
body.light-mode .btn-cancelar-mov,
[data-theme="light"] .btn-cancelar-mov { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.2); color: #dc2626; }
body.light-theme .btn-cancelar-mov:hover,
body.light-mode .btn-cancelar-mov:hover,
[data-theme="light"] .btn-cancelar-mov:hover { background: rgba(239, 68, 68, 0.16); border-color: #dc2626; }

/* --- MODAL ESTRUTURA E DARK MODE Padrão --- */
.modal-overlay-danger {
  display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 9999;
  align-items: center; justify-content: center;
  background: rgba(15, 23, 42, 0.75); backdrop-filter: blur(6px);
}
.modal-overlay-danger.ativo { display: flex !important; }

.modal-card-danger {
  background: #1e293b; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 32px 24px;
  width: 100%; max-width: 400px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5); text-align: center;
}
.modal-icon-badge {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px auto; display: flex; align-items: center; justify-content: center;
  background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: #ef4444;
}
.modal-icon-badge svg { width: 28px; height: 28px; }
.modal-title-danger { font-weight: 700; font-size: 1.25rem; margin-bottom: 8px; color: #f8fafc; }
.modal-desc-danger { font-size: 0.92rem; line-height: 1.5; margin-bottom: 24px; color: #94a3b8; }
.modal-actions-danger { display: flex; gap: 12px; justify-content: center; }

/* Botões do Modal */
.btn-modal-voltar {
  background: transparent; border: 1px solid #334155; color: #94a3b8; padding: 10px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.2s; flex: 1;
}
.btn-modal-voltar:hover { background: #334155; color: #cbd5e1; }
.btn-modal-confirmar {
  background: #ef4444; border: 1px solid #ef4444; color: #ffffff; padding: 10px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.2s; flex: 1;
}
.btn-modal-confirmar:hover { background: #dc2626; border-color: #dc2626; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4); }

/* --- SUPORTE AO LIGHT MODE DO MODAL --- */
body.light-theme .modal-overlay-danger,
body.light-mode .modal-overlay-danger,
[data-theme="light"] .modal-overlay-danger { background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(4px); }
body.light-theme .modal-card-danger,
body.light-mode .modal-card-danger,
[data-theme="light"] .modal-card-danger { background: #ffffff; border-color: #e2e8f0; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); }
body.light-theme .modal-icon-badge,
body.light-mode .modal-icon-badge,
[data-theme="light"] .modal-icon-badge { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.25); color: #dc2626; }
body.light-theme .modal-title-danger,
body.light-mode .modal-title-danger,
[data-theme="light"] .modal-title-danger { color: #0f172a; }
body.light-theme .modal-desc-danger,
body.light-mode .modal-desc-danger,
[data-theme="light"] .modal-desc-danger { color: #64748b; }
body.light-theme .btn-modal-voltar,
body.light-mode .btn-modal-voltar,
[data-theme="light"] .btn-modal-voltar { background: #f1f5f9; border-color: #cbd5e1; color: #475569; }
body.light-theme .btn-modal-voltar:hover,
body.light-mode .btn-modal-voltar:hover,
[data-theme="light"] .btn-modal-voltar:hover { background: #e2e8f0; color: #334155; border-color: #94a3b8; }
body.light-theme .linha-cancelada,
body.light-mode .linha-cancelada,
[data-theme="light"] .linha-cancelada {
    background-color: rgba(0, 0, 0, 0.03);
}
body.light-theme .badge-cancelada,
body.light-mode .badge-cancelada,
[data-theme="light"] .badge-cancelada {
    background-color: rgba(100, 116, 139, 0.1) !important;
    color: #475569 !important;
    border: 1px solid rgba(100, 116, 139, 0.25) !important;
}



