:root {
  --fp-bg: #030a14;
  --fp-bg-deep: #02070f;
  --fp-sidebar: #050c16;
  --fp-surface: #081322;
  --fp-surface-2: #0a1727;
  --fp-surface-3: #0d1b2d;
  --fp-line: rgba(127, 151, 190, .18);
  --fp-line-strong: rgba(139, 92, 246, .34);
  --fp-text: #f5f7ff;
  --fp-muted: #8f9cb2;
  --fp-violet: #8b5cf6;
  --fp-pink: #f34daf;
  --fp-green: #31df8b;
  --fp-red: #ff5572;
  --fp-blue: #4aa8ff;
  --fp-amber: #ff9d35;
  --fp-radius: 14px;
}

/* High-priority usability pass — operational density, financial semantics and settings. */
html body.fusion-premium-v5 #operacao .dashboard-grid .delta.good {
  color: #42d88f !important;
}

html body.fusion-premium-v5 #operacao .dashboard-grid .delta.bad {
  color: #ff7285 !important;
}

html body.fusion-premium-v5 #operacao .dashboard-grid .delta.neutral {
  color: #98a4b8 !important;
}

html body.fusion-premium-v5 #funil > .kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-bottom: 10px !important;
}

html body.fusion-premium-v5 #funil > .kpi-grid > .kpi {
  min-height: 92px !important;
  padding: 12px 14px !important;
}

html body.fusion-premium-v5 #funil > .kpi-grid > .kpi:nth-child(3),
html body.fusion-premium-v5 #funil > .kpi-grid > .kpi:nth-child(6),
html body.fusion-premium-v5 #funil > .kpi-grid > .kpi:nth-child(7) {
  display: none !important;
}

html body.fusion-premium-v5 #funil > .kpi-grid .kpi-head {
  align-items: center !important;
}

html body.fusion-premium-v5 #funil > .kpi-grid .kpi-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 9px !important;
}

html body.fusion-premium-v5 #funil > .kpi-grid .metric {
  margin-top: 5px !important;
  font-size: 23px !important;
}

html body.fusion-premium-v5 #funil > .kpi-grid .delta {
  display: none !important;
}

html body.fusion-premium-v5 #funil > .panel {
  margin-top: 10px !important;
}

html body.fusion-premium-v5 #carteira .finance-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

html body.fusion-premium-v5 #carteira .finance-summary-card {
  min-height: 82px !important;
  padding: 12px !important;
}

html body.fusion-premium-v5 #carteira .finance-summary-card:nth-child(5) {
  display: none !important;
}

html body.fusion-premium-v5 #configuracoes .parent-settings-tabs {
  position: sticky;
  top: 70px;
  z-index: 12;
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid rgba(126, 151, 190, .18);
  border-radius: 12px;
  background: rgba(7, 17, 28, .94);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
  backdrop-filter: blur(16px);
  scrollbar-width: none;
}

html body.fusion-premium-v5 #configuracoes .parent-settings-tabs::-webkit-scrollbar {
  display: none;
}

html body.fusion-premium-v5 #configuracoes .parent-settings-tabs button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #98a4b8;
  font-size: 12px;
  font-weight: 800;
}

html body.fusion-premium-v5 #configuracoes .parent-settings-tabs button.active {
  border-color: rgba(255, 79, 216, .32);
  background: rgba(255, 79, 216, .12);
  color: #fff;
}

html body.fusion-premium-v5 #configuracoes > .grid {
  grid-template-columns: minmax(0, 1fr) !important;
}

html body.fusion-premium-v5 #configuracoes [data-settings-pane][hidden] {
  display: none !important;
}

@media (max-width: 768px) {
  html body.mobile-premium-v5.fusion-premium-v5 .shell main {
    padding-bottom: calc(var(--mobile-nav-height, 68px) + env(safe-area-inset-bottom, 0px) + 38px) !important;
    scroll-padding-bottom: calc(var(--mobile-nav-height, 68px) + env(safe-area-inset-bottom, 0px) + 38px);
  }

  html body.mobile-premium-v5.fusion-premium-v5 #funil > .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  html body.mobile-premium-v5.fusion-premium-v5 #funil > .kpi-grid > .kpi {
    min-height: 84px !important;
    padding: 11px 12px !important;
  }

  html body.mobile-premium-v5.fusion-premium-v5 #funil > .kpi-grid .kpi-icon {
    width: 30px !important;
    height: 30px !important;
  }

  html body.mobile-premium-v5.fusion-premium-v5 #funil > .kpi-grid .metric {
    margin-top: 2px !important;
    font-size: 21px !important;
  }

  html body.mobile-premium-v5.fusion-premium-v5 #funil > .panel .panel-header {
    align-items: flex-start !important;
  }

  html body.mobile-premium-v5.fusion-premium-v5 #carteira .finance-tabs {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  html body.mobile-premium-v5.fusion-premium-v5 #carteira .finance-tabs::-webkit-scrollbar {
    display: none;
  }

  html body.mobile-premium-v5.fusion-premium-v5 #carteira .finance-tab {
    flex: 0 0 auto !important;
    min-width: 148px !important;
    scroll-snap-align: start;
  }

  html body.mobile-premium-v5.fusion-premium-v5 #carteira .finance-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  html body.mobile-premium-v5.fusion-premium-v5 #carteira .finance-summary-card {
    min-height: 76px !important;
    padding: 10px !important;
  }

  html body.mobile-premium-v5.fusion-premium-v5 .loop-filter-drawer {
    inset: auto 0 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: 72dvh !important;
    border: 1px solid rgba(126, 151, 190, .22) !important;
    border-bottom: 0 !important;
    border-radius: 22px 22px 0 0 !important;
    transform: translateY(105%) !important;
  }

  html body.mobile-premium-v5.fusion-premium-v5 .loop-filter-drawer.show {
    transform: translateY(0) !important;
  }

  html body.mobile-premium-v5.fusion-premium-v5 .loop-filter-body {
    overflow-y: auto;
  }

  html body.mobile-premium-v5.fusion-premium-v5 .loop-filter-actions {
    position: sticky;
    bottom: 0;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    background: #07111c;
  }

  html body.mobile-premium-v5.fusion-premium-v5 .modal-backdrop > .modal,
  html body.mobile-premium-v5.fusion-premium-v5 .modal-backdrop > .loop-entry-modal {
    max-height: calc(var(--fusion-mobile-viewport-height, 100dvh) - 8px) !important;
    overflow: hidden auto !important;
  }

  html body.mobile-premium-v5.fusion-premium-v5 .modal-actions {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 6 !important;
  }

  html body.mobile-premium-v5.fusion-premium-v5 #configuracoes .parent-settings-tabs {
    top: 8px;
    margin-inline: -2px;
  }
}

/* Cobertura da operação — indicador independente do filtro histórico do dashboard. */
html body.fusion-premium-v5 .shell main #operacao.view.active > .operation-coverage-card {
  order: 1 !important;
  position: relative;
  overflow: hidden;
  padding: 18px 20px;
  border: 1px solid var(--fp-line);
  border-radius: var(--fp-radius);
  background:
    radial-gradient(circle at 88% -40%, rgba(139, 92, 246, .16), transparent 40%),
    linear-gradient(150deg, rgba(10, 23, 39, .98), rgba(6, 16, 29, .99));
  box-shadow: 0 18px 48px rgba(0, 0, 0, .16);
}

