/* =========================================
   1. PALETA DE CORES (TEMA: BOUTIQUE DELICATE)
   ========================================= */
:root {
    /* --- PERSONALIDADE DA MARCA (CONFIGURÁVEL) --- */

    /* Primária: Um "Rose Gold" ou "Terra Suave". Elegante e neutro. */
    --cor-primaria: #c08497;

    /* Secundária: Um tom de areia/nude para fundos de destaque */
    --cor-secundaria: #f9f5f0;

    /* Acento: Verde Sálvia para coisas positivas (vendas, sucesso) */
    --cor-acento: #8ab0ab;

    /* Menu Lateral: Agora é CLARO para dar leveza */
    --menu-bg: #ffffff;
    --menu-texto: #666666;

    /* --- SISTEMA VISUAL --- */
    --bg-fundo: #fdfbf7;
    /* Um off-white levemente quente (creme) */
    --bg-card: #ffffff;
    --texto-titulo: #4a4a4a;
    /* Cinza escuro suave, não preto total */
    --texto-corpo: #7a7a7a;

    /* Bordas e Sombras Delicadas */
    --borda-suave: 1px solid #efe6dd;
    --sombra-card: 0 10px 30px -10px rgba(192, 132, 151, 0.15);
    /* Sombra rosada sutil */
    --sombra-hover: 0 15px 35px -5px rgba(192, 132, 151, 0.25);

    /* Design dos Botões (O que você pediu) */
    --btn-radius: 30px;
    /* Botões bem redondos (Pill Shape) */
}

/* RESET E TIPOGRAFIA */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-fundo);
    color: var(--texto-corpo);
    font-size: 14px;
    line-height: 1.6;
    /* Leitura mais arejada */
}

/* =========================================
   BLINDAGEM GLOBAL DE SCROLL (TELAS MODULARES)
   ========================================= */
#tela-avaliacao-detalhe,
#tela-fila,
#tela-status,
#tela-esteira,
.main-content,
.conteudo-principal {
    height: 100vh;
    overflow-y: auto;
    padding-bottom: 150px !important;
    /* Espaço para botões do rodapé não sumirem */
}

html,
body {
    min-height: 100%;
}


h1,
h2,
h3,
h4 {
    color: var(--texto-titulo);
    font-weight: 700;
    letter-spacing: -0.03em;
}

/* =========================================
   2. LOGIN (COM GRADIENTE ETEREO)
   ========================================= */
.login-container {
    height: 100vh;
    display: flex;
    /* Gradiente suave e feminino */
    background: linear-gradient(135deg, #fdfbf7 0%, #fcecf0 100%);
    align-items: center;
    justify-content: center;
}

.login-brand {
    display: none;
    /* No design minimalista, focamos no box central */
}

.login-form-side {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    /* Efeito vidro */
    border-radius: 20px;
    box-shadow: var(--sombra-hover);
    padding: 20px;
    width: 100%;
    max-width: 400px;
    border: 1px solid white;
}

.login-box {
    width: 100%;
    padding: 40px;
    text-align: center;
}

.login-logo {
    width: 120px;
    margin-bottom: 20px;
}

.logo-login-rebip {
    max-width: 110px;
    height: auto;
    display: block;
    margin: 0 auto 32px auto;
    transition: transform 0.3s ease;
}

.logo-login-rebip:hover {
    transform: scale(1.02);
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--texto-titulo);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group input {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #eee;
    background: #f9f9f9;
    border-radius: var(--btn-radius);
    /* Input redondo também */
    outline: none;
    transition: all 0.3s;
}

.input-group input:focus {
    background: white;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 4px rgba(192, 132, 151, 0.1);
}

/* =========================================
   3. LAYOUT (MENU CLARO & LEVE)
   ========================================= */
#app-principal {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: var(--menu-bg);
    border-right: var(--borda-suave);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100%;
    z-index: 100;
    transition: width 0.3s ease;
}

/* --- SIDEBAR DESKTOP HEADER & RECOLHER LÓGICA --- */
.sidebar-header-desktop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 20px 10px;
}

.sidebar-logo-text {
    color: var(--cor-primaria);
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
}

.btn-recolher {
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    transition: 0.2s;
}

