/*
 * CecBi | Design Executivo 2026 — prévia visual
 * Camada de APRESENTAÇÃO: não alterar estruturas, endpoints, estado dos filtros,
 * fórmulas, permissões, impressão, tabelas de dados, nem o JavaScript da aplicação.
 * Referências visuais: Dashboard CDE (login) e PontoComBI (dashboard executivo).
 */

/* ================== DESIGN SYSTEM ================== */
html[data-theme="light"] body:not(.login-page),
html:not([data-theme="dim"]) body:not(.login-page) {
  --bg: #f3f5f9;
  --panel: #fff;
  --panel-2: #fbfcfe;
  --line: #e0e6ee;
  --line-2: #d9e2ed;
  --text: #182b49;
  --text-body: #344662;
  --muted: #7788a2;
  --blue-dark: #1c345c;
  --blue: #315b9e;
  --blue-soft: #eef3fb;
  --red: #d43d50;
  --red-soft: #fceff1;
  --green: #16895f;
  --green-soft: #eaf8f2;
  --shadow: 0 14px 36px rgba(20,37,65,.055);
  --shadow-soft: 0 7px 24px rgba(20,37,65,.042);
  --cb-filter-bg:#fff;
  --cb-filter-border:#dbe3ef;
  --cb-filter-text:#233d60;
  --cb-filter-focus:#365f9c;
  --cb-filter-hover:#f2f5fa;
  --cb-filter-muted:#7e8fa7;
  background:#f3f5f9;
  color:#30425f;
}
body:not(.login-page){font-family:Inter,system-ui,-apple-system,'Segoe UI',sans-serif;font-size:13px;font-weight:450;line-height:1.48;-webkit-font-smoothing:antialiased;}
body:not(.login-page) :is(h1,h2,h3){letter-spacing:-.027em;}
body:not(.login-page) :is(a,button,input,select,textarea,summary){-webkit-tap-highlight-color:transparent;}
body:not(.login-page) :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid #5179bd;outline-offset:2px;}
body:not(.login-page) :is(.periodo-container,.dashboard-panel,.reports-hero,.relatorio-comissao-panel,.overview-heading,.info-panel,.ultimas-vendas-container,.chart-container,.product-analysis-panel,.product-analysis-card,.dashboard-personalizacao-card,.report-card){border-radius:17px;box-shadow:0 7px 27px rgba(20,37,65,.043);border-color:var(--line);}