html body.fusion-premium-v5 .operation-coverage-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--coverage-accent, var(--fp-blue));
  box-shadow: 0 0 20px var(--coverage-accent, var(--fp-blue));
  opacity: .85;
}

html body.fusion-premium-v5 .operation-coverage-card[data-coverage-state="near"] { --coverage-accent: var(--fp-amber); }
html body.fusion-premium-v5 .operation-coverage-card[data-coverage-state="paid"] { --coverage-accent: var(--fp-green); }
html body.fusion-premium-v5 .operation-coverage-card[data-coverage-state="above"] { --coverage-accent: var(--fp-pink); }
html body.fusion-premium-v5 .operation-coverage-card[data-coverage-state="no_costs"],
html body.fusion-premium-v5 .operation-coverage-card[data-coverage-state="error"] { --coverage-accent: #718096; }

html body.fusion-premium-v5 .operation-coverage-header,
html body.fusion-premium-v5 .operation-coverage-heading,
html body.fusion-premium-v5 .operation-coverage-result-line {
  display: flex;
  align-items: center;
}

html body.fusion-premium-v5 .operation-coverage-header {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

html body.fusion-premium-v5 .operation-coverage-heading { min-width: 0; gap: 11px; }
html body.fusion-premium-v5 .operation-coverage-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--coverage-accent, var(--fp-blue)) 42%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--coverage-accent, var(--fp-blue)) 12%, transparent);
  color: var(--coverage-accent, var(--fp-blue));
}
html body.fusion-premium-v5 .operation-coverage-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }
html body.fusion-premium-v5 .operation-coverage-heading h2 {
  margin: 0;
  color: var(--fp-text);
  font-size: 15px;
  font-weight: 760;
  letter-spacing: -.01em;
}
html body.fusion-premium-v5 .operation-coverage-heading p,
html body.fusion-premium-v5 .operation-coverage-summary p {
  margin: 3px 0 0;
  color: var(--fp-muted);
  font-size: 10px;
  line-height: 1.4;
}

html body.fusion-premium-v5 .operation-coverage-modes {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(64px, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--fp-line);
  border-radius: 10px;
  background: rgba(3, 10, 20, .7);
}
html body.fusion-premium-v5 .operation-coverage-modes button {
  min-height: 32px !important;
  padding: 0 13px;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: var(--fp-muted) !important;
  font-size: 11px;
  font-weight: 720;
}
html body.fusion-premium-v5 .operation-coverage-modes button.active {
  background: rgba(139, 92, 246, .2) !important;
  color: #f7f4ff !important;
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .25);
}

html body.fusion-premium-v5 .operation-coverage-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 31%);
  gap: 24px;
  align-items: end;
}
html body.fusion-premium-v5 .operation-coverage-summary { min-width: 0; }
html body.fusion-premium-v5 .operation-coverage-result-line { gap: 12px; margin-bottom: 11px; }
html body.fusion-premium-v5 .operation-coverage-result-line strong {
  color: var(--coverage-accent, var(--fp-blue));
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 790;
  line-height: 1;
  letter-spacing: -.035em;
}
html body.fusion-premium-v5 .operation-coverage-result-line span {
  color: #d9e1ed;
  font-size: 12px;
  font-weight: 700;
}
html body.fusion-premium-v5 .operation-coverage-track {
  height: 7px;
  overflow: hidden;
  border: 1px solid rgba(127, 151, 190, .12);
  border-radius: 999px;
  background: rgba(2, 8, 17, .84);
}
html body.fusion-premium-v5 .operation-coverage-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--coverage-accent, var(--fp-blue)) 68%, #fff), var(--coverage-accent, var(--fp-blue)));
  box-shadow: 0 0 16px color-mix(in srgb, var(--coverage-accent, var(--fp-blue)) 52%, transparent);
  transition: width .35s ease;
}
html body.fusion-premium-v5 .operation-coverage-summary p { margin-top: 9px; }