.btn-recolher:hover {
    background: #f0f0f0;
    color: var(--cor-primaria);
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .sidebar-logo-text,
.sidebar.collapsed .menu-item span,
.sidebar.collapsed .sidebar-label,
.sidebar.collapsed .sidebar-divisor,
.sidebar.collapsed #icon-caixa-arrow,
.sidebar.collapsed #icon-config-arrow,
.sidebar.collapsed .rebip-btn-logout span {
    display: none !important;
}

.sidebar.collapsed .menu-item {
    justify-content: center;
    padding: 15px 0;
}

.sidebar.collapsed .menu-item i {
    text-align: center;
    margin-right: 0 !important;
    font-size: 1.4rem;
}

.sidebar.collapsed .sidebar-header-desktop {
    justify-content: center;
    padding: 25px 0 10px;
}

.sidebar-header {
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sidebar-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: grayscale(20%);
    /* Deixa o logo mais suave */
}

.sidebar-menu {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* Atualize esta classe no seu style.css */
.menu-item {
    display: flex;
    align-items: center;
    /* Garante alinhamento vertical perfeito */
    width: 100%;
    padding: 12px 20px;
    margin-bottom: 8px;
    background: transparent;
    border: none;
    border-radius: var(--btn-radius);
    color: var(--menu-texto);
    text-align: left;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    gap: 12px;
    /* Espaço entre ícone e texto */
    font-size: 0.9rem;
}

/* Isso garante que o ícone tenha sempre o mesmo tamanho visual */
.menu-item i {
    min-width: 20px;
    text-align: center;
}

.menu-item:hover {
    background-color: var(--cor-secundaria);
    color: var(--cor-primaria);
    padding-left: 25px;
    /* Pequeno movimento delicado */
}

.menu-item.active {
    background-color: var(--cor-primaria);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(192, 132, 151, 0.3);
}

/* Modificador sutil para o submenu ativo */
.submenu-item.active {
    background-color: #f0f0f0;
    color: var(--cor-primaria);
    font-weight: bold;
    box-shadow: none;
    border-left: 4px solid var(--cor-primaria);
}

.sidebar-divisor {
    border: 0;
    height: 1px;
    background: #f0f0f0;
    margin: 15px 20px;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    /* Igual ao tamanho da sidebar expansível por padrão */
    padding: 40px;
    max-width: 1600px;
    transition: margin-left 0.3s ease;
    /* Transição suave quando o menu recolher */
}

/* Fix para Ícone dentro do Input */
.campo-com-icone {
    position: relative;
}

.campo-com-icone i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.campo-com-icone input {
    padding-left: 45px !important;
    /* Espaço para o ícone */
}

/* =========================================
   4. BOTÕES "BOUTIQUE" (O SEGREDO DO DESIGN)
   ========================================= */

/* Estilo Base */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    /* Mais largo */
    border-radius: var(--btn-radius);
    /* Bem redondo */
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 8px;
}

.btn:active {
    transform: scale(0.95);
}

/* Primário (Cor da Marca) */
.btn-primary,
.btn-roxo {
    background-color: var(--cor-primaria);
    color: white;
    box-shadow: 0 4px 15px rgba(192, 132, 151, 0.3);
}

.btn-primary:hover,
.btn-roxo:hover {
    background-color: #a86b7d;
    /* Um tom um pouco mais escuro */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192, 132, 151, 0.4);
}

/* Secundário (Suave) */
.btn-secondary,
.btn-rosa {
    background-color: white;
    border: 1px solid var(--cor-primaria);
    color: var(--cor-primaria);
}

.btn-secondary:hover,
.btn-rosa:hover {
    background-color: var(--cor-primaria);
    color: white;
}

/* Escuro (Neutro) */
.btn-escuro {
    background-color: #555;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-escuro:hover {
    background-color: #333;
}

/* Pequeno (Tabelas) */
.btn-pequeno {
    padding: 6px 14px;
    border-radius: 15px;
    /* Pill shape menor */
    font-size: 0.75rem;
    border: 1px solid #eee;
    background: white;
    color: var(--texto-corpo);
    cursor: pointer;
    transition: 0.2s;
    font-weight: 600;
    text-transform: uppercase;
}

.btn-pequeno:hover {
    border-color: var(--cor-primaria);
    color: var(--cor-primaria);
    background: var(--cor-secundaria);
}

/* =========================================
   5. CARDS & PAINÉIS (LEVEZA)
   ========================================= */
.card-formulario,
.card-checkin,
.card-avaliacao-refinado,
.table-container {
    background: var(--bg-card);
    border-radius: 20px;
    /* Cantos bem arredondados */
    padding: 35px;
    box-shadow: var(--sombra-card);
    border: 1px solid white;
    /* Borda branca sutil */
    margin-bottom: 30px;
    animation: fadeIn 0.4s ease-out;
}

/* Dashboard Cards (Minimalistas) */
.grid-dashboard-compacta,
.grid-dashboard-financeiro,
.grid-dashboard-estoque {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: var(--sombra-card);
    border: 1px solid white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    /* Detalhe decorativo sutil no topo */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--cor-secundaria);
    /* Padrao */
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra-hover);
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #999;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 300;
    /* Fonte mais fina = mais elegante */
    color: var(--texto-titulo);
}