/* ================== MENU LATERAL ================== */
/* Largura máxima de 1900px, conforme PontoComBI; sidebar e identidade visual preservadas. */
@media(min-width:1201px){
 body:not(.login-page) .app-shell{grid-template-columns:252px minmax(0,1fr);}
 body:not(.login-page) .sidebar{position:sticky;top:0;height:100vh;overflow-y:auto;padding:29px 16px 21px;}
 body:not(.login-page) .app-main{
  width:100%;max-width:1900px;min-width:0;box-sizing:border-box;
  justify-self:center;padding:25px clamp(19px,2.35vw,42px) 38px;
 }
}
body:not(.login-page) .sidebar{
 background:#172540;border-right:1px solid #1b2c4b;color:#d2dded;
 scrollbar-color:#516078 #172540;box-shadow:none;
}
body:not(.login-page) .sidebar-brand{
 background:transparent!important;border:0!important;box-shadow:none!important;
 padding:5px 10px 29px!important;margin:0 0 24px;
 justify-content:flex-start;min-height:76px;
}
/* Logo oficial colorida, sobre um quadro branco como o do login. */
body:not(.login-page) .sidebar-logo-image{
 display:block;width:208px;max-width:100%;height:auto;max-height:none;
 box-sizing:border-box;object-fit:contain;
 padding:14px 17px;background:#fff;border:1px solid rgba(228,234,243,.98);
 border-radius:13px;box-shadow:0 9px 22px rgba(5,13,28,.14);
 filter:none!important;opacity:1!important;
}
body:not(.login-page) .sidebar-menu{gap:7px;}
body:not(.login-page) .cecbi-nav::before{
 content:'ÁREA DE TRABALHO';display:block;padding:0 13px 11px;
 font-size:10px;font-weight:800;letter-spacing:.135em;color:#8ba4c9;
}
body:not(.login-page) .cecbi-nav-top-trigger{
 color:#c4d1e6;background:transparent;font-size:12.7px;font-weight:650;
 min-height:45px;border-radius:11px;padding:10px 12px;transition:background .18s,color .18s;
}
body:not(.login-page) .cecbi-nav-top-trigger .app-menu-icon,
body:not(.login-page) .cecbi-nav-top-trigger .app-menu-icon svg{color:#9fb8dc;}
body:not(.login-page) .cecbi-nav-top-trigger:is(:hover,.ativo){
 background:#2b3c5d!important;color:#fff!important;box-shadow:none!important;
}
body:not(.login-page) .cecbi-nav-top-trigger.ativo{box-shadow:inset 3px 0 #e14e5c!important;}
body:not(.login-page) .cecbi-nav-branch{margin:6px 0 10px 17px;padding-left:9px;border-left:1px solid #3a4c6b;gap:4px;}
body:not(.login-page) .cecbi-nav-group{background:transparent;border:0;}
body:not(.login-page) .cecbi-nav-group-trigger{color:#b2c5e0;font-size:11.6px;font-weight:650;min-height:34px;border-radius:8px;padding:8px 9px;}
body:not(.login-page) .cecbi-nav-group-trigger:is(:hover,.ativo){color:#fff;background:#293a58;}
body:not(.login-page) .cecbi-nav-link{color:#b6c6dc;padding:9px 11px;font-size:11.9px;font-weight:550;line-height:1.3;border-radius:8px;}
body:not(.login-page) .cecbi-nav-link:hover{background:#273954;color:#fff;}
body:not(.login-page) .cecbi-nav-link.ativo{background:#344968;color:#fff;box-shadow:inset 3px 0 #e24b5b;font-weight:720;}
body:not(.login-page) .sidebar-footer{border-top:1px solid #374963;padding:17px 10px 0;margin-top:auto;}
body:not(.login-page) .sidebar-version{background:transparent;color:#92a9c8;padding:0;font-size:10px;font-weight:500;letter-spacing:.015em;}

/* ================== TÍTULO E AÇÕES ================== */
body:not(.login-page) .page-hero{align-items:center;padding:2px 0 12px;min-height:61px;}
body:not(.login-page) .page-hero h1{font-size:clamp(24px,2.05vw,32px);font-weight:800;letter-spacing:-.046em;line-height:1.16;color:#172b4b;}
body:not(.login-page) .page-hero p{font-size:12.7px;font-weight:450;line-height:1.5;color:#7e8da3;margin-top:4px;}
body:not(.login-page) .topbar{background:transparent;border:0;margin:0 0 18px;padding:0;min-height:45px;justify-content:flex-end;}
body:not(.login-page) .topbar-secondary-row{min-height:40px;}
body:not(.login-page) .topbar-user{gap:8px;flex-wrap:wrap;justify-content:flex-end;}
body:not(.login-page) :is(.topbar-personalizar,.topbar-saldos,.topbar-theme-toggle,.topbar-resumo-pdf,.header-logout){
 border:1px solid #dce3ed;background:#fff;color:#2b4165;border-radius:10px;
 box-shadow:none;font-size:11px;font-weight:700;transition:background .16s,border-color .16s,color .16s;
}
body:not(.login-page) :is(.topbar-personalizar,.topbar-saldos,.topbar-theme-toggle,.topbar-resumo-pdf):hover{background:#f0f4fa;border-color:#c7d5e6;color:#1e3f6d;}
body:not(.login-page) .header-user{border:0;background:transparent;box-shadow:none;padding:2px 0 2px 10px;}
body:not(.login-page) .header-user-avatar{background:#e7eff9;color:#1d447f;width:32px;height:32px;font-size:12px;}
body:not(.login-page) .header-user-text span{color:#233854;font-size:11.7px;font-weight:750;}
body:not(.login-page) .header-user-text small{font-size:10px;color:#8b99af;}

/* ================== FILTROS ================== */
body:not(.login-page) .periodo-container{padding:17px 19px 13px;background:#fff;margin-bottom:19px;border:1px solid #e1e7ee;border-radius:18px;}
body:not(.login-page) .filtro-periodo{gap:12px 12px;align-items:end;}
/* Cada campo tem uma legenda compacta de orientação, sem aumentar o formulário. */
body:not(.login-page) .campo-filtro label,
body:not(.login-page) .relatorio-comissao-filtros label,
body:not(.login-page) .product-analysis-filters label{font-size:11px!important;font-weight:730!important;color:#647894!important;letter-spacing:0;}
body:not(.login-page) .campo-filtro :is(input,select),
body:not(.login-page) .relatorio-comissao-filtros :is(input,select),
body:not(.login-page) .product-analysis-filters :is(input,select),
body:not(.login-page) .cecbi-top-limit select{
 height:40px;min-height:40px;border:1px solid #dce4ee;border-radius:10px;background:#f9fbfe;
 color:#223958;font-size:12px;font-weight:630;padding:0 11px;box-shadow:none;}
body:not(.login-page) .campo-filtro :is(input,select):focus{background:#fff;border-color:#6d91c5;box-shadow:0 0 0 3px rgba(54,95,156,.10);}
body:not(.login-page) #view-dashboard .dashboard-criterio-campo{min-width:0;}
body:not(.login-page) #view-dashboard .dashboard-criterio-campo select{min-width:0;width:100%;background:#eef2f7;border-color:#e2e8f0;color:#213c62;font-weight:800;}
/* Duas opções de visão visualmente destacadas e independentes; os SELECT originais continuam intactos. */
body:not(.login-page) #view-dashboard .dashboard-criterio-campo select:hover{background:#e5edf7;}
body:not(.login-page) :is(.botao-filtrar,.relatorio-comissao-acoes button,.latest-sales-search button){
 background:#203b66!important;color:#fff!important;border:1px solid #203b66!important;
 box-shadow:none!important;border-radius:10px!important;font-weight:760!important;}
body:not(.login-page) :is(.botao-filtrar,.relatorio-comissao-acoes button,.latest-sales-search button):hover{background:#2e568b!important;}
body:not(.login-page) :is(.botao-limpar,.botao-mais-filtros,.botao-exportar,.relatorio-comissao-acoes a){
 color:#2d466b;background:#fff;border:1px solid #dce4ee;box-shadow:none;border-radius:10px;font-size:11.5px;font-weight:700;}
body:not(.login-page) :is(.botao-limpar,.botao-mais-filtros,.botao-exportar,.relatorio-comissao-acoes a):hover{background:#f2f5fa;border-color:#bdcee4;}
body:not(.login-page) .filtro-acoes{gap:7px;}
body:not(.login-page) .periodo-label{display:inline-flex;max-width:100%;white-space:normal;line-height:1.45;padding:7px 11px;margin-top:12px;border-radius:20px;background:#f8fafd;border:1px solid #e7ecf3;color:#6f819c;font-size:10.7px;font-weight:550;}

/* ================== CONTEÚDO EXECUTIVO ================== */
body:not(.login-page) .dashboard-widget-section{margin-top:15px;margin-bottom:21px;}
body:not(.login-page) .dashboard-widget-head{border:0;padding:0 0 10px;margin-bottom:6px;gap:12px;}
body:not(.login-page) .dashboard-widget-head h2{font-size:15px;color:#142b49;font-weight:800;letter-spacing:-.032em;}
body:not(.login-page) .dashboard-widget-head p{font-size:11.5px;color:#8a99ad;line-height:1.5;margin-top:3px;}
body:not(.login-page) .ranking-carousel-button{border:1px solid #dce5ef;border-radius:9px;background:#fff;box-shadow:none;color:#425d82;}
body:not(.login-page) .ranking-carousel-button:hover:not(:disabled){background:#edf2f8;}
body:not(.login-page) .metric-card{
 min-height:119px;padding:17px 16px 15px!important;background:#fff;border:1px solid #e1e7ee;
 border-radius:17px!important;box-shadow:0 7px 22px rgba(18,40,72,.039)!important;gap:10px;}
body:not(.login-page) .metric-card::after{display:none;}
body:not(.login-page) .metric-card-icon{width:36px;height:36px;border-radius:10px;box-shadow:none!important;background:#e9f0fa!important;color:#3766a7!important;}
body:not(.login-page) .metric-card-green .metric-card-icon{background:#e9f7f2!important;color:#198661!important;}
body:not(.login-page) :is(.metric-card-red,.metric-card-red-alt) .metric-card-icon{background:#fff0f1!important;color:#ce4050!important;}
body:not(.login-page) .metric-card-icon svg{width:17px;height:17px;}
body:not(.login-page) .metric-card-content span{font-size:11px!important;line-height:1.45;color:#607693!important;font-weight:700!important;}
body:not(.login-page) .metric-card-content strong{font-size:clamp(17px,1.45vw,23px)!important;line-height:1.18;color:#172c4b!important;font-weight:850!important;margin-top:10px;letter-spacing:-.045em;}
body:not(.login-page) .metric-card-content small{font-size:10px!important;line-height:1.42;color:#8797ac!important;margin-top:8px;}
body:not(.login-page) .metric-card-trend{opacity:.55;}
body:not(.login-page) .dashboard-panel{padding:18px;border-radius:18px;background:#fff;}
body:not(.login-page) .dashboard-panel-header{margin-bottom:13px;}
body:not(.login-page) .dashboard-panel-header h2{font-size:14px;color:#192f4f;font-weight:800;}
body:not(.login-page) .dashboard-panel-header p{font-size:11px;color:#8696ab;line-height:1.5;}
body:not(.login-page) .panel-chip{background:#f4f7fb;border-color:#e4eaf2;color:#425a7d;border-radius:9px;font-size:10.5px;}
body:not(.login-page) :is(.dashboard-table th,.product-analysis-table th,.relatorio-comissao-tabela th){background:#f7f9fc;color:#647c9b;font-size:10.5px;font-weight:800;letter-spacing:.018em;}
body:not(.login-page) :is(.dashboard-table td,.product-analysis-table td,.relatorio-comissao-tabela td){border-color:#e9eef5;color:#2a3d57;}
body:not(.login-page) :is(.dashboard-table tbody tr,.product-analysis-table tbody tr):hover{background:#f9fbfe;}
body:not(.login-page) .reports-hero{background:#fff;}
body:not(.login-page) .reports-hero .chart-title{color:#172b49;}
body:not(.login-page) .report-card{background:#fff;padding:14px 15px;}
body:not(.login-page) .report-card h3{font-size:13px;color:#1d3454;}
body:not(.login-page) .report-card p{font-size:11px;color:#8291a7;}
body:not(.login-page) .product-analysis-panel{background:#fff;}
body:not(.login-page) .product-analysis-kpis article{border-radius:12px;box-shadow:none;}
body:not(.login-page) .dashboard-personalizacao-card{box-shadow:0 30px 85px rgba(16,31,54,.24);}
body:not(.login-page) .cecbi-admin-menu-list{border:1px solid #e0e7f0;box-shadow:0 15px 40px rgba(18,40,72,.12);}

/* ================== LOGIN – DIVISÃO SOBRIA ================== */
body.login-page{
 background:radial-gradient(circle at 13% 20%,#e4e9f1 0%,transparent 42%),#f3f6fa;
 color:#1f3454;min-height:100dvh;padding:26px;font-family:Inter,system-ui,-apple-system,'Segoe UI',sans-serif;
}
body.login-page .login-shell{max-width:910px;width:100%;}
body.login-page .login-card-premium{
 display:grid;grid-template-columns: 48% 52%;gap:0;padding:0;
 background:#fff;border:1px solid #dce2eb;border-radius:20px;
 box-shadow:0 26px 62px rgba(27,45,72,.12);overflow:hidden;
}
body.login-page .login-brand-premium,
body.login-page .login-form-premium{min-height:520px;border-radius:0;}
body.login-page .login-brand-premium{
 background:linear-gradient(145deg,#203a63,#172b4d 78%);
 border:0;box-shadow:none;padding:56px 42px 46px;display:flex;align-items:flex-start;
 justify-content:center;gap:23px;}
body.login-page .login-brand-premium::after,
body.login-page .login-brand-decoration,
body.login-page .login-brand-bars{display:none!important;}
body.login-page .login-logo-glass{
 width:100%;max-width:277px;min-height:138px;padding:22px;background:#fff;
 border:0;border-radius:14px;box-shadow:none;backdrop-filter:none;}
body.login-page .login-logo-original{width:100%;max-height:105px;object-fit:contain;}
body.login-page .login-brand-copy{max-width:330px;width:100%;}
body.login-page .login-brand-kicker{font-size:12px;letter-spacing:.1em;text-transform:uppercase;font-weight:750;color:#a6c3eb;margin:0 0 19px;}
body.login-page .login-brand-copy p{color:#d9e3f1;font-weight:470;font-size:15px;line-height:1.7;margin:0;max-width:310px;}
body.login-page .login-version-badge{margin-top:58px;padding:0;background:transparent;border:0;border-radius:0;box-shadow:none;color:#a9bfdd;font-size:11px;font-weight:500;}
body.login-page .login-form-premium{padding:48px 43px;justify-content:center;gap:19px;background:#fff;}
body.login-page .login-form-heading{margin-bottom:3px;}
body.login-page .login-form-premium h1{color:#1b3358;font-size:29px;line-height:1.2;font-weight:800;letter-spacing:-.043em;}
body.login-page .login-form-premium .login-subtitle{color:#7d8ca4;font-size:13px;line-height:1.7;font-weight:450;margin:8px 0 0;}
body.login-page .login-field label{color:#425a7a;font-size:11.5px;font-weight:800;}
body.login-page .login-field{gap:7px;}
body.login-page .login-field-icon input{
 height:46px;min-height:46px;padding:0 46px 0 13px;border-radius:9px;
 border:1px solid #d8e2ee;background:#fff;color:#203b60;font-size:13px;font-weight:550;box-shadow:none;}
body.login-page .login-field-icon input:focus{outline:none;border-color:#6b8fbd;box-shadow:0 0 0 3px rgba(57,101,160,.11);}
body.login-page .login-input-icon{display:none;}
body.login-page .login-password-toggle{right:7px;width:32px;height:32px;color:#7b90ad;}
body.login-page .login-button-premium{
 margin-top:4px;min-height:46px;height:46px;border-radius:9px;
 background:#213d6a!important;border:1px solid #213d6a!important;color:#fff!important;
 box-shadow:none;font-size:13px;font-weight:800;}
body.login-page .login-button-premium:hover{background:#2c5488!important;}
body.login-page .login-alert{border-radius:10px;font-size:12px;}

/* ================== MODO ESCURO ================== */
html[data-theme="dim"] body:not(.login-page){background:#151e2c;color:#d1dceb;--bg:#151e2c;--panel:#243145;--panel-2:#28374b;--line:#39495f;--line-2:#4b6179;--text:#eff4fc;--text-body:#d1dceb;--blue-dark:#dceaff;--muted:#a5b5cb;--blue-soft:#2b405d;--cb-filter-bg:#26364b;--cb-filter-border:#465a75;--cb-filter-text:#e6eff9;--cb-filter-focus:#8bb7ef;}
html[data-theme="dim"] body:not(.login-page) .sidebar{background:#101a2a;border-color:#23344d;}
html[data-theme="dim"] body:not(.login-page) .sidebar-brand{background:transparent!important;}
html[data-theme="dim"] body:not(.login-page) :is(.page-hero h1,.dashboard-widget-head h2,.dashboard-panel-header h2,.metric-card-content strong,.header-user-text span){color:#e8f0fc!important;}
html[data-theme="dim"] body:not(.login-page) :is(.page-hero p,.dashboard-widget-head p,.dashboard-panel-header p,.metric-card-content span,.metric-card-content small){color:#aebed3!important;}
html[data-theme="dim"] body:not(.login-page) :is(.periodo-container,.dashboard-panel,.metric-card,.reports-hero,.report-card,.relatorio-comissao-panel,.product-analysis-panel,.product-analysis-card){background:#243145!important;border-color:#3d4d64!important;}
html[data-theme="dim"] body:not(.login-page) :is(.campo-filtro input,.campo-filtro select,.relatorio-comissao-filtros input,.relatorio-comissao-filtros select,.product-analysis-filters input,.product-analysis-filters select){background:#27384d;color:#eef3fc;border-color:#495d77;}
html[data-theme="dim"] body:not(.login-page) #view-dashboard .dashboard-criterio-campo select{background:#30425b;color:#f2f6ff;border-color:#536681;}
html[data-theme="dim"] body:not(.login-page) :is(.topbar-personalizar,.topbar-saldos,.topbar-theme-toggle,.header-logout,.ranking-carousel-button,.botao-limpar,.botao-mais-filtros){background:#27374c;color:#e5eef9;border-color:#4b5c73;}
html[data-theme="dim"] body:not(.login-page) .header-user-avatar{background:#334b68;color:#ecf3fc;}
html[data-theme="dim"] body:not(.login-page) .periodo-label{background:#28384e;color:#bccde3;border-color:#455a73;}
html[data-theme="dim"] body:not(.login-page) :is(.dashboard-table th,.product-analysis-table th,.relatorio-comissao-tabela th){background:#2e4056;color:#c0cfe3;}
html[data-theme="dim"] body:not(.login-page) :is(.dashboard-table td,.product-analysis-table td,.relatorio-comissao-tabela td){color:#e0e9f6;border-color:#3f526c;}

/* ================== RESPONSIVIDADE, PRINT ================== */
@media(max-width:1200px){
 body:not(.login-page) .sidebar{padding:14px 18px;min-height:0;height:auto;}
 body:not(.login-page) .sidebar-brand{margin:0;padding:4px 0 10px!important;min-height:0;}
 body:not(.login-page) .sidebar-logo-image{width:175px;padding:10px 13px;}
 body:not(.login-page) .cecbi-nav::before{display:none;}
 body:not(.login-page) .app-main{padding:18px;}
}
@media(max-width:920px){
 body:not(.login-page) .topbar{justify-content:flex-start;}
 body:not(.login-page) .topbar-user{justify-content:flex-start;}
 body.login-page .login-card-premium{grid-template-columns:1fr;}
 body.login-page .login-brand-premium,body.login-page .login-form-premium{min-height:0;}
 body.login-page .login-brand-premium{padding:28px;gap:12px;}
 body.login-page .login-logo-glass{max-width:210px;min-height:92px;padding:15px;}
 body.login-page .login-logo-original{max-height:75px;}
 body.login-page .login-version-badge{margin-top:11px;}
 body.login-page .login-form-premium{padding:28px;}
}
@media(max-width:650px){
 body:not(.login-page) .app-main{padding:14px;}
 body:not(.login-page) .page-hero h1{font-size:24px;}
 body:not(.login-page) .periodo-container{padding:13px;}
 body:not(.login-page) .metric-card{min-height:101px;}
 body.login-page{padding:12px;}
 body.login-page .login-card-premium{border-radius:17px;}
 body.login-page .login-brand-premium{padding:24px;}
 body.login-page .login-form-premium{padding:26px 24px 32px;}
}
@media print{
 body:not(.login-page) .sidebar{background:transparent!important;color:#000!important;}
 body:not(.login-page) .metric-card,body:not(.login-page) .dashboard-panel,body:not(.login-page) .periodo-container{box-shadow:none!important;}
}
/* Remove o scale(.8) herdado de um redesign antigo: tamanho real de 910 × 520. */
body.login-page .login-card-premium{transform:none!important;transform-origin:center!important;zoom:1!important;}