html body.fusion-premium-v5 .operation-coverage-highlight {
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid rgba(127, 151, 190, .14);
  border-radius: 11px;
  background: rgba(5, 14, 25, .7);
}
html body.fusion-premium-v5 .operation-coverage-highlight > span {
  display: block;
  color: var(--fp-muted);
  font-size: 9px;
  font-weight: 780;
  letter-spacing: .065em;
  text-transform: uppercase;
}
html body.fusion-premium-v5 .operation-coverage-highlight strong {
  display: block;
  margin-top: 5px;
  color: var(--fp-text);
  font-size: 16px;
  font-weight: 760;
}
html body.fusion-premium-v5 .operation-coverage-highlight small {
  display: block;
  margin-top: 5px;
  color: var(--fp-muted);
  font-size: 9px;
  line-height: 1.45;
}
html body.fusion-premium-v5 .operation-coverage-highlight .operation-coverage-pace {
  color: #b9c5d8;
  font-weight: 680;
}
html body.fusion-premium-v5 .operation-coverage-highlight .operation-coverage-reached {
  color: var(--fp-green);
  font-weight: 680;
}
html body.fusion-premium-v5 .operation-coverage-details-toggle {
  display: flex;
  width: 100%;
  min-height: 28px !important;
  margin-top: 8px;
  padding: 0 !important;
  align-items: center;
  justify-content: space-between;
  border: 0 !important;
  background: transparent !important;
  color: #b9c5d8 !important;
  font-size: 10px;
  font-weight: 720;
}
html body.fusion-premium-v5 .operation-coverage-details-toggle span:last-child { transition: transform .18s ease; }
html body.fusion-premium-v5 .operation-coverage-details-toggle[aria-expanded="true"] span:last-child { transform: rotate(180deg); }
html body.fusion-premium-v5 .operation-coverage-details[hidden] { display: none !important; }
html body.fusion-premium-v5 .operation-coverage-details {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--fp-line);
}
html body.fusion-premium-v5 .operation-coverage-details-head,
html body.fusion-premium-v5 .operation-coverage-detail-row,
html body.fusion-premium-v5 .operation-coverage-detail-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
html body.fusion-premium-v5 .operation-coverage-details-head { margin-bottom: 9px; }
html body.fusion-premium-v5 .operation-coverage-details-head strong,
html body.fusion-premium-v5 .operation-coverage-detail-total strong {
  color: var(--fp-text);
  font-size: 11px;
}
html body.fusion-premium-v5 .operation-coverage-details-head span,
html body.fusion-premium-v5 .operation-coverage-detail-row small,
html body.fusion-premium-v5 .operation-coverage-detail-total span {
  color: var(--fp-muted);
  font-size: 9px;
}
html body.fusion-premium-v5 .operation-coverage-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 20px;
}
html body.fusion-premium-v5 .operation-coverage-detail-row {
  min-width: 0;
  min-height: 28px;
  padding: 0 2px;
  border-bottom: 1px solid rgba(127, 151, 190, .09);
}
html body.fusion-premium-v5 .operation-coverage-detail-row span {
  min-width: 0;
  overflow: hidden;
  color: #d4dce8;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html body.fusion-premium-v5 .operation-coverage-detail-row strong { color: #edf2fa; font-size: 10px; }
html body.fusion-premium-v5 .operation-coverage-detail-row small { margin-left: auto; }
html body.fusion-premium-v5 .operation-coverage-detail-total { margin-top: 8px; }
html body.fusion-premium-v5 .operation-coverage-toast {
  position: fixed;
  z-index: 180;
  right: 24px;
  bottom: 24px;
  display: flex;
  min-height: 46px;
  padding: 0 16px;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(49, 223, 139, .35);
  border-radius: 12px;
  background: rgba(7, 24, 26, .96);
  color: #eafff4;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .35);
  font-size: 11px;
}
html body.fusion-premium-v5 .operation-coverage-toast[hidden] { display: none !important; }
html body.fusion-premium-v5 .operation-coverage-toast span { color: var(--fp-green); font-size: 17px; }
html body.fusion-premium-v5 .operation-coverage-card.is-loading { opacity: .78; }
html body.fusion-premium-v5 .operation-coverage-card.is-loading .operation-coverage-track > span { width: 24%; opacity: .45; }

html body.fusion-premium-v5 .manual-entry-cadence[hidden] { display: none !important; }
html body.fusion-premium-v5 .manual-entry-cadence > small {
  color: var(--fp-muted);
  font-size: 10px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  html body.mobile-premium-v5.fusion-premium-v5 .shell main #operacao.view.active > .operation-coverage-card {
    padding: 15px;
  }
  html body.fusion-premium-v5 .operation-coverage-header { align-items: flex-start; margin-bottom: 16px; }
  html body.fusion-premium-v5 .operation-coverage-heading p { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html body.fusion-premium-v5 .operation-coverage-modes { grid-template-columns: repeat(2, minmax(52px, 1fr)); }
  html body.fusion-premium-v5 .operation-coverage-modes button { min-height: 34px !important; padding: 0 9px; }
  html body.fusion-premium-v5 .operation-coverage-body { grid-template-columns: 1fr; gap: 12px; }
  html body.fusion-premium-v5 .operation-coverage-highlight { padding: 11px 12px; }
  html body.fusion-premium-v5 .operation-coverage-result-line { align-items: baseline; flex-wrap: wrap; gap: 7px 10px; }
  html body.fusion-premium-v5 .operation-coverage-result-line strong { font-size: 29px; }
  html body.fusion-premium-v5 .operation-coverage-detail-list { grid-template-columns: 1fr; }
  html body.fusion-premium-v5 .operation-coverage-toast {
    right: 14px;
    bottom: 82px;
    left: 14px;
    justify-content: center;
  }
}

body.fusion-premium-v5 {
  color: var(--fp-text) !important;
  background:
    radial-gradient(circle at 78% -8%, rgba(92, 67, 210, .12), transparent 31rem),
    radial-gradient(circle at 14% 34%, rgba(243, 77, 175, .055), transparent 28rem),
    var(--fp-bg) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

body.fusion-premium-v5 .shell,
body.fusion-premium-v5 .shell.sidebar-expanded {
  grid-template-columns: 216px minmax(0, 1fr) !important;
  background: transparent !important;
}

body.fusion-premium-v5 .shell > aside {
  position: sticky !important;
  width: auto !important;
  padding: 16px 12px 18px !important;
  border-right: 1px solid var(--fp-line) !important;
  background: linear-gradient(180deg, rgba(5, 13, 24, .99), rgba(3, 9, 17, .99)) !important;
  box-shadow: 18px 0 45px rgba(0, 0, 0, .18) !important;
}

body.fusion-premium-v5 .brand {
  min-height: 92px !important;
  margin: 0 0 14px !important;
  padding: 8px 13px 18px !important;
  gap: 10px !important;
  border-bottom-color: var(--fp-line) !important;
}

body.fusion-premium-v5 .brand-mark,
body.fusion-premium-v5 .brand-mark.has-logo,
body.fusion-premium-v5 #brandMark {
  width: 68px !important;
  height: 68px !important;
  flex: 0 0 68px !important;
  overflow: hidden !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: 0 0 24px rgba(243, 77, 175, .16) !important;
}

body.fusion-premium-v5 #brandMark > img,
body.fusion-premium-v5 .brand-mark img {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
}

body.fusion-premium-v5 #brandMark > span { display: none !important; }
body.fusion-premium-v5 .brand-text strong,
body.fusion-premium-v5 #brandName { font-size: 19px !important; font-weight: 760 !important; }
body.fusion-premium-v5 .brand-text span { display: block !important; color: var(--fp-muted) !important; font-size: 10px !important; }

body.fusion-premium-v5 .nav-btn {
  min-height: 43px !important;
  margin: 2px 0 !important;
  padding: 0 12px !important;
  gap: 11px !important;
  border-radius: 8px !important;
  color: #9aa7bc !important;
  font-size: 13px !important;
  font-weight: 620 !important;
  transition: color .18s ease, border-color .18s ease, background .18s ease !important;
}

body.fusion-premium-v5 .nav-btn:hover {
  border-color: rgba(139, 92, 246, .18) !important;
  background: rgba(139, 92, 246, .055) !important;
}

body.fusion-premium-v5 .nav-btn.active,
body.fusion-premium-v5 .nav-btn.is-active,
body.fusion-premium-v5 .nav-btn[aria-current="page"] {
  border-color: rgba(139, 92, 246, .30) !important;
  background: linear-gradient(90deg, rgba(127, 72, 207, .34), rgba(89, 50, 150, .16)) !important;
  color: #fff !important;
  box-shadow: inset 0 1px rgba(255,255,255,.04), 0 8px 22px rgba(61, 36, 120, .12) !important;
}

body.fusion-premium-v5 .nav-btn.active::after {
  inset: 10px auto 10px -12px !important;
  width: 2px !important;
  background: linear-gradient(var(--fp-pink), var(--fp-violet)) !important;
  box-shadow: 0 0 12px rgba(243, 77, 175, .5) !important;
}

body.fusion-premium-v5 .shell > main {
  padding: 0 26px 40px !important;
  background: transparent !important;
}

/* Desktop command/search bar */
body.fusion-premium-v5 .premium-command-bar {
  position: relative;
  z-index: 100;
  height: 68px;
  margin: 0 -26px;
  padding: 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--fp-line);
  background: rgba(3, 10, 20, .82);
  backdrop-filter: blur(18px);
}