/* =========================================
   6. TABELAS (CLEAN & ESPAÇADAS)
   ========================================= */
.tabela-padrao {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.tabela-padrao th {
    padding: 20px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    background-color: transparent;
    border-bottom: 1px solid #eee;
}

.tabela-padrao td {
    padding: 20px;
    border-bottom: 1px solid #f9f9f9;
    color: var(--texto-titulo);
    font-size: 0.95rem;
    vertical-align: middle;
}

.tabela-padrao tr:last-child td {
    border-bottom: none;
}

.tabela-padrao tr:hover {
    background-color: #fafafa;
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Inputs Gerais */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="tel"],
select {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid #eee;
    background: #fafafa;
    border-radius: var(--btn-radius);
    /* Pill inputs */
    font-size: 0.95rem;
    outline: none;
    color: var(--texto-titulo);
    transition: all 0.2s;
}

input:focus,
select:focus {
    background: white;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(192, 132, 151, 0.1);
}

/* =========================================
   7. ESTEIRA E AVALIAÇÃO (UI DE TRABALHO)
   ========================================= */
.card-lote {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--sombra-card);
    border: 1px solid white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: 0.2s;
}

.card-lote:hover {
    transform: translateY(-3px);
    box-shadow: var(--sombra-hover);
}

/* Inputs Refinados da Avaliação */
.input-refinado {
    background: #fff;
    border: 1px solid #eee;
    font-size: 1rem;
    height: 50px;
    font-weight: 500;
}

.input-destaque-custo {
    border-left: 3px solid #d4a5a5 !important;
}

.input-destaque-venda {
    border-left: 3px solid #8ab0ab !important;
}

.item-refinado {
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #f5f5f5;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

/* =========================================
   8. MOBILE RESPONSIVE
   ========================================= */

/* ── Topbar mobile (hambúrguer + nome) ── */
#rebip-mobile-topbar {
    display: none; /* oculta em desktop */
}

/* ── Overlay de fundo ── */
#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 10, 20, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 399;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#sidebar-overlay.active {
    opacity: 1;
}

/* ── Botão hambúrguer ── */
.rebip-hamburger {
    width: 44px;
    height: 44px;
    border: none;
    background: linear-gradient(135deg, #c08497, #a86b7d);
    border-radius: 14px;
    color: #fff;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(192, 132, 151, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
}
.rebip-hamburger:active {
    transform: scale(0.93);
    box-shadow: 0 2px 8px rgba(192, 132, 151, 0.3);
}

/* ── Botão fechar (X) dentro da sidebar ── */
.rebip-sidebar-close {
    width: 36px;
    height: 36px;
    border: 1.5px solid #eee;
    background: #fff;
    border-radius: 10px;
    color: #999;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}
.rebip-sidebar-close:hover {
    background: #fce4ec;
    color: #c08497;
    border-color: #c08497;
}

.mobile-header {
    display: none;
}

@media (max-width: 1024px) {

    /* ── Sidebar flutua sobre o conteúdo ── */
    .sidebar {
        position: fixed;
        top: 0; left: 0;
        height: 100vh;
        z-index: 400;
        transform: translateX(-100%);
        transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
        border: none;
        box-shadow: none;
    }
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 6px 0 40px rgba(0, 0, 0, 0.18);
    }

    /* ── Topbar sempre visível no topo ── */
    #rebip-mobile-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0; left: 0; right: 0;
        z-index: 300;
        background: #fff;
        padding: 10px 16px;
        box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
        height: 64px;
        gap: 12px;
    }
    #nome-loja-topbar {
        font-size: 1rem;
        font-weight: 700;
        color: var(--cor-primaria, #c08497);
        flex: 1;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* ── Conteúdo desce para não ficar sob a topbar ── */
    .main-content {
        margin-left: 0;
        padding: 20px;
        padding-top: 80px; /* altura da topbar + folga */
    }

    /* ── Header interno da sidebar (nome + fechar) ── */
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 18px 20px 14px;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 8px;
    }

    .grid-dashboard-compacta,
    .grid-dashboard-financeiro,
    .grid-dashboard-estoque {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {

    .grid-dashboard-compacta,
    .grid-dashboard-financeiro,
    .grid-dashboard-estoque {
        grid-template-columns: 1fr;
    }

    .table-container {
        overflow-x: auto;
        padding: 15px;
    }

    /* Ajuste para inputs redondos não quebrarem em tela pequena */
    .input-group input {
        padding: 12px 15px;
    }
}

/* =========================================
   9. BOTTOM NAVBAR MOBILE
   ========================================= */

/* Oculto no desktop */
#rebip-bottom-nav { display: none; }

@media (max-width: 1024px) {
    #rebip-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 14px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 32px);
        max-width: 420px;
        background: #fff;
        border-radius: 50px;
        padding: 8px 10px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.13);
        z-index: 250;
        justify-content: space-around;
        align-items: center;
        gap: 4px;
    }

    .rbn-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        border: none;
        background: transparent;
        cursor: pointer;
        padding: 7px 6px;
        border-radius: 30px;
        color: #bbb;
        font-size: 0.6rem;
        font-weight: 700;
        letter-spacing: 0.2px;
        transition: color 0.2s;
        min-width: 0;
    }

    .rbn-icon-wrap {
        width: 38px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-size: 1.25rem;
        transition: background 0.2s, color 0.2s;
    }

    .rbn-item.active {
        color: #c08497;
    }

    .rbn-item.active .rbn-icon-wrap {
        background: rgba(192, 132, 151, 0.12);
        color: #c08497;
    }
}

