/* -------------------------------------------------------------------------
   SISTEMA SAFE EXTINTORES - STYLE SYSTEM
   Responsável: Layout, Responsividade, Botões e Componentes
   ------------------------------------------------------------------------- */

:root {
    /* Paleta Corporativa Oficial - Safe Extintores (acento = cor do tenant) */
    --cor-primaria: #801715;          /* Vermelho Vinho (Ação e Destaque) */
    --cor-primaria-hover: #a31c1a;    /* Vermelho Mais Claro (Hover) */
    --cor-header: #000000;            /* Preto (Somente Topo) */
    --branco: #FFFFFF;                 /* Branco (Fundo e Cards) */
    --texto-principal: #121620;       /* Tinta escura (Textos) */
    --texto-secundario: #5F5D5D;      /* Cinza Escuro (Hierarquia 2) */
    --texto-claro: #7B7979;           /* Cinza Médio (Subtítulos e Bordas) */
    --fundo-pagina: #F4F6F9;           /* Fundo claro da página */
    --borda: #e6e8ee;                 /* Borda Suave */

    /* Auxiliares de Status (Padronizados) */
    --status-vinho: #801715;
    --cor-cancelar: #d32f2f;          /* Vermelho Padrão Cancelamento */
    --sombra-leve: 0 1px 2px rgba(16,24,40,.04), 0 10px 30px rgba(16,24,40,.05);
    --sombra-foco: 0 0 0 3px rgba(128, 23, 21, 0.1);

    /* ── Design system (Claude Design — conteúdo claro) ───── */
    --panel:   #FFFFFF;
    --panel-2: #F7F9FB;
    --ink:     #121620;
    --muted:   #6B7280;
    --border:  rgba(15,23,42,.08);
    --shadow:  0 1px 2px rgba(16,24,40,.04), 0 10px 30px rgba(16,24,40,.05);
    --radius:  16px;
    --chip-bg: rgba(128,23,21,.12);
    --chip-bg: color-mix(in srgb, var(--cor-primaria) 12%, transparent);

    /* ── Shell escuro (derivado da cor do tenant; fallback p/ navegadores sem color-mix) ─ */
    --side-bg:     #170a0c;
    --side-bg:     color-mix(in srgb, var(--cor-primaria) 20%, #0A0E16);
    --topbar-bg:   #170a0c;
    --topbar-bg:   color-mix(in srgb, var(--cor-primaria) 20%, #0A0E16);
    --side-ink:    rgba(255,255,255,.62);
    --side-active: rgba(128,23,21,.42);
    --side-active: color-mix(in srgb, var(--cor-primaria) 42%, transparent);
    --side-border: rgba(255,255,255,.08);

    /* ── Tipografia padronizada do conteúdo (1rem ≈ 18px) ───────────────
       Use estes tokens em todo o conteúdo das telas para manter consistência. */
    --fs-page-title: 1.3rem;   /* título da tela            ~23px */
    --fs-section:    1rem;      /* títulos de seção/tabela   ~18px */
    --fs-base:       0.85rem;   /* texto padrão do conteúdo  ~15px */
    --fs-control:    0.85rem;   /* campos de formulário      ~15px */
    --fs-label:      0.78rem;   /* rótulos de campo          ~14px */
    --fs-sm:         0.72rem;   /* tags, dicas, auxiliares   ~13px */
    --fs-btn:        0.82rem;   /* botões                    ~15px */
    /* Métrica compacta dos formulários */
    --field-h:       32px;      /* altura de inputs/selects/botões */
    --field-pad:     5px 9px;   /* padding interno dos campos */
}

/* Fonte-base do sistema. Como a maioria dos tamanhos usa rem, alterar este
   valor escala todo o sistema proporcionalmente. Padrão do navegador: 100% (16px). */
html { font-size: 112.5%; } /* 18px — reduzido de 22px para fontes menores em todo o sistema */

body {
    font-family: 'Manrope', 'Segoe UI', 'Roboto', Helvetica, Arial, sans-serif;
    background: var(--fundo-pagina);
    color: var(--texto-principal);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.num { font-family: 'JetBrains Mono', monospace; font-feature-settings: 'tnum'; }

/* ------------------ ESTILOS DO LOGIN ------------------ */
#tela-login { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    min-height: 100vh; 
    width: 100%;
    background: linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)), url('../img/papelextintor.jpg') no-repeat center center fixed;
    background-size: cover;
}
.login-box {
    background-color: #FFFFFF;
    padding: 16px 32px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
    width: 100%; 
    max-width: 400px; 
    text-align: center; 
    border: 1px solid var(--borda);
    border-top: 6px solid #1F5FD0; /* Azul FireGest (igual ao login do dev) */
}
.login-box img { max-width: 180px; max-height: 72px; width: auto; height: auto; margin: 0 auto 6px auto; display: block; }
.login-box h2 { color: var(--texto-principal); margin: 0 0 8px 0; font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; }
.login-tabs { display: flex; border-radius: 8px; overflow: hidden; border: 1px solid var(--borda); margin-bottom: 8px; }
.login-tab { flex: 1; padding: 10px; background: #f5f5f5; color: var(--texto-secundario); font-weight: 600; font-size: 0.9rem; border: none; cursor: pointer; transition: background 0.2s, color 0.2s; }
.login-tab.ativo { background: #1F5FD0; color: #fff; }
.login-form-tipo { display: none; }
.login-form-tipo.ativo { display: block; }
.input-group { margin-bottom: 6px; text-align: left; }
.input-group label { display: block; margin-bottom: 3px; color: var(--texto-secundario); font-size: 0.95rem; font-weight: 600; }
.input-group input { width: 100%; padding: 9px 11px; border: 1px solid #ddd; border-radius: 8px; box-sizing: border-box; font-size: 1rem; background-color: #FFFFFF; color: #000000; }
.input-group input:focus { outline: none; border-color: #1F5FD0; box-shadow: 0 0 8px rgba(31, 95, 208, 0.25); }
.btn-login { background-color: #1F5FD0; color: #FFFFFF; border: none; padding: 12px; border-radius: 8px; width: 100%; font-size: 1.1rem; font-weight: 700; cursor: pointer; margin-top: 4px; transition: background 0.3s; box-shadow: 0 4px 14px rgba(31, 95, 208, 0.30); }
.btn-login:hover { background-color: #1A52B5; }

/* Modo Colaborador: cinza escuro no lugar do azul */
#login-box.modo-colaborador { border-top-color: #374151; }
#login-box.modo-colaborador .login-tab.ativo { background: #374151; }
#login-box.modo-colaborador .btn-login { background-color: #374151; box-shadow: 0 4px 14px rgba(55,65,81,0.30); }
#login-box.modo-colaborador .btn-login:hover { background-color: #2B333F; }
#login-box.modo-colaborador .input-group input:focus { border-color: #374151; box-shadow: 0 0 8px rgba(55,65,81,0.25); }

/* Spinner do botão Entrar durante o login */
.btn-login.is-loading { color: transparent !important; pointer-events: none; position: relative; }
.btn-login.is-loading::after {
    content: ""; position: absolute; top: 50%; left: 50%; width: 18px; height: 18px;
    margin: -9px 0 0 -9px; border: 2px solid rgba(255,255,255,0.45); border-top-color: #fff;
    border-radius: 50%; animation: btn-spin 0.6s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
#mensagem-erro { color: var(--branco); background-color: var(--cor-primaria); padding: 8px; border-radius: 4px; font-size: 0.85rem; margin-top: 15px; display: none; font-weight: bold; line-height: 1.4; border: 1px solid var(--cor-primaria-hover);}
#aviso-navegador { background-color: #fff3e0; color: #e65100; border: 1px solid #ffcc80; padding: 10px; border-radius: 6px; font-size: 0.8rem; margin-top: 15px; display: none; text-align: left; }

/* ------------------ ESTILOS DO SISTEMA ------------------ */
#tela-sistema { display: none; height: 100vh; overflow: hidden; flex-direction: column; box-sizing: border-box; }

.header-wrapper {
    background-color: var(--topbar-bg);
    width: 100%;
    padding: 0;
    border: none;
    border-bottom: 1px solid var(--side-border);
    box-sizing: border-box;
    margin-bottom: 0;
    flex-shrink: 0;
}
.header-content { max-width: 100%; margin: 0; padding: 10px 24px; display: flex; align-items: center; justify-content: space-between; }
.header-left { display: flex; align-items: center; gap: 10px; }
.logo-container { display: flex; align-items: center; justify-content: center; width: 260px; flex-shrink: 0; margin-left: -24px; padding: 0; }
/* chip claro atrás do logo (necessário p/ o mix-blend-mode multiply em header escuro) */
.header-logo {
    max-width: 100%;
    height: auto;
    max-height: 72px;
    display: block;
    mix-blend-mode: normal;
    margin: 0;
    background: transparent;
    padding: 0;
    border-radius: 0;
}
.titulo-sessao-dinamico { margin-top: 0; margin-bottom: 20px; color: var(--texto-principal); font-weight: 600; font-size: var(--fs-page-title); font-family: 'Neo Sans', 'Chau Philomene One', sans-serif; letter-spacing: -0.5px; }
.titulos-container { display: flex; flex-direction: column; padding-left: 0; margin: 0; }
header h2 { font-family: 'Chau Philomene One', sans-serif; color: rgba(255,255,255,.85); margin: 0; padding: 0; font-size: 0.95rem; font-weight: 400; line-height: 1; }

.btn-sair { 
    background-color: var(--cor-primaria); 
    color: var(--branco); 
    border: none; 
    padding: 5px 10px; 
    border-radius: 6px; 
    font-weight: 500; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 4px; 
    font-size: 0.75rem; 
    transition: background 0.3s;
}
.btn-sair:hover { background-color: var(--cor-primaria-hover); }

.main-layout { max-width: 100%; margin: 0; padding: 0; display: flex; gap: 0px; align-items: stretch; flex: 1; min-height: 0; }
.sidebar {
    width: 260px;
    background-color: var(--side-bg);
    border-radius: 0;
    padding: 16px 12px;
    box-shadow: none;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    border: none;
    box-sizing: border-box;
    /* Ocupa a altura total do layout (via align-items:stretch do .main-layout).
       Rola internamente só quando o menu é mais alto que a tela — sem rolar a
       página. */
    overflow-y: auto;
}
.sidebar-divider { display: none; }
.sidebar-version { margin-top: auto; text-align: center; font-size: 0.75rem; color: var(--side-ink); opacity: .7; padding-top: 15px; margin-bottom: 5px; border-top: 1px solid var(--side-border); }

/* Rodapé da sidebar: Sair + versão fixados na base */
.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 15px; border-top: 1px solid var(--side-border); }
.sidebar-footer .btn-sair { width: 100%; justify-content: center; padding: 9px 12px; font-size: 0.8rem; background-color: transparent; color: var(--side-ink); transition: background 0.2s, color 0.2s; }
.sidebar-footer .btn-sair:hover { background-color: var(--cor-primaria); color: #fff; }
.sidebar-version-text { text-align: center; font-size: 0.72rem; color: var(--side-ink); opacity: .7; }
.header-right { display: flex; align-items: center; gap: 16px; }
.user-greeting { color: var(--side-ink); font-size: 0.85rem; line-height: 1; margin: 0; }
.user-greeting strong { color: #fff; font-weight: 700; margin-left: 3px; }

.btn-menu { font-family: 'Manrope', sans-serif; display: flex; align-items: center; gap: 11px; background-color: transparent; color: var(--side-ink); border: none; padding: 5px 13px; border-radius: 11px; font-size: 0.9rem; font-weight: 600; text-align: left; cursor: pointer; margin-bottom: 0; transition: all 0.15s; }
.material-symbols-outlined {
    font-size: 19px;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.btn-menu:hover { background-color: rgba(255,255,255,.06); color: #fff; }
.btn-menu.ativo { background-color: var(--side-active); color: #fff; box-shadow: inset 3px 0 0 var(--cor-primaria); }

/* --- Submenu (Dropdown) --- */
.menu-item-com-submenu { width: 100%; display: flex; flex-direction: column; }
.btn-dropdown.aberto .icone-seta { transform: rotate(180deg); }
.submenu-container { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; display: flex; flex-direction: column; gap: 2px; padding-left: 15px; }
.btn-submenu { padding: 4px 12px; font-size: 0.84rem; font-weight: 500; color: rgba(255,255,255,.5); border-radius: 9px; }
.btn-submenu .material-symbols-outlined { font-size: 16px; opacity: 0.7; }
.btn-submenu:hover { background-color: rgba(255,255,255,.05); color: #fff; padding-left: 14px; }
.btn-submenu.ativo { background-color: rgba(255,255,255,.06); color: #fff; box-shadow: none; font-weight: 600; }

.content-area {
    flex: 1;
    background: var(--fundo-pagina);
    padding: 28px 34px 48px 34px;
    border-radius: 0;
    min-width: 0;
    border: none;
    margin-top: 0;
    min-height: 0;
    overflow-y: auto;
    box-shadow: none;
    /* Tipografia padrão do conteúdo das telas */
    font-size: var(--fs-base);
    line-height: 1.45;
}
/* Padroniza o tamanho de todos os campos de formulário dentro do conteúdo */
.content-area input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
.content-area select,
.content-area textarea { font-size: var(--fs-control); }
.content-area label { font-size: var(--fs-label); }
.aba-conteudo { display: none; }
.aba-conteudo.ativo { display: block; }

/* --- Sub-Abas Horizontais (Tabs) --- */
.tabs-nativos { display: flex; gap: 0; overflow-x: auto; white-space: nowrap; border-bottom: 2px solid var(--borda); padding-bottom: 0px; margin-top: -18px; margin-bottom: 6px; scrollbar-width: thin; scrollbar-color: #ccc transparent; }
.tabs-nativos::-webkit-scrollbar { height: 4px; }
.tabs-nativos::-webkit-scrollbar-track { background: transparent; }
.tabs-nativos::-webkit-scrollbar-thumb { background-color: #ccc; border-radius: 10px; }
.tab-btn { background: none; border: none; font-family: 'Neo Sans', sans-serif; font-size: 0.82rem; font-weight: 500; color: #7B7979; cursor: pointer; padding: 8px 12px; border-bottom: 3px solid transparent; transition: all 0.2s; white-space: nowrap; outline: none; }
.tab-btn:hover { color: #000; background-color: #FAFAFA; border-radius: 6px 6px 0 0; }
.tab-btn.ativo { color: var(--cor-primaria); border-bottom: 3px solid var(--cor-primaria); font-weight: 600; }
.subaba-gerais-conteudo, .subaba-financeiro-conteudo { display: none; background: #fff; padding: 2px 0; }
.subaba-gerais-conteudo.ativo, .subaba-financeiro-conteudo.ativo { display: block; animation: fadeSubAba 0.3s ease-in-out; }
.subaba-gerais-conteudo h3, .subaba-financeiro-conteudo h3 { display: flex; align-items: center; gap: 6px; font-weight: 600; color: #333; margin-top: 0; margin-bottom: 2px; font-size: var(--fs-section); }
.subaba-gerais-conteudo p, .subaba-financeiro-conteudo p { color: #666; font-size: var(--fs-label); margin-top: 0; margin-bottom: 8px; }
@keyframes fadeSubAba { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }


/* Cards do Dashboard Padronizados */
.dashboard-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 15px; margin-bottom: 30px; }
.card { 
    background-color: var(--branco); 
    padding: 20px 15px; 
    border-radius: 12px; 
    box-shadow: var(--sombra-leve); 
    border: 1px solid var(--borda); 
    border-left: 6px solid var(--cor-primaria); /* Barra Vinho Lateral */
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
    transition: transform 0.2s ease-in-out; 
}
.card:hover { transform: translateY(-4px); }
.card.vencido { background-color: #fff8f8; border-left-color: #d32f2f; } /* Leve destaque para o card de vencidos */

.card-titulo { font-size: 0.8rem; color: var(--texto-secundario); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.card-valor { font-size: 2rem; font-weight: 700; color: var(--cor-header); }

.tabela-titulo { color: var(--cor-primaria); border-bottom: 2px solid var(--cor-primaria); padding-bottom: 4px; margin-bottom: 6px; margin-top: 10px; font-size: var(--fs-section); font-weight: bold; }
.painel-acoes { background-color: var(--bg-painel); border: 1px solid var(--border-painel); border-radius: 6px; padding: 8px; margin-bottom: 8px; }

.formulario { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: flex-end; }
.campo-form { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 2px; }
.campo-form label { font-size: var(--fs-label); color: var(--texto-secundario); font-weight: 600; }
.campo-form input, .campo-form select, .campo-form textarea {
    width: 100%;
    padding: var(--field-pad);
    border: 1px solid #efefef;
    border-radius: 8px;
    font-size: var(--fs-control);
    box-sizing: border-box;
    background-color: white;
    height: var(--field-h);
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}
.campo-form textarea { height: auto; min-height: var(--field-h); }
.campo-form input:disabled, .campo-form select:disabled { background-color: #f7f7f7; cursor: not-allowed; color: #999; border-color: #eee; }
.campo-form input.input-verde-bloqueado { background-color: #e8f5e9; color: var(--verde-disponivel); font-weight: bold; text-align: center; border-color: #c8e6c9; cursor: default; }
input:focus, select:focus { outline: none; border-color: var(--cor-primaria); box-shadow: var(--sombra-foco); background-color: #fff; }

/* Campo standalone (modais/popups fora de .campo-form): mesma aparência dos inputs do
   sistema. A classe era referenciada em vários lugares mas não existia no CSS. */
.campo-input {
    width: 100%;
    padding: var(--field-pad);
    border: 1px solid #efefef;
    border-radius: 8px;
    font-size: var(--fs-control);
    box-sizing: border-box;
    background-color: #fff;
    height: var(--field-h);
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}
textarea.campo-input { height: auto; min-height: calc(var(--field-h) * 2.4); line-height: 1.5; padding: 8px 10px; }
.campo-input:focus { outline: none; border-color: var(--cor-primaria); box-shadow: var(--sombra-foco); background-color: #fff; }

/* Componente de Busca Moderno */
.container-busca-moderna {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #efefef;
    border-radius: 10px;
    padding: 0 12px;
    height: 38px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    width: 100%;
}
.container-busca-moderna:focus-within {
    border-color: var(--cor-primaria);
    box-shadow: var(--sombra-foco);
}
.container-busca-moderna .material-symbols-outlined { color: #aaa; font-size: 20px; margin-right: 8px; }
.container-busca-moderna input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    height: 100% !important;
    flex: 1;
    font-size: 14px;
}
.container-busca-moderna select {
    border: none;
    border-left: 1px solid #eee;
    padding: 0 0 0 10px;
    margin-left: 10px;
    height: 60%;
    font-size: 13px;
    color: #666;
    background: transparent;
    cursor: pointer;
    outline: none;
}
.container-busca-moderna select:focus { box-shadow: none; }

.autocomplete-container { position: relative; width: 100%; }
.autocomplete-items { position: absolute; border: 1px solid var(--borda); border-top: none; z-index: 99; top: 100%; left: 0; right: 0; background-color: #fff; max-height: 180px; overflow-y: auto; border-radius: 0 0 5px 5px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); display: none; }
.autocomplete-item { padding: 10px; cursor: pointer; border-bottom: 1px solid #eee; font-size: 13px; }
.autocomplete-item:hover { background-color: #f1f1f1; color: var(--cor-primaria); }

.btn-registrar { 
    background-color: var(--cor-primaria); 
    color: var(--branco); 
    border: none; 
    padding: 0 16px; 
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: var(--fs-btn);
    transition: all 0.3s ease;
    height: var(--field-h);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(128, 23, 21, 0.1);
}
.btn-registrar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--texto-claro);
}
.btn-registrar:hover { background-color: var(--cor-primaria-hover); transform: translateY(-1px); box-shadow: 0 4px 8px rgba(128, 23, 21, 0.2); }

.btn-cancelar { 
    background-color: transparent; 
    color: var(--cor-cancelar); 
    border: 1.5px solid var(--cor-cancelar);
    padding: 5px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: var(--fs-btn);
    transition: all 0.3s ease;
    height: var(--field-h);
    display: flex;
    align-items: center; 
    justify-content: center; 
    gap: 6px; 
}
.btn-cancelar:hover { background-color: var(--cor-cancelar); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 8px rgba(211, 47, 47, 0.2); }

.btn-whatsapp { background-color: #2e7d32; color: white; border: none; padding: 4px 10px; border-radius: 6px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.btn-whatsapp:hover { opacity: 0.9; }

table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--borda); background-color: rgba(255,255,255,0.5);}
th { background-color: #f4f4f4; color: var(--texto-principal); font-weight: 600; text-transform: uppercase; font-size: var(--fs-label); }

/* Legibilidade: aumenta a fonte do conteúdo das tabelas em todo o sistema.
   Usa !important para vencer os font-size inline (10–13px) espalhados nas views.
   A matriz de permissões (.tabela-permissoes) mantém seu tamanho compacto próprio. */
.aba-conteudo table:not(.tabela-permissoes) td,
.content-area table:not(.tabela-permissoes) td,
.modal-content table td { font-size: var(--fs-base) !important; }
.aba-conteudo table:not(.tabela-permissoes) th,
.content-area table:not(.tabela-permissoes) th,
.modal-content table th { font-size: var(--fs-label) !important; }

/* Matriz de Permissões */
.tabela-permissoes { border: none; margin-top: 0; }
.tabela-permissoes th { background-color: #fdfdfd; border-bottom: 2px solid #eee; padding: 6px; }
.tabela-permissoes td { padding: 4px 10px; border-bottom: 1px solid #f0f0f0; }
.grupo-permissao td { background-color: #fafafa !important; color: var(--texto-secundario); font-size: 0.7rem; letter-spacing: 0.5px; border-top: 10px solid white; }
.linha-permissao:hover td { background-color: #fff9f9 !important; }
.linha-permissao td:first-child { color: #555; font-weight: 500; }
.linha-permissao input[type="checkbox"] { cursor: pointer; transform: scale(0.9); }

/* Logo da Empresa Area */
.area-logo { display: flex; align-items: center; gap: 15px; margin-top: 5px; }
.preview-logo { width: 80px; height: 80px; border: 2px dashed #ddd; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: #fff; overflow: hidden; position: relative; }
.preview-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.preview-logo .placeholder-icon { color: #ccc; font-size: 32px; }
.btn-remover-logo { position: absolute; top: -5px; right: -5px; background: #d32f2f; color: white; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 1px solid white; z-index: 10; font-size: 12px; }

.acoes-tabela { display: flex; gap: 4px; }
/* Botões de ação em tabela: ícones transparentes coloridos. A definição
   canônica (com as cores por variante) está mais abaixo em ".btn-acao". */

.permissoes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 15px; background-color: #fff; border: 1px solid var(--borda); border-radius: 4px; margin-top: 5px; }
.permissoes-grid label { font-size: 0.85rem; font-weight: normal; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.permissoes-grid input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

#painel-alertas { display: none; background-color: #fff3e0; border-left: 5px solid #ff9800; padding: 15px; margin-bottom: 20px; border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }

/* --- ESTILOS ADICIONAIS DAS OUTRAS TELAS (HARMONIZADOS) --- */
.section-box {
    background-color: #fafafa;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid #eee;
    margin-top: 10px;
}

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.form-col {
    flex: 1;
    min-width: 180px;
}

/* Modal Estilo Global */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    justify-content: center; align-items: center;
}

.modal-content {
    background: #fff;
    padding: 20px 22px;
    border-radius: 8px;
    width: 90%; 
    max-width: 600px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.exemplo-box {
    background-color: #f1f8e9;
    border-left: 5px solid var(--verde-disponivel);
    padding: 12px 14px;
    margin: 12px 0;
    font-size: var(--fs-base);
    color: #333;
    line-height: 1.5;
    max-height: 250px;
    overflow-y: auto;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    background-color: #f9f9f9;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    margin-bottom: 12px;
}

.info-item { display: flex; flex-direction: column; }
.info-label { font-size: var(--fs-sm); color: #757575; font-weight: bold; text-transform: uppercase; }
.info-value { font-size: var(--fs-base); color: var(--texto-principal); font-weight: bold; margin-top: 2px; }

.tag-norma {
    background-color: #e3f2fd;
    color: #1565c0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: var(--fs-sm);
    font-weight: bold;
}

.total-box {
    text-align: right;
    padding: 15px;
    background: #f5f5f5;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--cor-primaria);
    border-radius: 4px;
    border: 1px solid var(--borda);
    margin-top: 15px;
}

.row-zerada { opacity: 0.4; background-color: #f9f9f9; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVIDADE COMPLETA — HAMBURGER + BREAKPOINTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Botão Hamburger ──────────────────────────────────────────────────────── */
.btn-hamburger {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    color: #fff;
    border-radius: 6px;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
    margin-right: 4px;
}
.btn-hamburger:hover { background: rgba(255,255,255,.12); }
.btn-hamburger .material-symbols-outlined { font-size: 26px; }

/* ── Overlay do Sidebar (Mobile) ──────────────────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 998;
    animation: fadeOverlay 0.2s ease;
}
.sidebar-overlay.ativo { display: block; }
@keyframes fadeOverlay { from { opacity: 0; } to { opacity: 1; } }

/* ═══════════════════════════════════════════════════════════════════════════
   TABLET + MOBILE  (≤ 850px)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 850px) {

    /* Hamburger visível */
    .btn-hamburger { display: flex; }

    /* Layout mantém row (sidebar vira drawer fixo) */
    .main-layout { flex-direction: row !important; }

    /* Sidebar → drawer deslizante */
    .sidebar {
        position: fixed !important;
        left: -230px;
        top: 0;
        height: 100vh;
        min-height: 100vh !important;
        width: 215px !important;
        z-index: 999;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
        padding-top: 20px;
        background: var(--branco) !important;
    }
    .sidebar.aberta { left: 0; }

    /* Content area ocupa 100% */
    .content-area {
        width: 100%;
        padding: 14px 16px 40px 16px;
        margin-top: 0;
        border-radius: 0;
        border-left: none;
        border-top: 4px solid #5F5D5D;
        min-height: calc(100vh - 70px);
    }

    /* Header compacto */
    .header-wrapper { border-left: none; }
    .header-content {
        flex-wrap: wrap;
        padding: 8px 12px;
        gap: 6px;
        align-items: center;
    }
    .logo-container {
        width: auto;
        min-width: unset;
        flex: 1;
        margin-left: 0;
        justify-content: flex-start;
        padding-top: 8px;
    }
    .header-logo { max-height: 62px; margin-left: 4px; }
    .header-right { gap: 8px; }
    .user-greeting { font-size: 0.78rem; }

    /* Pesquisa: linha completa embaixo */
    .header-search {
        order: 4;
        flex-basis: 100%;
        max-width: 100%;
        margin: 0 0 2px 0;
    }

    /* Dashboard cards: 2 colunas */
    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Tabelas: scroll horizontal */
    .content-area table,
    .aba-conteudo table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    /* Modais: mais largos */
    .modal-content {
        width: 96%;
        padding: 20px 16px;
    }

    /* Formulários: empilhar */
    .form-row { flex-direction: column; gap: 10px; }
    .formulario { flex-direction: column; }
    .campo-form { min-width: 100% !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE  (≤ 480px)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {

    /* Login */
    #tela-login { padding: 0; }
    .login-box {
        padding: 28px 18px;
        border-radius: 0;
        width: 100%;
        max-width: 100%;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        box-shadow: none;
        border-top: 5px solid var(--cor-primaria);
    }

    /* Dashboard cards: 1 coluna */
    .dashboard-cards { grid-template-columns: 1fr; gap: 10px; }

    /* Cards valor menor */
    .card-valor { font-size: 1.6rem; }

    /* Header ainda mais compacto */
    .header-logo { max-height: 38px; }
    .user-greeting strong { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }

    /* Texto "Sair" oculto, só ícone */
    .btn-sair { padding: 5px 7px; font-size: 0; gap: 0; }
    .btn-sair .material-symbols-outlined { font-size: 18px !important; }

    /* Modais full-screen */
    .modal-overlay { align-items: flex-end; padding: 0; }
    .modal-content {
        width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 90dvh;
        overflow-y: auto;
        padding: 20px 16px 30px;
    }

    /* Grids de colunas → 1 coluna */
    .cli-grid-2,
    .cli-grid-3,
    .permissoes-grid,
    .info-grid { grid-template-columns: 1fr !important; }

    /* Tabs: menor */
    .tab-btn { font-size: 0.75rem; padding: 7px 9px; }
    .tabs-nativos { margin-top: -10px; }

    /* Seção conteúdo */
    .section-box { padding: 14px; }

    /* Título dinâmico */
    .titulo-sessao-dinamico { font-size: 1.1rem; margin-bottom: 16px; }

    /* Tabela: fonte um pouco menor no mobile, mas ainda escala com a base */
    table { font-size: 0.78rem; }
    th, td { padding: 4px 6px; }

    /* Formulário submenu */
    .painel-acoes { flex-direction: column; gap: 6px; }
    .btn-registrar, .btn-cancelar { width: 100%; justify-content: center; }
}

@media print {
    .sidebar, .header-wrapper, .btn-sair, .botoes-form, .painel-acoes, .acoes-tabela, #titulo-sessao, .sidebar-wrapper { display: none !important; }
    .content-area { border: none; box-shadow: none; padding: 0; }
    .row-zerada { display: none !important; }
    body { background: white !important; }
}

/* --- HR CUSTOM STYLES --- */
.btn-micro-add {
    background: #e3f2fd;
    color: #1976d2;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-micro-add:hover {
    background: #1976d2;
    color: #fff;
}
.btn-micro-add .material-symbols-outlined {
    font-size: 14px;
}
.subaba-funcionarios-conteudo {
    display: none;
    animation: fadeSubAba 0.3s ease-in-out;
}
.subaba-funcionarios-conteudo.ativo {
    display: block;
}
#func-beneficios-select {
    padding: 8px;
    border: 1px solid #efefef;
    border-radius: 8px;
    background: #fff;
}
#func-beneficios-select option {
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 2px;
}
#func-beneficios-select option:checked {
    background: var(--cor-primaria) !important;
    color: #fff !important;
}
/* --- Subaba RH (Isolamento de Conteúdo) --- */
.subaba-rh-conteudo {
    display: none;
    animation: fadeSubAba 0.3s ease-in-out;
}
.subaba-rh-conteudo.ativo {
    display: block;
}
/* --- Subaba Ponto Digital (Isolamento de Conteúdo) --- */
.subaba-ponto-conteudo {
    display: none;
    animation: fadeSubAba 0.3s ease-in-out;
}
.subaba-ponto-conteudo.ativo {
    display: block;
}
/* Animação do indicador "ao vivo" na aba Hoje */
@keyframes pulse {
    0%   { opacity: 1;   transform: scale(1); }
    50%  { opacity: 0.5; transform: scale(1.3); }
    100% { opacity: 1;   transform: scale(1); }
}

/* ============================================================
   Sino de notificações no header (Fase 5)
   ============================================================ */
.notif-sino-container {
    position: relative;
    display: inline-block;
}
.notif-sino-btn {
    background: rgba(255,255,255,.08);
    border: 1px solid var(--side-border);
    color: rgba(255,255,255,.75);
    cursor: pointer;
    padding: 6px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background 0.2s;
}
.notif-sino-btn:hover {
    background: rgba(255,255,255,.14);
}
.notif-sino-btn .material-symbols-outlined,
.notif-sino-btn .fa-bell {
    font-size: 18px;
    color: rgba(255,255,255,.8);
}
.notif-sino-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef5350;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-sizing: content-box;
    line-height: 1;
}
.notif-sino-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: -8px;
    width: 380px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    overflow: hidden;
}
.notif-sino-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 14px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    border-left: 1px solid #e0e0e0;
    transform: rotate(45deg);
}
.notif-sino-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}
.notif-sino-lista {
    max-height: 420px;
    overflow-y: auto;
}
.notif-sino-item {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.15s;
    align-items: flex-start;
}
.notif-sino-item:hover {
    background: #fafafa;
}
.notif-sino-item:last-child {
    border-bottom: none;
}
.notif-sino-item.lida {
    opacity: 0.6;
}
.notif-sino-item-icone {
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}
.notif-sino-item-conteudo {
    flex: 1;
    min-width: 0;
}
.notif-sino-item-titulo {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}
.notif-sino-item-msg {
    font-size: 11px;
    color: #666;
    line-height: 1.4;
}
.notif-sino-item-data {
    font-size: 10px;
    color: #aaa;
    margin-top: 4px;
}
.notif-sino-footer {
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}
/* Nível 2 — sub-abas internas dentro de Histórico e Gestão */
.ponto-sub-conteudo {
    display: none;
    animation: fadeSubAba 0.2s ease-in-out;
}
.ponto-sub-conteudo.ativo {
    display: block;
}
/* Navegação de sub-abas internas (estilo mais discreto que o nível 1) */
.ponto-subnav {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 0;
    overflow-x: auto;
}
.ponto-subnav .ponto-subtab-btn {
    background: transparent;
    border: none;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s, border-color 0.2s;
}
.ponto-subnav .ponto-subtab-btn:hover {
    color: var(--cor-primaria);
}
.ponto-subnav .ponto-subtab-btn.ativo {
    color: var(--cor-primaria);
    border-bottom-color: var(--cor-primaria);
}
/* --- Subaba Folha de Pagamento (Isolamento de Conteúdo) --- */
.subaba-folha-conteudo {
    display: none;
    animation: fadeSubAba 0.3s ease-in-out;
}
.subaba-folha-conteudo.ativo {
    display: block;
}
/* --- Subaba Relatórios RH (Isolamento de Conteúdo) --- */
.subaba-rh-relatorios-conteudo {
    display: none;
    animation: fadeSubAba 0.3s ease-in-out;
}
.subaba-rh-relatorios-conteudo.ativo {
    display: block;
}

/* --- Sub-abas do Portal do Colaborador --- */
.subaba-portal-conteudo {
    display: none;
    animation: fadeSubAba 0.3s ease-in-out;
}
.subaba-portal-conteudo.ativo {
    display: block;
}

/* --- Sub-abas internas do Banco de Horas --- */
.bh-subtab-conteudo {
    display: none;
    animation: fadeSubAba 0.3s ease-in-out;
}
.bh-subtab-conteudo.ativo {
    display: block;
}
.bh-tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
    overflow-x: auto;
}
.bh-tab-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 18px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}
.bh-tab-btn:hover {
    color: #333;
    background: #fafafa;
}
.bh-tab-btn.ativo {
    color: var(--cor-primaria);
    border-bottom: 3px solid var(--cor-primaria);
    font-weight: 600;
}
.bh-tab-btn .material-symbols-outlined {
    font-size: 18px;
}
.bh-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 15px;
    padding: 10px 0;
}
.bh-pagination button {
    min-width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bh-pagination button:hover {
    background: #f5f5f5;
    border-color: #bbb;
}
.bh-pagination button.ativo {
    background: var(--cor-primaria);
    color: #fff;
    border-color: var(--cor-primaria);
}
.bh-pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.bh-pagination .bh-page-info {
    font-size: 12px;
    color: #888;
    margin: 0 8px;
}

/* --- Layout Responsivo Dashboard Ponto --- */
@media (max-width: 1100px) {
    #ponto-dash > div[style*="flex"] {
        flex-direction: column !important;
    }
    #ponto-dash .kpi-ponto-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
    }
}
/* --- Botões de Exportação Secundários --- */
.btn-export-sec {
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    height: 32px;
}
.btn-export-sec:hover {
    background: #f8f9fa;
    border-color: #999;
}
.btn-export-sec span {
    font-size: 16px;
}

.card-ponto-kpi {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-ponto-kpi:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

/* --- Escalas Module --- */
.esc-view-content {
    display: none;
    animation: fadeSubAba 0.3s ease-in-out;
}
.esc-view-content.ativo {
    display: block;
}
.esc-view-btn {
    background: transparent;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.esc-view-btn:hover {
    background: #e0e0e0;
    color: #333;
}
.esc-view-btn.ativo {
    background: #fff;
    color: var(--cor-primaria);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    font-weight: 600;
}
.escalas-cell {
    transition: background 0.15s ease;
}
.escalas-cell:hover {
    background: #f5f8ff !important;
}
.escalas-event {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.escalas-event:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    z-index: 1;
    position: relative;
}

/* ── Pesquisa Universal ─────────────────────────────────────────── */
.header-search {
    flex: 1;
    max-width: 360px;
    margin: 0 24px;
    position: relative;
    align-self: center;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 8px;
    font-size: 16px;
    color: #999;
    pointer-events: none;
    z-index: 1;
    opacity: 0.7;
}

.search-input {
    width: 100%;
    padding: 6px 12px 6px 34px;
    border: 1px solid var(--side-border);
    border-radius: 10px;
    font-size: 0.85rem;
    font-family: inherit;
    background: rgba(255,255,255,.08);
    color: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.2s ease;
    outline: none;
    box-sizing: border-box;
    height: 36px;
}
.search-input::placeholder { color: rgba(255,255,255,.5); }

.search-input:focus {
    border-color: rgba(255,255,255,.35);
    background: rgba(255,255,255,.12);
    box-shadow: 0 0 0 3px rgba(255,255,255,.08);
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    z-index: 9999;
    max-height: 340px;
    overflow-y: auto;
    display: none;
}

.search-suggestions.aberto {
    display: block;
}

.search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.12s;
}

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

.search-suggestion-item:hover,
.search-suggestion-item.focado {
    background: #fdf3f3;
}

.search-suggestion-icon {
    font-size: 16px;
    color: var(--cor-primaria);
    flex-shrink: 0;
}

.search-suggestion-text {
    flex: 1;
    font-size: 0.85rem;
    color: var(--texto-principal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-suggestion-text mark {
    background: #ffd54f;
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
    font-weight: 700;
}

.search-suggestion-categoria {
    font-size: 0.68rem;
    color: var(--texto-claro);
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
    white-space: nowrap;
}

.search-empty {
    padding: 18px 14px;
    font-size: 0.85rem;
    color: var(--texto-claro);
    text-align: center;
}

@media (max-width: 850px) {
    .header-search {
        max-width: 100%;
        margin: 6px 0 0;
        order: 3;
        width: 100%;
    }
}

/* ── Banner Modo Desenvolvedor ─────────────────────────────── */
#_dev-imp-banner {
    font-family: 'Outfit', sans-serif;
    user-select: none;
}
/* Quando o banner está presente, o layout principal cede espaço */
body:has(#_dev-imp-banner) #tela-sistema {
    padding-top: 42px;
}
body:has(#_dev-imp-banner) #tela-login {
    padding-top: 42px;
}

/* =========================================================================
   MÓDULO CLIENTES
   ========================================================================= */

/* ── Formulário de cadastro ───────────────────────────────────────────────── */
.cli-section {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 10px;
}
.cli-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 10px;
    padding-bottom: 7px;
    border-bottom: 1px solid #f0f0f0;
}
.cli-section-title .material-symbols-outlined {
    font-size: 16px;
    color: var(--cor-primaria);
}
.cli-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.cli-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 7px;
    font-size: 0.85rem;
    font-family: inherit;
    background: #fff;
    color: #222;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.cli-input:focus {
    outline: none;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 2px rgba(128,23,21,0.08);
}
.cli-input::placeholder { color: #bbb; }
.cli-campo { display: flex; flex-direction: column; }

/* Coluna WhatsApp na lista de clientes: número + ícone clicável */
.cli-whats-link { display: inline-flex; align-items: center; gap: 6px; color: var(--texto-principal); text-decoration: none; }
.cli-whats-link i { color: #25d366; font-size: 1.1em; }
.cli-whats-link:hover { color: #128c4b; }
.cli-whats-link:hover i { color: #128c4b; }
.cli-erro {
    display: none;
    font-size: 0.72rem;
    color: #c0392b;
    margin-top: 2px;
    font-weight: 500;
}

/* ── Grids responsivos ────────────────────────────────────────────────────── */
.cli-grid { display: grid; gap: 8px; margin-bottom: 8px; }
.cli-grid:last-child { margin-bottom: 0; }
.cli-grid-1 { grid-template-columns: 1fr; }
.cli-grid-2 { grid-template-columns: repeat(2, 1fr); }
.cli-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ── Tabela de listagem ───────────────────────────────────────────────────── */
.cli-nome-cel    { font-weight: 600; font-size: 0.9rem; color: #222; }
.cli-fantasia-cel { font-size: 0.78rem; color: #888; margin-top: 1px; }
.cli-cpf-cel     { font-size: 0.82rem; color: #555; font-family: monospace; }

/* ── Badges ───────────────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.badge-pj     { background: #e3f0ff; color: #1a5dc5; }
.badge-pf     { background: #f3e8ff; color: #7c3aed; }
.badge-ativo  { background: #e6f4ea; color: #1e7e34; }
.badge-inativo { background: #ffeaea; color: #c0392b; }

/* ── Selects de filtro na barra de ações ──────────────────────────────────── */
.cli-filtro-select {
    height: 34px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s;
}
.cli-filtro-select:focus {
    outline: none;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 2px rgba(128,23,21,0.08);
}

/* ── Botões de ação na tabela (ícone) ─────────────────────────────────────── */
/* Reutiliza o mesmo padrão visual das ações inline do módulo RH              */
.acoes-col { text-align: right; white-space: nowrap; }
.btn-acao {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.2s, transform 0.2s;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--texto-secundario); /* cor base visível p/ .btn-acao sem variante */
}
.btn-acao:hover { background: #f0f0f0; transform: translateY(-1px); }
/* O ícone sempre herda a cor do botão (variante) — nunca branco/transparente. */
.btn-acao .material-symbols-outlined { font-size: 18px; color: inherit; opacity: 1; }
.btn-ver     { color: #1976d2; }
.btn-editar  { color: var(--cor-primaria); }
.btn-excluir { color: var(--cor-cancelar); }
.btn-pdf     { color: var(--cor-primaria); }
.btn-inspecao { color: #00897b; }

/* ── Barra de filtros + estado vazio (compartilhada entre telas) ──────────────
   Usada por .relman-filtros (Relatórios de Manutenção/INMETRO) e telas afins.
   Mantida global para que qualquer view carregada isoladamente herde o layout. */
.relman-filtros {
    background: #f8f9fa; border: 1px solid #eee; border-radius: 12px; padding: 14px;
    margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
}
.relman-filtros .campo-form label {
    font-size: var(--fs-sm); font-weight: bold; color: #777; display: block; margin-bottom: 3px;
}
.relman-filtros .campo-form input,
.relman-filtros .campo-form select {
    width: 100%; height: var(--field-h); padding: var(--field-pad);
    font-size: var(--fs-control); border: 1px solid #ccc; border-radius: 6px;
}
.relman-filtros .btn-registrar,
.relman-filtros .btn-cancelar,
.relman-filtros .btn-acao { height: var(--field-h); }
.relman-result {
    text-align: center; color: #999; font-size: var(--fs-base);
    padding: 48px 20px; border: 1px dashed #d8d8d8; border-radius: 12px; background: #fafafa;
}

/* ── Botão restaurar (lixeira) ────────────────────────────────────────────── */
/* Herda aparência do .btn-cancelar mas em verde para indicar restauração      */
.btn-cli-restaurar {
    background-color: transparent;
    color: #2e7d32;
    border: 1.5px solid #2e7d32;
    padding: 0 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.3s ease;
}
.btn-cli-restaurar:hover {
    background-color: #2e7d32;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(46,125,50,0.2);
}

/* ── Responsivo ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .cli-grid-2 { grid-template-columns: 1fr; }
    .cli-grid-3 { grid-template-columns: 1fr; }
    .cli-grid-3 .cli-campo[style*="grid-column: span 2"] { grid-column: span 1; }
    .cli-filtro-select { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MÓDULO ORÇAMENTO
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Status badges orçamento ──────────────────────────────────────────────── */
.orc-badge-rascunho  { background: #f0f0f0;   color: #666;    }
.orc-badge-enviado   { background: #e3f0ff;   color: #1a5dc5; }
.orc-badge-aprovado  { background: #e6f4ea;   color: #1e7e34; }
.orc-badge-reprovado { background: #ffeaea;   color: #c0392b; }
.orc-badge-cancelado { background: #fff3cd;   color: #856404; }

/* ── Mensagens de erro nos formulários ────────────────────────────────────── */
.orc-erro {
    display: block;
    font-size: 0.78rem;
    color: #c0392b;
    margin-top: 3px;
    min-height: 1em;
}