body.fusion-premium-v5 .premium-search { position: relative; width: min(450px, 52vw); }
body.fusion-premium-v5 .premium-search > svg {
  position: absolute; left: 13px; top: 50%; z-index: 1; width: 17px; height: 17px;
  transform: translateY(-50%); stroke: var(--fp-muted); fill: none;
}
body.fusion-premium-v5 .premium-search input {
  width: 100%; height: 38px; margin: 0 !important; padding: 0 56px 0 40px !important;
  border: 1px solid var(--fp-line) !important; border-radius: 8px !important;
  background: rgba(4, 12, 23, .9) !important; color: var(--fp-text) !important;
  font-size: 12px !important; box-shadow: inset 0 1px rgba(255,255,255,.02) !important;
}
body.fusion-premium-v5 .premium-search input:focus { border-color: rgba(139,92,246,.65) !important; outline: 0 !important; }
body.fusion-premium-v5 .premium-search kbd {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  min-width: 29px; padding: 3px 6px; border: 1px solid rgba(139,92,246,.5); border-radius: 5px;
  color: #b99cff; background: rgba(139,92,246,.08); font: 700 10px/1.2 ui-monospace, monospace; text-align: center;
}
body.fusion-premium-v5 .premium-search-results {
  position: absolute; inset: 44px 0 auto; z-index: 50; max-height: 310px; overflow: auto;
  padding: 7px; border: 1px solid var(--fp-line-strong); border-radius: 11px;
  background: rgba(7,18,32,.98); box-shadow: 0 20px 55px rgba(0,0,0,.48);
}
body.fusion-premium-v5 .premium-search-results[hidden] { display: none !important; }
body.fusion-premium-v5 .premium-search-results button,
body.fusion-premium-v5 .premium-profile-menu button {
  width: 100%; min-height: 42px; padding: 8px 10px !important; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 0 !important; border-radius: 7px !important; background: transparent !important; color: var(--fp-text) !important; text-align: left;
}
body.fusion-premium-v5 .premium-search-results button:hover,
body.fusion-premium-v5 .premium-profile-menu button:hover { background: rgba(139,92,246,.12) !important; }
body.fusion-premium-v5 .premium-search-results small { color: var(--fp-muted); font-size: 10px; }
body.fusion-premium-v5 .premium-search-results p { margin: 12px; color: var(--fp-muted); font-size: 12px; }
body.fusion-premium-v5 .premium-command-actions { display: flex; align-items: center; gap: 9px; }
body.fusion-premium-v5 .premium-command-icon {
  position: relative; width: 38px; height: 38px; padding: 0 !important; display: grid; place-items: center;
  border: 1px solid transparent !important; border-radius: 9px !important; background: transparent !important; color: #d8def0 !important;
}
body.fusion-premium-v5 .premium-command-icon:hover { border-color: var(--fp-line) !important; background: var(--fp-surface) !important; }
body.fusion-premium-v5 .premium-command-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }
body.fusion-premium-v5 .premium-notification-dot {
  position: absolute; right: 7px; top: 7px; width: 6px; height: 6px; border: 1px solid var(--fp-bg); border-radius: 50%; background: var(--fp-pink);
}
body.fusion-premium-v5 .premium-profile-wrap { position: relative; }
body.fusion-premium-v5 .premium-profile-button {
  min-height: 46px; padding: 4px 5px 4px 8px !important; display: flex; align-items: center; gap: 9px;
  border: 0 !important; background: transparent !important; color: var(--fp-text) !important; text-align: left;
}
body.fusion-premium-v5 .premium-profile-button img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
body.fusion-premium-v5 .premium-profile-button span { display: grid; gap: 1px; }
body.fusion-premium-v5 .premium-profile-button strong { font-size: 11px; }
body.fusion-premium-v5 .premium-profile-button small { color: var(--fp-muted); font-size: 9px; }
body.fusion-premium-v5 .premium-profile-button b { color: var(--fp-muted); font-size: 12px; }
body.fusion-premium-v5 .premium-profile-menu {
  position: absolute; right: 0; top: 51px; z-index: 60; width: 190px; padding: 7px;
  border: 1px solid var(--fp-line-strong); border-radius: 11px; background: rgba(7,18,32,.98); box-shadow: 0 18px 45px rgba(0,0,0,.45);
}
body.fusion-premium-v5 .premium-profile-menu[hidden] { display: none !important; }
body.fusion-premium-v5 .premium-profile-menu svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }

body.fusion-premium-v5 .topbar {
  display: grid !important;
  grid-template-columns: minmax(210px, 1fr) auto !important;
  min-height: 116px !important;
  margin: 0 -26px 18px !important;
  padding: 24px 26px !important;
  align-items: center !important;
  gap: 18px !important;
  border-bottom: 1px solid rgba(127,151,190,.08) !important;
  background: transparent !important;
}
body.fusion-premium-v5 .topbar h1 { font-size: clamp(25px, 2vw, 29px) !important; font-weight: 760 !important; }
body.fusion-premium-v5 .topbar-subtitle { color: var(--fp-muted) !important; font-size: 12px !important; }
body.fusion-premium-v5 .topbar .toolbar {
  display: flex !important; width: auto !important; grid-template-columns: none !important; flex-wrap: wrap !important; justify-content: flex-end !important;
}
body.fusion-premium-v5 .topbar .toolbar-status,
body.fusion-premium-v5 .topbar .dashboard-period-controls,
body.fusion-premium-v5 .topbar .toolbar-actions { display: flex !important; width: auto !important; }
body.fusion-premium-v5 .topbar .toolbar-status .sync-btn,
body.fusion-premium-v5 .topbar .toolbar-status .pending-payable-btn,
body.fusion-premium-v5 .topbar .toolbar .parent-period-button,
body.fusion-premium-v5 .topbar .toolbar-actions .icon-btn,
body.fusion-premium-v5 .premium-filter-toggle {
  height: 42px !important; min-height: 42px !important; padding: 0 12px !important;
  border: 1px solid var(--fp-line) !important; border-radius: 9px !important;
  background: rgba(8,19,34,.82) !important; color: #d3daea !important; box-shadow: none !important;
}
body.fusion-premium-v5 .topbar .toolbar-actions .icon-btn { width: 42px !important; padding: 0 !important; }
body.fusion-premium-v5 .parent-period-button svg,
body.fusion-premium-v5 .premium-filter-toggle svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }
body.fusion-premium-v5 .premium-filter-toggle { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; }
body.fusion-premium-v5 .premium-filter-count {
  min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: var(--fp-violet); color: #fff; font-size: 9px;
}
body.fusion-premium-v5 .dashboard-period-controls { position: relative !important; }
body.fusion-premium-v5 .premium-filter-popover {
  position: absolute; z-index: 45; right: 0; top: 50px; width: min(560px, 86vw); padding: 10px;
  display: grid; grid-template-columns: 1fr 210px; gap: 9px; align-items: center;
  border: 1px solid var(--fp-line-strong); border-radius: 12px; background: rgba(7,18,32,.98); box-shadow: 0 22px 55px rgba(0,0,0,.5);
}
body.fusion-premium-v5 .premium-filter-popover[hidden] { display: none !important; }
body.fusion-premium-v5 .topbar .premium-filter-popover .period-quick { display: flex !important; height: 42px !important; }
body.fusion-premium-v5 .topbar .premium-filter-popover .reseller-scope-filter {
  width: 100% !important; min-width: 0 !important; height: 42px !important; margin: 0 !important; border-color: var(--fp-line) !important; background: var(--fp-surface-2) !important;
}
body.fusion-premium-v5 .premium-mobile-brand { display: none; }

/* Cards and dashboard hierarchy */
body.fusion-premium-v5 .panel,
body.fusion-premium-v5 .kpi,
body.fusion-premium-v5 .reconciliation-card,
body.fusion-premium-v5 .closing-card,
body.fusion-premium-v5 .daily-closing-card,
body.fusion-premium-v5 .finance-summary-card,
body.fusion-premium-v5 .pending-center-card,
body.fusion-premium-v5 .audit-summary-card {
  border-color: var(--fp-line) !important;
  border-radius: var(--fp-radius) !important;
  background: linear-gradient(155deg, rgba(10,23,39,.96), rgba(6,16,29,.98)) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.015), 0 16px 38px rgba(0,0,0,.12) !important;
}
body.fusion-premium-v5 .panel-header,
body.fusion-premium-v5 .panel-head,
body.fusion-premium-v5 .finance-ledger-head {
  min-height: 55px !important; padding: 14px 16px !important; border-bottom-color: var(--fp-line) !important; background: transparent !important;
}
body.fusion-premium-v5 .panel-title,
body.fusion-premium-v5 .panel-head h2 { color: var(--fp-text) !important; font-size: 14px !important; font-weight: 730 !important; }
body.fusion-premium-v5 .panel-note { margin-top: 4px !important; color: var(--fp-muted) !important; font-size: 10px !important; }