/* =========================================
   9. ANIMAÇÕES & PRINT
   ========================================= */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.area-print {
    display: none;
}

@media print {
    body * {
        visibility: hidden;
    }

    .area-print,
    .area-print * {
        visibility: visible;
    }

    .area-print {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}

/* --- BOTÃO VOLTAR (SIMPLES) --- */
.btn-voltar-simples {
    background: transparent;
    border: none;
    color: #999;
    /* Cinza discreto */
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    /* Espaço entre a seta e o texto */
    padding: 0;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.btn-voltar-simples:hover {
    color: var(--cor-primaria);
    /* Fica rosa ao passar o mouse */
    transform: translateX(-3px);
    /* Pequeno movimento para a esquerda */
}

/* =========================================
   10. CONFIGURAÇÃO TÉRMICA (Blindada)
   ========================================= */
@media print {
    @page {
        size: auto;
        /* auto is the initial value */
        margin: 0mm;
        /* Esconde cabeçalho/rodapé padrão do navegador */
    }

    body * {
        visibility: hidden;
        height: 0;
        overflow: hidden;
    }

    /* A mágica acontece aqui: Apenas o container de impressão aparece */
    #container-impressao-termica,
    #container-impressao-termica * {
        visibility: visible;
        height: auto;
    }

    #container-impressao-termica {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .etiqueta-unitaria {
        /* Tamanho Padrão de Etiqueta (Ajuste conforme sua bobina) */
        width: 40mm;
        height: 25mm;

        /* Quebra de página forçada a cada etiqueta */
        page-break-after: always;
        break-after: page;

        /* Layout Interno */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 2px;
        overflow: hidden;
        /* Evita vazar se o texto for longo */
    }

    .etiqueta-desc {
        font-family: sans-serif;
        font-size: 8px;
        /* Pequeno para caber */
        font-weight: bold;
        text-transform: uppercase;
        max-width: 95%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 2px;
    }

    /* O código de barras SVG será controlado pelo JS, mas garantimos largura aqui */
    .etiqueta-unitaria svg {
        max-width: 95%;
        height: 12mm;
        /* Altura fixa para o código */
    }

    .etiqueta-sku {
        font-family: monospace;
        font-size: 9px;
        font-weight: bold;
        margin-top: 1px;
    }

    .etiqueta-preco {
        font-family: sans-serif;
        font-size: 10px;
        font-weight: 900;
        margin-top: 1px;
    }
}

/* =========================================
   11. ETIQUETA DE RECEBIMENTO (ESTILO EXCEL)
   ========================================= */
@media print {

    /* Força o container a aparecer ignorando o display:none do HTML */
    #container-impressao-termica {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        visibility: visible;
    }

    /* Esconde todo o resto */
    body * {
        visibility: hidden;
        height: 0;
    }

    /* Mostra só o recibo */
    #container-impressao-termica * {
        visibility: visible;
        height: auto;
    }

    .etiqueta-recebimento {
        width: 100%;
        max-width: 58mm;
        /* Ajustado para sua POS-58 */
        font-family: 'Arial', sans-serif;
        padding: 5px 0;
    }

    /* Linhas estilo Excel (Lado a Lado) */
    .recibo-grid {
        display: flex;
        align-items: baseline;
        /* Alinha texto pela base */
        margin-bottom: 6px;
        border-bottom: 1px dotted #ccc;
        /* Linha sutil entre linhas */
        padding-bottom: 2px;
    }

    .recibo-col-a {
        width: 35%;
        /* Coluna "NOME", "DATA" */
        text-align: right;
        font-size: 10px;
        font-weight: normal;
        color: #000;
        padding-right: 5px;
        border-right: 2px solid #000;
        /* A barra vertical preta da sua planilha */
        margin-right: 5px;
    }


    /* =========================================
       12. FICHA DIGITAL (GLASSMORPHISM & PREMIUM UI)
       ========================================= */
}

