[hidden] { display: none !important; }
body { font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif; }
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bs-tertiary-bg, #f4f6f9);
}
.login-box { width: min(100%, 390px); border-radius: 4px; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border-radius: 50%;
  color: #fff;
  background: var(--bs-primary, #0d6efd);
  font-weight: 700;
  letter-spacing: -.04em;
}
.password-screen {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 25, 31, .55);
}
.password-box { width: min(100%, 430px); }
.app-header .nav-link { color: var(--bs-body-color); }
.app-header .nav-link:hover { color: var(--bs-primary); }
.app-header button.nav-link { border: 0; background: transparent; }
.header-identity { white-space: nowrap; }
.bi-logo {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e9ecef;
  color: #343a40;
  font-size: 13px;
  font-weight: 800;
  margin-inline: 4px 9px;
}
.sidebar-static { cursor: default; pointer-events: none; color: #adb5bd !important; }
.sidebar-static:hover { background: transparent !important; }
.dashboard-toolbar { min-height: 31px; }
.small-box { height: 142px; display: flex; flex-direction: column; }
.small-box .inner { flex: 1; min-height: 0; padding-right: 36px; }
.small-box .inner h3 {
  font-size: 2rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
.small-box .inner h3.money-value { font-size: clamp(1.25rem, 1.75vw, 1.7rem); padding-top: 4px; min-height: 42px; }
.small-box .inner p { margin-bottom: 0; font-weight: 600; }
.small-box-footer { display: block; padding: 5px 10px; text-align: center; }
.small-box-footer strong { font-weight: 700; }
.card-header .card-title { font-size: 1rem; }
#filters { scroll-margin-top: 70px; }
#trend, #products { scroll-margin-top: 70px; }
#filters .form-label { font-weight: 600; font-size: .875rem; margin-bottom: 4px; }
#filters .form-control, #filters .form-select { min-height: 36px; }
.info-box { height: 100%; min-height: 90px; }
.info-box .info-box-number { font-size: 1.15rem; white-space: nowrap; }
.info-box .info-box-content { min-width: 0; }
.info-box .info-box-icon { font-size: 1.6rem; }
.trend-chart { min-height: 300px; width: 100%; }
.trend-chart svg { display: block; width: 100%; height: 300px; overflow: visible; }
.trend-grid { stroke: #dee2e6; stroke-width: 1; }
.trend-axis { fill: #66717c; font-size: 11px; }
.trend-line { fill: none; stroke: #0d6efd; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.trend-area { fill: rgba(13, 110, 253, .1); }
.trend-point { fill: #0d6efd; stroke: #fff; stroke-width: 2; }
.ranking-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}
.ranking-row:last-child { border-bottom: 0; }
.ranking-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; }
.ranking-value { font-size: .875rem; font-weight: 700; }
.ranking-track { grid-column: 1 / -1; height: 5px; background: #e9ecef; overflow: hidden; }
.ranking-fill { height: 100%; background: #0d6efd; }
.empty-state { color: #6c757d; padding: 45px 10px; text-align: center; }
@media (max-width: 1199px) {
  .small-box .inner h3.money-value { font-size: 1.5rem; }
}
@media (max-width: 767px) {
  .dashboard-toolbar { align-items: flex-start !important; }
  .small-box .inner h3.money-value { font-size: 1.35rem; }
  .trend-chart, .trend-chart svg { min-height: 230px; height: 230px; }
}
/* Painel de vendas */
.sales-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 22px 28px; border-radius: 14px; color: #fff; background: linear-gradient(120deg,#0e274d 0%,#174473 58%,#1b6782 100%); box-shadow: 0 12px 26px rgba(15,48,82,.15); }
.sales-hero h2 { margin: 5px 0 3px; font-size: clamp(1.6rem,2.5vw,2.2rem); font-weight: 700; }
.sales-hero p { margin: 0; color: #c8d9e8; }
.sales-eyebrow { color: #92d9e8; font-size: .72rem; font-weight: 700; letter-spacing: .14em; }
.sales-filter-panel { border: 1px solid #e1e8ef; border-radius: 11px; box-shadow: 0 3px 15px rgba(22,46,75,.035); }
.sales-filter-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 12px 18px; }
.sales-filter-header::after { display: none; }
.sales-filter-header > div { min-width: 0; }
.sales-filter-header > button { justify-self: end; margin-left: auto; white-space: nowrap; }
.sales-filter-header .filter-toggle-button { min-width: 38px; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.filter-toggle-button { border: 0 !important; background: transparent !important; box-shadow: none !important; color: #68798a; font-size: 1.1rem; }.filter-toggle-button:hover { color: #176399; }.filter-toggle-button:focus-visible { outline: 2px solid #2878b5; outline-offset: 2px; }
.sales-filter-header .card-title { float: none; color: #244462; font-weight: 700; }
.sales-filter-header small { display: block; margin-top: 3px; }
.sales-filter-panel .form-label { font-size: .85rem; font-weight: 700; color: #294663; margin-bottom: 5px; }
.sales-filter-panel .btn { min-height: 38px; }
.sales-kpi { position: relative; height: 100%; min-height: 152px; padding: 20px 20px 18px; border: 1px solid #e6ebf0; border-radius: 11px; background: #fff; box-shadow: 0 4px 15px rgba(22,46,75,.04); display: flex; flex-direction: column; }
.sales-kpi > span { color: #67778b; font-size: .84rem; font-weight: 600; }
.sales-kpi strong { display: block; margin-top: 8px; color: #193451; font-size: clamp(1.45rem,1.8vw,1.95rem); line-height: 1.2; white-space: nowrap; }
.sales-kpi small { margin-top: auto; padding-top: 9px; color: #6b7b8a; }
.sales-kpi-icon { position: absolute; right: 19px; top: 18px; width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; font-size: 1.1rem; }
.sales-kpi-icon.blue { color:#2873b5;background:#e9f3fc; }.sales-kpi-icon.amber { color:#d28c15;background:#fff5df; }.sales-kpi-icon.green { color:#208d73;background:#e4f8f0; }.sales-kpi-icon.purple { color:#8163bb;background:#f0ebfc; }
.sales-goal-track { height: 5px; margin-top: 9px; background:#e6f0ec; border-radius: 10px; overflow: hidden; }.sales-goal-track div { height:100%; width:0; background:#21a67f; border-radius:10px; }
.sales-definition { color:#63778b; font-size:.82rem; }
.sales-card { border:1px solid #e4eaf0; border-radius: 11px; box-shadow: 0 3px 15px rgba(22,46,75,.035); overflow:hidden; }
.sales-card .card-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:7px; padding: 15px 18px; border-bottom:1px solid #edf0f3; }
.sales-card .card-title { margin:0; font-weight:700; color:#173454; }.sales-card-hint { font-size:.76rem; color:#8a99a6; }
.sales-chart { min-height:245px; }.sales-chart svg { width:100%; height:245px; display:block; }.sales-chart text { font-family:inherit; fill:#8492a0; font-size:11px; }.sales-chart .grid { stroke:#edf1f5;stroke-width:1; }.sales-chart .line { fill:none;stroke:#1973b8;stroke-width:3;stroke-linecap:round;stroke-linejoin:round; }.sales-chart .area { fill:#eaf4fc; }.sales-chart .bar-current { fill:#1e75b5; }.sales-chart .bar-previous { fill:#afcde3; }.sales-chart .point { fill:#1973b8;stroke:#fff;stroke-width:2; }
.sales-chart-legend { display:flex; justify-content:center; gap:18px; color:#657789; font-size:.78rem; }.sales-chart-legend span:before { content:''; display:inline-block; width:10px; height:10px; border-radius:2px; margin-right:5px; }.sales-chart-legend .current:before { background:#1e75b5; }.sales-chart-legend .previous:before { background:#afcde3; }
.sales-state-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(52px,1fr)); gap:6px; margin-bottom:17px; }.sales-state { border:1px solid #dce8f2; border-radius:7px; background:#f5f9fc; color:#31597a; padding:7px 2px; text-align:center; font-weight:700; font-size:.8rem; cursor:pointer; }.sales-state:hover,.sales-state.active { background:#1f6ca5;color:#fff;border-color:#1f6ca5; }.sales-state small { display:block; font-size:.62rem; font-weight:400; opacity:.8; }
.sales-subhead { border-top:1px solid #edf0f3; padding-top:14px; margin-bottom:9px; color:#26445f; font-weight:700; font-size:.9rem; }.sales-bars { max-height:365px; overflow:auto; }.sales-bar-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 10px; padding:7px 0; border-bottom:1px solid #f0f2f4; font-size:.82rem; }.sales-bar-row:last-child { border-bottom:0; }.sales-bar-row .name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#526b80; }.sales-bar-row .value { color:#26445f; font-weight:700; }.sales-bar-track { grid-column:1/-1; background:#edf2f6; height:5px; border-radius:9px; overflow:hidden; }.sales-bar-fill { height:100%; background:#2a84bc; border-radius:9px; }
.sales-tabs { display:flex;gap:7px;margin-bottom:12px; }.sales-tabs button { border:1px solid #dfe8ef; border-radius:6px; background:#fff; color:#55718a; padding:6px 11px; font-size:.8rem; }.sales-tabs button.active { background:#e9f4fc; border-color:#b9d9ec; color:#176399; font-weight:700; }
.sales-table { font-size:.84rem; }.sales-table th { font-size:.74rem; color:#708294; text-transform:uppercase; letter-spacing:.03em; background:#f8fafc; }.sales-table td,.sales-table th { padding:10px 14px; vertical-align:middle; }.sales-table tbody tr[data-rca] { cursor:pointer; }.sales-table tbody tr[data-rca]:hover { color:#0b6ca8; }.sales-rca-scroll { max-height:445px;overflow:auto; }.sales-rca-scroll thead { position:sticky;top:0;z-index:1; }.sales-achievement { display:inline-block; min-width:58px; padding:3px 6px; border-radius:5px; background:#e8f7f0;color:#14805e; text-align:center; font-weight:700; }.sales-achievement.low { background:#fff2e7;color:#b86a23; }.sales-empty { color:#82909e; text-align:center; padding:20px; }
.industrial-table-scroll { max-height:65vh; overflow:auto; }.industrial-table-scroll thead { position:sticky; top:0; z-index:1; }.industrial-table-row { cursor:pointer; }.industrial-table-row:hover,.industrial-table-row:focus-visible { color:#0b6ca8; background:#f3f8fc; outline:none; }.industrial-table-scroll .sales-table { min-width:1450px; }.industrial-table-scroll .industrial-highlight,.industrial-table-scroll thead th:nth-child(4),.industrial-table-scroll thead th:nth-child(5),.industrial-table-scroll thead th:nth-child(8) { background:#fff0a6 !important; }.industrial-table-scroll .industrial-total-row td { font-weight:700; color:#183951; background:#f1f4f7; border-top:2px solid #aab9c6; }.industrial-table-scroll .industrial-total-row td.industrial-highlight { background:#ffe985 !important; }
.sales-dialog { border:0; border-radius:12px; padding:0; width:min(900px,calc(100% - 30px)); max-height:85vh; box-shadow:0 20px 70px #0c234780; }.sales-dialog::backdrop { background:#0b1d32aa; }.sales-dialog-head { display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #e7edf2; }.sales-dialog-head h5 { margin:0;color:#183951; }.sales-dialog-body { padding:18px 20px;overflow:auto;max-height:calc(85vh - 65px); }
@media(max-width:767px){.sales-hero{padding:23px 20px;}.sales-kpi{min-height:135px;}}

/* Painel financeiro */
.finance-daily { max-height: 350px; overflow: auto; }
.finance-daily-row { display: grid; grid-template-columns: 27px minmax(75px, 1fr) minmax(100px, auto); align-items: center; gap: 10px; padding: 5px 0; font-size: .82rem; }
.finance-daily-row strong { color: #244462; font-variant-numeric: tabular-nums; text-align: right; }
.finance-day { color: #67778b; font-weight: 700; }
.finance-daily-track { height: 9px; border-radius: 10px; background: #e9f0f4; overflow: hidden; }
.finance-daily-fill { height: 100%; border-radius: 10px; background: #2884aa; }
.finance-table-scroll { max-height: 440px; overflow: auto; }
.finance-table-scroll thead { position: sticky; top: 0; z-index: 1; }
.finance-table-scroll td:nth-child(2) { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 575px) { .finance-daily-row { grid-template-columns: 25px minmax(50px, 1fr) minmax(88px, auto); gap: 6px; font-size: .75rem; } }
.sales-dialog.industrial-dialog { width:min(1500px,calc(100% - 30px)); }
.industrial-popup-scroll { max-height:65vh; overflow:auto; }
.industrial-popup-scroll .industrial-metrics-table { min-width:1450px; }
.industrial-popup-scroll thead { position:sticky; top:0; z-index:1; }
.industrial-popup-scroll .industrial-highlight,.industrial-popup-scroll thead th:nth-child(4),.industrial-popup-scroll thead th:nth-child(5),.industrial-popup-scroll thead th:nth-child(8) { background:#fff0a6 !important; }
.industrial-popup-scroll .industrial-total-row td { font-weight:700; color:#183951; background:#f1f4f7; border-top:2px solid #aab9c6; }
.industrial-popup-scroll .industrial-total-row td.industrial-highlight { background:#ffe985 !important; }

.industrial-popup-breadcrumb { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:-5px 0 14px; font-size:.9rem; }
.industrial-breadcrumb-link { padding:0; border:0; background:none; color:#1473a5; font:inherit; text-decoration:underline; cursor:pointer; }
.industrial-breadcrumb-link:hover,.industrial-breadcrumb-link:focus-visible { color:#0b4f75; }
.industrial-breadcrumb-separator { color:#8293a3; }
.industrial-breadcrumb-current { color:#42576a; font-weight:700; }

.branch-multiselect { position:relative; }
.branch-checkbox-list { position:absolute; z-index:1050; top:calc(100% + 4px); left:0; width:max(100%,260px); max-height:280px; overflow:auto; padding:7px; border:1px solid #ccd6df; border-radius:7px; background:#fff; box-shadow:0 8px 24px #102a4330; }
.branch-checkbox-option { display:flex; align-items:center; gap:9px; padding:7px 8px; border-radius:4px; cursor:pointer; font-size:.9rem; }
.branch-checkbox-option:hover { background:#f1f6fa; }
.branch-checkbox-option input { width:16px; height:16px; accent-color:#0d6efd; flex:none; }

.branch-breakdown-trigger { cursor:pointer; }
.branch-breakdown-trigger:focus-visible { outline:3px solid #0d6efd; outline-offset:3px; }
.branch-breakdown-dialog { width:min(1450px,calc(100% - 30px)); }
.branch-breakdown-scroll { max-height:65vh; overflow:auto; }
.branch-breakdown-table { min-width:1100px; }
.branch-breakdown-scroll thead { position:sticky; top:0; z-index:1; }
.branch-breakdown-scroll thead th:nth-child(2),.branch-breakdown-scroll thead th:nth-child(5),.branch-breakdown-scroll thead th:nth-child(8),.branch-breakdown-highlight { background:#fff0a6 !important; }
.branch-breakdown-total-row td { font-weight:700; color:#183951; background:#f1f4f7; border-top:2px solid #aab9c6; }
.branch-breakdown-total-row td.branch-breakdown-highlight { background:#ffe985 !important; }
.branch-breakdown-clickable { cursor:pointer; }
.branch-breakdown-clickable:hover td { background:#eef6fc; }
.branch-breakdown-clickable:focus-visible { outline:2px solid #0d6efd; outline-offset:-2px; }
.branch-drill-table { min-width:1100px; }
.branch-breadcrumb-link { border:0; padding:0; color:#0d6efd; background:transparent; text-decoration:underline; cursor:pointer; }

.branch-breakdown-table.branch-returns-table thead th:nth-child(7) { background:#fff0a6 !important; }

.user-permissions label { display:inline-flex; align-items:center; gap:6px; color:#405466; }
.user-permissions input { accent-color:#0d6efd; }

.user-dialog { width:min(760px,calc(100% - 30px)); }