body.fusion-premium-v5 #operacao > .dashboard-surface {
  overflow: visible !important; border: 0 !important; background: transparent !important; box-shadow: none !important;
}
body.fusion-premium-v5 #operacao > .dashboard-surface .dashboard-grid.kpi-grid {
  display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 12px !important; overflow: visible !important;
}
body.fusion-premium-v5 #operacao > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(n) {
  display: none !important;
}
body.fusion-premium-v5 #operacao > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(1),
body.fusion-premium-v5 #operacao > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(2),
body.fusion-premium-v5 #operacao > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(3),
body.fusion-premium-v5 #operacao > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(7) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 42px !important; grid-template-rows: auto auto auto !important;
  min-height: 150px !important; padding: 18px !important; column-gap: 12px !important;
  border: 1px solid var(--fp-line) !important; border-radius: var(--fp-radius) !important;
  background: linear-gradient(155deg, rgba(10,23,39,.97), rgba(6,16,29,.98)) !important;
}
body.fusion-premium-v5 #operacao .dashboard-grid .kpi-head { display: contents !important; }
body.fusion-premium-v5 #operacao .dashboard-grid .name {
  grid-column: 1 !important; grid-row: 1 !important; max-width: none !important; color: #c7cfdd !important; font-size: 12px !important; font-weight: 620 !important; text-transform: none !important;
}
body.fusion-premium-v5 #operacao .dashboard-grid .kpi-icon {
  grid-column: 2 !important; grid-row: 1 / span 2 !important; width: 38px !important; height: 38px !important; border: 1px solid currentColor !important; border-radius: 10px !important;
}
body.fusion-premium-v5 #operacao .dashboard-grid .metric {
  grid-column: 1 / -1 !important; grid-row: 2 !important; margin: 15px 0 0 !important; color: var(--fp-text) !important; font-size: clamp(22px, 2vw, 28px) !important; font-weight: 780 !important;
}
body.fusion-premium-v5 #operacao .dashboard-grid .delta {
  grid-column: 1 / -1 !important; grid-row: 3 !important; align-self: end !important; margin: 12px 0 0 !important; color: var(--fp-green) !important; font-size: 10px !important;
}
body.fusion-premium-v5 #operacao .dashboard-grid .kpi:nth-child(2) .metric,
body.fusion-premium-v5 #operacao .dashboard-grid .kpi:nth-child(3) .metric { color: var(--fp-text) !important; }

body.fusion-premium-v5 #operacao > .dashboard-insights {
  order: 2 !important; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr) !important; gap: 14px !important;
}
body.fusion-premium-v5 #operacao > .dashboard-insights,
body.fusion-premium-v5 #operacao > .dashboard-insights > .panel { height: auto !important; min-height: 405px !important; }
body.fusion-premium-v5 #operacao .dashboard-finance-chart { min-height: 335px !important; }

body.fusion-premium-v5 .premium-section-disclosure {
  width: 100%; min-height: 42px; margin: 2px 0 0; padding: 0 4px !important; display: flex; align-items: center; justify-content: space-between;
  border: 0 !important; background: transparent !important; color: #dbe1ed !important; font-size: 12px; font-weight: 700; text-align: left;
}
body.fusion-premium-v5 .premium-section-disclosure b { color: var(--fp-muted); transition: transform .2s ease; }
body.fusion-premium-v5 .premium-section-disclosure[aria-expanded="true"] b { transform: rotate(180deg); }
body.fusion-premium-v5 #operacao > .dashboard-command-center,
body.fusion-premium-v5 #operacao > .dashboard-secondary-insights {
  max-height: 900px !important; opacity: 1; transform: translateY(0); transition: max-height .25s ease, opacity .2s ease, transform .2s ease !important;
}
body.fusion-premium-v5 #operacao > .dashboard-command-center.premium-collapsed,
body.fusion-premium-v5 #operacao > .dashboard-secondary-insights.premium-collapsed {
  display: grid !important; min-height: 0 !important; max-height: 0 !important; margin: 0 !important; padding: 0 !important; overflow: hidden !important; border: 0 !important; opacity: 0; transform: translateY(-5px);
}
body.fusion-premium-v5 #operacao > .dashboard-command-center::before { display: none !important; }
body.fusion-premium-v5 #operacao > .dashboard-command-center:not(.premium-collapsed) {
  padding: 0 !important; border-radius: var(--fp-radius) !important; background: var(--fp-surface) !important;
}