/* Fundo Escuro com Blur Intenso (Overlay) - FORA DO MEDIA PRINT */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    /* Inicia oculto */
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

/* Utilitário para travar rolagem */
body.no-scroll {
    overflow: hidden;
}

/* Ajuste para card dentro do modal */
.modal-overlay .card-formulario {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    /* Padrão Rebip */
    max-height: 90vh;
    /* Limite de altura */
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.3s ease-out;
    background: #fff;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Card Principal (O Dossiê) */
#modal-ficha-cliente .card-formulario {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border-radius: 24px;
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header com Gradiente Sutil */
.ficha-header {
    padding: 20px;
    background: linear-gradient(to right, #ffffff, #fdfbf7);
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

/* Avatar com Brilho */
.ficha-header div:first-child {
    box-shadow: 0 8px 20px rgba(192, 132, 151, 0.3);
    border: 4px solid white;
    position: relative;
    z-index: 2;
}

/* Tabs Estilizadas (Pill Shape Moderno) */
.tabs-ficha {
    display: flex;
    gap: 8px;
    padding: 15px 20px 0;
    border-bottom: 1px solid #eee;
    background: white;
}

.tab-btn {
    padding: 12px 24px;
    border-radius: 12px 12px 0 0;
    background: transparent;
    border: none;
    font-weight: 600;
    color: #999;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    letter-spacing: 0.3px;
}

.tab-btn:hover {
    color: var(--cor-primaria);
    background: rgba(192, 132, 151, 0.05);
}

.tab-btn.active {
    color: var(--cor-primaria);
    background: white;
    /* Fundo branco para conectar com o conteúdo */
}

/* Indicador de Tab Ativa (Barra Inferior Animada) */
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--cor-primaria);
    border-radius: 3px 3px 0 0;
}

/* Conteúdo das Tabs */
.tab-content-ficha {
    padding: 30px;
    background: white;
    min-height: 300px;
    animation: fadeIn 0.3s ease-out;
}

/* Inputs da Ficha (Mais limpos) */
.tab-content-ficha .input-group input {
    background: #fdfdfd;
    border: 1px solid #eef0f2;
    font-weight: 500;
    color: #333;
    transition: all 0.2s;
}

.tab-content-ficha .input-group input:focus {
    background: white;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 4px rgba(192, 132, 151, 0.1);
}

/* Botão Fechar (Discreto) */
#modal-ficha-cliente button[onclick*="none"] {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

#modal-ficha-cliente button[onclick*="none"]:hover {
    background: #f0f0f0;
    color: #333;
    transform: rotate(90deg);
}

/* Boxes inferiores (Volumes e Caract) */
.recibo-box-titulo {
    text-align: center;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    margin-top: 10px;
}

.recibo-box-valor {
    border: 2px solid #000;
    /* Borda grossa igual planilha */
    text-align: center;
    font-weight: 900;
    padding: 5px;
    margin-top: 2px;
}


/* =========================================
   12. IMPRESSÃO A4 (PIMACO A4248 - OFICIAL)
   ========================================= */
@media print {

    @page {
        size: A4;
        margin: 0;
    }

    /* Esconde toda a UI — apenas o #print-area injetado pelo JS fica visível */
    body > *:not(#print-area) {
        display: none !important;
    }

    /* Proteção contra o `body * { visibility:hidden; height:0 }` do bloco da térmica.
       Não toca em 'display' para não sobrescrever o flex das classes filhas. */
    #print-area,
    #print-area * {
        visibility: visible !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* Folha virtual A4: gabarito físico Pimaco A4248 (6 colunas × 17 linhas) */
    .folha-a4 {
        width: 210mm;
        box-sizing: border-box;
        padding-top: 8.5mm;
        padding-bottom: 8.5mm;
        padding-left: 12mm;
        padding-right: 12mm;
        display: flex !important;
        flex-wrap: wrap !important;
        align-content: flex-start;
        gap: 0 !important;
        margin: 0;
    }

    /* Etiqueta individual: trava absoluta de tamanho para zero deriva cumulativa */
    .etiqueta-pimaco {
        width: 31mm !important;
        height: 17mm !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        border: none !important;
        /* Respiro interno: afasta conteúdo da linha de corte */
        padding-top: 2mm;
        padding-bottom: 1mm;
        padding-left: 1mm;
        padding-right: 1mm;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        overflow: hidden !important;
        background: white;
        page-break-inside: avoid;
    }

    /* Linha 1: descrição + tamanho */
    .pimaco-texto {
        font-size: 7pt;
        font-family: Arial, sans-serif;
        font-weight: bold;
        text-transform: uppercase;
        line-height: 1;
        white-space: nowrap;
        text-align: center;
        display: block;
        width: 100%;
        overflow: hidden;
        margin: 0 auto;
    }

    /* Linha 2: código de barras */
    .pimaco-barcode {
        height: 6mm;
        width: auto;
        max-width: 100%;
        display: block;
        margin: 1px auto;
        image-rendering: pixelated;
        text-align: center;
    }

    /* Linha 3: SKU + preço */
    .pimaco-preco {
        font-size: 7pt;
        font-family: Arial, sans-serif;
        font-weight: 900;
        line-height: 1;
        color: #000;
        text-align: center;
        display: block;
        margin: 0 auto;
    }

    .etiqueta-pulo {
        width: 31mm !important;
        height: 17mm !important;
        margin: 0 !important;
        border: none !important;
        box-sizing: border-box !important;
        visibility: hidden !important;
    }


}

