/* ERP Dashboard V2 - ERP-DASHBOARD-V2-20260904 */
.erp-dashboard-main{padding:26px 30px 42px;display:flex;flex-direction:column;gap:22px}
.erp-dashboard-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:20px}
.erp-dashboard-hero h1{margin-top:4px;color:#0f172a;font-size:30px;font-weight:850;letter-spacing:-.035em;line-height:1.1}
.erp-dashboard-hero p{margin-top:6px;color:#94a3b8;font-size:12.5px}
.erp-eyebrow{display:flex;align-items:center;gap:8px;color:#94a3b8;font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.16em}
.erp-live-dot{width:7px;height:7px;border-radius:999px;background:var(--erp-primary-500,#f97316);box-shadow:0 0 0 4px rgba(249,115,22,.12)}
.erp-dashboard-hero-actions{display:flex;align-items:center;gap:10px}.erp-updated-at{font-size:10.5px;color:#94a3b8;white-space:nowrap}
.erp-icon-button{width:38px;height:38px;border:1px solid #e2e8f0;border-radius:11px;background:#fff;color:#64748b;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:.15s ease}
.erp-icon-button:hover{border-color:var(--erp-primary-300,#fdba74);color:var(--erp-primary-600,#ea580c);background:var(--erp-primary-50,#fff7ed)}
.erp-icon-button svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.erp-icon-button.is-loading svg{animation:erp-dash-spin .75s linear infinite}@keyframes erp-dash-spin{to{transform:rotate(360deg)}}
.erp-dashboard-category{display:flex;flex-direction:column;gap:14px;padding-top:4px}
.erp-dashboard-category+.erp-dashboard-category{border-top:1px solid #e8edf3;padding-top:26px}
.erp-category-header{display:flex;align-items:flex-end;justify-content:space-between;gap:18px}.erp-category-header>div:first-child>p{margin-top:4px;color:#94a3b8;font-size:11.5px}
.erp-category-title-row{display:flex;align-items:center;gap:10px}.erp-category-title-row h2{font-size:20px;font-weight:850;letter-spacing:-.025em;color:#0f172a}
.erp-category-icon{min-width:31px;height:31px;padding:0 7px;border-radius:9px;background:var(--erp-primary-50,#fff7ed);border:1px solid var(--erp-primary-100,#ffedd5);color:var(--erp-primary-700,#c2410c);font-size:10px;font-weight:900;display:inline-flex;align-items:center;justify-content:center}
.erp-category-actions{display:flex;align-items:center;gap:9px}.erp-category-actions-wrap{flex-wrap:wrap;justify-content:flex-end}
.erp-period-control{display:flex;align-items:center;padding:4px;background:#fff;border:1px solid #e2e8f0;border-radius:11px;box-shadow:0 1px 2px rgba(15,23,42,.025)}
.erp-period-control button{border:0;background:transparent;padding:8px 10px;border-radius:7px;color:#64748b;font-size:10.5px;font-weight:800;cursor:pointer;white-space:nowrap;transition:.15s ease}.erp-period-control button:hover{background:#f8fafc;color:#0f172a}.erp-period-control button.is-active{background:var(--erp-primary-50,#fff7ed);color:var(--erp-primary-700,#c2410c)}
.erp-custom-period{align-self:flex-end;display:flex;align-items:flex-end;gap:8px;padding:9px;background:#fff;border:1px solid #e2e8f0;border-radius:11px}.erp-custom-period label{display:flex;flex-direction:column;gap:3px;color:#94a3b8;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.erp-custom-period input{height:33px;border:1px solid #e2e8f0;border-radius:8px;padding:0 8px;color:#334155;font-size:11px;background:#fff}.erp-custom-period button{height:33px;border:0;border-radius:8px;padding:0 11px;background:var(--erp-primary-600,#ea580c);color:#fff;font-size:10.5px;font-weight:850;cursor:pointer}
.erp-future-control{display:flex;align-items:center;gap:7px;color:#64748b;font-size:10px;font-weight:800}.erp-compact-select{height:34px;border:1px solid #e2e8f0;border-radius:9px;background:#fff;color:#475569;padding:0 28px 0 9px;font-size:10.5px;font-weight:750;outline:none}.erp-compact-select:focus{border-color:var(--erp-primary-400,#fb923c)}
.erp-kpi-grid{display:grid;gap:11px}.erp-kpi-grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.erp-kpi-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.erp-kpi-card{display:flex;flex-direction:column;min-height:117px;padding:15px 16px;background:#fff;border:1px solid #e2e8f0;border-radius:14px;text-decoration:none;box-shadow:0 1px 2px rgba(15,23,42,.02);transition:.15s ease}.erp-kpi-card:hover{border-color:#cbd5e1;box-shadow:0 7px 20px rgba(15,23,42,.055);transform:translateY(-1px)}
.erp-kpi-label{color:#64748b;font-size:10.5px;font-weight:800}.erp-kpi-value{margin-top:auto;color:#0f172a;font-size:24px;font-weight:900;letter-spacing:-.04em;line-height:1.05}.erp-kpi-note{margin-top:7px;color:#94a3b8;font-size:9.5px;font-weight:650}.erp-kpi-warning{border-color:#fde68a}.erp-kpi-warning .erp-kpi-value{color:#b45309}
.erp-skeleton-value{color:transparent!important;position:relative;overflow:hidden;background:#f1f5f9;border-radius:7px;width:72%;min-height:26px}.erp-skeleton-value:after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.75),transparent);animation:erp-shimmer 1.1s infinite}@keyframes erp-shimmer{100%{transform:translateX(100%)}}
.erp-chart-grid{display:grid;gap:13px}.erp-chart-grid-sales{grid-template-columns:minmax(0,1.15fr) minmax(0,1.15fr) minmax(280px,.7fr)}.erp-chart-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.erp-panel-span-2{grid-column:span 2}
.erp-panel{min-width:0;padding:17px 18px;background:#fff;border:1px solid #e2e8f0;border-radius:15px;box-shadow:0 1px 2px rgba(15,23,42,.02)}.erp-panel-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:13px}.erp-panel-header h3{color:#0f172a;font-size:13px;font-weight:850}.erp-panel-header p{margin-top:3px;color:#94a3b8;font-size:10.5px}.erp-panel-badge{display:inline-flex;align-items:center;min-height:25px;padding:0 8px;border:1px solid #e2e8f0;border-radius:999px;background:#f8fafc;color:#64748b;font-size:9px;font-weight:800;white-space:nowrap}
.erp-chart-wrap{position:relative;width:100%}.erp-chart-lg{height:275px}.erp-chart-md{height:245px}
.erp-annual-card{display:flex;flex-direction:column}.erp-annual-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:auto}.erp-annual-grid>div{padding:13px;border:1px solid #eef2f7;border-radius:11px;background:#fbfcfe}.erp-annual-grid span{display:block;color:#94a3b8;font-size:9.5px;font-weight:750}.erp-annual-grid strong{display:block;margin-top:5px;color:#0f172a;font-size:17px;font-weight:900;letter-spacing:-.025em}
.erp-subheading{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.erp-subheading h3{font-size:12px;font-weight:850;color:#334155}.erp-subheading span{font-size:9.5px;color:#94a3b8}
.erp-resource-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}.erp-resource-card{min-height:91px;padding:13px 14px;background:#fff;border:1px solid #e2e8f0;border-radius:13px}.erp-resource-card span{display:block;color:#64748b;font-size:10px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.erp-resource-card strong{display:block;margin-top:10px;color:#0f172a;font-size:19px;font-weight:900;letter-spacing:-.03em}.erp-resource-card small{display:block;margin-top:5px;color:#94a3b8;font-size:8.5px}.erp-resource-card.is-uninitialized strong{color:#94a3b8;font-size:13px}.erp-resource-placeholder{grid-column:1/-1;padding:24px;text-align:center;color:#94a3b8;font-size:11px}
.erp-finance-forecast-grid{max-width:760px}.erp-flow-summary{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin:-4px 0 12px;color:#94a3b8;font-size:9.5px;font-weight:750}.erp-flow-summary strong{margin-left:4px;color:#475569;font-size:11px}
.erp-section-error,.erp-dashboard-error{border:1px solid #fecaca;background:#fef2f2;color:#b91c1c;border-radius:10px;padding:9px 11px;font-size:10.5px;font-weight:700}.hidden{display:none!important}
body.dark .erp-dashboard-hero h1,body.dark .erp-category-title-row h2,body.dark .erp-kpi-value,body.dark .erp-panel-header h3,body.dark .erp-annual-grid strong,body.dark .erp-resource-card strong{color:#fff!important}
body.dark .erp-dashboard-category+.erp-dashboard-category{border-color:#202020}.dark .erp-icon-button,.dark .erp-period-control,.dark .erp-custom-period,.dark .erp-kpi-card,.dark .erp-panel,.dark .erp-resource-card{background:#111!important;border-color:#262626!important}.dark .erp-period-control button{color:#a3a3a3}.dark .erp-period-control button:hover{background:#1a1a1a;color:#fff}.dark .erp-period-control button.is-active{background:var(--erp-primary-950,#431407);color:var(--erp-primary-300,#fdba74)}.dark .erp-custom-period input,.dark .erp-compact-select{background:#0a0a0a!important;border-color:#333!important;color:#e5e5e5!important}.dark .erp-annual-grid>div{background:#151515;border-color:#252525}.dark .erp-subheading h3,.dark .erp-flow-summary strong{color:#d4d4d4}.dark .erp-skeleton-value{background:#202020}.dark .erp-panel-badge{background:#171717;border-color:#2a2a2a;color:#a3a3a3}.dark .erp-section-error,.dark .erp-dashboard-error{background:#2a1111;border-color:#4c1d1d;color:#fca5a5}
@media(max-width:1250px){.erp-chart-grid-sales{grid-template-columns:repeat(2,minmax(0,1fr))}.erp-chart-grid-sales .erp-panel-span-2{grid-column:span 1}.erp-chart-grid-sales .erp-annual-card{grid-column:span 1}.erp-chart-grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}.erp-chart-grid-3 .erp-panel:last-child{grid-column:span 2}}
@media(max-width:920px){.erp-dashboard-main{padding:21px 18px 34px}.erp-category-header{align-items:flex-start;flex-direction:column}.erp-category-actions{width:100%;justify-content:space-between}.erp-period-control{max-width:100%;overflow:auto}.erp-kpi-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.erp-chart-grid-sales,.erp-chart-grid-3{grid-template-columns:1fr}.erp-chart-grid-sales .erp-panel-span-2,.erp-chart-grid-3 .erp-panel:last-child{grid-column:span 1}.erp-chart-lg,.erp-chart-md{height:235px}}
@media(max-width:620px){.erp-dashboard-main{padding:17px 12px 28px;gap:18px}.erp-dashboard-hero{align-items:flex-start}.erp-dashboard-hero h1{font-size:25px}.erp-updated-at{display:none}.erp-category-actions,.erp-category-actions-wrap{align-items:flex-start;flex-direction:column}.erp-period-control{width:100%}.erp-period-control button{flex:1;padding:8px 9px}.erp-custom-period{width:100%;align-items:stretch;flex-wrap:wrap}.erp-custom-period label{flex:1;min-width:125px}.erp-custom-period input{width:100%}.erp-kpi-grid-4,.erp-kpi-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.erp-kpi-card{min-height:108px;padding:13px}.erp-kpi-value{font-size:20px}.erp-panel{padding:14px}.erp-chart-lg,.erp-chart-md{height:220px}.erp-annual-grid{grid-template-columns:1fr 1fr}.erp-resource-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:390px){.erp-kpi-grid-4,.erp-kpi-grid-2,.erp-resource-grid{grid-template-columns:1fr}.erp-annual-grid{grid-template-columns:1fr}.erp-period-control button{font-size:9.5px;padding:8px 7px}}

/* ============================================================
   HOTFIX CABECALHO DASHBOARD V2
   ERP-DASHBOARD-V2-HEADER-HOTFIX-20260904
   Replica o padrao visual do cabecalho interno da pagina de OS.
   ============================================================ */
.erp-dashboard-main{
    max-width:none!important;
    padding:24px!important;
    gap:24px!important;
}
.erp-dashboard-page-header{
    width:100%;
    padding:24px;
    background:#fff;
    border:1px solid #e2e8f0;
    border-radius:12px;
    box-shadow:0 1px 2px rgba(15,23,42,.05);
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap:16px;
}
.erp-dashboard-page-header h1{
    margin:0;
    color:#0f172a;
    font-size:24px;
    line-height:32px;
    font-weight:700;
    letter-spacing:0;
}
.erp-dashboard-page-header p{
    margin-top:2px;
    color:#64748b;
    font-size:14px;
    line-height:20px;
}
body.dark .erp-dashboard-page-header{
    background:#111!important;
    border-color:#262626!important;
}
body.dark .erp-dashboard-page-header h1{
    color:#fff!important;
}
body.dark .erp-dashboard-page-header p{
    color:#a3a3a3!important;
}

/* O menu superior compartilhado deve aparecer no desktop como nas demais paginas. */
@media (min-width:768px){
    #erp-shared-header header > div:first-child > nav{
        display:flex!important;
    }
}
@media (max-width:767px){
    #erp-shared-header header > div:first-child > nav{
        display:none!important;
    }
}
@media (max-width:767px){
    .erp-dashboard-main{
        padding:16px!important;
        gap:18px!important;
    }
    .erp-dashboard-page-header{
        padding:18px;
        flex-direction:column;
        align-items:flex-start;
    }
    .erp-dashboard-page-header h1{
        font-size:22px;
        line-height:28px;
    }
    .erp-dashboard-page-header p{
        font-size:13px;
    }
    .erp-dashboard-hero-actions{
        width:100%;
        justify-content:space-between;
    }
}



/* ============================================================
   ERP-DASHBOARD-REFRESH-ALIGNMENT-HOTFIX-20260904
   Alinhamento optico do timestamp + botao de atualizar.
   ============================================================ */
.erp-dashboard-page-header .erp-dashboard-hero-actions,
.erp-dashboard-hero .erp-dashboard-hero-actions{
    display:flex!important;
    align-items:center!important;
}
.erp-dashboard-page-header .erp-updated-at,
.erp-dashboard-hero .erp-updated-at{
    display:inline-flex;
    align-items:center;
    min-height:38px;
    line-height:1!important;
}
#dashboard-refresh-all{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:0!important;
    line-height:0!important;
    vertical-align:middle!important;
}
#dashboard-refresh-all svg{
    display:block!important;
    position:relative;
    left:-1px;
    top:-1px;
    margin:0!important;
    flex:none;
}
@media(max-width:620px){
    .erp-dashboard-page-header .erp-updated-at,
    .erp-dashboard-hero .erp-updated-at{
        display:none!important;
    }
}


/* ERP-DASHBOARD-AGENDA-TAREFAS-20260907 */
.erp-kpi-grid-5{grid-template-columns:repeat(5,minmax(0,1fr))}
.erp-kpi-card[href]{cursor:pointer}
.erp-kpi-card[href]:focus-visible{outline:2px solid var(--erp-primary-500);outline-offset:2px}
@media(max-width:1200px){.erp-kpi-grid-5{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:767px){.erp-kpi-grid-5{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.erp-kpi-grid-5{grid-template-columns:1fr}}