/* Working screens, tables and actions */
body.fusion-premium-v5 .action-btn,
body.fusion-premium-v5 button.secondary,
body.fusion-premium-v5 .seg {
  border-radius: 8px !important; transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease !important;
}
body.fusion-premium-v5 .action-btn.approved,
body.fusion-premium-v5 button.primary,
body.fusion-premium-v5 .primary {
  border-color: rgba(243,77,175,.65) !important;
  background: linear-gradient(100deg, #a84fe6, #ee4bab) !important;
  color: #fff !important; box-shadow: 0 8px 22px rgba(192,57,168,.16) !important;
}
body.fusion-premium-v5 input,
body.fusion-premium-v5 select,
body.fusion-premium-v5 textarea {
  border-color: var(--fp-line) !important; border-radius: 8px !important; background: #081522 !important; color: var(--fp-text) !important;
}
body.fusion-premium-v5 input:focus,
body.fusion-premium-v5 select:focus,
body.fusion-premium-v5 textarea:focus { border-color: rgba(139,92,246,.68) !important; outline: 0 !important; box-shadow: 0 0 0 3px rgba(139,92,246,.09) !important; }
body.fusion-premium-v5 .table-wrap { border-color: var(--fp-line) !important; border-radius: 10px !important; }
body.fusion-premium-v5 table thead th { color: #8f9cb2 !important; background: rgba(10,23,39,.78) !important; font-size: 10px !important; letter-spacing: .045em !important; }
body.fusion-premium-v5 table td { min-height: 54px; border-color: rgba(127,151,190,.10) !important; color: #cfd6e5 !important; }
body.fusion-premium-v5 table tbody tr { transition: background .16s ease !important; }
body.fusion-premium-v5 table tbody tr:hover { background: rgba(139,92,246,.045) !important; }

body.fusion-premium-v5 .premium-actions-wrap { position: relative; display: inline-flex; }
body.fusion-premium-v5 .premium-more-button {
  width: 40px; height: 40px; padding: 0 !important; border: 1px solid var(--fp-line) !important; border-radius: 8px !important; background: var(--fp-surface-2) !important; color: #cbd3e2 !important;
}
body.fusion-premium-v5 .premium-actions-menu {
  position: absolute; right: 0; top: 46px; z-index: 45; min-width: 210px; padding: 7px;
  border: 1px solid var(--fp-line-strong); border-radius: 11px; background: rgba(7,18,32,.99); box-shadow: 0 20px 48px rgba(0,0,0,.48);
}
body.fusion-premium-v5 .premium-actions-menu[hidden] { display: none !important; }
body.fusion-premium-v5 .premium-actions-menu .action-btn { width: 100% !important; min-height: 40px !important; margin: 0 !important; padding: 8px 10px !important; justify-content: flex-start !important; border: 0 !important; background: transparent !important; color: #d6ddec !important; box-shadow: none !important; text-align: left !important; }
body.fusion-premium-v5 .premium-actions-menu .action-btn:hover { background: rgba(139,92,246,.12) !important; }

@media (max-width: 1180px) {
  body.fusion-premium-v5 .shell,
  body.fusion-premium-v5 .shell.sidebar-expanded { grid-template-columns: 76px minmax(0, 1fr) !important; }
  body.fusion-premium-v5 .brand-text,
  body.fusion-premium-v5 .nav-label { display: none !important; }
  body.fusion-premium-v5 .brand { justify-content: center !important; padding-inline: 0 !important; }
  body.fusion-premium-v5 .nav-btn { justify-content: center !important; padding: 0 !important; }
  body.fusion-premium-v5 .topbar { grid-template-columns: 1fr !important; }
  body.fusion-premium-v5 .topbar .toolbar { justify-content: flex-start !important; }
  body.fusion-premium-v5 #operacao > .dashboard-surface .dashboard-grid.kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 760px) {
  body.fusion-premium-v5 .shell,
  body.fusion-premium-v5 .shell.sidebar-expanded,
  body.fusion-premium-v5 .shell.sidebar-collapsed { display: block !important; }
  body.responsive-shell-v4.fusion-premium-v5 .shell > aside {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    z-index: 1002 !important;
    width: min(86vw, 300px) !important;
    height: 100dvh !important;
    padding: 16px 12px 24px !important;
    border: 0 !important;
    border-right: 1px solid var(--fp-line) !important;
    background: rgba(5, 13, 24, .98) !important;
    box-shadow: 24px 0 70px rgba(0,0,0,.52) !important;
    transform: translateX(-105%) !important;
  }
  body.responsive-shell-v4.fusion-premium-v5.mobile-nav-open .shell > aside { transform: translateX(0) !important; }
  body.fusion-premium-v5 .shell > main { margin: 0 !important; padding: 0 14px 92px !important; }
  body.fusion-premium-v5 .premium-command-bar { display: none !important; }
  body.fusion-premium-v5 .topbar {
    min-height: 0 !important; margin: 0 -14px 14px !important; padding: 14px !important;
    display: grid !important; grid-template-columns: 1fr auto !important; align-items: center !important; gap: 12px !important;
  }
  body.fusion-premium-v5 .premium-mobile-brand { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 7px; }
  body.fusion-premium-v5 .premium-mobile-brand img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; filter: drop-shadow(0 0 10px rgba(243,77,175,.22)); }
  body.fusion-premium-v5 .premium-mobile-brand strong { display: none; }
  body.fusion-premium-v5 .topbar > div:first-of-type { grid-column: 1; grid-row: 1; }
  body.fusion-premium-v5 .topbar h1 { font-size: 24px !important; }
  body.fusion-premium-v5 .topbar .toolbar { grid-column: 1 / -1; display: grid !important; grid-template-columns: 1fr !important; width: 100% !important; }
  body.fusion-premium-v5 .topbar .toolbar-status { display: grid !important; grid-template-columns: 1fr 1fr !important; width: 100% !important; }
  body.fusion-premium-v5 .topbar .dashboard-period-controls { display: grid !important; grid-template-columns: minmax(0,1fr) 48px !important; width: 100% !important; gap: 8px !important; }
  body.fusion-premium-v5 .topbar .toolbar-actions { display: none !important; }
  body.fusion-premium-v5 .parent-period-shell { width: 100% !important; }
  body.fusion-premium-v5 .parent-period-button { width: 100% !important; justify-content: flex-start !important; }
  body.fusion-premium-v5 .premium-filter-toggle { width: 48px !important; padding: 0 !important; justify-content: center; }
  body.fusion-premium-v5 .premium-filter-toggle span { display: none; }
  body.fusion-premium-v5 .premium-filter-count { position: absolute; right: -3px; top: -4px; }
  body.fusion-premium-v5 .premium-filter-popover {
    position: static; grid-column: 1 / -1; width: 100%; padding: 0; grid-template-columns: 1fr; border: 0; background: transparent; box-shadow: none;
  }
  body.fusion-premium-v5 .premium-filter-popover[hidden] { display: none !important; }
  body.fusion-premium-v5 .topbar .premium-filter-popover .period-quick { display: grid !important; width: 100% !important; height: auto !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 7px !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
  body.fusion-premium-v5 .topbar .premium-filter-popover .period-quick .seg { height: 42px !important; border: 1px solid var(--fp-line) !important; background: var(--fp-surface) !important; }
  body.fusion-premium-v5 .topbar .premium-filter-popover .period-quick .seg.active { background: linear-gradient(100deg,#9a4ee0,#e94aa9) !important; }
  body.fusion-premium-v5 .topbar .premium-filter-popover .reseller-scope-filter { height: 44px !important; }
  body.fusion-premium-v5 #operacao.view.active { gap: 10px !important; }
  body.fusion-premium-v5 #operacao > .dashboard-surface .dashboard-grid.kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 9px !important; }
  body.fusion-premium-v5 #operacao > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(1),
  body.fusion-premium-v5 #operacao > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(2),
  body.fusion-premium-v5 #operacao > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(3),
  body.fusion-premium-v5 #operacao > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(7) {
    min-height: 132px !important; padding: 14px !important; grid-template-columns: minmax(0,1fr) 34px !important;
  }
  body.fusion-premium-v5 #operacao .dashboard-grid .kpi-icon { width: 33px !important; height: 33px !important; border-radius: 9px !important; }
  body.fusion-premium-v5 #operacao .dashboard-grid .name { font-size: 10px !important; }
  body.fusion-premium-v5 #operacao .dashboard-grid .metric { margin-top: 12px !important; font-size: clamp(17px, 5.5vw, 22px) !important; }
  body.fusion-premium-v5 #operacao .dashboard-grid .delta { font-size: 9px !important; }
  body.fusion-premium-v5 #operacao > .dashboard-insights { grid-template-columns: 1fr !important; gap: 10px !important; }
  body.fusion-premium-v5 #operacao > .dashboard-insights,
  body.fusion-premium-v5 #operacao > .dashboard-insights > .panel { min-height: 0 !important; }
  body.fusion-premium-v5 .panel-header,
  body.fusion-premium-v5 .panel-head { padding: 13px 14px !important; }
  body.fusion-premium-v5 .panel-note { max-width: 70vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.fusion-premium-v5 .premium-actions-menu { position: fixed; inset: auto 10px 78px; min-width: 0; }
  body.fusion-premium-v5 .action-btn,
  body.fusion-premium-v5 button { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  body.fusion-premium-v5 *,
  body.fusion-premium-v5 *::before,
  body.fusion-premium-v5 *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Final dashboard rules intentionally mirror the existing selector weight. */
body.fusion-premium-v5 .shell main #operacao.view.active > .premium-command-disclosure { order: 3 !important; }
body.fusion-premium-v5 .shell main #operacao.view.active > .dashboard-command-center { order: 4 !important; }
body.fusion-premium-v5 .shell main #operacao.view.active > .premium-secondary-disclosure { order: 5 !important; }
body.fusion-premium-v5 .shell main #operacao.view.active > .dashboard-secondary-insights { order: 6 !important; }
body.fusion-premium-v5 .shell.sidebar-expanded > aside #brandMark.brand-mark,
body.fusion-premium-v5 .shell.sidebar-expanded > aside #brandMark.brand-mark.has-logo {
  position: relative !important; display: block !important; width: 64px !important; height: 64px !important; flex: 0 0 64px !important; max-width: 64px !important; max-height: 64px !important;
}
body.fusion-premium-v5 .shell.sidebar-expanded > aside #brandMark.brand-mark > img {
  position: absolute !important; inset: 0 !important; width: 64px !important; height: 64px !important; max-width: 64px !important; max-height: 64px !important; object-fit: cover !important;
}
html body.fusion-premium-v5 .shell.sidebar-expanded > aside #brandMark.brand-mark > span { display: none !important; }
body.fusion-premium-v5 .shell main #operacao.view.active > .dashboard-surface {
  overflow: visible !important; border: 0 !important; background: transparent !important; box-shadow: none !important;
}
body.fusion-premium-v5 .shell main #operacao.view.active > .dashboard-surface .dashboard-grid.kpi-grid {
  display: grid !important; grid-template-columns: repeat(4,minmax(0,1fr)) !important; gap: 12px !important; overflow: visible !important;
  border: 0 !important; border-radius: 0 !important; background: transparent !important;
}
body.fusion-premium-v5 .shell main #operacao.view.active > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(n) { display: none !important; }
body.fusion-premium-v5 .shell main #operacao.view.active > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(1),
body.fusion-premium-v5 .shell main #operacao.view.active > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(2),
body.fusion-premium-v5 .shell main #operacao.view.active > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(3),
body.fusion-premium-v5 .shell main #operacao.view.active > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(7) {
  display: flex !important; flex-direction: column !important;
  min-height: 150px !important; padding: 18px !important; gap: 0 !important;
  border: 1px solid var(--fp-line) !important; border-radius: var(--fp-radius) !important;
  background: linear-gradient(155deg,rgba(10,23,39,.97),rgba(6,16,29,.98)) !important;
}
body.fusion-premium-v5 .shell main #operacao.view.active .dashboard-grid .kpi-head {
  display: flex !important; align-items: flex-start !important; justify-content: space-between !important; gap: 10px !important;
}
body.fusion-premium-v5 .shell main #operacao.view.active .dashboard-grid .name {
  display: block !important; max-width: none !important; color: #c7cfdd !important; font-size: 12px !important; font-weight: 620 !important; line-height: 1.35 !important; text-transform: none !important;
}
body.fusion-premium-v5 .shell main #operacao.view.active .dashboard-grid .kpi-icon {
  width: 38px !important; height: 38px !important; flex: 0 0 38px !important; align-self: auto !important; border: 1px solid currentColor !important; border-radius: 10px !important;
}
body.fusion-premium-v5 .shell main #operacao.view.active .dashboard-grid .metric {
  display: block !important; width: 100% !important; margin: 16px 0 0 !important; color: var(--fp-text) !important; font-size: clamp(22px,2vw,28px) !important; font-weight: 780 !important; line-height: 1.1 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important;
}
body.fusion-premium-v5 .shell main #operacao.view.active .dashboard-grid .delta {
  display: block !important; width: 100% !important; margin: auto 0 0 !important; padding-top: 12px !important; color: var(--fp-green) !important; font-size: 10px !important; line-height: 1.35 !important;
}