/* --- PRANCHETA DE CADASTRO --- */
.campo-copia {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.2s;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
}

.icone-copia {
    font-size: 0.8rem;
    color: #999;
}

/* =========================================
   13. PDV INTELIGENTE (OVERLAY)
   ========================================= */

/* Botão Flutuante (FAB) */
.fab-pdv {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: var(--cor-primaria);
    color: white;
    border-radius: 50%;
    border: none;
    box-shadow: 0 10px 25px rgba(192, 132, 151, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fab-pdv:hover {
    transform: scale(1.1) rotate(5deg);
    background: #a86b7d;
}

@media (max-width: 1024px) {
    /* FAB oculto em mobile — PDV acessível pelo card "PDV / Vendas" do dashboard */
    .fab-pdv { display: none !important; }
}

/* Overlay Glassmorphism */
.pdv-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 44, 44, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.pdv-container {
    width: 95%;
    max-width: 1200px;
    height: 90vh;
    background: #fdfbf7;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Header do PDV */
.pdv-header {
    background: white;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.pdv-busca-cliente {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pdv-busca-cliente input {
    width: 100%;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-size: 1.1rem;
    background: #fafafa;
}

.pdv-busca-cliente input:focus {
    border-color: var(--cor-primaria);
    background: white;
}

.btn-icon-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    transition: 0.2s;
}

.btn-icon-close:hover {
    color: #e74c3c;
    transform: rotate(90deg);
}

/* Corpo do PDV (Grid) */
.pdv-body {
    flex: 1;
    display: grid;
    grid-template-columns: 2fr 1fr;
    overflow: hidden;
}

/* Coluna Esquerda (Carrinho) */
.pdv-col-esquerda {
    padding: 20px;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    background: white;
}

.input-produto-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #fdfbf7;
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 20px;
}

.input-produto-box input {
    border: none;
    background: transparent;
    font-size: 1rem;
    width: 100%;
    outline: none;
}

.pdv-carrinho-header {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr;
    padding: 10px;
    font-weight: bold;
    color: #999;
    font-size: 0.8rem;
    text-transform: uppercase;
    border-bottom: 2px solid #eee;
}

.pdv-lista-itens {
    flex: 1;
    overflow-y: auto;
    padding-top: 10px;
}

.pdv-item-row {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr;
    padding: 15px 10px;
    border-bottom: 1px solid #f5f5f5;
    align-items: center;
    font-size: 0.95rem;
    position: relative;
    transition: 0.2s;
}

.pdv-item-row:hover {
    background: #fafafa;
}

/* Coluna Direita (Pagamento) */
.pdv-col-direita {
    padding: 30px;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.resumo-financeiro {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.linha-resumo {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.linha-total {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed #eee;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--texto-titulo);
}

.pdv-metodos-pagamento {
    margin-top: 20px;
}

.pdv-metodos-pagamento p {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #999;
}

.grid-pagamentos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-pgto {
    padding: 15px;
    border: 1px solid #eee;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s;
    color: #666;
}

.btn-pgto.active {
    border-color: var(--cor-primaria);
    background: #fff5f8;
    color: var(--cor-primaria);
    box-shadow: 0 0 0 2px rgba(192, 132, 151, 0.2);
}

.btn-finalizar-venda {
    width: 100%;
    padding: 20px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(39, 174, 96, 0.3);
    transition: 0.3s;
}

.btn-finalizar-venda:hover {
    background: #219150;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(39, 174, 96, 0.4);
}



.campo-copia:hover .icone-copia {
    opacity: 1;
    /* Mostra o ícone */
}

/* --- LOGIN SAAS SPLIT SCREEN --- */
.login-split-container {
    display: flex;
    height: 100vh;
    width: 100%;
    background: white;
    overflow: hidden;
}

.login-hero-side {
    flex: 1.2;
    /* Lado da imagem um pouco maior */
    background-image: url('https://images.unsplash.com/photo-1551232864-3f52236a3f86?q=80&w=2071&auto=format&fit=crop');
    /* Imagem Moda/Tech */
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(89, 74, 115, 0.8) 0%, rgba(192, 132, 151, 0.8) 100%);
    /* Gradiente Roxo -> Rosa */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.login-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #fff;
}

.login-box-saas {
    width: 100%;
    max-width: 420px;
    /* animation: fadeIn 0.6s ease-out;  <-- REMOVI ISSO */
}

/* Força a cor do título */
.login-box-saas h2 {
    color: #333 !important;
    /* Cinza Escuro */
}

.login-box-saas p {
    color: #666 !important;
}

/* Força a cor dos labels e inputs */
.input-group-saas label {
    color: #444 !important;
    /* Cinza Escuro para leitura */
    font-weight: 800;
}

.input-group-saas input {
    background: #fdfdfd !important;
    color: #000 !important;
    /* Texto preto ao digitar */
    border: 2px solid #ddd !important;
}

/* Garante que o fundo do lado direito seja branco absoluto */
.login-form-side {
    background-color: #ffffff !important;
}

.input-group-saas {
    margin-bottom: 20px;
}

.input-group-saas label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #888;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group-saas input {
    width: 100%;
    padding: 16px;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    background: #fdfdfd;
    outline: none;
}

.input-group-saas input:focus {
    background: white;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 4px rgba(192, 132, 151, 0.15);
}

/* Animação de Erro */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.3s ease-in-out;
}

/* Mobile */
@media (max-width: 900px) {
    .login-split-container {
        flex-direction: column;
    }

    .login-hero-side {
        display: none;
    }

    .login-form-side {
        padding: 20px;
        background: var(--bg-fundo);
    }
}

/* =========================================
   12. PADRÃO REBIP (UI AUDIT & FIX)
   ========================================= */

/* Campos de Busca (Smart Search) */
.rebip-search {
    border-radius: 25px !important;
    border: 1px solid #ddd !important;
    padding: 10px 20px !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;

}

.rebip-search:focus {
    box-shadow: 0 5px 15px rgba(192, 132, 151, 0.25) !important;
    border-color: var(--cor-primaria) !important;
    background: #fff;
    outline: none;
}

/* Campos Numéricos/Financeiros */
.rebip-input-financeiro,
.rebip-number {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* Ajuste no ::placeholder */
.rebip-search::placeholder {
    color: #aaa;
    font-size: 0.9rem;
    font-weight: 400;
}

/* Lista de Resultados Flutuante (Eventos) */
.lista-resultados-flutuante {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #eee;
    margin-top: 5px;
}

.item-resultado {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

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

.item-resultado:hover {
    background: #fdf6f7;
    /* Tom rosado bem leve */
}

/* --- Tabela Linear (Rebip Standard) --- */
.rebip-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-top: 15px;
}

.rebip-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #eee;
}

.rebip-table th {
    text-align: left;
    padding: 12px 15px;
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rebip-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: 0.95rem;
    color: #333;
}

.rebip-table tr:last-child td {
    border-bottom: none;
}

.rebip-img-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: #f0f0f0;
}

.rebip-action-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s;
    padding: 5px;
}

.rebip-action-btn:hover {
    color: #e74c3c;
    background: #fff0f0;
    border-radius: 5px;
}

/* =========================================
   28. ZONAS DE UPLOAD - MIGRAÇÃO DE DADOS
   ========================================= */
.zona-upload-csv {
    background: #fff;
    border: 1.5px solid #f0e6ea;
    border-radius: 28px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(192, 132, 151, 0.07);
}

.zona-upload-csv:hover,
.zona-upload-csv.dragover {
    border-color: var(--cor-primaria);
    background: #fffafe;
    box-shadow: 0 12px 35px -8px rgba(192, 132, 151, 0.22);
    transform: translateY(-3px);
}

/* Botão píllula Rebip — zonas de upload */
.rebip-btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 22px;
    border-radius: 50px;
    border: 1.5px solid var(--cor-primaria);
    background: transparent;
    color: var(--cor-primaria);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.rebip-btn-upload:hover {
    background: var(--cor-primaria);
    color: #fff;
    box-shadow: 0 6px 18px rgba(192, 132, 151, 0.35);
}

/* Hover no botão Iniciar Importação */
.rebip-btn-importacao:hover {
    background: linear-gradient(135deg, #0da572, #2bc989) !important;
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.45) !important;
    transform: translateY(-2px);
}

/* =========================================
   14. ESTOQUE & PRODUTOS (LAYOUT REFINADO)
   ========================================= */

/* TOOLBAR INTELIGENTE */
.rebip-estoque-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 15px 25px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.03);
    border: 1px solid #f2f2f2;
    flex-wrap: wrap;
    gap: 15px;
}

