:root {
    --bg: #f3f7fc;
    --panel: #ffffff;
    --panel-2: #fbfdff;
    --line: #e4ebf5;
    --line-2: #d7e2f1;
    --text: #14336b;
    --text-body: #324e7f;
    --muted: #7b93b9;
    --blue-dark: #0C306A;
    --blue: #1f7df2;
    --blue-soft: #e8f2ff;
    --red: #EC1826;
    --red-soft: #fff0f2;
    --green: #20b469;
    --green-soft: #eafaf3;
    --gold: #f2aa1f;
    --gold-soft: #fff8e9;
    --shadow: 0 10px 32px rgba(27, 71, 134, .08);
    --shadow-soft: 0 6px 20px rgba(27, 71, 134, .05);
    --radius-xl: 22px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 12px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
    margin:0;
    font-family:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
    background:linear-gradient(180deg,#f7fbff 0%,#f2f7fc 100%);
    color:var(--text-body);
}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
svg{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

.app-shell{display:grid;grid-template-columns:230px minmax(0,1fr);min-height:100vh}
.sidebar{
    background:#fff;
    border-right:1px solid var(--line);
    padding:18px 16px 24px;
    display:flex;
    flex-direction:column;
    position:sticky;
    top:0;
    height:100vh;
}
.sidebar-brand{padding:8px 8px 20px;display:flex;align-items:center;justify-content:center}
.sidebar-logo-image{max-width:170px;width:100%;display:block}
.sidebar-menu{display:flex;flex-direction:column;gap:10px}
.app-menu-item{
    display:flex;align-items:center;gap:14px;
    min-height:54px;
    padding:0 18px;
    border-radius:18px;
    border:1px solid transparent;
    background:transparent;
    color:#46608e;
    font-size:16px;
    font-weight:700;
    transition:background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.app-menu-item:hover,.app-menu-item-link:hover{background:#f4f8ff;color:var(--blue-dark)}
.app-menu-item.ativo{
    background:linear-gradient(135deg,#0f66e8 0%,#1f7df2 100%);
    color:#fff;
    box-shadow:0 12px 26px rgba(31,125,242,.25);
}
.app-menu-item-link{text-decoration:none}
.app-menu-item-long{white-space:nowrap;font-size:.70rem;letter-spacing:-.015em;gap:8px;padding-left:10px;padding-right:10px;box-sizing:border-box;width:calc(100% + 10px);margin-right:-10px}
.app-menu-icon{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 24px}
.app-menu-icon svg{width:22px;height:22px}
.sidebar-footer{margin-top:auto;padding-top:18px;border-top:1px solid var(--line)}
.sidebar-version{display:inline-flex;padding:9px 12px;border-radius:999px;background:var(--blue-soft);color:var(--blue-dark);font-size:12px;font-weight:800;letter-spacing:.04em}

.app-main{padding:16px 28px 30px;max-width:none}
.topbar{
    display:flex;align-items:center;justify-content:space-between;gap:20px;
    margin-bottom:14px;
    padding-bottom:12px;
    border-bottom:1px solid var(--line);
}
.topbar-search{
    display:flex;align-items:center;gap:12px;
    width:min(100%,560px);height:56px;padding:0 18px;
    border-radius:16px;background:#fff;border:1px solid var(--line);
    box-shadow:var(--shadow-soft)
}
.topbar-search svg{width:20px;height:20px;color:#7590ba}
.topbar-search input{width:100%;border:0;outline:0;background:transparent;color:var(--text-body);font-size:15px}
.topbar-search input::placeholder{color:#8ea4c4}
.topbar-user{display:flex;align-items:center;gap:14px}
.topbar-version{padding:10px 12px;border-radius:999px;background:#fff;border:1px solid var(--line);font-size:12px;font-weight:800;color:var(--blue-dark)}
.topbar-notification{
    position:relative;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;
    border:1px solid var(--line);background:#fff;color:var(--blue-dark);box-shadow:var(--shadow-soft)
}
.topbar-notification svg{width:20px;height:20px}
.topbar-notification span{
    position:absolute;top:-2px;right:-1px;min-width:18px;height:18px;padding:0 4px;border-radius:999px;
    display:grid;place-items:center;background:var(--red);color:#fff;font-size:11px;font-weight:800
}
.header-user{
    display:flex;align-items:center;gap:12px;padding:8px 10px;border-radius:18px;border:1px solid var(--line);background:#fff;box-shadow:var(--shadow-soft)
}
.header-user-avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#0C306A,#1f7df2);color:#fff;font-weight:800}
.header-user-text{display:flex;flex-direction:column;line-height:1.2}
.header-user-text span{font-weight:800;font-size:15px;color:var(--blue-dark)}
.header-user-text small{font-size:13px;color:#8098bd}
.header-logout{padding:10px 14px;border-radius:12px;border:1px solid var(--line);background:#f7faff;color:var(--blue-dark);font-size:13px;font-weight:700}

.page-hero{display:flex;align-items:end;justify-content:space-between;padding:12px 0 16px}
.page-hero-compact{padding-top:8px}
.page-hero h1{margin:0;font-size:58px;line-height:.96;letter-spacing:-.04em;color:var(--blue-dark);font-weight:900}
.page-hero p{margin:6px 0 0;font-size:18px;color:#6d86ad;font-weight:500}
.page-hero-meta{display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.page-hero-meta span{padding:8px 12px;border-radius:999px;background:#eef5ff;color:var(--blue-dark);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.page-hero-meta strong{font-size:14px;color:#7e92b3}
.view-section{display:none}.view-section.ativo{display:block}

.erro-box,.texto-info,.busca-pedido-feedback{padding:14px 16px;border-radius:14px;border:1px solid #ffd5da;background:#fff5f6;color:#b42318;font-size:14px}
.texto-info{border-color:var(--line);background:#f9fbff;color:#6680a8}
.busca-pedido-feedback{margin-bottom:12px}

.periodo-container,.dashboard-panel,.reports-hero,.relatorio-comissao-panel,.overview-heading,.info-panel,.ultimas-vendas-container,.chart-container{
    background:#fff;border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow-soft)
}
.periodo-container{padding:18px 18px 14px;margin-bottom:18px}
.filtro-periodo{display:grid;grid-template-columns:1.15fr 1.15fr 1fr 1fr 1fr auto;gap:14px;align-items:end}
.campo-filtro{display:flex;flex-direction:column;gap:8px}
.campo-filtro label,.relatorio-comissao-filtros label{font-size:13px;font-weight:700;color:#5b769f}
.campo-filtro input,.campo-filtro select,.relatorio-comissao-filtros input,.relatorio-comissao-filtros select{
    width:100%;height:48px;padding:0 15px;border-radius:14px;border:1px solid var(--line-2);background:#fff;color:var(--blue-dark);font-size:14px;font-weight:600;outline:none
}
.campo-filtro input:focus,.campo-filtro select:focus,.relatorio-comissao-filtros input:focus,.relatorio-comissao-filtros select:focus{border-color:#7cb4ff;box-shadow:0 0 0 4px rgba(31,125,242,.10)}
.campo-filtro-inline{min-width:0}
.filtro-acoes{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-bottom:1px}
.botao-filtrar,.botao-limpar,.botao-mais-filtros,.botao-exportar,.login-button,.relatorio-comissao-acoes button,.relatorio-comissao-acoes a,.nota-fechar,.latest-sales-search button{
    min-height:46px;padding:0 18px;border-radius:14px;border:1px solid transparent;font-size:14px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;transition:background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease
}
.botao-filtrar,.login-button,.relatorio-comissao-acoes button,.latest-sales-search button{background:linear-gradient(135deg,#0f66e8,#1f7df2);color:#fff;box-shadow:0 12px 24px rgba(31,125,242,.18)}
.botao-limpar,.botao-mais-filtros,.botao-exportar,.relatorio-comissao-acoes a,.nota-fechar{background:#fff;border-color:var(--line-2);color:var(--text-body)}
.botao-mais-filtros.ativo{background:#eef5ff;border-color:#cfe0fb;color:var(--blue-dark)}
.botao-exportar-excel{background:#effcf3;color:#177245}.botao-exportar-pdf{background:#fff4f2;color:#c1402d}
.periodo-label{display:inline-flex;align-items:center;gap:6px;margin-top:14px;padding:10px 14px;border-radius:999px;background:#f6f9fe;border:1px solid var(--line);color:#6981a8;font-size:13px;font-weight:700}
.filtros-avancados{grid-column:1/-1;display:none;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;padding-top:6px}
.filtros-avancados.ativo{display:grid}

.kpi-grid-modern{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px;margin-bottom:18px}
.metric-card{
    position:relative;display:grid;grid-template-columns:56px 1fr auto;gap:16px;align-items:start;
    background:#fff;border:1px solid var(--line);border-radius:22px;padding:18px 18px 16px;box-shadow:var(--shadow-soft);overflow:hidden
}
.metric-card::after{content:'';position:absolute;inset:auto 0 0 0;height:4px;background:linear-gradient(90deg,rgba(31,125,242,.55),rgba(31,125,242,0))}
.metric-card-green::after{background:linear-gradient(90deg,rgba(32,180,105,.6),rgba(32,180,105,0))}
.metric-card-red::after,.metric-card-red-alt::after{background:linear-gradient(90deg,rgba(236,24,38,.55),rgba(236,24,38,0))}
.metric-card-icon{width:50px;height:50px;border-radius:15px;display:grid;place-items:center;color:#fff;box-shadow:0 8px 20px rgba(31,125,242,.2)}
.metric-card-blue .metric-card-icon,.metric-card-blue-alt .metric-card-icon{background:linear-gradient(135deg,#1583ff,#176bff)}
.metric-card-green .metric-card-icon{background:linear-gradient(135deg,#17b86f,#0fa458)}
.metric-card-red .metric-card-icon,.metric-card-red-alt .metric-card-icon{background:linear-gradient(135deg,#ff6571,#ff323f)}
.metric-card-icon svg{width:24px;height:24px}
.metric-card-content span{display:block;font-size:14px;color:#4f6894;font-weight:600;margin-top:3px}
.metric-card-content strong{display:block;margin-top:10px;font-size:22px;line-height:1.18;color:var(--blue-dark);font-weight:900;letter-spacing:-.03em}
.metric-card-content small{display:block;margin-top:10px;font-size:12px;color:#8aa0c0}
.metric-card-trend{align-self:end;width:72px}
.metric-card-trend svg{display:block;width:100%;height:32px;stroke-width:2.2;fill:none}
.metric-card-trend-positive svg{stroke:#5ecb93}.metric-card-trend-negative svg{stroke:#ff6373}.metric-card-trend-neutral svg{stroke:#73aefc}

.dashboard-charts-grid{display:grid;grid-template-columns:1.25fr 1.05fr .85fr;gap:16px;margin-bottom:18px}
.dashboard-panel{padding:18px 18px 16px}
.dashboard-panel-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}
.dashboard-panel-header h2{margin:0;font-size:18px;color:var(--blue-dark);font-weight:800;letter-spacing:-.03em}
.dashboard-panel-header p{margin:4px 0 0;font-size:13px;color:#7891b6}
.panel-chip{display:inline-flex;align-items:center;padding:8px 12px;border-radius:12px;background:#f6faff;border:1px solid var(--line);font-size:13px;font-weight:700;color:#456497}
.panel-link{display:inline-flex;align-items:center;justify-content:center;height:34px;padding:0 12px;border-radius:12px;border:1px solid #d7e6fb;background:#f7fbff;color:#1f7df2;font-size:13px;font-weight:700}
.canvas-wrapper-medium{height:260px}
.canvas-wrapper canvas{width:100%!important;height:100%!important}
.category-panel-body{display:grid;grid-template-columns:160px 1fr;gap:14px;align-items:center}
.category-chart-wrapper{height:160px;display:grid;place-items:center}
.category-chart-wrapper canvas{max-width:160px!important;max-height:160px!important}
.category-legend-list{display:flex;flex-direction:column;gap:10px}
.category-legend-item{display:grid;grid-template-columns:14px 1fr auto;gap:10px;align-items:center;font-size:13px;color:#4f6894}
.category-legend-item strong{color:var(--blue-dark)}
.category-legend-dot{width:10px;height:10px;border-radius:50%;display:block}
.dot-0{background:#164ea6}.dot-1{background:#1f7df2}.dot-2{background:#EC1826}.dot-3{background:#f394a5}.dot-4{background:#ad8df6}.dot-5{background:#c4d0df}

.dashboard-bottom-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px}
.dashboard-table-panel{padding-bottom:10px}
.table-scroll{overflow:auto}
.dashboard-table{width:100%;border-collapse:separate;border-spacing:0;min-width:100%}
.dashboard-table thead th{background:#f6f9fe;color:#5874a2;font-size:12px;font-weight:800;padding:11px 12px;text-align:left;border-bottom:1px solid var(--line)}
.dashboard-table thead th:first-child{border-top-left-radius:12px;border-bottom-left-radius:12px}
.dashboard-table thead th:last-child{border-top-right-radius:12px;border-bottom-right-radius:12px}
.dashboard-table tbody td{padding:12px 12px;border-bottom:1px solid #edf2f9;font-size:13px;color:#36527f;vertical-align:middle}
.dashboard-table tbody tr:hover{background:#fbfdff}
.table-rank{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:800;color:#fff}
.rank-1{background:#f6b12b}.rank-2{background:#b8c7dd}.rank-3{background:#d98e58}.rank-4,.rank-5{background:#dce6f5;color:#496591}
.latest-sales-header{align-items:center}
.latest-sales-search{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.latest-sales-search input{height:40px;padding:0 14px;border-radius:12px;border:1px solid var(--line-2);min-width:150px}
.latest-sales-search button{min-height:40px;padding:0 14px;border-radius:12px}
.status-venda,.status-pill,.nota-kicker,.report-status,.relatorio-comissao-metrica span{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
.status-finalizada{background:#e9f9ef;color:#148048}.status-pendente{background:#fff0f2;color:#c43b48}
.pedido-numero{font-weight:800;color:#1f7df2}

.nota-modal[hidden]{display:none}.nota-modal{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:28px}.nota-modal-backdrop{position:absolute;inset:0;background:rgba(13,30,60,.5);backdrop-filter:blur(4px)}
.nota-card{position:relative;z-index:1;width:min(1100px,100%);max-height:calc(100vh - 56px);overflow:auto;background:#fff;border:1px solid var(--line);border-radius:26px;box-shadow:0 20px 60px rgba(13,30,60,.18);padding:24px}
.nota-card-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:22px}
.nota-card-header h2{margin:8px 0 6px;font-size:30px;line-height:1.04;color:var(--blue-dark)}
.nota-card-header p{margin:0;color:#7790b5}
.nota-kicker,.report-status,.relatorio-comissao-metrica span{background:#eef5ff;color:#56709b}
.nota-fechar{width:42px;min-height:42px;padding:0}
.nota-resumo-grid,.nota-totais,.relatorio-comissao-metricas{display:grid;gap:14px}
.nota-resumo-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:18px}
.nota-totais{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:18px}
.nota-info,.nota-totais>div,.relatorio-comissao-metrica,.relatorio-comissao-resumo{background:#f8fbff;border:1px solid var(--line);border-radius:18px;padding:14px 16px}
.nota-info-wide{grid-column:span 2}
.nota-info span,.nota-totais span,.relatorio-comissao-resumo span{display:block;margin-bottom:8px;color:#7690b5;font-size:12px;font-weight:700}
.nota-info strong,.nota-totais strong,.relatorio-comissao-metrica strong,.relatorio-comissao-resumo strong{font-size:16px;color:var(--blue-dark);font-weight:800}
.nota-total-lucro small{display:block;margin-top:6px;color:#7c92b3}
.lucro-negativo{color:#c43b48!important}.lucro-positivo{color:#148048!important}
.nota-itens{width:100%;border-collapse:collapse}
.nota-itens th,.nota-itens td{padding:12px;border-bottom:1px solid var(--line);font-size:13px;text-align:left}
.nota-itens th{font-size:12px;color:#5874a2;text-transform:uppercase}
.nota-observacao{margin-top:16px;padding:16px;border-radius:16px;border:1px solid #f8e0a3;background:#fff9eb}
.nota-observacao span{display:block;margin-bottom:8px;font-size:12px;font-weight:800;color:#9a7b1d;text-transform:uppercase}
.nota-observacao p{margin:0;color:#685823}
body.modal-aberto{overflow:hidden}

.reports-hero,.relatorio-comissao-panel{padding:20px}
.reports-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px}
.reports-hero-badge{padding:14px 16px;border-radius:18px;background:#f7fbff;border:1px solid var(--line);min-width:180px}
.reports-hero-badge span{display:block;font-size:12px;color:#7c92b3;margin-bottom:6px;font-weight:700}
.reports-hero-badge strong{color:var(--blue-dark)}
.reports-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:16px}
.report-card{display:grid;grid-template-columns:52px 1fr auto;gap:14px;align-items:center;padding:18px;border-radius:20px;border:1px solid var(--line);background:#fff;box-shadow:var(--shadow-soft)}
.report-icon{width:52px;height:52px;border-radius:16px;display:grid;place-items:center}
.report-icon svg{width:24px;height:24px}
.report-card h3{margin:0 0 5px;font-size:18px;color:var(--blue-dark)}
.report-card p{margin:0;font-size:13px;color:#7b93b8;line-height:1.5}
.report-card-active{border-color:#cfe0fb;box-shadow:0 14px 28px rgba(31,125,242,.08)}
.report-status-active{background:#e9f9ef;color:#148048}
.report-card-blue .report-icon{background:#eef5ff;color:#1f7df2}.report-card-gold .report-icon{background:#fff7e6;color:#c48812}.report-card-red .report-icon{background:#fff1f2;color:#d83f4a}.report-card-green .report-icon{background:#eefaf3;color:#16a15a}.report-card-gray .report-icon{background:#f4f7fb;color:#6881a7}
.relatorio-comissao-header{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:18px}.relatorio-comissao-header-actions{display:flex;gap:12px;align-items:stretch;flex-wrap:wrap}
.relatorio-comissao-filtros{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:14px;align-items:end}
.relatorio-comissao-filtros .campo-filtro{grid-column:span 3}
.relatorio-comissao-acoes{grid-column:span 4;display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:6px}
.relatorio-comissao-exportacoes{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.relatorio-comissao-metricas{grid-template-columns:repeat(3,minmax(0,1fr));margin:18px 0}
.relatorio-comissao-tabela{width:100%;border-collapse:collapse}.relatorio-comissao-tabela th,.relatorio-comissao-tabela td{padding:12px 10px;border-bottom:1px solid var(--line);font-size:13px;text-align:left}.relatorio-comissao-tabela th{font-size:12px;color:#5874a2;text-transform:uppercase}.relatorio-comissao-tabela tfoot th{background:#f8fbff;color:var(--blue-dark);font-size:13px;font-weight:900}.relatorio-comissao-valor{font-weight:900;color:var(--blue-dark)}

.login-page{min-height:100vh;display:grid;place-items:center;padding:24px}.login-shell{width:100%;max-width:1180px}.login-card{display:grid;grid-template-columns:1fr 1fr;gap:28px;padding:28px;border-radius:30px;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow)}.login-brand{padding:40px;border-radius:26px;background:linear-gradient(145deg,#0C306A 0%,#0f57bf 50%,#1f7df2 100%);color:#fff;display:flex;flex-direction:column;justify-content:center;gap:24px;position:relative;overflow:hidden}.login-brand::after{content:'';position:absolute;right:-70px;bottom:-70px;width:220px;height:220px;border-radius:50%;background:rgba(255,255,255,.08)}.brand-logo-shell-login{max-width:220px}.brand-logo-image{width:100%;display:block}.login-brand-text span:first-child{display:block;font-size:14px;letter-spacing:.08em;text-transform:uppercase;opacity:.84}.login-brand-text strong{display:block;margin-top:10px;font-size:54px;line-height:1;font-weight:900}.login-brand-text p{max-width:520px;font-size:17px;line-height:1.7;opacity:.92}.login-version-badge{display:inline-flex;padding:10px 14px;border-radius:999px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.18);font-size:13px;font-weight:700}.login-form{display:flex;flex-direction:column;justify-content:center;gap:18px;padding:12px}.login-form h1{margin:0;font-size:36px;line-height:1.03;color:var(--blue-dark);letter-spacing:-.03em}.login-subtitle{margin:8px 0 0;font-size:15px;color:#7e94b6}.login-alert{padding:14px 16px;border-radius:14px;background:#fff0f2;border:1px solid #ffd4d9;color:#b42318;font-size:14px}.login-field{display:flex;flex-direction:column;gap:8px}.login-field label{font-size:14px;font-weight:700;color:#5874a2}.login-field input{height:54px;padding:0 16px;border-radius:16px;border:1px solid var(--line-2);font-size:15px;font-weight:600}.login-field input:focus{outline:none;border-color:#7cb4ff;box-shadow:0 0 0 4px rgba(31,125,242,.1)}.login-demo{padding:14px 16px;border-radius:16px;background:#f8fbff;border:1px solid var(--line);font-size:13px;color:#7a92b8}.login-demo code{padding:2px 6px;border-radius:8px;background:#eef5ff;color:var(--blue-dark);font-weight:700}

.flatpickr-calendar{border:1px solid var(--line)!important;border-radius:18px!important;box-shadow:0 14px 40px rgba(18,54,104,.16)!important;overflow:hidden;font-family:'Inter',sans-serif!important}.flatpickr-months .flatpickr-month,.flatpickr-current-month input.cur-year,.flatpickr-weekday,.flatpickr-day{font-family:'Inter',sans-serif!important}.flatpickr-current-month .flatpickr-monthDropdown-months,.flatpickr-current-month input.cur-year{font-size:15px!important;font-weight:700!important}.flatpickr-weekday{font-size:12px!important}.flatpickr-day{font-size:14px!important;height:36px!important;line-height:36px!important}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange{background:#1f7df2!important;border-color:#1f7df2!important}.flatpickr-day.today{border-color:#9bc1ff!important}

@media (max-width: 1600px){
    .dashboard-charts-grid{grid-template-columns:1fr 1fr}
    .dashboard-panel-small{grid-column:1/-1}
}
@media (max-width: 1440px){
    .kpi-grid-modern{grid-template-columns:repeat(3,minmax(0,1fr))}
    .dashboard-bottom-grid,.reports-grid{grid-template-columns:1fr 1fr}
    .latest-sales-panel{grid-column:1/-1}
}
@media (max-width: 1200px){
    .app-shell{grid-template-columns:1fr}
    .sidebar{position:static;height:auto;border-right:0;border-bottom:1px solid var(--line)}
    .sidebar-menu{flex-direction:row;flex-wrap:wrap}
    .filtro-periodo{grid-template-columns:repeat(3,minmax(0,1fr))}
    .dashboard-charts-grid,.dashboard-bottom-grid,.reports-grid,.relatorio-comissao-metricas,.nota-resumo-grid,.nota-totais,.login-card{grid-template-columns:1fr 1fr}
    .category-panel-body{grid-template-columns:1fr}
    .topbar,.page-hero,.reports-hero,.relatorio-comissao-header{flex-direction:column;align-items:stretch}
}
@media (max-width: 820px){
    .app-main{padding:16px}
    .page-hero h1{font-size:42px}
    .filtro-periodo{grid-template-columns:1fr}
    .kpi-grid-modern,.dashboard-charts-grid,.dashboard-bottom-grid,.reports-grid,.relatorio-comissao-metricas,.nota-resumo-grid,.nota-totais,.login-card{grid-template-columns:1fr}
    .metric-card{grid-template-columns:50px 1fr}
    .metric-card-trend{grid-column:1/-1;width:100%}
    .topbar-user{width:100%;justify-content:space-between;flex-wrap:wrap}
    .topbar-search{width:100%}
    .relatorio-comissao-filtros{grid-template-columns:1fr}
    .relatorio-comissao-filtros .campo-filtro,.relatorio-comissao-acoes{grid-column:auto}
    .nota-info-wide{grid-column:auto}
    .header-user{width:100%;justify-content:space-between}
}

/* =========================================================
   CecBi v0.2.1 — perfil de densidade inspirado no BI da Loja
   Objetivo: caber dashboard completo em monitor Full HD a 100%
   ========================================================= */
:root{
    --density-ink:#16345f;
    --density-muted:#697b91;
    --density-canvas:#f4f7fc;
}

body{
    background:var(--density-canvas);
    color:var(--density-ink);
    font-family:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
    font-size:14px;
}

.app-shell{grid-template-columns:225px minmax(0,1fr)}
.sidebar{padding:14px 10px 18px;gap:0}
.sidebar-brand{padding:4px 7px 14px}
.sidebar-logo-image{max-width:145px}
.sidebar-menu{gap:5px}
.app-menu-item{
    min-height:44px;
    padding:0 13px;
    border-radius:11px;
    gap:10px;
    font-size:.86rem;
    font-weight:600;
}
.app-menu-icon,.app-menu-icon svg{width:18px;height:18px;flex-basis:18px}
.sidebar-footer{padding:12px 4px 0}
.sidebar-version{padding:6px 9px;font-size:.67rem}

.app-main{padding:12px 18px 22px;max-width:1900px;width:100%;justify-self:start}
.topbar{gap:14px;margin-bottom:8px;padding-bottom:8px}
.topbar-search{height:44px;max-width:540px;border-radius:12px;padding:0 14px;box-shadow:0 4px 16px rgba(30,55,100,.04)}
.topbar-search svg{width:17px;height:17px}
.topbar-search input{font-size:.84rem}
.topbar-user{gap:8px}
.topbar-version{padding:6px 9px;font-size:.67rem}
.topbar-notification{width:36px;height:36px}
.topbar-notification svg{width:17px;height:17px}
.topbar-notification span{min-width:16px;height:16px;font-size:9px}
.header-user{gap:8px;padding:5px 7px;border-radius:12px;box-shadow:0 4px 16px rgba(30,55,100,.04)}
.header-user-avatar{width:34px;height:34px;font-size:.78rem}
.header-user-text span{font-size:.78rem}
.header-user-text small{font-size:.67rem}
.header-logout{padding:7px 9px;border-radius:9px;font-size:.68rem}

.page-hero{padding:4px 0 9px}
.page-hero h1{font-size:2rem;letter-spacing:-.035em}
.page-hero p{margin-top:3px;font-size:.86rem}

.periodo-container{padding:11px 13px 9px;margin-bottom:11px;border-radius:16px;box-shadow:0 5px 19px rgba(30,55,100,.045)}
.filtro-periodo{grid-template-columns:1.05fr 1.05fr .95fr 1fr 1fr auto;gap:9px}
.campo-filtro{gap:4px}
.campo-filtro label,.relatorio-comissao-filtros label{font-size:.70rem;margin-bottom:0}
.campo-filtro input,.campo-filtro select,.relatorio-comissao-filtros input,.relatorio-comissao-filtros select{
    height:40px;
    padding:0 11px;
    border-radius:9px;
    font-size:.78rem;
}
.filtro-acoes{gap:7px}
.botao-filtrar,.botao-limpar,.botao-mais-filtros,.botao-exportar,.login-button,.relatorio-comissao-acoes button,.relatorio-comissao-acoes a,.nota-fechar,.latest-sales-search button{
    min-height:40px;
    padding:0 13px;
    border-radius:9px;
    font-size:.76rem;
}
.periodo-label{margin-top:8px;padding:6px 9px;font-size:.68rem}
.filtros-avancados{gap:9px;padding-top:4px}

.kpi-grid-modern{gap:10px;margin-bottom:11px}
.metric-card{
    grid-template-columns:40px 1fr 54px;
    gap:10px;
    min-height:88px;
    padding:10px 11px 9px;
    border-radius:15px;
    box-shadow:0 5px 19px rgba(30,55,100,.045);
}
.metric-card-icon{width:36px;height:36px;border-radius:10px}
.metric-card-icon svg{width:18px;height:18px}
.metric-card-content span{font-size:.70rem;margin-top:0}
.metric-card-content strong{margin-top:4px;font-size:1.08rem;line-height:1.15}
.metric-card-content small{margin-top:5px;font-size:.61rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.metric-card-trend{width:50px;align-self:end}
.metric-card-trend svg{height:24px}

.dashboard-charts-grid{gap:10px;margin-bottom:11px}
.dashboard-panel{padding:11px 12px 10px;border-radius:16px;box-shadow:0 5px 19px rgba(30,55,100,.045)}
.dashboard-panel-header{gap:10px;margin-bottom:7px}
.dashboard-panel-header h2{font-size:.94rem;letter-spacing:-.02em}
.dashboard-panel-header p{margin-top:2px;font-size:.66rem}
.panel-chip{padding:6px 8px;border-radius:8px;font-size:.66rem}
.panel-link{height:28px;padding:0 9px;border-radius:8px;font-size:.66rem}
.canvas-wrapper-medium{height:198px}
.category-panel-body{grid-template-columns:128px 1fr;gap:9px}
.category-chart-wrapper{height:128px}
.category-chart-wrapper canvas{max-width:128px!important;max-height:128px!important}
.category-legend-list{gap:6px}
.category-legend-item{grid-template-columns:10px 1fr auto;gap:6px;font-size:.65rem}
.category-legend-dot{width:7px;height:7px}

.dashboard-bottom-grid{gap:10px}
.dashboard-table-panel{padding:10px 11px 7px;border-radius:16px}
.dashboard-table-panel .dashboard-panel-header{margin-bottom:7px}
.table-scroll{overflow:auto}
.dashboard-table-panel .table-scroll{max-height:200px}
.dashboard-table thead th{font-size:.60rem;padding:7px 8px}
.dashboard-table tbody td{font-size:.66rem;padding:7px 8px}
.table-rank{width:18px;height:18px;font-size:.56rem}
.latest-sales-search{gap:6px}
.latest-sales-search input{height:32px;min-width:112px;padding:0 9px;border-radius:8px;font-size:.66rem}
.latest-sales-search button{min-height:32px;padding:0 9px;border-radius:8px;font-size:.65rem}
.status-venda{padding:4px 7px;font-size:.56rem}

.reports-hero,.relatorio-comissao-panel{padding:14px 16px;border-radius:16px}
.reports-hero{margin-bottom:10px}
.reports-hero .chart-title,.relatorio-comissao-header .chart-title{font-size:1.15rem}
.reports-hero .chart-subtitle,.relatorio-comissao-header .chart-subtitle{font-size:.72rem}
.reports-hero-badge{padding:9px 11px;border-radius:11px;min-width:140px}
.reports-hero-badge span{font-size:.62rem;margin-bottom:2px}
.reports-hero-badge strong{font-size:.85rem}
.reports-grid{gap:10px;margin-bottom:10px}
.report-card{grid-template-columns:38px 1fr auto;gap:9px;padding:11px;border-radius:14px}
.report-icon{width:38px;height:38px;border-radius:10px}
.report-icon svg{width:18px;height:18px}
.report-card h3{font-size:.86rem;margin-bottom:2px}
.report-card p{font-size:.64rem;line-height:1.35}
.report-status{padding:4px 7px;font-size:.54rem}
.relatorio-comissao-header{gap:10px;margin-bottom:10px}
.relatorio-comissao-filtros{gap:9px}
.relatorio-comissao-metricas{gap:9px;margin:10px 0}
.relatorio-comissao-metrica,.relatorio-comissao-resumo{padding:9px 11px;border-radius:11px}
.relatorio-comissao-metrica span,.relatorio-comissao-resumo span{font-size:.60rem;margin-bottom:3px}
.relatorio-comissao-metrica strong,.relatorio-comissao-resumo strong{font-size:.82rem}
.relatorio-comissao-tabela th,.relatorio-comissao-tabela td{padding:7px 8px;font-size:.66rem}
.relatorio-comissao-tabela th{font-size:.59rem}

.flatpickr-calendar{font-size:12px!important}
.flatpickr-current-month .flatpickr-monthDropdown-months,.flatpickr-current-month input.cur-year{font-size:13px!important}
.flatpickr-weekday{font-size:10px!important}
.flatpickr-day{font-size:11px!important;height:30px!important;line-height:30px!important}

@media(max-width:1440px){
    .app-shell{grid-template-columns:215px minmax(0,1fr)}
    .kpi-grid-modern{grid-template-columns:repeat(5,minmax(0,1fr))}
    .dashboard-charts-grid{grid-template-columns:1.22fr 1fr .82fr}
    .dashboard-panel-small{grid-column:auto}
    .dashboard-bottom-grid{grid-template-columns:1fr 1fr 1fr}
    .latest-sales-panel{grid-column:auto}
}
@media(max-width:1180px){
    .app-shell{grid-template-columns:1fr}
    .sidebar{position:static;height:auto;border-right:0;border-bottom:1px solid var(--line)}
    .sidebar-menu{flex-direction:row;flex-wrap:wrap}
    .filtro-periodo{grid-template-columns:repeat(3,minmax(0,1fr))}
    .kpi-grid-modern{grid-template-columns:repeat(3,minmax(0,1fr))}
    .dashboard-charts-grid,.dashboard-bottom-grid,.reports-grid{grid-template-columns:1fr 1fr}
    .dashboard-panel-small,.latest-sales-panel{grid-column:1/-1}
}
@media(max-width:760px){
    .app-main{padding:12px}
    .page-hero h1{font-size:1.65rem}
    .filtro-periodo,.kpi-grid-modern,.dashboard-charts-grid,.dashboard-bottom-grid,.reports-grid{grid-template-columns:1fr}
    .dashboard-panel-small,.latest-sales-panel{grid-column:auto}
    .metric-card{grid-template-columns:38px 1fr 48px}
}

/* =========================================================
   v0.2.3 — comparativos dos cards + carrossel de destaques
   ========================================================= */
.metric-card-content .metric-card-comparison{
    margin-top:5px;
    display:flex;
    align-items:center;
    gap:6px;
    min-width:0;
    white-space:nowrap;
    overflow:hidden;
}
.metric-card-comparison b{
    font-size:.68rem;
    font-weight:900;
    letter-spacing:-.01em;
    flex:0 0 auto;
}
.metric-card-comparison span{
    font-size:.60rem;
    color:#7f94b5;
    overflow:hidden;
    text-overflow:ellipsis;
}
.comparativo-positivo b{color:#16a464}
.comparativo-negativo b{color:#ef3340}
.comparativo-neutro b{color:#60799f}
.metric-card-trend.comparativo-positivo svg{stroke:#58c98b}
.metric-card-trend.comparativo-negativo svg{stroke:#ff6675}
.metric-card-trend.comparativo-neutro svg{stroke:#78adf7}

.ranking-carousel-section{
    margin-top:0;
    margin-bottom:11px;
}
.ranking-carousel-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin-bottom:7px;
}
.ranking-carousel-head h2{
    margin:0;
    font-size:.86rem;
    color:var(--blue-dark);
    font-weight:800;
    letter-spacing:-.02em;
}
.ranking-carousel-head p{
    margin:2px 0 0;
    font-size:.62rem;
    color:#7b93b8;
}
.ranking-carousel-controls{
    display:flex;
    align-items:center;
    gap:6px;
}
.ranking-carousel-button{
    width:30px;
    height:30px;
    border-radius:9px;
    border:1px solid var(--line-2);
    background:#fff;
    color:var(--blue-dark);
    display:grid;
    place-items:center;
    font-size:1.2rem;
    line-height:1;
    box-shadow:0 4px 12px rgba(30,55,100,.04);
    transition:all .18s ease;
}
.ranking-carousel-button:hover:not(:disabled){
    background:#eef5ff;
    border-color:#c9dcf9;
    transform:translateY(-1px);
}
.ranking-carousel-button:disabled{
    opacity:.38;
    cursor:default;
}
.ranking-carousel-viewport{
    overflow:hidden;
    width:100%;
}
.ranking-carousel-track{
    display:flex;
    gap:10px;
    transition:transform .38s cubic-bezier(.2,.75,.25,1);
    will-change:transform;
}
.ranking-carousel-slide{
    flex:0 0 calc((100% - 20px) / 3);
    min-width:0;
    padding:10px 11px 7px;
    border-radius:16px;
}
.ranking-carousel-slide .dashboard-panel-header{
    margin-bottom:7px;
}
.ranking-carousel-slide .table-scroll{
    max-height:200px;
}
.ranking-carousel-slide.latest-sales-panel{
    grid-column:auto;
}
.ranking-carousel-slide .latest-sales-header{
    gap:8px;
}
.ranking-carousel-slide .latest-sales-search{
    flex-wrap:nowrap;
}
.ranking-carousel-slide .latest-sales-search input{
    min-width:82px;
    width:82px;
}

@media(max-width:1180px){
    .ranking-carousel-slide{flex-basis:calc((100% - 10px) / 2)}
}
@media(max-width:760px){
    .ranking-carousel-head{align-items:flex-start}
    .ranking-carousel-head p{display:none}
    .ranking-carousel-slide{flex-basis:100%}
}

/* =========================================================
   v0.2.4 — card de Ticket Médio
   ========================================================= */
.metric-card-ticket::after{
    background:linear-gradient(90deg,rgba(242,170,31,.62),rgba(242,170,31,0));
}
.metric-card-ticket .metric-card-icon{
    background:linear-gradient(135deg,#f4b62f,#df9410);
    box-shadow:0 8px 20px rgba(223,148,16,.20);
}

/* Seis indicadores na mesma linha em monitores amplos, mantendo a densidade do BI-Loja. */
.kpi-grid-modern{
    grid-template-columns:repeat(6,minmax(0,1fr));
}
@media(max-width:1540px){
    .kpi-grid-modern{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media(max-width:1180px){
    .kpi-grid-modern{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media(max-width:760px){
    .kpi-grid-modern{grid-template-columns:1fr;}
}

/* =========================================================
   CecBi v0.2.6 — topo compacto em duas linhas
   Título primeiro; busca/versão/usuário logo abaixo.
   ========================================================= */
.app-main{
    padding-top:8px;
}
.page-hero-top{
    padding:0 0 5px !important;
    margin:0 !important;
}
.page-hero-top h1{
    margin:0;
    font-size:1.92rem;
    line-height:1;
}
.page-hero-top p{
    margin:2px 0 0;
    font-size:.82rem;
    line-height:1.2;
}
.topbar-secondary-row{
    margin:0 0 8px !important;
    padding:0 !important;
    border-bottom:0 !important;
    min-height:38px;
    align-items:center;
}
.topbar-secondary-row .topbar-search{
    height:38px;
    max-width:520px;
    border-radius:10px;
    padding:0 12px;
    box-shadow:0 3px 12px rgba(30,55,100,.035);
}
.topbar-secondary-row .topbar-search svg{
    width:16px;
    height:16px;
}
.topbar-secondary-row .topbar-search input{
    font-size:.80rem;
}
.topbar-secondary-row .topbar-user{
    gap:7px;
}
.topbar-secondary-row .topbar-version{
    padding:5px 8px;
    font-size:.64rem;
}
.topbar-secondary-row .topbar-notification{
    width:32px;
    height:32px;
}
.topbar-secondary-row .topbar-notification svg{
    width:15px;
    height:15px;
}
.topbar-secondary-row .header-user{
    min-height:34px;
    gap:7px;
    padding:4px 6px;
    border-radius:10px;
}
.topbar-secondary-row .header-user-avatar{
    width:30px;
    height:30px;
    font-size:.72rem;
}
.topbar-secondary-row .header-user-text span{
    font-size:.74rem;
}
.topbar-secondary-row .header-user-text small{
    font-size:.62rem;
}
.topbar-secondary-row .header-logout{
    padding:6px 8px;
    border-radius:8px;
    font-size:.64rem;
}

@media (max-width:820px){
    .topbar-secondary-row{
        gap:7px;
        align-items:stretch;
    }
    .topbar-secondary-row .topbar-search{
        max-width:none;
        width:100%;
    }
}

/* =========================================================
   CecBi v0.2.7 — Login premium aprovado
   ========================================================= */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px 24px;
    background:
        radial-gradient(circle at 15% 15%, rgba(31, 125, 242, .08), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, #f2f6fb 100%);
}

.login-shell {
    width: 100%;
    max-width: 1280px;
}

.login-card-premium {
    display: grid;
    grid-template-columns: minmax(0, .98fr) minmax(0, 1.02fr);
    gap: 0;
    padding: 18px;
    border-radius: 30px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(12, 48, 106, .08);
    box-shadow: 0 24px 70px rgba(23, 60, 113, .12);
    overflow: hidden;
}

.login-brand-premium {
    min-height: 600px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 24px;
    padding: 38px 48px;
    border-radius: 24px;
    color: #fff;
    background:
        radial-gradient(circle at 15% 10%, rgba(255, 255, 255, .08), transparent 24%),
        linear-gradient(145deg, #073378 0%, #0c4fbd 50%, #1677f3 100%);
}

.login-brand-premium::after {
    content: '';
    position: absolute;
    right: -90px;
    bottom: -100px;
    width: 330px;
    height: 330px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.28);
    background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.03));
    z-index: -1;
}

.login-brand-decoration {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.08);
    z-index: -1;
}
.login-brand-decoration-a {
    width: 290px;
    height: 290px;
    right: -105px;
    top: -80px;
    background: rgba(255,255,255,.05);
}
.login-brand-decoration-b {
    width: 190px;
    height: 190px;
    left: -90px;
    bottom: -90px;
    background: rgba(255,255,255,.04);
}

.login-brand-bars {
    position: absolute;
    right: 36px;
    bottom: 0;
    display: flex;
    align-items: flex-end;
    gap: 18px;
    opacity: .16;
    z-index: -1;
}
.login-brand-bars span {
    width: 42px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.08));
}
.login-brand-bars span:nth-child(1) { height: 88px; }
.login-brand-bars span:nth-child(2) { height: 138px; }
.login-brand-bars span:nth-child(3) { height: 205px; }

.login-logo-glass {
    width: min(100%, 360px);
    min-height: 176px;
    display: grid;
    place-items: center;
    padding: 14px 16px;
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(255,255,255,.48), rgba(255,255,255,.20));
    border: 1px solid rgba(255,255,255,.64);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.45),
        0 18px 44px rgba(1, 36, 98, .18);
    backdrop-filter: blur(14px);
}

.login-logo-original {
    width: 106%;
    max-width: none;
    height: auto;
    object-fit: contain;
    display: block;
}

.login-brand-copy {
    max-width: 560px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.login-brand-kicker {
    display: block;
    margin-bottom: 16px;
    color: rgba(255,255,255,.92);
    font-size: 15px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .34em;
}

.login-brand-copy p {
    margin: 0;
    color: #fff;
    font-size: 18px;
    line-height: 1.58;
    font-weight: 500;
    max-width: 520px;
}

.login-version-badge {
    display: inline-flex;
    align-items: center;
    margin-top: 22px;
    padding: 11px 18px;
    border-radius: 999px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.20);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

.login-form-premium {
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 17px;
    padding: 40px 52px;
    background: #fff;
}

.login-form-heading {
    margin-bottom: 6px;
}
.login-form-premium h1 {
    margin: 0;
    color: var(--blue-dark);
    font-size: clamp(36px, 2.7vw, 46px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -.045em;
}
.login-form-premium .login-subtitle {
    margin: 10px 0 0;
    color: #7b91b3;
    font-size: 16px;
    font-weight: 500;
}

.login-field-icon {
    gap: 9px;
}
.login-field-icon > label {
    color: #2b4f84;
    font-size: 14px;
    font-weight: 800;
}

.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.login-input-icon {
    position: absolute;
    left: 18px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #56729d;
    pointer-events: none;
}
.login-input-icon svg,
.login-password-toggle svg,
.login-button-premium svg,
.login-demo-icon svg {
    width: 100%;
    height: 100%;
}

.login-field-icon input {
    height: 62px;
    width: 100%;
    padding: 0 62px 0 58px;
    border-radius: 20px;
    border: 1px solid #cfdaeb;
    background: #fff;
    color: #18396e;
    font-size: 16px;
    font-weight: 600;
    outline: 0;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.login-field-icon input::placeholder {
    color: #8d9cb1;
    font-weight: 500;
}
.login-field-icon input:focus {
    border-color: #62a3ff;
    box-shadow: 0 0 0 5px rgba(31, 125, 242, .12);
}

.login-password-toggle {
    position: absolute;
    right: 16px;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #56729d;
}
.login-password-toggle:hover {
    background: #f3f7fd;
}

.login-button-premium {
    height: 58px;
    margin-top: 4px;
    border: 0;
    border-radius: 16px;
    gap: 16px;
    color: #fff;
    background: linear-gradient(90deg, #1166e9 0%, #237af2 100%);
    box-shadow: 0 14px 28px rgba(31, 125, 242, .18);
    font-size: 17px;
    font-weight: 800;
}
.login-button-premium svg {
    width: 24px;
    height: 24px;
}
.login-button-premium:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(31, 125, 242, .24);
}

.login-demo-premium {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid #d7e3f2;
    background: #f8fbff;
    color: #7187a9;
    font-size: 14px;
}
.login-demo-premium strong {
    color: #3f5f8e;
}
.login-demo-premium code {
    padding: 5px 9px;
    border-radius: 9px;
    background: #eaf2fd;
    color: #123f86;
    font-weight: 900;
}
.login-demo-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    color: var(--blue);
}

@media (max-width: 1100px) {
    .login-card-premium { grid-template-columns: 1fr; }
    .login-brand-premium,
    .login-form-premium { min-height: auto; }
    .login-brand-premium { padding: 42px; }
    .login-form-premium { padding: 48px 42px; }
    .login-logo-glass { width: min(100%, 340px); min-height: 190px; }
}

@media (max-width: 640px) {
    .login-page { padding: 14px; }
    .login-card-premium { padding: 12px; border-radius: 24px; }
    .login-brand-premium,
    .login-form-premium { padding: 30px 22px; }
    .login-brand-premium { border-radius: 20px; gap: 24px; }
    .login-logo-glass { min-height: 160px; padding: 18px; border-radius: 20px; }
    .login-logo-original { height: 130px; }
    .login-brand-kicker { letter-spacing: .22em; font-size: 12px; }
    .login-brand-copy p { font-size: 17px; }
    .login-form-premium h1 { font-size: 36px; }
    .login-field-icon input { height: 62px; border-radius: 16px; }
    .login-button-premium { height: 58px; }
    .login-demo-premium { align-items: flex-start; }
}


/* CecBi v0.2.8 — login compacto para monitores menores */
@media (min-width: 1101px) and (max-height: 760px) {
    .login-page { padding-top: 14px; padding-bottom: 14px; }
    .login-brand-premium,
    .login-form-premium { min-height: 560px; }
    .login-brand-premium { padding: 30px 42px; gap: 18px; }
    .login-form-premium { padding: 32px 46px; gap: 14px; }
    .login-logo-glass { width: min(100%, 330px); min-height: 150px; }
    .login-brand-kicker { margin-bottom: 12px; }
    .login-brand-copy p { font-size: 17px; line-height: 1.5; }
    .login-version-badge { margin-top: 18px; }
    .login-field-icon input { height: 58px; }
    .login-button-premium { height: 54px; }
    .login-demo-premium { min-height: 54px; }
}


/* =========================================================
   CecBi v0.2.9 — login ainda mais compacto + logo UHD limpa
   ========================================================= */
.login-page {
    padding: 12px 18px;
    min-height: 100dvh;
}

.login-shell {
    max-width: 1120px;
}

.login-card-premium {
    padding: 14px;
    border-radius: 26px;
    box-shadow: 0 18px 56px rgba(23, 60, 113, .11);
}

.login-brand-premium,
.login-form-premium {
    min-height: 520px;
}

.login-brand-premium {
    padding: 28px 38px;
    gap: 17px;
    border-radius: 22px;
}

.login-logo-glass {
    width: min(100%, 350px);
    min-height: 138px;
    padding: 10px 12px;
    border-radius: 20px;
}

.login-logo-original {
    width: 98%;
    max-width: 98%;
    max-height: 126px;
    object-fit: contain;
}

.login-brand-kicker {
    margin-bottom: 11px;
    font-size: 13px;
    letter-spacing: .30em;
}

.login-brand-copy p {
    font-size: 16px;
    line-height: 1.46;
    max-width: 470px;
}

.login-version-badge {
    margin-top: 16px;
    padding: 9px 15px;
    font-size: 12px;
}

.login-form-premium {
    padding: 28px 42px;
    gap: 13px;
}

.login-form-heading {
    margin-bottom: 2px;
}

.login-form-premium h1 {
    font-size: clamp(32px, 2.45vw, 41px);
}

.login-form-premium .login-subtitle {
    margin-top: 8px;
    font-size: 14px;
}

.login-field-icon {
    gap: 7px;
}

.login-field-icon > label {
    font-size: 13px;
}

.login-field-icon input {
    height: 54px;
    border-radius: 17px;
    font-size: 15px;
    padding-left: 54px;
}

.login-input-icon {
    left: 17px;
    width: 22px;
    height: 22px;
}

.login-password-toggle {
    width: 38px;
    height: 38px;
    right: 12px;
    padding: 9px;
}

.login-button-premium {
    height: 52px;
    margin-top: 2px;
    border-radius: 15px;
    font-size: 16px;
}

.login-demo-premium {
    min-height: 50px;
    padding: 11px 15px;
    border-radius: 16px;
    font-size: 13px;
}

.login-demo-icon {
    width: 23px;
    height: 23px;
    flex-basis: 23px;
}

.login-brand-bars span { width: 34px; }
.login-brand-bars span:nth-child(1) { height: 74px; }
.login-brand-bars span:nth-child(2) { height: 112px; }
.login-brand-bars span:nth-child(3) { height: 165px; }

@media (min-width: 1101px) and (max-height: 700px) {
    .login-page { padding: 8px 12px; }
    .login-shell { max-width: 1040px; }
    .login-card-premium { padding: 10px; border-radius: 22px; }
    .login-brand-premium,
    .login-form-premium { min-height: 474px; }
    .login-brand-premium { padding: 22px 32px; gap: 13px; }
    .login-logo-glass { width: min(100%, 315px); min-height: 118px; }
    .login-logo-original { max-height: 108px; }
    .login-brand-kicker { margin-bottom: 8px; font-size: 12px; }
    .login-brand-copy p { font-size: 15px; line-height: 1.40; }
    .login-version-badge { margin-top: 12px; padding: 8px 13px; }
    .login-form-premium { padding: 22px 36px; gap: 10px; }
    .login-form-premium h1 { font-size: 34px; }
    .login-form-premium .login-subtitle { font-size: 13px; }
    .login-field-icon input { height: 49px; }
    .login-button-premium { height: 48px; }
    .login-demo-premium { min-height: 46px; padding: 9px 13px; }
}

@media (max-width: 1100px) {
    .login-shell { max-width: 760px; }
    .login-brand-premium,
    .login-form-premium { min-height: auto; }
    .login-brand-premium { padding: 28px 32px; }
    .login-form-premium { padding: 30px 32px; }
    .login-logo-glass { width: min(100%, 330px); min-height: 126px; }
}


/* =========================================================
   CecBi v0.2.10 — identidade vetorial oficial em SVG
   ========================================================= */
.login-logo-original {
    width: 104%;
    max-width: none;
    max-height: 132px;
    object-fit: contain;
    image-rendering: auto;
}

.sidebar-logo-image {
    width: 100%;
    max-width: 154px;
    height: auto;
    image-rendering: auto;
}

@media (min-width: 1101px) and (max-height: 700px) {
    .login-logo-original {
        width: 102%;
        max-height: 112px;
    }
}


/* =========================================================
   CecBi v0.2.11 — ajuste final da tela de login aprovada
   ========================================================= */
.login-page {
    padding: 16px 20px;
    min-height: 100dvh;
}

.login-shell {
    width: 100%;
    max-width: 1220px;
}

.login-card-premium {
    grid-template-columns: minmax(440px, 1.02fr) minmax(500px, 0.98fr);
    gap: 20px;
    padding: 16px;
    border-radius: 34px;
    align-items: stretch;
    box-shadow: 0 18px 48px rgba(15, 41, 87, 0.10);
}

.login-brand-premium,
.login-form-premium {
    min-height: 500px;
}

.login-brand-premium {
    padding: 30px 40px;
    gap: 18px;
    border-radius: 26px;
    justify-content: flex-start;
    background: linear-gradient(145deg, #0C306A 0%, #0f57bf 54%, #1f7df2 100%);
}

.login-logo-glass {
    width: min(100%, 350px);
    min-height: 154px;
    padding: 12px 18px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,.14) 100%);
    border: 1px solid rgba(255,255,255,.46);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 14px 28px rgba(5, 31, 81, .16);
    backdrop-filter: blur(8px);
}

.login-logo-original {
    width: 100%;
    max-width: 100%;
    max-height: 126px;
    object-fit: contain;
    display: block;
}

.login-brand-kicker {
    margin-bottom: 8px;
    font-size: 12px;
    letter-spacing: .34em;
}

.login-brand-copy p {
    max-width: 430px;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.login-version-badge {
    margin-top: 14px;
    padding: 10px 16px;
    font-size: 12px;
}

.login-form-premium {
    padding: 26px 40px;
    gap: 12px;
    justify-content: center;
}

.login-form-premium h1 {
    font-size: clamp(30px, 2.7vw, 42px);
    line-height: 1.02;
}

.login-form-premium .login-subtitle {
    margin-top: 8px;
    font-size: 14px;
}

.login-field-icon > label {
    font-size: 13px;
}

.login-field-icon input {
    height: 52px;
    border-radius: 17px;
    font-size: 15px;
    padding-left: 56px;
}

.login-input-icon {
    left: 18px;
    width: 22px;
    height: 22px;
}

.login-password-toggle {
    right: 13px;
    width: 38px;
    height: 38px;
}

.login-button-premium {
    height: 52px;
    margin-top: 4px;
    border-radius: 16px;
    font-size: 16px;
}

.login-demo-premium {
    min-height: 48px;
    padding: 11px 15px;
    font-size: 13px;
}

.login-demo-icon {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
}

.login-brand-bars span { width: 30px; }
.login-brand-bars span:nth-child(1) { height: 64px; }
.login-brand-bars span:nth-child(2) { height: 96px; }
.login-brand-bars span:nth-child(3) { height: 142px; }

@media (min-width: 1101px) and (max-height: 780px) {
    .login-page { padding: 10px 14px; }
    .login-shell { max-width: 1160px; }
    .login-card-premium { padding: 12px; gap: 16px; }
    .login-brand-premium,
    .login-form-premium { min-height: 460px; }
    .login-brand-premium { padding: 24px 34px; gap: 14px; }
    .login-logo-glass { width: min(100%, 320px); min-height: 136px; padding: 10px 16px; }
    .login-logo-original { max-height: 110px; }
    .login-brand-kicker { margin-bottom: 6px; font-size: 11px; }
    .login-brand-copy p { font-size: 14px; line-height: 1.5; }
    .login-version-badge { margin-top: 10px; padding: 8px 14px; }
    .login-form-premium { padding: 22px 34px; gap: 10px; }
    .login-form-premium h1 { font-size: 34px; }
    .login-field-icon input { height: 48px; }
    .login-button-premium { height: 48px; }
    .login-demo-premium { min-height: 44px; padding: 9px 13px; }
    .login-brand-bars span { width: 26px; }
    .login-brand-bars span:nth-child(1) { height: 54px; }
    .login-brand-bars span:nth-child(2) { height: 82px; }
    .login-brand-bars span:nth-child(3) { height: 124px; }
}

@media (max-width: 1100px) {
    .login-shell { max-width: 820px; }
    .login-card-premium { grid-template-columns: 1fr; }
    .login-brand-premium,
    .login-form-premium { min-height: auto; }
    .login-brand-premium { padding: 28px 32px; }
    .login-form-premium { padding: 28px 32px; }
    .login-logo-glass { width: min(100%, 340px); min-height: 146px; }
}

@media (max-width: 680px) {
    .login-page { padding: 10px; }
    .login-card-premium { padding: 10px; border-radius: 24px; }
    .login-brand-premium { padding: 22px 24px; border-radius: 20px; }
    .login-form-premium { padding: 24px 22px; }
    .login-logo-glass { width: 100%; min-height: 128px; padding: 10px 14px; }
    .login-logo-original { max-height: 96px; }
    .login-form-premium h1 { font-size: 32px; }
}

/* CecBi 0.2.12 - Login fiel ao layout de referência */
body.login-page { background: radial-gradient(ellipse at 50% 45%, #ffffff 0%, #eef6ff 72%, #e8f3ff 100%); }
.login-shell { max-width: 1360px; }
.login-card-premium {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  gap: clamp(28px,4vw,64px);
  padding: 16px;
  border-radius: 30px;
}
.login-brand-premium, .login-form-premium { min-height: 550px; }
.login-brand-premium {
  background: linear-gradient(130deg,#073579 0%,#0757cb 57%,#0b83ff 100%);
  padding: 48px clamp(34px,5vw,70px);
  gap: 28px;
  border-radius: 24px;
}
.login-logo-glass {
  width: 100%; max-width: 420px; min-height: 186px;
  border-radius: 21px;
  background: radial-gradient(ellipse at 42% 48%,rgba(255,255,255,.72),rgba(255,255,255,.22) 75%,rgba(255,255,255,.12));
  border: 1px solid rgba(255,255,255,.68);
  padding: 22px;
}
.login-logo-original { width:100%; max-width:100%; max-height:145px; object-fit:contain; }
.login-brand-kicker { font-size:13px; font-weight:500; letter-spacing:.32em; }
.login-brand-copy p { font-size:18px; font-weight:400; line-height:1.65; max-width:390px; }
.login-version-badge { font-size:13px; margin-top:28px; }
.login-form-premium { padding: 30px clamp(20px,3vw,54px) 30px 0; gap:18px; }
.login-form-premium h1 { font-size:clamp(32px,3.3vw,46px); }
.login-form-premium .login-subtitle { font-size:17px; }
.login-field-icon > label { font-size:15px; }
.login-field-icon input { height:62px; font-size:16px; }
.login-button-premium { height:62px; font-size:18px; }
.login-demo-premium { min-height:60px; font-size:14px; }
@media (min-width:1101px) and (max-height:760px) {
 .login-brand-premium,.login-form-premium { min-height: min(550px,calc(100dvh - 48px)); }
 .login-brand-premium { padding-top:26px;padding-bottom:26px;gap:16px; }
 .login-logo-glass { min-height:130px; }
 .login-logo-original { max-height:105px; }
 .login-brand-copy p { font-size:15px;line-height:1.45; }
 .login-version-badge { margin-top:12px; }
 .login-field-icon input,.login-button-premium { height:49px; }
 .login-demo-premium { min-height:45px; }
 .login-form-premium { gap:10px; }
}
@media (max-width:1100px) {
 .login-card-premium { grid-template-columns:1fr; }
 .login-brand-premium,.login-form-premium { min-height:auto; }
 .login-form-premium { padding:26px; }
 .login-brand-premium { padding:28px; }
 .login-logo-glass { min-height:140px; }
}


/* =========================================================
   CecBi v0.2.13 — login 20% menor, mantendo proporções 1:1
   ========================================================= */
.login-shell {
    display: grid;
    place-items: center;
}

.login-card-premium {
    width: 100%;
    zoom: 0.80;
}

@supports not (zoom: 1) {
    .login-card-premium {
        transform: scale(0.80);
        transform-origin: center center;
    }
}


/* =========================================================
   CecBi v0.2.14 — quadro inteiro 20% menor em largura e altura
   Mantém exatamente as proporções e o layout interno da v0.2.12
   ========================================================= */
.login-card-premium {
    width: 100%;
    zoom: 1 !important;
    transform: scale(0.80);
    transform-origin: center center;
}

.login-shell {
    display: grid;
    place-items: center;
    overflow: visible;
}

@media (max-width: 1100px) {
    .login-card-premium {
        transform: none;
    }
}


/* =========================================================
   CecBi v0.2.15 — cards no padrão visual de referência
   ========================================================= */
.kpi-grid-modern{
    gap:14px;
    margin-bottom:14px;
}
.metric-card{
    grid-template-columns:54px minmax(0,1fr) 58px;
    gap:12px;
    min-height:126px;
    padding:16px 16px 14px;
    border-radius:18px;
    align-items:start;
    box-shadow:0 7px 24px rgba(30,55,100,.06);
}
.metric-card-icon{
    width:50px;
    height:50px;
    border-radius:13px;
}
.metric-card-icon svg{
    width:24px;
    height:24px;
}
.metric-card-content span{
    font-size:.86rem;
    line-height:1.2;
    font-weight:600;
    margin-top:3px;
}
.metric-card-content strong{
    margin-top:7px;
    font-size:1.48rem;
    line-height:1.08;
    font-weight:900;
    letter-spacing:-.035em;
}
.metric-card-content .metric-card-comparison{
    margin-top:13px;
    gap:8px;
    overflow:visible;
}
.metric-card-comparison b{
    font-size:.82rem;
}
.metric-card-comparison span{
    font-size:.72rem;
    color:#7a90b1;
}
.metric-card-trend{
    width:58px;
    align-self:end;
    margin-bottom:1px;
}
.metric-card-trend svg{
    height:34px;
    stroke-width:2.15;
}
.metric-margin-badge{
    display:inline-flex;
    align-items:center;
    height:24px;
    padding:0 8px;
    margin-left:2px;
    border-radius:999px;
    background:#eaf9f1;
    border:1px solid #ccefdc;
    color:#168653;
    font-size:.67rem;
    font-style:normal;
    font-weight:800;
    white-space:nowrap;
}
.metric-card-comparison-lucro{
    flex-wrap:wrap;
    row-gap:5px;
}

@media(max-width:1540px){
    .metric-card{
        min-height:118px;
        padding:14px;
        grid-template-columns:48px minmax(0,1fr) 52px;
    }
    .metric-card-icon{width:44px;height:44px}
    .metric-card-icon svg{width:21px;height:21px}
    .metric-card-content span{font-size:.80rem}
    .metric-card-content strong{font-size:1.30rem}
    .metric-card-comparison b{font-size:.75rem}
    .metric-card-comparison span{font-size:.67rem}
}

@media(max-width:760px){
    .metric-card{
        grid-template-columns:50px minmax(0,1fr) 54px;
        min-height:116px;
    }
}


/* =========================================================
   CecBi v0.2.16 — tipografia dos KPIs + margem no canto
   ========================================================= */
.kpi-grid-modern .metric-card {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 12px;
    min-height: 126px;
    padding: 16px 16px 14px;
}
.kpi-grid-modern .metric-card-icon {
    width: 50px;
    height: 50px;
}
.kpi-grid-modern .metric-card-content {
    min-width: 0;
    padding-right: 2px;
}
.kpi-grid-modern .metric-card-content > span {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: .82rem;
    line-height: 1.15;
    font-weight: 500;
    letter-spacing: -.01em;
}
.kpi-grid-modern .metric-card-content > strong {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    margin-top: 6px;
    font-size: 1.20rem;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -.035em;
    white-space: nowrap;
}
.kpi-grid-modern .metric-card-content .metric-card-comparison {
    margin-top: 12px;
    gap: 7px;
    padding-right: 58px;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: hidden;
}
.kpi-grid-modern .metric-card-comparison b {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: .75rem;
    font-weight: 700;
}
.kpi-grid-modern .metric-card-comparison span {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: .67rem;
    font-weight: 400;
}
.kpi-grid-modern .metric-card-trend {
    position: absolute;
    right: 14px;
    bottom: 13px;
    width: 52px;
    margin: 0;
}
.kpi-grid-modern .metric-card-trend svg {
    height: 30px;
}
.metric-margin-badge-corner {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    height: 22px;
    padding: 0 8px;
    margin: 0;
    border-radius: 999px;
    background: #eaf9f1;
    border: 1px solid #ccefdc;
    color: #168653;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: .62rem;
    line-height: 1;
    font-style: normal;
    font-weight: 700;
    white-space: nowrap;
}
.metric-card-green .metric-card-content {
    padding-right: 72px;
}
.metric-card-green .metric-card-content .metric-card-comparison {
    padding-right: 0;
}

@media (max-width: 1540px) {
    .kpi-grid-modern .metric-card {
        grid-template-columns: 46px minmax(0,1fr);
        gap: 10px;
        padding: 14px 13px 12px;
    }
    .kpi-grid-modern .metric-card-icon {
        width: 46px;
        height: 46px;
    }
    .kpi-grid-modern .metric-card-content > span { font-size: .76rem; }
    .kpi-grid-modern .metric-card-content > strong { font-size: 1.08rem; }
    .kpi-grid-modern .metric-card-comparison b { font-size: .69rem; }
    .kpi-grid-modern .metric-card-comparison span { font-size: .61rem; }
    .metric-margin-badge-corner {
        top: 12px;
        right: 12px;
        height: 20px;
        padding: 0 7px;
        font-size: .56rem;
    }
    .metric-card-green .metric-card-content { padding-right: 62px; }
    .kpi-grid-modern .metric-card-trend { right: 12px; bottom: 11px; width: 48px; }
}


/* =========================================================
   CecBi v0.2.17 — Inter como tipografia global
   Mantém tamanhos, pesos e layout existentes.
   ========================================================= */
html,
body,
button,
input,
select,
textarea,
table,
th,
td,
label,
code,
.app-shell,
.login-page {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* =========================================================
   CecBi v0.2.20 — Saldos dos caixas em painel sobre o dashboard
   Corrige bloco CSS da v0.2.19 que havia sido gravado com \n literais.
   ========================================================= */
.topbar-saldos {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    margin: 0;
    border: 1px solid #d9e5f5;
    border-radius: 11px;
    background: #ffffff;
    color: #59749e;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(25, 66, 126, .04);
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.topbar-saldos:hover {
    color: #1f7df2;
    border-color: #bcd5fb;
    background: #f5f9ff;
    transform: translateY(-1px);
}
.topbar-saldos svg {
    display: block;
    width: 19px !important;
    height: 19px !important;
    min-width: 19px;
    min-height: 19px;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.saldo-caixa-modal[hidden] {
    display: none !important;
}
.saldo-caixa-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 5000 !important;
    display: flex !important;
    justify-content: flex-end;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
    isolation: isolate;
}
.saldo-caixa-backdrop {
    position: absolute !important;
    inset: 0 !important;
    z-index: 0;
    background: rgba(8, 26, 55, .38);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .18s ease;
}
.saldo-caixa-card {
    position: relative !important;
    z-index: 1;
    width: min(920px, calc(100vw - 190px));
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 0;
    border-left: 1px solid #dce7f5;
    border-radius: 22px 0 0 22px;
    box-shadow: -28px 0 75px rgba(13, 30, 60, .16);
    transform: translateX(24px);
    opacity: 0;
    outline: none;
    transition: transform .18s ease, opacity .18s ease;
}
.saldo-caixa-modal.aberto .saldo-caixa-backdrop { opacity: 1; }
.saldo-caixa-modal.aberto .saldo-caixa-card {
    transform: translateX(0);
    opacity: 1;
}

.saldo-caixa-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding: 26px 28px 18px;
    border-bottom: 1px solid #edf2f8;
}
.saldo-caixa-kicker {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: #6f89af;
}
.saldo-caixa-header h2 {
    margin: 0;
    color: #12356d;
    font-size: 25px;
    line-height: 1.08;
    font-weight: 700;
}
.saldo-caixa-header p {
    margin: 7px 0 0;
    color: #7890b3;
    font-size: 13px;
    font-weight: 400;
}
.saldo-caixa-fechar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #dfe8f4;
    border-radius: 12px;
    background: #f9fbfe;
    color: #627ca3;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
}
.saldo-caixa-fechar:hover { background: #f1f6fd; color: #1f7df2; }

.saldo-caixa-resumo {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 18px 28px 14px;
}
.saldo-caixa-resumo article {
    min-width: 0;
    padding: 15px 16px;
    border: 1px solid #dfe9f6;
    border-radius: 15px;
    background: linear-gradient(180deg, #fbfdff 0%, #f6faff 100%);
}
.saldo-caixa-resumo span {
    display: block;
    margin-bottom: 6px;
    color: #7089ae;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.saldo-caixa-resumo strong {
    display: block;
    color: #12336d;
    font-size: 19px;
    line-height: 1.2;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.saldo-caixa-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 0 28px 14px;
}
.saldo-caixa-busca {
    flex: 1;
    min-width: 220px;
    height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 13px;
    border: 1px solid #dfe8f4;
    border-radius: 12px;
    background: #ffffff;
}
.saldo-caixa-busca:focus-within {
    border-color: #9fc4fb;
    box-shadow: 0 0 0 3px rgba(31,125,242,.08);
}
.saldo-caixa-busca svg {
    display: block;
    width: 17px !important;
    height: 17px !important;
    min-width: 17px;
    min-height: 17px;
    fill: none !important;
    stroke: #7890b3 !important;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.saldo-caixa-busca input {
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 0;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #173a75;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 400;
}
.saldo-caixa-acoes {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}
.saldo-caixa-acoes button {
    height: 38px;
    padding: 0 14px;
    border: 1px solid #d8e5f7;
    border-radius: 11px;
    background: #f8fbff;
    color: #45658f;
    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.saldo-caixa-acoes button:hover { border-color: #a9c9f8; color: #1f7df2; }

.saldo-caixa-aviso {
    margin: 0 28px 14px;
    padding: 11px 13px;
    border-radius: 12px;
    border: 1px solid #f3d9a2;
    background: #fff9eb;
    color: #7f651c;
    font-size: 12px;
}
.saldo-caixa-tabela-wrap {
    flex: 1;
    min-height: 0;
    margin: 0 28px;
    border: 1px solid #e1e9f4;
    border-radius: 14px;
    overflow: auto;
    background: #fff;
}
.saldo-caixa-tabela {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 760px;
}
.saldo-caixa-tabela th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 12px;
    background: #f6f9fe;
    border-bottom: 1px solid #e1e9f4;
    color: #627da5;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
    text-align: left;
}
.saldo-caixa-tabela td {
    padding: 10px 12px;
    border-bottom: 1px solid #edf2f8;
    color: #38577f;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 400;
}
.saldo-caixa-tabela tbody tr:last-child td { border-bottom: 0; }
.saldo-caixa-tabela tbody tr:hover { background: #fbfdff; }
.saldo-caixa-tabela td:nth-child(n+4),
.saldo-caixa-tabela th:nth-child(n+4) { text-align: right; white-space: nowrap; }
.saldo-caixa-check { width: 34px; text-align: center !important; }
.saldo-caixa-checkbox {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #1f7df2;
    cursor: pointer;
}
.saldo-caixa-vazio { text-align: center !important; padding: 28px !important; color: #7b91b2 !important; }
.saldo-caixa-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 28px 20px;
    color: #7088ac;
    font-size: 12px;
}
.saldo-caixa-footer strong { color: #163970; }
.saldo-caixa-footer small { font-size: 11px; }
body.modal-aberto { overflow: hidden !important; }

@media (max-width: 1000px) {
    .saldo-caixa-card { width: min(760px, calc(100vw - 70px)); }
}
@media (max-width: 760px) {
    .saldo-caixa-card {
        width: 100vw;
        height: 100dvh;
        border-radius: 0;
        border-left: 0;
    }
    .saldo-caixa-header { padding: 18px 18px 14px; }
    .saldo-caixa-resumo { grid-template-columns: 1fr; padding: 14px 18px; }
    .saldo-caixa-toolbar { flex-direction: column; align-items: stretch; padding: 0 18px 12px; }
    .saldo-caixa-busca { min-width: 0; }
    .saldo-caixa-tabela-wrap { margin: 0 18px; }
    .saldo-caixa-footer { padding: 12px 18px 18px; flex-direction: column; align-items: flex-start; }
}


/* =========================================================
   CecBi v0.2.21 — Saldos: visualização separada da seleção
   ========================================================= */
.saldo-caixa-view[hidden] { display: none !important; }

.saldo-caixa-header-acoes {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}
.saldo-caixa-selecionar {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid #cfe0f7;
    border-radius: 11px;
    background: #f6faff;
    color: #285992;
    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.saldo-caixa-selecionar:hover {
    border-color: #9fc4fb;
    background: #eef6ff;
    color: #1f7df2;
}
.saldo-caixa-selecionar svg {
    width: 17px !important;
    height: 17px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.saldo-caixa-selecao-badge {
    min-width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    padding: 0 6px;
    border-radius: 999px;
    background: #dfeeff;
    color: #176bd7;
    font-size: 11px;
    font-weight: 700;
}

.saldo-caixa-view-principal,
.saldo-caixa-view-selecao {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.saldo-caixa-tabela-principal-wrap {
    flex: 1;
    min-height: 0;
    margin-top: 18px;
}
.saldo-caixa-tabela-principal {
    min-width: 650px;
}
.saldo-caixa-tabela-principal th:first-child { width: 46%; }
.saldo-caixa-tabela-principal th:nth-child(n+2),
.saldo-caixa-tabela-principal td:nth-child(n+2) {
    text-align: right !important;
    white-space: nowrap;
}
.saldo-caixa-tabela-principal td {
    padding-top: 13px;
    padding-bottom: 13px;
}
.saldo-caixa-conta-info strong,
.saldo-caixa-conta-info small {
    display: block;
}
.saldo-caixa-conta-info strong {
    color: #173a75;
    font-size: 13px;
    font-weight: 700;
}
.saldo-caixa-conta-info small {
    margin-top: 3px;
    color: #8498b7;
    font-size: 10px;
    font-weight: 500;
}
.saldo-caixa-valor {
    font-size: 13px !important;
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums;
}
.saldo-caixa-valor-usd { color: #176fe5 !important; }
.saldo-caixa-valor-brl { color: #0ba86b !important; }
.saldo-caixa-valor-pyg { color: #d39400 !important; }
.saldo-caixa-vazio-principal {
    height: 230px;
    vertical-align: middle;
}
.saldo-caixa-vazio-principal strong,
.saldo-caixa-vazio-principal span {
    display: block;
}
.saldo-caixa-vazio-principal strong {
    color: #315986;
    font-size: 14px;
}
.saldo-caixa-vazio-principal span {
    margin-top: 6px;
    color: #8297b7;
    font-size: 12px;
    font-weight: 400;
}
.saldo-caixa-footer-principal {
    justify-content: flex-end;
}

.saldo-caixa-selecao-topo {
    padding: 18px 28px 8px;
}
.saldo-caixa-selecao-topo h3 {
    margin: 0;
    color: #173a75;
    font-size: 18px;
    font-weight: 700;
}
.saldo-caixa-selecao-topo p {
    margin: 5px 0 0;
    color: #7b91b3;
    font-size: 12px;
    font-weight: 400;
}
.saldo-caixa-toolbar-selecao {
    padding-top: 8px;
}
.saldo-caixa-tabela-selecao-wrap {
    flex: 1;
    min-height: 0;
}
.saldo-caixa-tabela-selecao {
    min-width: 560px;
}
.saldo-caixa-tabela-selecao th:nth-child(n+2),
.saldo-caixa-tabela-selecao td:nth-child(n+2) {
    text-align: left !important;
    white-space: normal;
}
.saldo-caixa-tabela-selecao td:nth-child(2) { width: 90px; }
.saldo-caixa-footer-selecao {
    border-top: 1px solid #edf2f8;
}
.saldo-caixa-footer-acoes {
    display: flex;
    align-items: center;
    gap: 8px;
}
.saldo-caixa-botao-secundario,
.saldo-caixa-botao-principal {
    min-height: 38px;
    padding: 0 15px;
    border-radius: 11px;
    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.saldo-caixa-botao-secundario {
    border: 1px solid #d8e5f7;
    background: #fff;
    color: #56739c;
}
.saldo-caixa-botao-principal {
    border: 1px solid #1f7df2;
    background: #1f7df2;
    color: #fff;
    box-shadow: 0 5px 14px rgba(31,125,242,.16);
}
.saldo-caixa-botao-principal:hover { background: #176fe5; }
.saldo-caixa-botao-secundario:hover { background: #f7faff; color: #1f7df2; }

/* O resumo total da versão anterior deixa de existir no fluxo atual. */
.saldo-caixa-resumo { display: none !important; }

@media (max-width: 760px) {
    .saldo-caixa-header { align-items: flex-start; }
    .saldo-caixa-header-acoes { gap: 6px; }
    .saldo-caixa-selecionar span:not(.saldo-caixa-selecao-badge) { display: none; }
    .saldo-caixa-selecionar { width: 38px; padding: 0; justify-content: center; }
    .saldo-caixa-selecao-badge { display: none; }
    .saldo-caixa-selecao-topo { padding: 14px 18px 6px; }
    .saldo-caixa-footer-selecao { align-items: stretch; }
    .saldo-caixa-footer-acoes { width: 100%; }
    .saldo-caixa-footer-acoes button { flex: 1; }
}


/* =========================================================
   CecBi v0.2.22 — refinamento UX/UI e acessibilidade
   Fonte de verdade para microajustes visuais desta versão.
   ========================================================= */
:root {
    --muted-accessible: #596f91;
    --green-accessible: #087d52;
    --gold-accessible: #9c6b00;
    --focus-ring: rgba(31, 125, 242, .26);
    --shadow-sm: 0 4px 14px rgba(27, 71, 134, .05);
    --shadow-md: 0 10px 28px rgba(27, 71, 134, .08);
    --shadow-lg: 0 22px 60px rgba(13, 30, 60, .18);
}

/* Conteúdo permanece limitado em ultra-wide, mas agora fica visualmente centralizado. */
.app-main {
    width: 100%;
    max-width: 1900px;
    justify-self: center;
}

/* Funções ainda não entregues não devem parecer clicáveis/disponíveis. */
.app-feature-unavailable,
.app-menu-item-future[hidden] {
    display: none !important;
}

/* Topo limpo: ações reais ficam alinhadas à direita. */
.topbar-secondary-row {
    justify-content: flex-end;
}

/* Tipografia mínima legível e comparativos intencionais, sem “texto cortado”. */
.sidebar-version { font-size: 11px; }
.kpi-grid-modern .metric-card-content > span { font-size: 12px; }
.kpi-grid-modern .metric-card-comparison b { font-size: 12px; }
.kpi-grid-modern .metric-card-comparison span {
    font-size: 11px;
    color: var(--muted-accessible);
    text-overflow: clip;
}
.metric-margin-badge-corner { font-size: 10px; }
.header-user-text small,
.page-hero p,
.panel-title p,
.dashboard-table tbody td,
.saldo-caixa-conta-info small,
.saldo-caixa-selecao-topo p,
.saldo-caixa-footer,
.login-subtitle {
    color: var(--muted-accessible);
}

/* Contraste WCAG AA para saldos sobre fundo branco. */
.saldo-caixa-valor-usd { color: #176fe5 !important; }
.saldo-caixa-valor-brl { color: var(--green-accessible) !important; }
.saldo-caixa-valor-pyg { color: var(--gold-accessible) !important; }

/* Foco por teclado consistente em toda a aplicação. */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

/* Botões/ações compartilham uma sensação de elevação coerente. */
.header-user,
.topbar-saldos,
.saldo-caixa-selecionar,
.saldo-caixa-botao-secundario,
.saldo-caixa-botao-principal {
    box-shadow: var(--shadow-sm);
}
.saldo-caixa-card { box-shadow: var(--shadow-lg); }

/* Navegação móvel: drawer real em vez de menu horizontal ocupando a tela. */
.mobile-menu-toggle,
.sidebar-backdrop {
    display: none;
}
.mobile-menu-toggle {
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    color: var(--blue-dark);
    box-shadow: var(--shadow-sm);
}
.mobile-menu-toggle svg { width: 20px; height: 20px; }

/* Painel de saldos: a lista principal vira cartões legíveis no celular. */
@media (max-width: 760px) {
    .saldo-caixa-tabela-principal-wrap {
        border: 0;
        background: transparent;
        overflow: visible;
    }
    .saldo-caixa-tabela-principal {
        display: block;
        min-width: 0;
    }
    .saldo-caixa-tabela-principal thead { display: none; }
    .saldo-caixa-tabela-principal tbody {
        display: grid;
        gap: 10px;
    }
    .saldo-caixa-tabela-principal tbody tr {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px 8px;
        padding: 14px;
        border: 1px solid #e1e9f4;
        border-radius: 14px;
        background: #fff;
        box-shadow: var(--shadow-sm);
    }
    .saldo-caixa-tabela-principal tbody td {
        display: block;
        min-width: 0;
        padding: 0 !important;
        border: 0 !important;
        text-align: left !important;
        white-space: normal !important;
    }
    .saldo-caixa-tabela-principal .saldo-caixa-conta-info {
        grid-column: 1 / -1;
        padding-bottom: 9px !important;
        border-bottom: 1px solid #edf2f8 !important;
    }
    .saldo-caixa-tabela-principal .saldo-caixa-valor {
        text-align: right !important;
        white-space: nowrap !important;
        font-size: 12px !important;
    }
    .saldo-caixa-tabela-principal .saldo-caixa-valor::before {
        display: block;
        margin-bottom: 4px;
        color: var(--muted-accessible);
        font-size: 10px;
        font-weight: 600;
    }
    .saldo-caixa-tabela-principal .saldo-caixa-valor-usd::before { content: 'US$'; }
    .saldo-caixa-tabela-principal .saldo-caixa-valor-brl::before { content: 'R$'; }
    .saldo-caixa-tabela-principal .saldo-caixa-valor-pyg::before { content: '₲'; }
    .saldo-caixa-vazio-principal {
        grid-column: 1 / -1;
        height: auto;
        padding: 28px 16px !important;
        text-align: center !important;
    }
}

@media (max-width: 1200px) {
    .app-shell { grid-template-columns: minmax(0, 1fr); }
    .sidebar {
        position: fixed !important;
        inset: 0 auto 0 0;
        z-index: 140;
        width: min(286px, 86vw);
        height: 100dvh !important;
        padding: 18px 14px 20px;
        border-right: 1px solid var(--line);
        border-bottom: 0;
        box-shadow: var(--shadow-lg);
        transform: translateX(-104%);
        transition: transform .22s ease;
        overflow-y: auto;
    }
    .sidebar-menu {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
    }
    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 130;
        padding: 0;
        border: 0;
        background: rgba(13, 30, 60, .38);
        backdrop-filter: blur(2px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .2s ease, visibility .2s ease;
    }
    body.sidebar-aberta { overflow: hidden; }
    body.sidebar-aberta .sidebar { transform: translateX(0); }
    body.sidebar-aberta .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .mobile-menu-toggle { display: grid; flex: 0 0 auto; }
    .topbar-secondary-row {
        justify-content: space-between;
        flex-direction: row !important;
        align-items: center !important;
    }
    .topbar-user { margin-left: auto; width: auto; }
}

@media (max-width: 820px) {
    .app-main { padding: 12px 14px 20px; }
    .mobile-menu-toggle,
    .topbar-saldos { width: 44px; height: 44px; }
    .header-logout {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    .topbar-secondary-row .header-user { min-height: 44px; }
}

@media (max-width: 560px) {
    .header-user-text { display: none; }
    .header-user { gap: 5px; }
    .topbar-user { gap: 6px; }
}


/* =========================================================
   CecBi v0.2.27 — ordenação de contas por código ou nome
   ========================================================= */
.saldo-caixa-ordenacao {
    height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 8px 0 11px;
    border: 1px solid #d8e3f2;
    border-radius: 11px;
    background: #fff;
    color: #5a6f91;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.saldo-caixa-ordenacao select {
    appearance: auto;
    height: 28px;
    min-width: 72px;
    padding: 0 3px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #183d75;
    font-family: "Inter", sans-serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}
.saldo-caixa-ordenacao:focus-within {
    border-color: #8dbbf8;
    box-shadow: 0 0 0 3px rgba(31, 125, 242, .10);
}
@media (max-width: 680px) {
    .saldo-caixa-ordenacao span { display: none; }
    .saldo-caixa-ordenacao { padding-left: 7px; }
}


/* =========================================================
   CecBi v1.0.0 — gráficos 12 meses + estados vazios refinados
   ========================================================= */
.dashboard-empty-state {
    min-height: 116px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px 18px;
    border: 1px dashed #d6e2f2;
    border-radius: 14px;
    background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
    text-align: center;
    color: #60779a;
}

.dashboard-table-panel .dashboard-empty-state {
    min-height: 165px;
    margin-top: 6px;
}

.dashboard-empty-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #edf5ff;
    color: #2f7cf3;
    margin-bottom: 2px;
}

.dashboard-empty-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-empty-state strong {
    color: #27466f;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 700;
}

.dashboard-empty-state > span:last-child {
    max-width: 300px;
    color: #7187a8;
    font-size: 11px;
    line-height: 1.45;
    font-weight: 400;
}

.dashboard-empty-state-categoria .dashboard-empty-icon {
    background: #f1f4ff;
    color: #5a6ee6;
}

.dashboard-empty-state-ranking .dashboard-empty-icon {
    background: #fff8e8;
    color: #b68119;
}

.dashboard-empty-state-vendas .dashboard-empty-icon {
    background: #eef9f3;
    color: #16815a;
}

.dashboard-panel-header .panel-chip {
    white-space: nowrap;
}

@media (max-width: 760px) {
    .dashboard-empty-state {
        min-height: 108px;
        padding: 17px 14px;
    }
    .dashboard-table-panel .dashboard-empty-state { min-height: 140px; }
    .dashboard-panel-header .panel-chip {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* =========================================================
   CecBi v1.1.0 - PDF da venda / modelos de impressão
   ========================================================= */
.nota-card-header { align-items: flex-start; }
.nota-header-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.nota-pdf-botao {
    min-height: 40px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    padding:0 13px;
    border-radius:12px;
    border:1px solid #cfe0fb;
    background:#1f7df2;
    color:#fff;
    text-decoration:none;
    font-size:12px;
    font-weight:700;
    line-height:1;
    box-shadow:0 7px 18px rgba(31,125,242,.16);
    transition:background-color .18s,border-color .18s,transform .18s,box-shadow .18s;
}
.nota-pdf-botao:hover { background:#1669d5; border-color:#1669d5; transform:translateY(-1px); box-shadow:0 10px 22px rgba(31,125,242,.20); }
.nota-pdf-botao:active { transform:translateY(0); }
.nota-pdf-botao svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.nota-modelo-controle { display:flex; align-items:center; gap:7px; }
.nota-modelo-controle label { font-size:11px; font-weight:700; color:#5f7497; }
.nota-modelo-controle select {
    height:40px;
    border:1px solid #d6e0ee;
    border-radius:11px;
    background:#fff;
    color:#173968;
    font:600 12px Inter, sans-serif;
    padding:0 30px 0 10px;
}
.nota-modelo-badge {
    min-height:40px;
    display:inline-flex;
    align-items:center;
    padding:0 11px;
    border-radius:11px;
    border:1px solid #dbe5f3;
    background:#f7faff;
    color:#597294;
    font-size:11px;
    font-weight:700;
}
@media (max-width: 680px) {
    .nota-card-header { gap:10px; }
    .nota-header-actions { width:100%; justify-content:flex-start; }
    .nota-pdf-botao { flex:1 1 auto; }
    .nota-fechar { margin-left:auto; }
    .nota-modelo-badge { display:none; }
}

/* CecBi v1.1.9 - botão para salvar diretamente o mesmo PDF visualizado */
.nota-salvar-botao {
    min-height:40px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    padding:0 12px;
    border-radius:12px;
    border:1px solid #cfdbea;
    background:#fff;
    color:#244b7b;
    text-decoration:none;
    font-size:12px;
    font-weight:700;
    line-height:1;
    transition:background-color .18s,border-color .18s,color .18s,transform .18s;
}
.nota-salvar-botao:hover { background:#f4f8fd; border-color:#aebfd5; color:#163d70; transform:translateY(-1px); }
.nota-salvar-botao:active { transform:translateY(0); }
.nota-salvar-botao svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
@media (max-width:680px) {
    .nota-salvar-botao { flex:1 1 auto; }
}

/* =========================================================
   CecBi v1.2.0 — Dashboard modular/personalizável
   ========================================================= */
.topbar-personalizar{
    min-height:36px;
    padding:0 12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    border:1px solid var(--line-2);
    border-radius:11px;
    background:#fff;
    color:var(--blue-dark);
    font:700 12px/1 Inter, sans-serif;
    box-shadow:var(--shadow-sm);
    cursor:pointer;
    transition:background-color .18s,border-color .18s,transform .18s;
    text-decoration:none;
}
.topbar-personalizar:hover{background:#eef5ff;border-color:#c9dcf9;transform:translateY(-1px)}
.topbar-personalizar svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

.dashboard-widget-section{margin-bottom:11px}
.dashboard-widget-head{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:16px;
    margin:0 0 8px;
}
.dashboard-widget-head h2{margin:0;color:var(--blue-dark);font-size:.95rem;font-weight:800;letter-spacing:-.02em}
.dashboard-widget-head p{margin:2px 0 0;color:#657da3;font-size:11px}
.dashboard-widget-head-compact{margin-bottom:7px}
.dashboard-widget-controls{display:flex;align-items:center;gap:6px;flex:0 0 auto}

.dashboard-kpi-viewport,.dashboard-chart-viewport{overflow:hidden;width:100%}
.dashboard-kpi-track,.dashboard-chart-track{
    display:flex;
    gap:10px;
    transition:transform .38s cubic-bezier(.2,.75,.25,1);
    will-change:transform;
}
.dashboard-kpi-slide{
    flex:0 0 calc((100% - 50px) / 6);
    min-width:0;
    margin:0 !important;
}
.dashboard-chart-slide{
    flex:0 0 calc((100% - 20px) / 3);
    min-width:0;
    min-height:254px;
    margin:0;
}
.dashboard-chart-slide .canvas-wrapper-medium{height:184px;min-height:184px}
.dashboard-chart-period{white-space:nowrap}

.dashboard-chart-loading{
    min-height:184px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
}
.dashboard-chart-loading[hidden]{display:none}
.dashboard-chart-loading span{width:7px;height:7px;border-radius:50%;background:#8eb7ef;animation:cecbiChartPulse .9s ease-in-out infinite alternate}
.dashboard-chart-loading span:nth-child(2){animation-delay:.15s}.dashboard-chart-loading span:nth-child(3){animation-delay:.3s}
@keyframes cecbiChartPulse{from{opacity:.28;transform:translateY(2px)}to{opacity:1;transform:translateY(-2px)}}
.dashboard-chart-empty{
    min-height:184px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
    gap:6px;
    color:#657da3;
}
.dashboard-chart-empty[hidden]{display:none}
.dashboard-chart-empty .dashboard-empty-icon{width:38px;height:38px}
.dashboard-chart-empty strong{font-size:13px;color:var(--blue-dark)}
.dashboard-chart-empty > span:last-child{font-size:11px;max-width:270px}

.metric-card-purple::after{background:linear-gradient(90deg,rgba(132,91,222,.62),rgba(132,91,222,0))}
.metric-card-purple .metric-card-icon{background:linear-gradient(135deg,#9a7af2,#7350d6);box-shadow:0 8px 20px rgba(115,80,214,.18)}
.metric-card-orange::after{background:linear-gradient(90deg,rgba(220,145,16,.62),rgba(220,145,16,0))}
.metric-card-orange .metric-card-icon{background:linear-gradient(135deg,#f2b23b,#d8870c);box-shadow:0 8px 20px rgba(216,135,12,.18)}
.metric-card-cyan::after{background:linear-gradient(90deg,rgba(20,159,174,.62),rgba(20,159,174,0))}
.metric-card-cyan .metric-card-icon{background:linear-gradient(135deg,#21b7c5,#128c9b);box-shadow:0 8px 20px rgba(18,140,155,.18)}
.metric-card-indigo::after{background:linear-gradient(90deg,rgba(76,91,196,.62),rgba(76,91,196,0))}
.metric-card-indigo .metric-card-icon{background:linear-gradient(135deg,#6574e8,#4656bf);box-shadow:0 8px 20px rgba(70,86,191,.18)}

.dashboard-personalizacao-modal[hidden]{display:none}
.dashboard-personalizacao-modal{position:fixed;inset:0;z-index:130;display:grid;place-items:center;padding:24px}
.dashboard-personalizacao-backdrop{position:absolute;inset:0;background:rgba(13,30,60,.52);backdrop-filter:blur(5px)}
.dashboard-personalizacao-card{
    position:relative;z-index:1;width:min(920px,100%);max-height:calc(100vh - 48px);overflow:auto;
    background:#fff;border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow-lg);padding:22px;
}
.dashboard-personalizacao-header{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:18px}
.dashboard-personalizacao-header h2{margin:7px 0 5px;font-size:25px;color:var(--blue-dark);letter-spacing:-.03em}
.dashboard-personalizacao-header p{margin:0;color:#657da3;font-size:13px}
.dashboard-personalizacao-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.dashboard-personalizacao-grupo{border:1px solid var(--line);border-radius:18px;padding:16px;background:#fbfdff}
.dashboard-personalizacao-grupo h3{margin:0 0 4px;color:var(--blue-dark);font-size:16px}
.dashboard-personalizacao-grupo>p{margin:0 0 12px;color:#657da3;font-size:11px;line-height:1.5}
.dashboard-personalizacao-opcoes{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.dashboard-widget-option{display:flex;align-items:center;gap:7px;min-height:42px;padding:7px 8px;border:1px solid #e1eaf6;border-radius:11px;background:#fff;color:#36527f;font-size:12px;font-weight:650;transition:border-color .15s ease,background .15s ease,opacity .15s ease,transform .15s ease}
.dashboard-widget-option:hover{border-color:#bdd4f5;background:#f6faff}
.dashboard-widget-option.is-dragging{opacity:.48;border-style:dashed;transform:scale(.985)}
.dashboard-widget-option input{width:16px;height:16px;accent-color:#176fe5;flex:0 0 auto}
.dashboard-widget-name{min-width:0;flex:1;cursor:pointer;line-height:1.2}
.dashboard-widget-drag{display:inline-grid;place-items:center;width:20px;height:26px;color:#8aa0bf;font-weight:900;letter-spacing:-2px;cursor:grab;user-select:none;touch-action:none}
.dashboard-widget-drag:active{cursor:grabbing}
.dashboard-widget-order-actions{display:flex;gap:3px;flex:0 0 auto}
.dashboard-widget-order-actions button{width:24px;height:24px;padding:0;border:1px solid #dce6f3;border-radius:7px;background:#f8fbff;color:#49658d;font-size:12px;font-weight:800;line-height:1;cursor:pointer}
.dashboard-widget-order-actions button:hover{background:#edf5ff;border-color:#bfd5f2;color:#164d9b}
.dashboard-personalizacao-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}
.dashboard-personalizacao-actions{display:flex;align-items:center;gap:10px}

@media(max-width:1180px){
    .dashboard-kpi-slide{flex-basis:calc((100% - 20px) / 3)}
    .dashboard-chart-slide{flex-basis:calc((100% - 10px) / 2)}
}
@media(max-width:760px){
    .topbar-personalizar{width:40px;height:40px;padding:0}.topbar-personalizar span{display:none}
    .dashboard-widget-head{align-items:flex-start}.dashboard-widget-head p{display:none}
    .dashboard-kpi-slide,.dashboard-chart-slide{flex-basis:100%}
    .dashboard-personalizacao-modal{padding:10px}
    .dashboard-personalizacao-card{padding:16px;border-radius:20px;max-height:calc(100vh - 20px)}
    .dashboard-personalizacao-grid{grid-template-columns:1fr}
    .dashboard-personalizacao-opcoes{grid-template-columns:1fr}
    .dashboard-widget-order-actions button{width:30px;height:30px}
    .dashboard-personalizacao-footer{align-items:stretch;flex-direction:column-reverse}
    .dashboard-personalizacao-actions{display:grid;grid-template-columns:1fr 1fr}
    .dashboard-personalizacao-footer>button{width:100%}
}
@media(prefers-reduced-motion:reduce){.dashboard-kpi-track,.dashboard-chart-track{transition:none}.dashboard-chart-loading span{animation:none}}


/* =========================================================
   CecBi v1.2.1 — BLOQUEIO VISUAL DO DASHBOARD
   A identidade aprovada até v1.1.9 é a referência oficial.
   A modularização não pode alterar tipografia, proporções ou
   aparência dos componentes já aprovados.
   ========================================================= */
.dashboard-kpi-carousel-section .metric-card{
    font-family:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
    grid-template-columns:50px minmax(0,1fr);
    gap:12px;
    min-height:126px;
    padding:16px 16px 14px;
    border-radius:18px;
    align-items:start;
    box-shadow:0 7px 24px rgba(30,55,100,.06);
}
.dashboard-kpi-carousel-section .metric-card-icon{
    width:50px;
    height:50px;
    border-radius:13px;
}
.dashboard-kpi-carousel-section .metric-card-icon svg{
    width:24px;
    height:24px;
}
.dashboard-kpi-carousel-section .metric-card-content{
    min-width:0;
    padding-right:2px;
}
.dashboard-kpi-carousel-section .metric-card-content > span{
    font-family:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
    font-size:12px;
    line-height:1.15;
    font-weight:500;
    letter-spacing:-.01em;
    margin-top:0;
}
.dashboard-kpi-carousel-section .metric-card-content > strong{
    font-family:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
    display:block;
    margin-top:6px;
    font-size:1.20rem;
    line-height:1.05;
    font-weight:800;
    letter-spacing:-.035em;
    white-space:nowrap;
}
.dashboard-kpi-carousel-section .metric-card-content .metric-card-comparison{
    margin-top:12px;
    gap:7px;
    padding-right:58px;
    flex-wrap:nowrap;
    white-space:nowrap;
    overflow:hidden;
}
.dashboard-kpi-carousel-section .metric-card-comparison b{
    font-family:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
    font-size:12px;
    font-weight:700;
}
.dashboard-kpi-carousel-section .metric-card-comparison span{
    font-family:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
    font-size:11px;
    font-weight:400;
    color:var(--muted-accessible);
    text-overflow:clip;
}
.dashboard-kpi-carousel-section .metric-card-trend{
    position:absolute;
    right:14px;
    bottom:13px;
    width:52px;
    margin:0;
    align-self:end;
}
.dashboard-kpi-carousel-section .metric-card-trend svg{
    height:30px;
    stroke-width:2.2;
}
.dashboard-kpi-carousel-section .metric-margin-badge-corner{
    top:14px;
    right:14px;
    height:22px;
    padding:0 8px;
    font-size:10px;
}
.dashboard-kpi-carousel-section .metric-card-has-badge .metric-card-content{
    padding-right:72px;
}
.dashboard-kpi-carousel-section .metric-card-has-badge .metric-card-content .metric-card-comparison{
    padding-right:0;
}

/* Vendas por Categoria: restaura o layout/legenda aprovados na v1.1.9. */
.dashboard-category-modular{
    grid-template-columns:128px minmax(0,1fr);
    gap:9px;
    align-items:center;
    min-height:184px;
}
.dashboard-category-modular[hidden]{display:none!important}
.dashboard-category-modular:not([hidden]){display:grid}
.dashboard-category-modular .category-chart-wrapper{
    width:128px;
    height:128px;
    min-height:128px;
}
.dashboard-category-modular .category-chart-wrapper canvas{
    max-width:128px!important;
    max-height:128px!important;
}
.dashboard-category-modular .category-legend-list{
    display:flex;
    flex-direction:column;
    gap:6px;
    min-width:0;
}
.dashboard-category-modular .category-legend-item{
    display:grid;
    grid-template-columns:7px minmax(0,1fr) auto;
    align-items:center;
    gap:6px;
    min-width:0;
    font-size:.65rem;
    color:#4f6894;
}
.dashboard-category-modular .category-legend-label{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.dashboard-category-modular .category-legend-item strong{
    color:var(--blue-dark);
    font-weight:800;
    white-space:nowrap;
}
.dashboard-category-modular .category-legend-dot{
    width:7px;
    height:7px;
    border-radius:50%;
    display:block;
}

@media(max-width:1540px){
    .dashboard-kpi-carousel-section .metric-card{
        grid-template-columns:46px minmax(0,1fr);
        gap:10px;
        min-height:118px;
        padding:14px 13px 12px;
    }
    .dashboard-kpi-carousel-section .metric-card-icon{width:46px;height:46px}
    .dashboard-kpi-carousel-section .metric-card-content > strong{font-size:1.08rem}
    .dashboard-kpi-carousel-section .metric-margin-badge-corner{top:12px;right:12px;height:20px;padding:0 7px;font-size:10px}
    .dashboard-kpi-carousel-section .metric-card-has-badge .metric-card-content{padding-right:62px}
    .dashboard-kpi-carousel-section .metric-card-trend{right:12px;bottom:11px;width:48px}
}
@media(max-width:760px){
    .dashboard-category-modular{
        grid-template-columns:112px minmax(0,1fr);
        gap:8px;
    }
    .dashboard-category-modular .category-chart-wrapper{width:112px;height:112px;min-height:112px}
    .dashboard-category-modular .category-chart-wrapper canvas{max-width:112px!important;max-height:112px!important}
}


/* CecBi v1.2.2 — personalização também para Destaques / Tops.
   Não altera a identidade visual aprovada até a v1.1.9. */
.dashboard-personalizacao-grupo-tops{grid-column:1/-1}
.dashboard-personalizacao-opcoes-tops{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:760px){.dashboard-personalizacao-opcoes-tops{grid-template-columns:1fr}}

/* =========================================================
   CecBi v1.2.3 — Modo Escuro Leve / Dim Mode
   ADITIVO: o modo claro aprovado até v1.1.9 permanece intacto.
   O tema escuro altera apenas cores; medidas, tipografia, espaçamento,
   bordas, raios e hierarquia visual permanecem os mesmos.
   ========================================================= */
.topbar-theme-toggle{
    width:36px;
    height:36px;
    flex:0 0 36px;
    display:inline-grid;
    place-items:center;
    padding:0;
    border:1px solid var(--line-2);
    border-radius:11px;
    background:#fff;
    color:#59749e;
    box-shadow:var(--shadow-sm);
    cursor:pointer;
    transition:background-color .18s ease,border-color .18s ease,color .18s ease,transform .18s ease;
}
.topbar-theme-toggle:hover{background:#eef5ff;border-color:#c9dcf9;color:#1f7df2;transform:translateY(-1px)}
.topbar-theme-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.topbar-theme-toggle svg[hidden]{display:none!important}

html[data-theme="dim"] body:not(.login-page){
    color-scheme:dark;
    --bg:#1e2937;
    --panel:#263342;
    --panel-2:#2c3a4b;
    --line:#3a495d;
    --line-2:#495b73;
    --text:#e8eef7;
    --text-body:#cbd5e2;
    --muted:#91a1b6;
    --muted-accessible:#a6b4c8;
    --blue-dark:#dce9ff;
    --blue:#4c8dff;
    --blue-soft:rgba(76,141,255,.14);
    --red:#ff6876;
    --red-soft:rgba(255,104,118,.12);
    --green:#43c58b;
    --green-soft:rgba(67,197,139,.12);
    --green-accessible:#62d7a2;
    --gold:#f1b84b;
    --gold-soft:rgba(241,184,75,.12);
    --gold-accessible:#f4c968;
    --focus-ring:rgba(92,153,255,.34);
    --shadow-sm:0 4px 14px rgba(0,0,0,.16);
    --shadow-md:0 10px 28px rgba(0,0,0,.20);
    --shadow-lg:0 22px 60px rgba(0,0,0,.30);
    background:linear-gradient(180deg,#223040 0%,#1e2937 100%);
    color:var(--text-body);
}

/* Superfícies principais */
html[data-theme="dim"] body:not(.login-page) .sidebar,
html[data-theme="dim"] body:not(.login-page) .periodo-container,
html[data-theme="dim"] body:not(.login-page) .dashboard-panel,
html[data-theme="dim"] body:not(.login-page) .reports-hero,
html[data-theme="dim"] body:not(.login-page) .relatorio-comissao-panel,
html[data-theme="dim"] body:not(.login-page) .overview-heading,
html[data-theme="dim"] body:not(.login-page) .info-panel,
html[data-theme="dim"] body:not(.login-page) .ultimas-vendas-container,
html[data-theme="dim"] body:not(.login-page) .chart-container,
html[data-theme="dim"] body:not(.login-page) .metric-card,
html[data-theme="dim"] body:not(.login-page) .report-card,
html[data-theme="dim"] body:not(.login-page) .nota-card,
html[data-theme="dim"] body:not(.login-page) .dashboard-personalizacao-card,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-card{
    background:var(--panel);
    border-color:var(--line);
    box-shadow:var(--shadow-sm);
}
html[data-theme="dim"] body:not(.login-page) .sidebar{border-right-color:var(--line)}
html[data-theme="dim"] body:not(.login-page) .sidebar-brand{
    background:transparent;
}
html[data-theme="dim"] body:not(.login-page) .sidebar-logo-image{
    filter:
        brightness(1.08)
        saturate(1.05)
        drop-shadow(0 1px 1px rgba(255,255,255,.24))
        drop-shadow(0 5px 12px rgba(4,12,24,.28));
}

/* Superfícies internas */
html[data-theme="dim"] body:not(.login-page) .nota-info,
html[data-theme="dim"] body:not(.login-page) .nota-totais>div,
html[data-theme="dim"] body:not(.login-page) .relatorio-comissao-metrica,
html[data-theme="dim"] body:not(.login-page) .relatorio-comissao-resumo,
html[data-theme="dim"] body:not(.login-page) .reports-hero-badge,
html[data-theme="dim"] body:not(.login-page) .dashboard-personalizacao-grupo,
html[data-theme="dim"] body:not(.login-page) .dashboard-widget-option,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-tabela-wrap,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-tabela-principal-wrap,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-tabela-selecao-wrap,
html[data-theme="dim"] body:not(.login-page) .texto-info{
    background:var(--panel-2);
    border-color:var(--line);
    color:var(--text-body);
}

/* Controles */
html[data-theme="dim"] body:not(.login-page) .topbar-theme-toggle,
html[data-theme="dim"] body:not(.login-page) .topbar-personalizar,
html[data-theme="dim"] body:not(.login-page) .topbar-saldos,
html[data-theme="dim"] body:not(.login-page) .topbar-notification,
html[data-theme="dim"] body:not(.login-page) .topbar-version,
html[data-theme="dim"] body:not(.login-page) .header-user,
html[data-theme="dim"] body:not(.login-page) .mobile-menu-toggle,
html[data-theme="dim"] body:not(.login-page) .botao-limpar,
html[data-theme="dim"] body:not(.login-page) .botao-mais-filtros,
html[data-theme="dim"] body:not(.login-page) .botao-exportar,
html[data-theme="dim"] body:not(.login-page) .nota-fechar,
html[data-theme="dim"] body:not(.login-page) .nota-salvar-botao,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-selecionar,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-botao-secundario,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-acoes button{
    background:var(--panel-2);
    border-color:var(--line-2);
    color:var(--text-body);
}
html[data-theme="dim"] body:not(.login-page) .topbar-theme-toggle:hover,
html[data-theme="dim"] body:not(.login-page) .topbar-personalizar:hover,
html[data-theme="dim"] body:not(.login-page) .topbar-saldos:hover,
html[data-theme="dim"] body:not(.login-page) .header-logout:hover,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-acoes button:hover,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-botao-secundario:hover{
    background:#334356;
    border-color:#52709a;
    color:#8fbbff;
}
html[data-theme="dim"] body:not(.login-page) .header-logout{
    background:#293646;
    border-color:var(--line-2);
    color:#cfe0f7;
}
html[data-theme="dim"] body:not(.login-page) .botao-mais-filtros.ativo{
    background:rgba(76,141,255,.14);
    border-color:rgba(92,153,255,.42);
    color:#a9caff;
}

html[data-theme="dim"] body:not(.login-page) input,
html[data-theme="dim"] body:not(.login-page) select,
html[data-theme="dim"] body:not(.login-page) textarea,
html[data-theme="dim"] body:not(.login-page) .campo-filtro input,
html[data-theme="dim"] body:not(.login-page) .campo-filtro select,
html[data-theme="dim"] body:not(.login-page) .relatorio-comissao-filtros input,
html[data-theme="dim"] body:not(.login-page) .relatorio-comissao-filtros select,
html[data-theme="dim"] body:not(.login-page) .latest-sales-search input,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-busca input,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-ordenacao select{
    background:#23303f;
    border-color:var(--line-2);
    color:var(--text);
}
html[data-theme="dim"] body:not(.login-page) input::placeholder,
html[data-theme="dim"] body:not(.login-page) textarea::placeholder{color:#77879c}

/* Hierarquia tipográfica — somente cor; tamanhos permanecem os aprovados */
html[data-theme="dim"] body:not(.login-page) .page-hero h1,
html[data-theme="dim"] body:not(.login-page) .dashboard-panel-header h2,
html[data-theme="dim"] body:not(.login-page) .dashboard-widget-head h2,
html[data-theme="dim"] body:not(.login-page) .metric-card-content > strong,
html[data-theme="dim"] body:not(.login-page) .metric-card-content > span,
html[data-theme="dim"] body:not(.login-page) .header-user-text span,
html[data-theme="dim"] body:not(.login-page) .dashboard-empty-state strong,
html[data-theme="dim"] body:not(.login-page) .dashboard-chart-empty strong,
html[data-theme="dim"] body:not(.login-page) .nota-card-header h2,
html[data-theme="dim"] body:not(.login-page) .nota-info strong,
html[data-theme="dim"] body:not(.login-page) .nota-totais strong,
html[data-theme="dim"] body:not(.login-page) .reports-hero-badge strong,
html[data-theme="dim"] body:not(.login-page) .report-card h3,
html[data-theme="dim"] body:not(.login-page) .relatorio-comissao-metrica strong,
html[data-theme="dim"] body:not(.login-page) .relatorio-comissao-resumo strong,
html[data-theme="dim"] body:not(.login-page) .relatorio-comissao-valor,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-header h2,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-selecao-topo h3,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-conta-info strong,
html[data-theme="dim"] body:not(.login-page) .dashboard-category-modular .category-legend-item strong{
    color:var(--text);
}
html[data-theme="dim"] body:not(.login-page) .page-hero p,
html[data-theme="dim"] body:not(.login-page) .dashboard-panel-header p,
html[data-theme="dim"] body:not(.login-page) .dashboard-widget-head p,
html[data-theme="dim"] body:not(.login-page) .header-user-text small,
html[data-theme="dim"] body:not(.login-page) .campo-filtro label,
html[data-theme="dim"] body:not(.login-page) .relatorio-comissao-filtros label,
html[data-theme="dim"] body:not(.login-page) .dashboard-empty-state > span:last-child,
html[data-theme="dim"] body:not(.login-page) .dashboard-chart-empty,
html[data-theme="dim"] body:not(.login-page) .dashboard-personalizacao-header p,
html[data-theme="dim"] body:not(.login-page) .dashboard-personalizacao-grupo>p,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-header p,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-kicker,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-selecao-topo p,
html[data-theme="dim"] body:not(.login-page) .nota-card-header p,
html[data-theme="dim"] body:not(.login-page) .nota-info span,
html[data-theme="dim"] body:not(.login-page) .nota-totais span,
html[data-theme="dim"] body:not(.login-page) .relatorio-comissao-resumo span,
html[data-theme="dim"] body:not(.login-page) .dashboard-category-modular .category-legend-item{
    color:var(--muted-accessible);
}

/* Tabelas */
html[data-theme="dim"] body:not(.login-page) .dashboard-table thead th,
html[data-theme="dim"] body:not(.login-page) .relatorio-comissao-tabela th,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-tabela th{
    background:#2c3a4b;
    color:#aebdd2;
    border-color:var(--line);
}
html[data-theme="dim"] body:not(.login-page) .dashboard-table tbody td,
html[data-theme="dim"] body:not(.login-page) .relatorio-comissao-tabela td,
html[data-theme="dim"] body:not(.login-page) .nota-itens td,
html[data-theme="dim"] body:not(.login-page) .nota-itens th,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-tabela td{
    color:#c6d1df;
    border-color:#38485c;
}
html[data-theme="dim"] body:not(.login-page) .dashboard-table tbody tr:hover,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-tabela tbody tr:hover{background:#293747}
html[data-theme="dim"] body:not(.login-page) .relatorio-comissao-tabela tfoot th{background:#304052;color:var(--text)}

/* Estados vazios e chips */
html[data-theme="dim"] body:not(.login-page) .dashboard-empty-state{
    background:linear-gradient(180deg,#253243 0%,#222d3b 100%);
    border-color:#40516a;
    color:#a3b1c5;
}
html[data-theme="dim"] body:not(.login-page) .dashboard-empty-icon{background:#31455d;color:#7fb0ff}
html[data-theme="dim"] body:not(.login-page) .dashboard-empty-state-categoria .dashboard-empty-icon{background:#38445f;color:#a7b3ff}
html[data-theme="dim"] body:not(.login-page) .dashboard-empty-state-ranking .dashboard-empty-icon{background:#4a4029;color:#f1c368}
html[data-theme="dim"] body:not(.login-page) .dashboard-empty-state-vendas .dashboard-empty-icon{background:#2d473e;color:#68d4a2}
html[data-theme="dim"] body:not(.login-page) .panel-chip,
html[data-theme="dim"] body:not(.login-page) .periodo-label,
html[data-theme="dim"] body:not(.login-page) .nota-kicker,
html[data-theme="dim"] body:not(.login-page) .report-status,
html[data-theme="dim"] body:not(.login-page) .nota-modelo-badge{
    background:#304052;
    border-color:var(--line);
    color:#b7c6da;
}
html[data-theme="dim"] body:not(.login-page) .panel-link{background:#304052;border-color:#405a7c;color:#80b0ff}

/* Menu lateral */
html[data-theme="dim"] body:not(.login-page) .app-menu-item{color:#aebbd0}
html[data-theme="dim"] body:not(.login-page) .app-menu-item:hover,
html[data-theme="dim"] body:not(.login-page) .app-menu-item-link:hover{background:#304052;color:#e2ebf7}
html[data-theme="dim"] body:not(.login-page) .app-menu-item.ativo{color:#fff;background:linear-gradient(135deg,#176fe5 0%,#3b8cff 100%)}
html[data-theme="dim"] body:not(.login-page) .sidebar-footer{border-color:var(--line)}
html[data-theme="dim"] body:not(.login-page) .sidebar-version{background:rgba(76,141,255,.14);color:#a9caff}

/* Modais / painéis laterais */
html[data-theme="dim"] body:not(.login-page) .nota-modal-backdrop,
html[data-theme="dim"] body:not(.login-page) .dashboard-personalizacao-backdrop,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-backdrop{background:rgba(5,10,16,.58)}
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-card{border-left-color:var(--line)}
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-header{border-bottom-color:var(--line)}
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-fechar{background:#304052;border-color:var(--line-2);color:#b5c4d8}
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-fechar:hover{background:#394b60;color:#8fbbff}
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-botao-principal{background:#397fe8;border-color:#397fe8;color:#fff}
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-botao-principal:hover{background:#4c8dff}

/* Indicadores preservam suas cores sem saturar o fundo escuro. */
html[data-theme="dim"] body:not(.login-page) .metric-card-comparison span{color:#9eacc0}
html[data-theme="dim"] body:not(.login-page) .metric-card-trend{opacity:.90}
html[data-theme="dim"] body:not(.login-page) .metric-margin-badge-corner{box-shadow:none}
html[data-theme="dim"] body:not(.login-page) .status-finalizada{background:rgba(67,197,139,.14);color:#6bd5a4}
html[data-theme="dim"] body:not(.login-page) .status-pendente{background:rgba(255,104,118,.13);color:#ff8993}

/* Flatpickr acompanha o Dim Mode sem alterar o layout do calendário. */
html[data-theme="dim"] body:not(.login-page) .flatpickr-calendar,
html[data-theme="dim"] body:not(.login-page) .flatpickr-months .flatpickr-month,
html[data-theme="dim"] body:not(.login-page) .flatpickr-weekdays,
html[data-theme="dim"] body:not(.login-page) span.flatpickr-weekday{
    background:#263342!important;
    color:#cbd5e2!important;
    border-color:#344256!important;
}
html[data-theme="dim"] body:not(.login-page) .flatpickr-calendar{border-color:#344256!important;box-shadow:0 16px 42px rgba(0,0,0,.30)!important}
html[data-theme="dim"] body:not(.login-page) .flatpickr-days,
html[data-theme="dim"] body:not(.login-page) .dayContainer{background:#222d3b!important}
html[data-theme="dim"] body:not(.login-page) .flatpickr-day{color:#cbd5e2!important}
html[data-theme="dim"] body:not(.login-page) .flatpickr-day:hover{background:#334356!important;border-color:#40516a!important}
html[data-theme="dim"] body:not(.login-page) .flatpickr-day.prevMonthDay,
html[data-theme="dim"] body:not(.login-page) .flatpickr-day.nextMonthDay{color:#65758b!important}
html[data-theme="dim"] body:not(.login-page) .flatpickr-current-month .flatpickr-monthDropdown-months,
html[data-theme="dim"] body:not(.login-page) .flatpickr-current-month input.cur-year{color:#e8eef7!important;background:#222d3b!important}

/* Scrollbars discretas no modo escuro. */
html[data-theme="dim"] body:not(.login-page) *{scrollbar-color:#52647c #202a37}

@media(max-width:760px){
    .topbar-theme-toggle{width:40px;height:40px;flex-basis:40px}
}

/* Complementos do Dim Mode para controles e componentes legados. */
html[data-theme="dim"] body:not(.login-page) .ranking-carousel-button{
    background:var(--panel-2);border-color:var(--line-2);color:#cfe0f7;box-shadow:var(--shadow-sm)
}
html[data-theme="dim"] body:not(.login-page) .ranking-carousel-button:hover:not(:disabled){
    background:#334356;border-color:#5a7394;color:#8fbbff
}
html[data-theme="dim"] body:not(.login-page) .nota-modelo-controle label{color:#a6b4c8}
html[data-theme="dim"] body:not(.login-page) .nota-modelo-controle select{
    background:#23303f;border-color:var(--line-2);color:var(--text)
}
html[data-theme="dim"] body:not(.login-page) .erro-box,
html[data-theme="dim"] body:not(.login-page) .busca-pedido-feedback{
    background:rgba(255,104,118,.10);border-color:rgba(255,104,118,.28);color:#ff9aa3
}
html[data-theme="dim"] body:not(.login-page) .nota-observacao,
html[data-theme="dim"] body:not(.login-page) .saldo-caixa-aviso{
    background:rgba(241,184,75,.09);border-color:rgba(241,184,75,.30);color:#e4c67f
}
html[data-theme="dim"] body:not(.login-page) .botao-exportar-excel{background:rgba(67,197,139,.12);color:#72d9aa}
html[data-theme="dim"] body:not(.login-page) .botao-exportar-pdf{background:rgba(255,104,118,.10);color:#ff9aa3}
html[data-theme="dim"] body:not(.login-page) .report-card-blue .report-icon{background:rgba(76,141,255,.14);color:#7fb0ff}
html[data-theme="dim"] body:not(.login-page) .report-card-gold .report-icon{background:rgba(241,184,75,.13);color:#f1c96f}
html[data-theme="dim"] body:not(.login-page) .report-card-red .report-icon{background:rgba(255,104,118,.12);color:#ff8993}
html[data-theme="dim"] body:not(.login-page) .report-card-green .report-icon{background:rgba(67,197,139,.12);color:#6bd5a4}
html[data-theme="dim"] body:not(.login-page) .report-card-gray .report-icon{background:#324154;color:#a6b7ce}
html[data-theme="dim"] body:not(.login-page) .dashboard-personalizacao-footer{border-color:var(--line)}
html[data-theme="dim"] body:not(.login-page) .dashboard-widget-option:hover{background:#334356;border-color:#58749a}
html[data-theme="dim"] body:not(.login-page) .dashboard-widget-option{color:#c6d1df}
html[data-theme="dim"] body:not(.login-page) .topbar{border-bottom-color:var(--line)}

/* v1.3.1 — destaque do relatório atualmente selecionado, preservando identidade aprovada */
.report-card-selected{box-shadow:0 0 0 2px rgba(31,125,242,.22),0 14px 28px rgba(31,125,242,.10)}
html[data-theme="dim"] body:not(.login-page) .report-card-selected{box-shadow:0 0 0 2px rgba(76,141,255,.32),0 14px 28px rgba(0,0,0,.18)}

/* ===== CecBi v1.4.0 — Análise de Produtos (preserva padrão visual v1.1.9) ===== */
.product-analysis-panel{padding:14px 16px;border-radius:16px;border:1px solid var(--line);background:#fff;box-shadow:var(--shadow-soft)}
.product-analysis-header{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:12px}.product-analysis-header-badges{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.product-analysis-badge{display:inline-flex;align-items:center;min-height:28px;padding:6px 9px;border-radius:999px;border:1px solid var(--line);background:#f8fbff;color:#5b769f;font-size:.61rem;font-weight:800;white-space:nowrap}
.product-analysis-filters{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:9px;align-items:end;margin-bottom:12px}.product-analysis-filters .campo-filtro{grid-column:span 2}.product-analysis-filters .product-analysis-search{grid-column:span 3}.product-analysis-filters label{font-size:.70rem;font-weight:700;color:#5b769f;margin-bottom:0}.product-analysis-filters input,.product-analysis-filters select{width:100%;min-height:38px;border:1px solid var(--line-2);border-radius:10px;background:#fff;color:var(--text-body);padding:0 11px;font-size:.72rem;outline:none}.product-analysis-filters input:focus,.product-analysis-filters select:focus{border-color:#7cb4ff;box-shadow:0 0 0 4px rgba(31,125,242,.10)}.product-analysis-check{grid-column:span 2;display:flex;align-items:center;gap:7px;min-height:38px;padding:0 10px;border:1px solid var(--line);border-radius:10px;background:#f8fbff;color:#5b769f!important}.product-analysis-check input{width:auto!important;min-height:auto!important}.product-analysis-actions{grid-column:span 3;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.product-analysis-actions .botao-filtrar,.product-analysis-actions .botao-limpar{min-height:38px}
.product-analysis-kpis{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:9px;margin:10px 0 12px}.product-analysis-kpis article{padding:10px 11px;border:1px solid var(--line);border-radius:12px;background:#f8fbff;min-width:0}.product-analysis-kpis span{display:block;color:#7690b5;font-size:.59rem;font-weight:700;margin-bottom:3px}.product-analysis-kpis strong{display:block;color:var(--blue-dark);font-size:.83rem;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.product-analysis-visual-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:10px;margin-bottom:10px}.product-analysis-card{border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 8px 22px rgba(31,125,242,.05);padding:12px}.product-analysis-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:8px}.product-analysis-card-head h3{margin:0 0 2px;color:var(--blue-dark);font-size:.87rem}.product-analysis-card-head p{margin:0;color:#7b93b8;font-size:.63rem;line-height:1.35}.product-analysis-chart-wrap{height:300px}.product-analysis-quadrant-legend{display:flex;gap:12px;flex-wrap:wrap;margin-top:6px;font-size:.59rem;font-weight:800;color:#6c82a3}.pa-star{color:#0b8a5b}.pa-volume{color:#176fe5}.pa-opportunity{color:#d39400}.pa-low{color:#8796aa}
.product-analysis-ranking{display:grid;gap:2px}.product-analysis-ranking>div{display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:7px;padding:7px 0;border-bottom:1px solid var(--line)}.product-analysis-ranking>div:last-child{border-bottom:0}.rank-pos{display:grid;place-items:center;width:20px;height:20px;border-radius:7px;background:#eef5ff;color:#176fe5;font-size:.56rem;font-weight:900}.rank-name{font-size:.64rem;font-weight:700;color:var(--text-body);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.product-analysis-ranking strong{font-size:.63rem;color:var(--blue-dark)}
.product-analysis-alert-list{display:grid}.product-analysis-alert-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:7px;padding:7px 0;border-bottom:1px solid var(--line);font-size:.62rem}.product-analysis-alert-row>span:nth-child(2){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.product-analysis-alert-row strong{font-size:.61rem;color:#6a7f9e}.pa-alert{padding:4px 6px;border-radius:999px;font-size:.52rem;font-weight:900;text-transform:uppercase;white-space:nowrap}.pa-alert-ruptura{background:#fff1f2;color:#d83f4a}.pa-alert-parado{background:#fff7e6;color:#b87908}.pa-alert-margem{background:#fff1f2;color:#d83f4a}
.product-analysis-table-card{margin-top:10px;padding:0;overflow:hidden}.product-analysis-table-head{padding:12px 12px 9px;margin:0}.product-analysis-table{width:100%;border-collapse:collapse}.product-analysis-table th,.product-analysis-table td{padding:7px 7px;border-bottom:1px solid var(--line);font-size:.62rem;text-align:left;vertical-align:middle}.product-analysis-table th{font-size:.55rem;color:#5874a2;text-transform:uppercase;background:#f8fbff;white-space:nowrap}.product-analysis-table td strong{display:block;color:var(--blue-dark);font-size:.64rem;max-width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.product-analysis-table td small{display:block;color:#8195b2;font-size:.53rem;margin-top:2px;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.valor-positivo{color:#159b6c!important}.valor-negativo{color:#d83f4a!important}.pa-profile{display:inline-flex;padding:4px 6px;border-radius:999px;font-size:.52rem;font-weight:900;white-space:nowrap}.pa-profile-estrela{background:#eefaf3;color:#168a57}.pa-profile-volume{background:#eef5ff;color:#176fe5}.pa-profile-oportunidade{background:#fff7e6;color:#b87908}.pa-profile-baixo{background:#f1f4f8;color:#718096}.pa-inline-alert{color:#d83f4a!important;font-weight:800}.pa-detail-link{display:inline-flex;padding:5px 8px;border-radius:8px;border:1px solid #cfe0fb;background:#f8fbff;color:#176fe5;font-size:.56rem;font-weight:800;text-decoration:none}.product-analysis-pagination{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:10px 12px;color:#748aa9;font-size:.61rem}.product-analysis-pagination a{padding:6px 9px;border-radius:8px;border:1px solid var(--line);background:#fff;color:#176fe5;font-weight:800;text-decoration:none}
.product-analysis-detail{margin-top:10px}.product-analysis-detail-head{align-items:center}.product-analysis-detail-kpis{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;margin-bottom:10px}.product-analysis-detail-kpis>div{padding:9px;border-radius:10px;background:#f8fbff;border:1px solid var(--line)}.product-analysis-detail-kpis span{display:block;color:#7690b5;font-size:.55rem;font-weight:700;margin-bottom:3px}.product-analysis-detail-kpis strong{color:var(--blue-dark);font-size:.72rem}.product-analysis-detail-chart{height:230px}
@media(max-width:1500px){.product-analysis-kpis,.product-analysis-detail-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}.product-analysis-filters .campo-filtro{grid-column:span 3}.product-analysis-filters .product-analysis-search{grid-column:span 4}}
@media(max-width:1000px){.product-analysis-visual-grid{grid-template-columns:1fr}.product-analysis-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.product-analysis-filters .campo-filtro,.product-analysis-filters .product-analysis-search,.product-analysis-check,.product-analysis-actions{grid-column:auto}.product-analysis-kpis,.product-analysis-detail-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.product-analysis-panel{padding:11px}.product-analysis-header{flex-direction:column}.product-analysis-header-badges{justify-content:flex-start}.product-analysis-filters{grid-template-columns:1fr}.product-analysis-kpis,.product-analysis-detail-kpis{grid-template-columns:1fr 1fr}.product-analysis-chart-wrap{height:260px}.product-analysis-card{padding:10px}}

html[data-theme="dim"] body:not(.login-page) .product-analysis-panel,
html[data-theme="dim"] body:not(.login-page) .product-analysis-card{background:#263342;border-color:#3a495d;box-shadow:0 10px 24px rgba(0,0,0,.12)}
html[data-theme="dim"] body:not(.login-page) .product-analysis-kpis article,
html[data-theme="dim"] body:not(.login-page) .product-analysis-detail-kpis>div,
html[data-theme="dim"] body:not(.login-page) .product-analysis-check,
html[data-theme="dim"] body:not(.login-page) .product-analysis-badge{background:#2c3a4b;border-color:#3a495d}
html[data-theme="dim"] body:not(.login-page) .product-analysis-filters input,
html[data-theme="dim"] body:not(.login-page) .product-analysis-filters select{background:#2c3a4b;border-color:#495b73;color:#e8eef7}
html[data-theme="dim"] body:not(.login-page) .product-analysis-card-head h3,
html[data-theme="dim"] body:not(.login-page) .product-analysis-kpis strong,
html[data-theme="dim"] body:not(.login-page) .product-analysis-detail-kpis strong,
html[data-theme="dim"] body:not(.login-page) .product-analysis-table td strong,
html[data-theme="dim"] body:not(.login-page) .product-analysis-ranking strong{color:#e8eef7}
html[data-theme="dim"] body:not(.login-page) .product-analysis-table th{background:#304052;color:#a6b4c8}
html[data-theme="dim"] body:not(.login-page) .product-analysis-table td{border-color:#3a495d}
html[data-theme="dim"] body:not(.login-page) .rank-name{color:#cbd5e2}
html[data-theme="dim"] body:not(.login-page) .product-analysis-pagination a{background:#2c3a4b;border-color:#495b73;color:#7fb0ff}

/* =========================================================
   CecBi v1.5.0 — Comissão por regras + logo Dim aprovada
   ========================================================= */
.comissao-tabs{display:flex;gap:8px;align-items:center;margin:0 0 14px;flex-wrap:wrap}.comissao-tab{display:inline-flex;align-items:center;gap:7px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--text-body);font-size:.70rem;font-weight:800;text-decoration:none}.comissao-tab span{display:inline-flex;min-width:20px;height:20px;align-items:center;justify-content:center;border-radius:999px;background:#edf4ff;color:#2563eb;font-size:.60rem}.comissao-tab.ativo{background:#1f7df2;color:#fff;border-color:#1f7df2;box-shadow:0 8px 20px rgba(31,125,242,.16)}.comissao-tab.ativo span{background:rgba(255,255,255,.20);color:#fff}
.comissao-modo-banner{display:flex;align-items:center;gap:10px;padding:10px 12px;margin-bottom:12px;border:1px solid #cfe2ff;border-radius:12px;background:#f4f8ff;color:#39567f;font-size:.68rem}.comissao-modo-banner strong{color:#164eae}.comissao-modo-banner span{flex:1}.comissao-modo-banner a{color:#1565d8;font-weight:800;text-decoration:none;white-space:nowrap}.comissao-modo-banner.simples{border-color:#eadfb8;background:#fffaf0}.comissao-modo-banner.simples strong{color:#8a6510}
.comissao-config-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:14px;margin-bottom:14px}.comissao-config-card,.comissao-list-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;box-shadow:var(--shadow-sm)}.comissao-list-card{margin-top:14px}.comissao-config-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px}.comissao-config-head h3{margin:0;color:var(--blue-dark);font-size:.86rem}.comissao-config-head p{margin:3px 0 0;color:#758bad;font-size:.64rem}.comissao-chip{display:inline-flex;padding:5px 8px;border-radius:999px;background:#eef5ff;color:#456994;font-size:.58rem;font-weight:800;white-space:nowrap}.comissao-config-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;align-items:end}.comissao-config-form .campo-filtro{min-width:0}.comissao-config-form .campo-filtro small{display:block;color:#8295b2;font-size:.55rem;margin-top:3px}.comissao-check{display:flex;align-items:center;gap:7px;font-size:.65rem;font-weight:700;color:var(--text-body);padding-bottom:9px}.comissao-check input{accent-color:#1f7df2}.comissao-form-actions{display:flex;align-items:end}.comissao-feedback{padding:9px 12px;border-radius:10px;margin-bottom:10px;font-size:.66rem;font-weight:700}.comissao-feedback.sucesso{background:#ecfdf3;border:1px solid #bbf7d0;color:#177245}.comissao-feedback.erro{background:#fff1f2;border:1px solid #fecdd3;color:#b4233b}.comissao-config-table td strong{display:block}.comissao-config-table td small{display:block;margin-top:2px;color:#8092ae;font-size:.56rem}.comissao-delete{border:1px solid #f2c5ca;background:#fff5f6;color:#c23b4c;border-radius:8px;padding:5px 8px;font:inherit;font-size:.58rem;font-weight:800;cursor:pointer}.status-pill.status-ok{background:#e8f8ef;color:#268451}.comissao-metricas-6{grid-template-columns:repeat(6,minmax(0,1fr))}.comissao-meta-texto{display:block;max-width:210px;font-size:.60rem;color:#667f9f;line-height:1.25}.comissao-detalhes-card{padding:12px 14px}

/* Opção 1 aprovada: placa clara arredondada apenas no modo Dim. */
html[data-theme="dim"] body:not(.login-page) .sidebar-brand{
    margin:10px 10px 16px;
    padding:10px 12px;
    min-height:auto;
    background:linear-gradient(180deg,#ffffff 0%,#f3f7ff 100%);
    border:1px solid rgba(137,176,235,.68);
    border-radius:16px;
    box-shadow:0 7px 22px rgba(0,0,0,.22),0 0 0 1px rgba(255,255,255,.30),0 0 18px rgba(76,141,255,.16);
}
html[data-theme="dim"] body:not(.login-page) .sidebar-logo-image{
    max-width:145px;
    filter:brightness(1.04) saturate(1.04) drop-shadow(0 2px 4px rgba(9,35,80,.12));
}

html[data-theme="dim"] body:not(.login-page) .comissao-tab,html[data-theme="dim"] body:not(.login-page) .comissao-config-card,html[data-theme="dim"] body:not(.login-page) .comissao-list-card{background:var(--panel);border-color:var(--line);color:var(--text-body)}
/* v1.5.2 — No modo Dim, a aba ativa deve manter o mesmo destaque azul do modo claro. */
html[data-theme="dim"] body:not(.login-page) .comissao-tab.ativo{
    background:var(--blue);
    border-color:var(--blue);
    color:#fff;
    box-shadow:0 8px 20px rgba(76,141,255,.22);
}
html[data-theme="dim"] body:not(.login-page) .comissao-tab.ativo span{
    background:rgba(255,255,255,.20);
    color:#fff;
}
html[data-theme="dim"] body:not(.login-page) .comissao-config-head h3{color:var(--text)}html[data-theme="dim"] body:not(.login-page) .comissao-config-head p,html[data-theme="dim"] body:not(.login-page) .comissao-config-form .campo-filtro small,html[data-theme="dim"] body:not(.login-page) .comissao-meta-texto{color:var(--text-muted)}html[data-theme="dim"] body:not(.login-page) .comissao-modo-banner{background:#263d59;border-color:#395775;color:#cbd9ec}html[data-theme="dim"] body:not(.login-page) .comissao-modo-banner strong,html[data-theme="dim"] body:not(.login-page) .comissao-modo-banner a{color:#8bb8ff}html[data-theme="dim"] body:not(.login-page) .comissao-modo-banner.simples{background:#3b3528;border-color:#5d5339}html[data-theme="dim"] body:not(.login-page) .comissao-modo-banner.simples strong{color:#f1c85e}html[data-theme="dim"] body:not(.login-page) .comissao-delete{background:#3b2e34;border-color:#64414c;color:#ff98a7}

@media(max-width:1180px){.comissao-metricas-6{grid-template-columns:repeat(3,minmax(0,1fr))}.comissao-config-grid{grid-template-columns:1fr}.comissao-config-form{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.comissao-metricas-6,.comissao-config-form{grid-template-columns:1fr}.comissao-modo-banner{align-items:flex-start;flex-direction:column}.comissao-config-head{flex-direction:column}}
.comissao-row-actions{display:flex;gap:5px;align-items:center}.comissao-row-actions form{margin:0}.comissao-toggle{border:1px solid #c9d9ef;background:#f5f9ff;color:#3567a7;border-radius:8px;padding:5px 8px;font:inherit;font-size:.58rem;font-weight:800;cursor:pointer}html[data-theme="dim"] body:not(.login-page) .comissao-toggle{background:#2b3e55;border-color:#435b77;color:#a8c8f1}

/* =========================================================
   CecBi v1.5.3 — Seleção amigável do alvo da regra de comissão
   ========================================================= */
.comissao-alvo-campo[hidden]{display:none!important}
.comissao-alvo-geral-box,.comissao-alvo-selecionado{min-height:38px;border:1px solid var(--line);border-radius:10px;background:#f8fbff;padding:9px 11px;display:flex;align-items:center;color:var(--text-body);font-size:.67rem;font-weight:750}
.comissao-alvo-selecionado{gap:8px;align-items:center}.comissao-alvo-selecionado strong{display:inline-flex;padding:4px 7px;border-radius:999px;background:#eaf2ff;color:#2563eb;font-size:.57rem;text-transform:uppercase;letter-spacing:.02em}.comissao-alvo-selecionado span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.comissao-alvo-selecionado.pendente{border-color:#f0c7c7;background:#fff8f8}.comissao-alvo-selecionado.pendente strong{background:#fff0f0;color:#b94444}.comissao-alvo-selecionado.pendente span{color:#a95151}
.comissao-produto-autocomplete{position:relative}.comissao-produto-resultados{position:absolute;z-index:80;left:0;right:0;top:calc(100% + 5px);max-height:260px;overflow:auto;background:#fff;border:1px solid #cfdcf0;border-radius:11px;box-shadow:0 16px 34px rgba(25,56,100,.16);padding:5px}.comissao-produto-opcao{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:2px;border:0;background:transparent;border-radius:8px;padding:8px 9px;text-align:left;color:var(--text-body);cursor:pointer;font:inherit}.comissao-produto-opcao:hover,.comissao-produto-opcao:focus{background:#eef5ff;outline:none}.comissao-produto-opcao strong{font-size:.65rem;color:var(--blue-dark)}.comissao-produto-opcao span{font-size:.55rem;color:#7a8ead}.comissao-produto-vazio{padding:10px;color:#7a8ead;font-size:.62rem}
html[data-theme="dim"] body:not(.login-page) .comissao-alvo-geral-box,html[data-theme="dim"] body:not(.login-page) .comissao-alvo-selecionado{background:#2b3949;border-color:var(--line);color:var(--text-body)}
html[data-theme="dim"] body:not(.login-page) .comissao-alvo-selecionado strong{background:#263f65;color:#9ec3ff}
html[data-theme="dim"] body:not(.login-page) .comissao-alvo-selecionado.pendente{background:#3a3034;border-color:#664650}html[data-theme="dim"] body:not(.login-page) .comissao-alvo-selecionado.pendente strong{background:#50333a;color:#ff9dac}html[data-theme="dim"] body:not(.login-page) .comissao-alvo-selecionado.pendente span{color:#f4a9b4}
html[data-theme="dim"] body:not(.login-page) .comissao-produto-resultados{background:var(--panel);border-color:var(--line);box-shadow:0 18px 36px rgba(0,0,0,.30)}html[data-theme="dim"] body:not(.login-page) .comissao-produto-opcao{color:var(--text-body)}html[data-theme="dim"] body:not(.login-page) .comissao-produto-opcao:hover,html[data-theme="dim"] body:not(.login-page) .comissao-produto-opcao:focus{background:#30455f}html[data-theme="dim"] body:not(.login-page) .comissao-produto-opcao strong{color:var(--text)}html[data-theme="dim"] body:not(.login-page) .comissao-produto-opcao span,html[data-theme="dim"] body:not(.login-page) .comissao-produto-vazio{color:var(--text-muted)}

/* Exportação global CecBi */
.cec-export-menu{position:relative;display:inline-block}.cec-export-menu>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;gap:6px}.cec-export-menu>summary::-webkit-details-marker{display:none}.cec-export-options{position:absolute;z-index:80;top:calc(100% + 7px);right:0;min-width:190px;padding:7px;background:var(--card-bg,#fff);border:1px solid var(--border-color,#dbe4f0);border-radius:11px;box-shadow:0 12px 30px rgba(22,52,95,.15);display:grid;gap:3px}.cec-export-options a,.cec-export-options button{display:block;width:100%;border:0;background:transparent;color:var(--text-color,#173266);text-decoration:none;text-align:left;padding:9px 10px;border-radius:8px;font:inherit;font-size:12px;font-weight:700;cursor:pointer}.cec-export-options a:hover,.cec-export-options button:hover{background:#f1f5fb}.cec-export-menu:not([open]) .cec-export-options{display:none}html[data-theme="dim"] .cec-export-options{background:#263342;border-color:#3a495d;box-shadow:0 14px 30px rgba(0,0,0,.30)}html[data-theme="dim"] .cec-export-options a,html[data-theme="dim"] .cec-export-options button{color:#e6eef8}html[data-theme="dim"] .cec-export-options a:hover,html[data-theme="dim"] .cec-export-options button:hover{background:#314154}

/* b24: pesquisa dinâmica de entidades */
.entity-picker{position:relative}.entity-picker input[type="search"]{width:100%}
.entity-results{position:absolute;z-index:60;left:0;right:0;top:calc(100% + 4px);max-height:260px;overflow:auto;background:#fff;border:1px solid #d5e0ee;border-radius:10px;box-shadow:0 12px 28px rgba(20,49,88,.16);padding:4px}
.entity-result{display:block;width:100%;border:0;background:transparent;text-align:left;padding:9px 10px;border-radius:7px;color:#18375f;cursor:pointer;font:inherit}.entity-result:hover{background:#edf4ff}
html[data-theme="dim"] .entity-results{background:#223040;border-color:#3a495d;box-shadow:0 12px 30px rgba(0,0,0,.28)}
html[data-theme="dim"] .entity-result{color:#dfe8f5}html[data-theme="dim"] .entity-result:hover{background:#2d4055}

/* PDF do Resumo Executivo — interface desacoplada dos demais relatórios */
.cecbi-pdf-modal .dashboard-personalizacao-card{width:min(1000px,calc(100vw - 28px));max-height:90vh;overflow:auto}
.cecbi-pdf-settings-row{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px;padding:14px 20px;border-bottom:1px solid #e1eaf6}
.cecbi-pdf-orientacao{border:0;padding:0;display:flex;gap:16px;flex-wrap:wrap;align-items:center}
.cecbi-pdf-orientacao legend{font-size:12px;font-weight:800;color:#17447b;margin-bottom:7px}
.cecbi-pdf-orientacao label{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;cursor:pointer}
.cecbi-pdf-select-actions{display:flex;gap:8px;flex-wrap:wrap}
.cecbi-pdf-select-actions button{background:#f4f8ff;color:#174b8b;border:1px solid #cbdefa;border-radius:9px;padding:8px 10px;font-weight:700;font-size:11px;cursor:pointer}
.cecbi-pdf-options-grid{padding:14px 20px;gap:12px}
.cecbi-pdf-item{display:flex;align-items:center;gap:9px;width:100%;padding:6px 5px;font-size:12px;line-height:1.3;color:#15355f;cursor:pointer}
.cecbi-pdf-item input{accent-color:#176fe5;width:15px;height:15px;flex-shrink:0}
.cecbi-pdf-hint{font-size:11px;color:#677995}
.topbar-resumo-pdf{white-space:nowrap}
@media(max-width:750px){.cecbi-pdf-options-grid{grid-template-columns:1fr!important}.cecbi-pdf-settings-row{align-items:flex-start}.topbar-resumo-pdf span{display:none}}

/* b58: modal Resumo Executivo — formulário fixo e rodapé do próprio CecBi. */
.cecbi-pdf-modal .dashboard-personalizacao-card{display:flex;flex-direction:column;overflow:hidden;width:min(1020px,calc(100vw - 26px));max-height:min(90vh,900px);padding:22px 22px 0}
.cecbi-pdf-modal .dashboard-personalizacao-header{flex:0 0 auto}
.cecbi-pdf-modal #resumoPdfForm{display:flex;flex-direction:column;min-height:0;flex:1}
.cecbi-pdf-modal .cecbi-pdf-settings-row{flex:0 0 auto;padding:12px 0 14px}
.cecbi-pdf-modal .cecbi-pdf-options-grid{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px 2px 12px;scrollbar-width:thin}
.cecbi-pdf-modal .dashboard-personalizacao-footer{flex:0 0 auto;margin:0 -22px;padding:15px 22px;background:var(--card-bg,#fff);border-top:1px solid var(--line,#dce7f5);box-shadow:0 -9px 25px rgba(26,66,116,.045)}
.cecbi-pdf-modal .cecbi-pdf-cancelar,.cecbi-pdf-modal .cecbi-pdf-gerar{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:0 19px;border-radius:11px;border:1px solid #d3e0f1;font-family:inherit;font-size:12px;font-weight:800;cursor:pointer;transition:background .15s,border-color .15s,transform .15s}
.cecbi-pdf-modal .cecbi-pdf-cancelar{background:#f8fbff;color:#325788}
.cecbi-pdf-modal .cecbi-pdf-gerar{background:#1b75e8;border-color:#1b75e8;color:#fff;box-shadow:0 5px 14px rgba(27,117,232,.18)}
.cecbi-pdf-modal .cecbi-pdf-gerar:hover{background:#095cc8;border-color:#095cc8}
.cecbi-pdf-modal .cecbi-pdf-cancelar:hover{background:#edf5ff;border-color:#a8c9f4}
.cecbi-pdf-modal .cecbi-pdf-gerar:focus-visible,.cecbi-pdf-modal .cecbi-pdf-cancelar:focus-visible{outline:3px solid #9cc8ff;outline-offset:2px}
html[data-theme="dim"] .cecbi-pdf-modal .dashboard-personalizacao-footer{background:var(--card-bg,#263342)}
html[data-theme="dim"] .cecbi-pdf-modal .cecbi-pdf-cancelar{background:#263b56;border-color:#456282;color:#e2efff}
@media(max-width:750px){.cecbi-pdf-modal .dashboard-personalizacao-card{padding:14px 14px 0;max-height:calc(100vh - 18px)}.cecbi-pdf-modal .dashboard-personalizacao-footer{margin:0 -14px;padding:12px 14px}.cecbi-pdf-modal .cecbi-pdf-gerar,.cecbi-pdf-modal .cecbi-pdf-cancelar{min-width:0}}

/* b59: composição executiva controlada (5+2+3+1), modo claro/escuro */
.cecbi-pdf-modal .dashboard-personalizacao-grupo h3 small{float:right;background:#eaf2ff;color:#1559a8;border-radius:99px;padding:3px 9px;font-size:11px;font-weight:800}
.cecbi-pdf-modal .cecbi-pdf-item-disabled{opacity:.46;cursor:not-allowed}
.cecbi-pdf-modal .cecbi-pdf-item-disabled input{cursor:not-allowed}
.cecbi-pdf-complementar{margin-top:16px;border-top:1px solid var(--line,#e4eaf5);padding-top:14px;display:grid;gap:7px}
.cecbi-pdf-complementar>label{font-size:12px;color:var(--text,#17375e);font-weight:800;display:flex;justify-content:space-between}
.cecbi-pdf-complementar>label small{background:#eaf2ff;color:#1559a8;padding:3px 9px;border-radius:99px}
.cecbi-pdf-complementar select{width:100%;min-height:39px;background:var(--card-bg,#fff);color:var(--text,#17375e);border:1px solid var(--line,#cddaf0);border-radius:10px;padding:7px 10px;font:inherit;font-size:12px}
.cecbi-pdf-complementar>span{font-size:10.5px;color:var(--muted,#657894)}
.cecbi-pdf-modal #pdfResumoGerar:disabled{opacity:.5;cursor:not-allowed}
html[data-theme="dim"] .cecbi-pdf-modal .dashboard-personalizacao-grupo h3 small,html[data-theme="dim"] .cecbi-pdf-complementar>label small{background:#254569;color:#a7d4ff}


/* CecBi build64: placeholders suaves — não mostrar falso US$ 0,00 antes da consulta. */
@keyframes cecbiSkeletonPulse { 0% { opacity: .47; } 50% { opacity: .88; } 100% { opacity: .47; } }
@keyframes cecbiAsyncEnter { from { opacity: .12; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.cecbi-async-card { min-height: 114px; }
.cecbi-async-card .metric-card-content { width: 100%; }
.cecbi-async-bar, .cecbi-async-lines span {
    display: block; width: 75%; min-width: 70px; height: 20px;
    border-radius: 7px; background: currentColor; opacity: .15;
    animation: cecbiSkeletonPulse 1.3s ease-in-out infinite;
}
.cecbi-async-bar-sm { width: 48%; height: 10px; min-width: 44px; margin-top: 7px; }
.cecbi-async-rank { min-height: 265px; }
.cecbi-async-lines { padding: 16px 18px; display: flex; flex-direction: column; gap: 16px; }
.cecbi-async-lines span { height: 12px; width: 85%; opacity: .1; }
.cecbi-async-lines span:nth-child(2) { width: 65%; animation-delay: .15s; }
.cecbi-async-lines span:nth-child(3) { width: 93%; animation-delay: .3s; }
.cecbi-async-lines span:nth-child(4) { width: 54%; animation-delay: .45s; }
.cecbi-async-pronto > .dashboard-kpi-slide,
.cecbi-async-pronto > .ranking-carousel-slide { animation: cecbiAsyncEnter .35s ease-out both; }
.cecbi-async-fail { padding: 18px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 12px; }
.cecbi-async-fail button { border: 1px solid #c9d6e7; background: transparent; color: inherit; border-radius: 8px; padding: 7px 12px; cursor: pointer; }
@media (prefers-reduced-motion: reduce) {
 .cecbi-async-bar,.cecbi-async-lines span,.cecbi-async-pronto > .dashboard-kpi-slide,.cecbi-async-pronto > .ranking-carousel-slide { animation: none !important; }
}


/* Build 67 — filtros de situação nas últimas vendas e administração agrupada. */
.latest-sales-status-controls{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap}
.latest-sales-status-btn{border:1px solid var(--line-2);background:var(--panel);color:var(--text-body);font-size:11px;font-weight:750;padding:7px 10px;border-radius:9px;cursor:pointer;transition:background-color .15s,border-color .15s}
.latest-sales-status-btn:hover{border-color:var(--blue)}
.latest-sales-status-btn.is-active,.latest-sales-status-btn[aria-pressed="true"]{background:var(--blue-soft);border-color:var(--blue);color:var(--blue-dark)}
.latest-sales-status-btn:disabled{opacity:.55;cursor:wait}
.latest-sales-panel[aria-busy="true"] .latest-sales-status-controls{opacity:.75}
.ranking-carousel-slide .latest-sales-header{flex-wrap:wrap}
.cecbi-admin-menu{position:relative;flex-shrink:0}
.cecbi-admin-menu-trigger{list-style:none;display:inline-flex;align-items:center;gap:8px;cursor:pointer}
.cecbi-admin-menu-trigger::-webkit-details-marker{display:none}
.cecbi-admin-menu-list{position:absolute;right:0;top:calc(100% + 7px);min-width:185px;z-index:200;display:flex;flex-direction:column;padding:7px;background:var(--panel);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:12px}
.cecbi-admin-menu-list a{display:block;padding:10px 12px;border-radius:8px;color:var(--text-body);font-size:12px;font-weight:650;white-space:nowrap}
.cecbi-admin-menu-list a:hover,.cecbi-admin-menu-list a:focus-visible{background:var(--blue-soft);color:var(--blue-dark)}
@media(max-width:980px){.latest-sales-status-controls{order:3;width:100%}}


/* ================================================================
   CecBi Build 70 — RESUMO EXECUTIVO, MODO ESCURO
   Corrige contraste perdido por heranca de cores azuis do tema claro.
   Escopo exclusivo: .cecbi-pdf-modal; PDFs, formularios e limites intactos.
   ================================================================ */
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal {
  --cecbi-pdf-text:#e9f0fb;
  --cecbi-pdf-muted:#b8c6d9;
  --cecbi-pdf-panel:#293749;
  --cecbi-pdf-inner:#2d3d52;
  --cecbi-pdf-line:#465a74;
  --cecbi-pdf-accent:#a9ccff;
  color:var(--cecbi-pdf-text);
  color-scheme:dark;
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .dashboard-personalizacao-card {
  background:#243243;
  border-color:#4a5d75;
  box-shadow:0 26px 65px rgba(3,10,22,.58);
  color:var(--cecbi-pdf-text);
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .dashboard-personalizacao-header h2,
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .dashboard-personalizacao-grupo h3,
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .cecbi-pdf-complementar>label {
  color:var(--cecbi-pdf-text);
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .dashboard-personalizacao-header p,
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .cecbi-pdf-hint,
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .cecbi-pdf-complementar>span {
  color:var(--cecbi-pdf-muted);
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .nota-kicker {
  background:#35465a;
  color:#d9e5f5;
  border-color:#52657d;
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .cecbi-pdf-settings-row {
  border-bottom-color:var(--cecbi-pdf-line);
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .cecbi-pdf-orientacao legend {
  color:#d9e5f5;
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .cecbi-pdf-orientacao label {
  color:var(--cecbi-pdf-text);
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal :is(input[type="radio"],input[type="checkbox"]) {
  accent-color:#4c9af8;
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .dashboard-personalizacao-grupo {
  background:var(--cecbi-pdf-panel);
  border-color:var(--cecbi-pdf-line);
  color:var(--cecbi-pdf-text);
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .cecbi-pdf-item {
  color:var(--cecbi-pdf-text);
  border-radius:8px;
  transition:background-color .16s ease;
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .cecbi-pdf-item>span {
  color:inherit;
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .cecbi-pdf-item:not(.cecbi-pdf-item-disabled):hover {
  background:#374a61;
}
/* Limite atingido: indisponivel perceptivel, mas texto permanece legivel. */
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .cecbi-pdf-item-disabled {
  color:#b3bed0;
  opacity:.77;
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .cecbi-pdf-item-disabled input {
  opacity:.58;
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .dashboard-personalizacao-grupo h3 small,
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .cecbi-pdf-complementar>label small {
  background:#3e536d;
  border:1px solid #536c8c;
  color:#e4efff;
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .cecbi-pdf-complementar {
  border-top-color:var(--cecbi-pdf-line);
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .cecbi-pdf-complementar select {
  background:#223043;
  color:#f0f5ff;
  border-color:#59708e;
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .cecbi-pdf-select-actions button {
  background:#34455a;
  color:#e7effc;
  border-color:#536783;
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .cecbi-pdf-select-actions button:hover {
  background:#415773;
  border-color:#738bab;
  color:#fff;
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .dashboard-personalizacao-footer {
  background:#243243;
  border-top-color:var(--cecbi-pdf-line);
  box-shadow:0 -8px 22px rgba(7,15,27,.17);
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .cecbi-pdf-cancelar {
  background:#34465c;
  color:#e8f0fc;
  border-color:#647791;
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .cecbi-pdf-cancelar:hover {
  background:#405570;
  color:#fff;
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .cecbi-pdf-gerar:not(:disabled) {
  background:linear-gradient(135deg,#1469ce,#358aef);
  border-color:#448fe8;
  color:#fff;
  box-shadow:0 7px 18px rgba(7,13,24,.25);
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .cecbi-pdf-gerar:not(:disabled):hover {
  background:linear-gradient(135deg,#227be4,#58a4fa);
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal .cecbi-pdf-options-grid {
  scrollbar-color:#657c9b transparent;
}
html[data-theme="dim"] body:not(.login-page) .cecbi-pdf-modal :is(button,select,input):focus-visible {
  outline:2px solid #8cc4ff;
  outline-offset:3px;
}

/* Build 71: seletor de quantidade dos Tops, identidade azul CecBi. */
.cecbi-top-limit{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;font-size:12px;font-weight:700;color:var(--text-primary,#344766)}
.cecbi-top-limit select{min-width:64px;height:34px;border:1px solid var(--border-color,#d3dfed);border-radius:9px;background:var(--bg-card,#fff);color:var(--text-primary,#213552);padding:5px 9px;cursor:pointer;font:inherit}
.cecbi-top-limit select:focus-visible{outline:2px solid #2a73c8;outline-offset:2px}
html[data-theme="dim"] .cecbi-top-limit{color:#e0e9f4}
html[data-theme="dim"] .cecbi-top-limit select{background:#1d2b3f;color:#f1f5fb;border-color:#47576c}

/* Dashboard: seletores globais independentes B72 */
#view-dashboard .filtro-periodo{grid-template-columns:repeat(2,minmax(175px,1.15fr)) repeat(2,minmax(120px,1fr)) repeat(3,minmax(135px,1fr)) auto;}
.dashboard-criterio-campo{min-width:175px}.dashboard-criterio-campo select{min-width:175px;max-width:100%;font-weight:700}
@media(max-width:1250px){#view-dashboard .filtro-periodo{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){#view-dashboard .filtro-periodo{grid-template-columns:minmax(0,1fr)}}