@media (max-width: 1180px) {
  body.fusion-premium-v5 .shell main #operacao.view.active > .dashboard-surface .dashboard-grid.kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
}

@media (max-width: 760px) {
  body.fusion-premium-v5 .shell main #operacao.view.active > .dashboard-surface .dashboard-grid.kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 9px !important; }
  body.fusion-premium-v5 .shell main #operacao.view.active > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(1),
  body.fusion-premium-v5 .shell main #operacao.view.active > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(2),
  body.fusion-premium-v5 .shell main #operacao.view.active > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(3),
  body.fusion-premium-v5 .shell main #operacao.view.active > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(7) {
    min-height: 132px !important; padding: 14px !important;
  }
  body.fusion-premium-v5 .shell main #operacao.view.active .dashboard-grid .name { font-size: 10px !important; }
  body.fusion-premium-v5 .shell main #operacao.view.active .dashboard-grid .kpi-icon { width: 33px !important; height: 33px !important; flex-basis: 33px !important; border-radius: 9px !important; }
  body.fusion-premium-v5 .shell main #operacao.view.active .dashboard-grid .metric { margin-top: 12px !important; font-size: clamp(17px,5.5vw,22px) !important; }
  body.fusion-premium-v5 .shell main #operacao.view.active .dashboard-grid .delta { font-size: 9px !important; }
}

/* Final mobile composition: the header, sheet and four primary KPIs follow the
   selected reference without changing the original data or interactions. */
@media (max-width: 760px) {
  html body.mobile-premium-v5.fusion-premium-v5 .topbar {
    grid-template-columns: minmax(0, 1fr) 56px !important;
  }
  html body.mobile-premium-v5.fusion-premium-v5 .topbar > .premium-mobile-brand {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 56px !important;
    justify-self: end !important;
  }
  html body.mobile-premium-v5.fusion-premium-v5 .topbar > .premium-mobile-brand + div {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
  html body.mobile-premium-v5.fusion-premium-v5 .topbar > .toolbar {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
  }
  html body.mobile-premium-v5.fusion-premium-v5 .topbar .toolbar-status {
    width: 100% !important;
  }
  html body.mobile-premium-v5.fusion-premium-v5 .shell main #operacao.view.active > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(1),
  html body.mobile-premium-v5.fusion-premium-v5 .shell main #operacao.view.active > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(2),
  html body.mobile-premium-v5.fusion-premium-v5 .shell main #operacao.view.active > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(3),
  html body.mobile-premium-v5.fusion-premium-v5 .shell main #operacao.view.active > .dashboard-surface .dashboard-grid.kpi-grid > .kpi:nth-child(7) {
    grid-column: auto !important;
  }
  html body.mobile-premium-v5.fusion-premium-v5 .mobile-sheet-body .dashboard-period-controls {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  html body.mobile-premium-v5.fusion-premium-v5 .mobile-sheet-body .premium-filter-toggle {
    display: none !important;
  }
  html body.mobile-premium-v5.fusion-premium-v5 .mobile-sheet-body .premium-filter-popover,
  html body.mobile-premium-v5.fusion-premium-v5 .mobile-sheet-body .premium-filter-popover[hidden] {
    position: static !important;
    display: grid !important;
    width: 100% !important;
    padding: 0 !important;
    gap: 10px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  html body.mobile-premium-v5.fusion-premium-v5 .mobile-sheet-body .premium-filter-popover .period-quick {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  html body.mobile-premium-v5.fusion-premium-v5 .mobile-sheet-body .premium-filter-popover .period-quick .seg,
  html body.mobile-premium-v5.fusion-premium-v5 .mobile-sheet-body .premium-filter-popover .reseller-scope-filter,
  html body.mobile-premium-v5.fusion-premium-v5 .mobile-sheet-body .parent-period-button {
    width: 100% !important;
    min-height: 46px !important;
  }
}

html body.fusion-premium-v5 .shell main #operacao.view.active > .dashboard-command-center.premium-collapsed {
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}
html body.fusion-premium-v5 .shell main #operacao.view.active > .dashboard-command-center.premium-collapsed::before {
  display: none !important;
}
html body.fusion-premium-v5 #movementFilterBar[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  html body.mobile-premium-v5.fusion-premium-v5 .loop-filter-drawer {
    display: grid !important;
    width: 100vw !important;
    max-width: 390px !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 64px minmax(0, 1fr) auto !important;
    overflow: hidden !important;
  }
  html body.mobile-premium-v5.fusion-premium-v5 .loop-filter-drawer .loop-filter-head {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 18px !important;
  }
  html body.mobile-premium-v5.fusion-premium-v5 .loop-filter-drawer .loop-filter-body {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 18px !important;
    gap: 18px !important;
    overflow: auto !important;
  }
  html body.mobile-premium-v5.fusion-premium-v5 .loop-filter-drawer .loop-filter-body label,
  html body.mobile-premium-v5.fusion-premium-v5 .loop-filter-drawer .loop-filter-body select {
    width: 100% !important;
    min-width: 0 !important;
  }
  html body.mobile-premium-v5.fusion-premium-v5 .loop-filter-drawer .loop-filter-actions {
    grid-column: 1 !important;
    grid-row: 3 !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 14px 18px calc(18px + env(safe-area-inset-bottom, 0px)) !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    background: rgba(7, 17, 28, .96) !important;
    border-top: 1px solid var(--fp-line) !important;
  }
}
body.fusion-premium-v5 .client-screens-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(139, 92, 246, .34);
  border-radius: 999px;
  color: #c4b5fd;
  background: rgba(139, 92, 246, .1);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