.campo-busca-estoque {
    flex: 1;
    min-width: 250px;
}

.campo-busca-estoque input {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px 12px 45px !important;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    outline: none;
    background: #fbfbfb;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    transition: 0.3s;
    font-size: 0.95rem;
}

.toolbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.toolbar-divider {
    height: 30px;
    width: 1px;
    background: #eee;
    margin: 0 5px;
}

.select-ordenacao {
    border-radius: 25px !important;
    border: 1px solid #e0e0e0 !important;
    padding: 10px 15px !important;
    outline: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    cursor: pointer;
    background: #fff !important;
    color: #555 !important;
    font-size: 0.85rem !important;
    font-weight: 500;
    width: auto !important;
}

.btn-filtros {
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    transition: 0.2s;
}

.btn-filtros:hover {
    border-color: var(--cor-primaria);
    color: var(--cor-primaria);
}

.btn-expressa { background-color: #27ae60; color: white; border-radius: 25px; font-size: 0.85rem; border: none; }
.btn-imprimir { background-color: #6c5ce7; color: white; border-radius: 25px; font-size: 0.85rem; border: none; }

/* PAGINAÇÃO */
.rebip-paginacao {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    padding: 10px 0;
}

.paginacao-info {
    font-size: 0.85rem;
    color: #777;
    font-weight: 500;
}

.paginacao-info strong {
    color: #333;
}

.paginacao-controles {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #777;
}

.select-itens-pagina {
    border-radius: 15px !important;
    border: 1px solid #e0e0e0 !important;
    padding: 6px 12px !important;
    outline: none;
    background: #fff !important;
    cursor: pointer;
    font-size: 0.85rem !important;
    width: auto !important;
}

.paginacao-botoes {
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-paginacao {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: #555;
    transition: 0.2s;
}

.btn-paginacao:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-paginacao:hover:not(:disabled) {
    background: #f0f0f0;
    color: #333;
}

/* MODAL DE FILTROS */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.modal-box {
    background: #fff;
    width: 100%;
    max-width: 600px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    animation: fadeIn 0.3s ease-out;
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fcfcfc;
}

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title-group i {
    font-size: 1.5rem;
    color: var(--cor-primaria);
}

.modal-title-group h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.btn-fechar-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #aaa;
    cursor: pointer;
}

.modal-body {
    padding: 30px;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.modal-grid .input-group {
    margin: 0;
}

.modal-grid label {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 6px;
    display: block;
}

.select-filtro {
    border-radius: 15px !important;
    border: 1px solid #e0e0e0 !important;
    padding: 12px !important;
    width: 100% !important;
    background: #f9f9f9 !important;
    outline: none;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #fcfcfc;
}

.btn-modal-outline {
    background: transparent;
    border: 1.5px solid #ddd;
    color: #555;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-modal-primary {
    background: var(--cor-primaria);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(192,132,151,0.3);
    font-size: 0.9rem;
}

/* =========================================
   12. TELA DE BALANÇO (INVENTÁRIO)
   ========================================= */

.input-scan-gigante-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.rebip-input-scan-gigante {
    width: 100%;
    padding: 25px 50px 25px 65px !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--texto-titulo) !important;
    background: #fff !important;
    border: 2px solid #eee !important;
    border-radius: 35px !important; /* Estética Rebip - Canto bem arredondado */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s ease !important;
    outline: none !important;
}

.rebip-input-scan-gigante:focus {
    border-color: var(--cor-primaria) !important;
    box-shadow: 0 10px 40px rgba(192, 132, 151, 0.2) !important;
    transform: translateY(-2px);
}

.rebip-input-scan-gigante::placeholder {
    color: #ccc;
    font-weight: 400;
}

.lupinha-scan {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
    color: var(--cor-primaria);
    pointer-events: none;
    z-index: 2;
}

.btn-limpar-scan {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: #f0f0f0;
    border: none;
    color: #999;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    z-index: 2;
}

.btn-limpar-scan:hover {
    background: #e0e0e0;
    color: #555;
}

.lista-ultimos-lidos {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lista-ultimos-lidos li {
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    animation: fadeIn 0.3s ease-out;
}

.lista-ultimos-lidos li.lido-sucesso {
    border-left: 4px solid #27ae60;
}

.lista-ultimos-lidos li.lido-erro {
    border-left: 4px solid #e74c3c;
    background: #fdf5f5;
}

.badge-lido-sucesso {
    background: #e8f8f5;
    color: #27ae60;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-lido-erro {
    background: #fdedec;
    color: #e74c3c;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}