/* Parent controls v2: period is a dedicated control; listing filters live in
   the existing filter drawer and never alter the global pending indicator. */
html body.fusion-premium-v5 .parent-filter-source[hidden],
html body.fusion-premium-v5 .mobile-filter-trigger[hidden],
html body.fusion-premium-v5 .premium-filter-count[hidden] {
  display: none !important;
}

html body.fusion-premium-v5 .topbar .dashboard-period-controls[data-separated-filters="true"] {
  position: relative !important;
  display: flex !important;
  width: auto !important;
  align-items: center !important;
  gap: 8px !important;
}

html body.fusion-premium-v5 .parent-period-shell {
  position: relative !important;
  display: block !important;
  min-width: 170px !important;
}

html body.fusion-premium-v5 .topbar .toolbar .parent-period-menu-button {
  width: 100% !important;
  min-width: 170px !important;
  justify-content: flex-start !important;
  gap: 9px !important;
  padding: 0 11px !important;
}

html body.fusion-premium-v5 .parent-period-menu-button.active {
  border-color: rgba(255, 79, 216, .48) !important;
  background: rgba(18, 25, 44, .96) !important;
  box-shadow: 0 0 0 1px rgba(255, 79, 216, .08) !important;
}

html body.fusion-premium-v5 .parent-period-control-copy {
  display: grid !important;
  min-width: 0 !important;
  flex: 1 !important;
  gap: 0 !important;
  text-align: left !important;
}

html body.fusion-premium-v5 .parent-period-control-copy small {
  color: var(--fp-muted) !important;
  font-size: 8px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
}

html body.fusion-premium-v5 .parent-period-control-copy strong {
  max-width: 230px !important;
  overflow: hidden !important;
  color: #eef3fb !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body.fusion-premium-v5 .parent-period-chevron {
  color: var(--fp-muted) !important;
  font-size: 13px !important;
}

html body.fusion-premium-v5 .parent-period-menu {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  z-index: 95 !important;
  width: 306px !important;
  padding: 10px !important;
  border: 1px solid var(--fp-line-strong) !important;
  border-radius: 13px !important;
  background: rgba(7, 18, 32, .98) !important;
  box-shadow: 0 22px 55px rgba(0, 0, 0, .5) !important;
}

html body.fusion-premium-v5 .parent-period-menu[hidden],
html body.fusion-premium-v5 .loop-filter-body [hidden] {
  display: none !important;
}

html body.fusion-premium-v5 .topbar .parent-period-menu .period-quick {
  display: grid !important;
  width: 100% !important;
  height: auto !important;
  padding: 0 !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 7px !important;
  border: 0 !important;
  background: transparent !important;
}

html body.fusion-premium-v5 .topbar .parent-period-menu .period-quick .seg {
  min-width: 0 !important;
  height: 40px !important;
  border: 1px solid var(--fp-line) !important;
  border-radius: 9px !important;
  background: var(--fp-surface-2) !important;
  color: #cbd5e1 !important;
  font-size: 11px !important;
}

html body.fusion-premium-v5 .topbar .parent-period-menu .period-quick .seg.active {
  border-color: rgba(255, 79, 216, .45) !important;
  background: linear-gradient(105deg, rgba(154, 78, 224, .88), rgba(233, 74, 169, .88)) !important;
  color: #fff !important;
}

html body.fusion-premium-v5 .parent-period-custom-option {
  display: flex !important;
  width: 100% !important;
  min-height: 42px !important;
  margin-top: 8px !important;
  padding: 0 11px !important;
  align-items: center !important;
  gap: 9px !important;
  border: 1px solid var(--fp-line) !important;
  border-radius: 9px !important;
  background: rgba(12, 25, 42, .88) !important;
  color: #dbe4f1 !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  box-shadow: none !important;
}

html body.fusion-premium-v5 .parent-period-custom-option svg {
  width: 16px !important;
  height: 16px !important;
  stroke: #ff65d5 !important;
  fill: none !important;
}

html body.fusion-premium-v5 .parent-period-custom-option span:nth-child(2) {
  flex: 1 !important;
  text-align: left !important;
}

html body.fusion-premium-v5 .parent-period-picker {
  z-index: 100 !important;
  border-color: var(--fp-line-strong) !important;
  border-radius: 14px !important;
  background: #071220 !important;
}

html body.fusion-premium-v5 .parent-header-filter-toggle.active {
  border-color: rgba(139, 92, 246, .48) !important;
  color: #f4efff !important;
}

html body.fusion-premium-v5 .loop-filter-head {
  height: auto !important;
  min-height: 76px !important;
}

html body.fusion-premium-v5 .loop-filter-head p {
  margin: 4px 0 0 !important;
  color: var(--fp-muted) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

@media (max-width: 768px) {
  html body.mobile-premium-v5.fusion-premium-v5 .topbar .dashboard-period-controls[data-separated-filters="true"] {
    display: grid !important;
    width: 100% !important;
    grid-template-columns: minmax(0, 1fr) 48px !important;
    gap: 8px !important;
  }

  html body.mobile-premium-v5.fusion-premium-v5 .parent-period-shell {
    width: 100% !important;
    min-width: 0 !important;
  }

  html body.mobile-premium-v5.fusion-premium-v5 .topbar .toolbar .parent-period-menu-button {
    min-width: 0 !important;
    min-height: 46px !important;
  }

  html body.mobile-premium-v5.fusion-premium-v5 .parent-period-control-copy strong {
    max-width: min(55vw, 240px) !important;
  }

  html body.mobile-premium-v5.fusion-premium-v5 .parent-period-menu {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
    width: min(306px, calc(100vw - 28px)) !important;
    padding: 12px !important;
    border-radius: 17px !important;
  }

  html body.mobile-premium-v5.fusion-premium-v5 .parent-period-picker {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
    width: calc(100vw - 28px) !important;
    max-height: calc(100dvh - 210px) !important;
    overflow: auto !important;
  }

  html body.mobile-premium-v5.fusion-premium-v5 .parent-header-filter-toggle {
    width: 48px !important;
    min-width: 48px !important;
    min-height: 46px !important;
  }
}
