/* Dashboard isolated from legacy panel rules. */
#app-view #dashboard-view {
  --dash-blue: #1168eb;
  --dash-ink: #10234f;
  --dash-muted: #61759d;
  --dash-line: #dbe6f4;
  --dash-page: #eaf2fc;
  container: dashboard / inline-size;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 14px !important;
  overflow-x: clip !important;
  background:
    linear-gradient(135deg, rgba(17, 104, 235, .055), transparent 38%),
    var(--dash-page) !important;
  color: var(--dash-ink);
  font-family: var(--ui-font);
}

#app-view #dashboard-view::before,
#app-view #dashboard-view::after { display: none !important; content: none !important; }
#app-view #dashboard-view,
#app-view #dashboard-view * { box-sizing: border-box; letter-spacing: 0 !important; font-family: var(--ui-font) !important; }

#app-view #dashboard-view .workspace-board {
  position: relative !important;
  z-index: auto !important;
  display: flex !important;
  flex-direction: column;
  gap: 14px !important;
  width: 100% !important;
  max-width: 1600px !important;
  min-width: 0;
  min-height: 100% !important;
  height: auto !important;
  margin: 0 auto !important;
  overflow: visible !important;
}

#app-view #dashboard-view .board-welcome,
#app-view #dashboard-view .dashboard-actions,
#app-view #dashboard-view .dashboard-card,
#app-view #dashboard-view .dashboard-chart,
#app-view #dashboard-view .finance-pie-card,
#app-view #dashboard-view .board-panel {
  border: 1px solid var(--dash-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 4px 14px rgba(33, 72, 125, .055) !important;
}

#app-view #dashboard-view .dashboard-actions::before,
#app-view #dashboard-view .dashboard-actions::after,
#app-view #dashboard-view .dashboard-chart::before,
#app-view #dashboard-view .dashboard-chart::after,
#app-view #dashboard-view .finance-pie-card::before,
#app-view #dashboard-view .finance-pie-card::after,
#app-view #dashboard-view .board-panel::before,
#app-view #dashboard-view .board-panel::after,
#app-view #dashboard-view .dashboard-section-title h2::before,
#app-view #dashboard-view .dashboard-section-title h2::after { display: none !important; content: none !important; }

/* Welcome */
#app-view #dashboard-view .board-welcome {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center !important;
  gap: 22px;
  min-height: 104px !important;
  padding: 16px 20px !important;
  color: var(--dash-ink) !important;
}

#app-view #dashboard-view .board-welcome::before { display: none !important; content: none !important; }
#app-view #dashboard-view .dashboard-welcome-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
#app-view #dashboard-view .dashboard-welcome-icon { display: grid; place-items: center; width: 64px; height: 64px; flex: 0 0 64px; border-radius: 8px; background: #e9f2ff; color: var(--dash-blue) !important; }
#app-view #dashboard-view .dashboard-welcome-icon svg { width: 34px; height: 34px; }
#app-view #dashboard-view .dashboard-welcome-icon.with-image {
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--dash-blue) 28%, #fff);
  background: #fff;
  box-shadow: 0 7px 17px rgba(17, 104, 235, .16);
  overflow: hidden;
}
#app-view #dashboard-view .dashboard-welcome-icon.with-image img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  object-fit: contain;
}
#app-view #dashboard-view .board-welcome h2 { margin: 0 !important; color: var(--dash-ink) !important; font-size: clamp(22px, 2.2cqi, 30px) !important; font-weight: 800 !important; line-height: 1.1 !important; }
#app-view #dashboard-view .board-welcome h2 strong { color: var(--dash-blue); }
#app-view #dashboard-view .board-welcome p { margin: 6px 0 0; color: var(--dash-muted); font-size: 13px; line-height: 1.3; }
#app-view #dashboard-view .dashboard-motto { padding-right: 22px; border-right: 1px solid var(--dash-line); color: #075cda; font-size: 15px; line-height: 1.05; text-align: right; }

#app-view #dashboard-view .board-welcome .big-action { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: 180px !important; min-height: 52px !important; padding: 0 18px; border-radius: 7px !important; background: var(--dash-blue) !important; color: #fff !important; box-shadow: 0 7px 16px rgba(17, 104, 235, .18) !important; font-size: 16px !important; }
#app-view #dashboard-view .board-welcome .big-action::before { display: none !important; content: none !important; }
#app-view #dashboard-view .board-welcome .big-action svg:first-child { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: #fff; color: var(--dash-blue); }
#app-view #dashboard-view .board-welcome .big-action svg:nth-child(2) { width: 20px; height: 20px; padding: 0 !important; border-radius: 0 !important; background: transparent !important; }

/* Quick actions */
#app-view #dashboard-view .dashboard-actions { padding: 15px 18px !important; }
#app-view #dashboard-view .dashboard-section-title { display: flex !important; align-items: center; justify-content: space-between; gap: 14px; min-height: 35px !important; margin: 0 0 12px !important; }
#app-view #dashboard-view .dashboard-section-title > div { min-width: 0; }
#app-view #dashboard-view .dashboard-section-title span { display: block; color: var(--dash-blue) !important; font-size: 10px !important; font-weight: 800 !important; text-transform: uppercase; }
#app-view #dashboard-view .dashboard-section-title h2 { margin: 3px 0 0 !important; color: var(--dash-ink) !important; font-size: 16px !important; font-weight: 800 !important; }
#app-view #dashboard-view .dashboard-section-title p { margin: 0; color: var(--dash-muted); font-size: 11px; }
#app-view #dashboard-view .dashboard-shortcuts { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 10px !important; }

#app-view #dashboard-view .shortcut {
  --shortcut-accent: #1168eb;
  position: relative;
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) 18px !important;
  grid-template-rows: auto auto !important;
  align-items: center !important;
  column-gap: 13px !important;
  min-width: 0;
  min-height: 82px !important;
  padding: 12px 14px !important;
  border: 1px solid var(--dash-line) !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: var(--dash-ink) !important;
  box-shadow: none !important;
  text-align: left;
  transform: none !important;
  overflow: hidden;
  isolation: isolate;
}

#app-view #dashboard-view .shortcut::before { display: none !important; content: none !important; }
#app-view #dashboard-view .shortcut::after {
  content: "" !important;
  position: absolute;
  inset: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  z-index: 0;
  display: block !important;
  width: auto !important;
  height: auto !important;
  border-radius: 6px;
  background: var(--shortcut-accent);
  opacity: 1;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  pointer-events: none;
  transform: scaleY(.05) !important;
  transform-origin: center bottom !important;
  transition: transform .24s cubic-bezier(.2, .75, .25, 1) !important;
}
#app-view #dashboard-view .shortcut > * { position: relative; z-index: 1; }
#app-view #dashboard-view .shortcut-icon { grid-row: 1 / 3; display: grid !important; place-items: center; width: 48px; height: 48px; border-radius: 8px; background: color-mix(in srgb, var(--shortcut-accent) 11%, #fff); color: var(--shortcut-accent) !important; box-shadow: none; }
#app-view #dashboard-view .shortcut-icon svg { width: 25px; height: 25px; }
#app-view #dashboard-view .shortcut > strong { align-self: end; overflow: hidden; color: var(--dash-ink) !important; font-size: clamp(15px, 1.05cqi, 17px) !important; font-weight: 800 !important; line-height: 1.18; text-overflow: ellipsis; white-space: nowrap; }
#app-view #dashboard-view .shortcut > span:not(.shortcut-icon) { align-self: start; overflow: hidden; color: var(--dash-muted) !important; font-size: clamp(12px, .84cqi, 13px) !important; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
#app-view #dashboard-view .shortcut > svg { grid-column: 3; grid-row: 1 / 3; width: 17px; height: 17px; color: #6d84aa; }
#app-view #dashboard-view .shortcut:hover,
#app-view #dashboard-view .shortcut:focus-visible,
#app-view #dashboard-view .shortcut:active {
  border-color: var(--shortcut-accent) !important;
  background: #fff !important;
  color: #fff !important;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--shortcut-accent) 28%, transparent) !important;
  outline: none;
}
#app-view #dashboard-view .shortcut:hover::after,
#app-view #dashboard-view .shortcut:focus-visible::after,
#app-view #dashboard-view .shortcut:active::after {
  opacity: 1;
  transform: scaleY(1) !important;
  background: var(--shortcut-accent);
}
#app-view #dashboard-view .shortcut:hover .shortcut-icon,
#app-view #dashboard-view .shortcut:focus-visible .shortcut-icon,
#app-view #dashboard-view .shortcut:active .shortcut-icon {
  border-color: rgba(255, 255, 255, .3) !important;
  background: rgba(255, 255, 255, .18) !important;
  color: #fff !important;
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 8px 17px color-mix(in srgb, var(--shortcut-accent) 25%, transparent);
}
#app-view #dashboard-view .shortcut:hover > strong,
#app-view #dashboard-view .shortcut:focus-visible > strong,
#app-view #dashboard-view .shortcut:active > strong { color: #fff !important; }
#app-view #dashboard-view .shortcut:hover > span:not(.shortcut-icon),
#app-view #dashboard-view .shortcut:focus-visible > span:not(.shortcut-icon),
#app-view #dashboard-view .shortcut:active > span:not(.shortcut-icon) { color: rgba(255, 255, 255, .86) !important; }
#app-view #dashboard-view .shortcut:hover > svg,
#app-view #dashboard-view .shortcut:focus-visible > svg,
#app-view #dashboard-view .shortcut:active > svg { color: #fff !important; transform: translateX(2px); }
#app-view #dashboard-view .shortcut-icon,
#app-view #dashboard-view .shortcut > strong,
#app-view #dashboard-view .shortcut > svg { transition: color .2s ease, background-color .2s ease, transform .2s ease, box-shadow .2s ease; }
#app-view #dashboard-view .shortcut.sell { --shortcut-accent: #118853; }
#app-view #dashboard-view .shortcut.products { --shortcut-accent: #1168eb; }
#app-view #dashboard-view .shortcut.clients { --shortcut-accent: #7139e8; }
#app-view #dashboard-view .shortcut.receive { --shortcut-accent: #078b92; }
#app-view #dashboard-view .shortcut.pay { --shortcut-accent: #df2838; }
#app-view #dashboard-view .shortcut.cash { --shortcut-accent: #0788ad; }

/* Metrics */
#app-view #dashboard-view .dashboard-summary { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 10px !important; min-width: 0; }
#app-view #dashboard-view .dashboard-card { display: grid !important; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto auto; align-content: center !important; gap: 3px 10px !important; min-width: 0; min-height: 104px !important; padding: 12px !important; border-top: 1px solid var(--dash-line) !important; color: var(--dash-ink) !important; text-align: left !important; transform: none !important; overflow: hidden; }
#app-view #dashboard-view .dashboard-card::before,
#app-view #dashboard-view .dashboard-card::after { display: none !important; content: none !important; }
#app-view #dashboard-view .dashboard-card-icon { position: static !important; grid-column: 1 !important; grid-row: 1 / 4 !important; align-self: start; width: 44px !important; height: 44px !important; padding: 11px !important; border-radius: 8px !important; background: #e7f1ff; color: var(--dash-blue); }
#app-view #dashboard-view .dashboard-card.sales .dashboard-card-icon { background: #e6f7ee; color: #138653; }
#app-view #dashboard-view .dashboard-card.cash .dashboard-card-icon { background: #f0eaff; color: #7538e7; }
#app-view #dashboard-view .dashboard-card.receive .dashboard-card-icon { background: #e5f7f8; color: #078b92; }
#app-view #dashboard-view .dashboard-card.pay .dashboard-card-icon { background: #ffeaed; color: #d92738; }
#app-view #dashboard-view .dashboard-card > span { grid-column: 2 !important; align-self: end; overflow: visible; color: #4f6790 !important; font-size: 10px !important; font-weight: 750 !important; text-transform: uppercase !important; white-space: normal; }
#app-view #dashboard-view .dashboard-card > strong { grid-column: 2 !important; overflow: visible; color: #101f43 !important; font-size: clamp(17px, 1.55cqi, 23px) !important; font-weight: 800 !important; line-height: 1.12 !important; overflow-wrap: anywhere; white-space: normal !important; }
#app-view #dashboard-view .dashboard-card > small { grid-column: 2 !important; overflow: visible; color: var(--dash-muted) !important; font-size: 11px !important; font-weight: 500 !important; white-space: normal; }
#app-view #dashboard-view .dashboard-card b { color: inherit; }
#app-view #dashboard-view .dashboard-card:hover { border-color: #bdd3f2 !important; box-shadow: 0 6px 16px rgba(31, 75, 138, .08) !important; }

/* Charts */
#app-view #dashboard-view .dashboard-work { display: grid !important; grid-template-columns: minmax(0, 1.65fr) minmax(350px, 1fr) !important; gap: 12px !important; min-width: 0; overflow: visible !important; }
#app-view #dashboard-view .dashboard-chart,
#app-view #dashboard-view .finance-pie-card { min-width: 0; min-height: 290px !important; padding: 15px 18px !important; }
#app-view #dashboard-view .mini-chart { display: grid !important; grid-template-columns: repeat(7, minmax(62px, 1fr)) !important; align-items: stretch !important; gap: 8px !important; width: 100%; height: 210px !important; min-height: 210px !important; padding: 4px 0 0 !important; overflow-x: auto !important; scrollbar-width: thin; }
#app-view #dashboard-view .mini-chart-bar { display: grid !important; grid-template-rows: 25px minmax(130px, 1fr) 22px !important; gap: 5px !important; min-width: 0; height: 100% !important; text-align: center; }
#app-view #dashboard-view .mini-chart-bar span { overflow: visible; color: #1d315c !important; font-size: 10px !important; font-weight: 750 !important; white-space: nowrap; }
#app-view #dashboard-view .mini-chart-bar i { display: flex; align-items: flex-end; justify-content: center; border-radius: 0 !important; background: repeating-linear-gradient(to bottom, transparent 0 32px, #e8eef7 33px) !important; }
#app-view #dashboard-view .mini-chart-bar i > b { width: min(62%, 66px) !important; min-height: 4px; border-radius: 4px 4px 0 0 !important; background: #2d86f3 !important; }
#app-view #dashboard-view .mini-chart-bar small { color: #526b94 !important; font-size: 10px !important; }

#app-view #dashboard-view .finance-chart.pie { display: grid !important; grid-template-columns: minmax(150px, .75fr) minmax(180px, 1fr); align-items: center; gap: 14px !important; min-width: 0; min-height: 205px; margin: 0 !important; }
#app-view #dashboard-view .finance-pie { position: relative; width: min(158px, 100%); aspect-ratio: 1; justify-self: center; border-radius: 50%; background: conic-gradient(#20b967 0 calc(var(--receive) * 1%), #ef3340 calc(var(--receive) * 1%) 100%); box-shadow: none !important; }
#app-view #dashboard-view .finance-pie::before { display: none !important; content: none !important; }
#app-view #dashboard-view .finance-pie::after { content: ""; position: absolute; inset: 20%; border-radius: 50%; background: #fff; }
#app-view #dashboard-view .finance-pie > span { position: absolute; inset: 23%; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; color: var(--dash-ink) !important; text-align: center; }
#app-view #dashboard-view .finance-pie > span::before,
#app-view #dashboard-view .finance-pie > span::after { display: none !important; content: none !important; }
#app-view #dashboard-view .finance-pie > span strong { max-width: 100%; font-size: clamp(9px, 1.2cqi, 14px); line-height: 1.05; overflow-wrap: anywhere; }
#app-view #dashboard-view .finance-pie > span small { margin-top: 3px; color: var(--dash-muted); font-size: 9px; }
#app-view #dashboard-view .finance-pie-legend { display: grid; gap: 8px; min-width: 0; }
#app-view #dashboard-view .finance-pie-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; min-width: 0; padding: 10px 12px; border: 1px solid var(--dash-line); border-radius: 7px; background: #fff; color: var(--dash-ink); text-align: left; }
#app-view #dashboard-view .finance-pie-item span { color: #425b86 !important; font-size: 11px !important; }
#app-view #dashboard-view .finance-pie-item strong { overflow-wrap: anywhere; font-size: 12px; text-align: right; }
#app-view #dashboard-view .finance-pie-item small { grid-column: 1 / -1; color: var(--dash-muted); font-size: 9px; }

/* Operational lists */
#app-view #dashboard-view .board-lists { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; min-width: 0; overflow: visible !important; }
#app-view #dashboard-view .board-panel { min-width: 0; min-height: 190px !important; padding: 15px 18px !important; overflow: visible !important; }
#app-view #dashboard-view .list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; min-height: 46px !important; margin: 0 0 7px !important; padding: 9px 11px !important; border: 1px solid #e3eaf4 !important; border-radius: 6px !important; background: #f8fbff !important; box-shadow: none !important; }
#app-view #dashboard-view .list-row > div { min-width: 0; }
#app-view #dashboard-view .list-row strong { font-size: 12px !important; }
#app-view #dashboard-view .list-row span { display: block; overflow: hidden; color: var(--dash-muted); font-size: 10px !important; text-overflow: ellipsis; white-space: nowrap; }

/* Visual polish aligned with the approved dashboard sketch. */
#app-view #dashboard-view {
  background: linear-gradient(180deg, #eef5fd 0%, #f7faff 58%, #eef4fb 100%) !important;
}

#app-view #dashboard-view .board-welcome,
#app-view #dashboard-view .dashboard-actions,
#app-view #dashboard-view .dashboard-chart,
#app-view #dashboard-view .finance-pie-card,
#app-view #dashboard-view .board-panel {
  box-shadow: 0 9px 24px rgba(43, 86, 143, .09) !important;
}

#app-view #dashboard-view .board-welcome {
  background: linear-gradient(108deg, #ffffff 0%, #f3f8ff 48%, #e5f1ff 100%) !important;
  border-color: #bdd6f6 !important;
  box-shadow: 0 10px 26px rgba(31, 103, 196, .12) !important;
}

#app-view #dashboard-view .dashboard-welcome-icon {
  background: linear-gradient(145deg, #edf5ff, #dceaff);
  box-shadow: inset 0 0 0 1px rgba(17, 104, 235, .07), 0 7px 15px rgba(17, 104, 235, .12);
}

#app-view #dashboard-view .board-welcome h2 { font-weight: 750 !important; }
#app-view #dashboard-view .board-welcome h2 strong { font-weight: 800; text-shadow: 0 2px 8px rgba(17, 104, 235, .12); }
#app-view #dashboard-view .dashboard-motto { font-weight: 750; }

#app-view #dashboard-view .board-welcome .big-action {
  gap: 10px !important;
  border: 1px solid #075bda !important;
  background: linear-gradient(135deg, #0878f9, #075ee8) !important;
  box-shadow: 0 9px 20px rgba(12, 99, 229, .28) !important;
  color: #fff !important;
  overflow: visible !important;
}

#app-view #dashboard-view .board-welcome .big-action:hover {
  background: linear-gradient(135deg, #086ee8, #054ec5) !important;
  box-shadow: 0 12px 24px rgba(12, 99, 229, .34) !important;
  transform: translateY(-1px);
}

#app-view #dashboard-view .dashboard-sell-plus {
  display: grid !important;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  border-radius: 50%;
  background: #fff !important;
  color: #0965e8 !important;
  box-shadow: 0 3px 8px rgba(3, 45, 112, .15);
}

#app-view #dashboard-view .dashboard-sell-plus svg {
  display: block !important;
  width: 17px !important;
  height: 17px !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #0965e8 !important;
  stroke-width: 3;
}

#app-view #dashboard-view .dashboard-sell-cart {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  padding: 0 !important;
  background: transparent !important;
  color: #fff !important;
}

#app-view #dashboard-view .dashboard-sell-label { display: inline !important; color: #fff !important; font-size: 16px; font-weight: 750; }

#app-view #dashboard-view .dashboard-actions {
  border-color: #c7daf3 !important;
  background: linear-gradient(180deg, #f8fbff, #edf5ff) !important;
  box-shadow: 0 10px 25px rgba(39, 91, 158, .10) !important;
}

#app-view #dashboard-view .dashboard-section-title > div > span::before {
  content: "";
  display: inline-block;
  width: 19px;
  height: 5px;
  margin-right: 7px;
  border-radius: 4px;
  background: linear-gradient(90deg, #086cf0, #53a0ff);
  vertical-align: 2px;
}

#app-view #dashboard-view .shortcut {
  border-color: color-mix(in srgb, var(--shortcut-accent) 24%, #d6e3f3) !important;
  background: color-mix(in srgb, var(--shortcut-accent) 7%, #ffffff) !important;
  box-shadow: 0 5px 13px color-mix(in srgb, var(--shortcut-accent) 10%, transparent) !important;
}

#app-view #dashboard-view .shortcut::after {
  opacity: .08;
  transform: scaleY(1) !important;
}

#app-view #dashboard-view .shortcut-icon {
  border: 1px solid color-mix(in srgb, var(--shortcut-accent) 28%, #fff);
  background: color-mix(in srgb, var(--shortcut-accent) 16%, #fff) !important;
  box-shadow: 0 6px 13px color-mix(in srgb, var(--shortcut-accent) 18%, transparent);
}

#app-view #dashboard-view .shortcut > strong { font-weight: 750 !important; }
#app-view #dashboard-view .shortcut:hover { transform: translateY(-2px) !important; }

#app-view #dashboard-view .dashboard-card {
  border-color: #d7e3f1 !important;
  box-shadow: 0 7px 18px rgba(42, 82, 134, .085) !important;
}

#app-view #dashboard-view .dashboard-card.sales { border-top: 4px solid #16955e !important; background: linear-gradient(135deg, #ffffff 30%, #e7f8ef) !important; }
#app-view #dashboard-view .dashboard-card.cash { border-top: 4px solid #7542df !important; background: linear-gradient(135deg, #ffffff 30%, #f0e9ff) !important; }
#app-view #dashboard-view .dashboard-card.records { border-top: 4px solid #2474e8 !important; background: linear-gradient(135deg, #ffffff 30%, #e6f1ff) !important; }
#app-view #dashboard-view .dashboard-card.receive { border-top: 4px solid #07939a !important; background: linear-gradient(135deg, #ffffff 30%, #e4f8f8) !important; }
#app-view #dashboard-view .dashboard-card.pay { border-top: 4px solid #df3546 !important; background: linear-gradient(135deg, #ffffff 30%, #ffe8ec) !important; }

#app-view #dashboard-view .dashboard-card-icon {
  box-shadow: inset 0 0 0 1px rgba(15, 59, 120, .035), 0 6px 12px rgba(44, 87, 145, .10);
}

#app-view #dashboard-view .dashboard-card > strong { font-weight: 750 !important; }
#app-view #dashboard-view .dashboard-card:hover { transform: translateY(-2px) !important; box-shadow: 0 11px 23px rgba(31, 75, 138, .14) !important; }

#app-view #dashboard-view .dashboard-chart,
#app-view #dashboard-view .finance-pie-card { background: linear-gradient(180deg, #ffffff, #fcfdff) !important; }
#app-view #dashboard-view .mini-chart-bar i > b { background: linear-gradient(180deg, #459cff, #1f73e7) !important; box-shadow: 0 5px 10px rgba(31, 115, 231, .17); }
#app-view #dashboard-view .finance-pie { box-shadow: 0 7px 18px rgba(20, 97, 75, .13) !important; }
#app-view #dashboard-view .finance-pie-item.receive { background: linear-gradient(135deg, #fff, #f0fbf5) !important; }
#app-view #dashboard-view .finance-pie-item.pay { background: linear-gradient(135deg, #fff, #fff2f3) !important; }

#app-view #dashboard-view .board-panel:first-child { border-top: 3px solid #14a0bc !important; }
#app-view #dashboard-view .board-panel:last-child { border-top: 3px solid #ef8c24 !important; }

@container dashboard (max-width: 1120px) {
  #app-view #dashboard-view .dashboard-motto { display: none; }
  #app-view #dashboard-view .board-welcome { grid-template-columns: minmax(0, 1fr) auto; }
  #app-view #dashboard-view .dashboard-summary { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  #app-view #dashboard-view .dashboard-work { grid-template-columns: minmax(0, 1fr) !important; }
}

@container dashboard (max-width: 760px) {
  #app-view #dashboard-view { padding: 9px !important; }
  #app-view #dashboard-view .board-welcome { align-items: center !important; gap: 12px; padding: 13px !important; }
  #app-view #dashboard-view .dashboard-welcome-icon { width: 48px; height: 48px; flex-basis: 48px; }
  #app-view #dashboard-view .dashboard-welcome-icon svg { width: 27px; height: 27px; }
  #app-view #dashboard-view .board-welcome h2 { font-size: 20px !important; }
  #app-view #dashboard-view .board-welcome p { font-size: 11px; }
  #app-view #dashboard-view .board-welcome .big-action { min-width: 48px !important; width: 48px; padding: 0; overflow: hidden; color: transparent !important; gap: 0; }
  #app-view #dashboard-view .dashboard-sell-cart,
  #app-view #dashboard-view .dashboard-sell-label { display: none !important; }
  #app-view #dashboard-view .dashboard-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #app-view #dashboard-view .shortcut > strong { font-size: 15px !important; }
  #app-view #dashboard-view .shortcut > span:not(.shortcut-icon) { font-size: 12px !important; }
  #app-view #dashboard-view .dashboard-summary { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #app-view #dashboard-view .board-lists { grid-template-columns: minmax(0, 1fr) !important; }
}

@container dashboard (max-width: 480px) {
  #app-view #dashboard-view .workspace-board { gap: 9px !important; }
  #app-view #dashboard-view .dashboard-welcome-icon { display: none; }
  #app-view #dashboard-view .dashboard-section-title p { display: none; }
  #app-view #dashboard-view .dashboard-shortcuts,
  #app-view #dashboard-view .dashboard-summary { grid-template-columns: minmax(0, 1fr) !important; }
  #app-view #dashboard-view .shortcut > strong { font-size: 16px !important; }
  #app-view #dashboard-view .shortcut > span:not(.shortcut-icon) { font-size: 13px !important; }
  #app-view #dashboard-view .finance-chart.pie { grid-template-columns: minmax(0, 1fr); }
  #app-view #dashboard-view .finance-pie { width: 140px; }
}

html[data-theme="dark"] #app-view #dashboard-view { --dash-ink: #edf3ff; --dash-muted: #aab8d0; --dash-line: #334460; --dash-page: #141d30; }
html[data-theme="dark"] #app-view #dashboard-view .board-welcome,
html[data-theme="dark"] #app-view #dashboard-view .dashboard-actions,
html[data-theme="dark"] #app-view #dashboard-view .dashboard-card,
html[data-theme="dark"] #app-view #dashboard-view .dashboard-chart,
html[data-theme="dark"] #app-view #dashboard-view .finance-pie-card,
html[data-theme="dark"] #app-view #dashboard-view .board-panel,
html[data-theme="dark"] #app-view #dashboard-view .shortcut,
html[data-theme="dark"] #app-view #dashboard-view .finance-pie-item { background: #1c2940 !important; }
html[data-theme="dark"] #app-view #dashboard-view .dashboard-card > strong,
html[data-theme="dark"] #app-view #dashboard-view .shortcut > strong,
html[data-theme="dark"] #app-view #dashboard-view .dashboard-section-title h2 { color: #edf3ff !important; }
html[data-theme="dark"] #app-view #dashboard-view .finance-pie::after { background: #1c2940; }
html[data-theme="dark"] #app-view #dashboard-view .list-row { border-color: #334460 !important; background: #202f49 !important; }
html[data-theme="dark"] #app-view #dashboard-view .shortcut:hover,
html[data-theme="dark"] #app-view #dashboard-view .shortcut:focus-visible,
html[data-theme="dark"] #app-view #dashboard-view .shortcut:active {
  background: #1c2940 !important;
}

/* Dark dashboard: retain each module's semantic color instead of flattening it. */
html[data-theme="dark"] #app-view #dashboard-view {
  --dash-page: #0d1423;
  --dash-ink: #f3f7ff;
  --dash-muted: #a6b4ca;
  --dash-line: #34445f;
  background:
    radial-gradient(circle at 8% 0%, rgba(45, 108, 223, .17), transparent 28%),
    radial-gradient(circle at 92% 4%, rgba(16, 154, 143, .12), transparent 25%),
    var(--dash-page) !important;
}

html[data-theme="dark"] #app-view #dashboard-view .board-welcome {
  border-color: #365a8e !important;
  background: linear-gradient(108deg, #172743, #152239 52%, #163344) !important;
}

html[data-theme="dark"] #app-view #dashboard-view .dashboard-actions,
html[data-theme="dark"] #app-view #dashboard-view .dashboard-chart,
html[data-theme="dark"] #app-view #dashboard-view .finance-pie-card,
html[data-theme="dark"] #app-view #dashboard-view .board-panel {
  border-color: #34445f !important;
  background: #151f32 !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .24) !important;
}

html[data-theme="dark"] #app-view #dashboard-view .shortcut {
  border-color: color-mix(in srgb, var(--shortcut-accent) 46%, #34445f) !important;
  background: color-mix(in srgb, var(--shortcut-accent) 15%, #151f32) !important;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--shortcut-accent) 12%, transparent) !important;
}

html[data-theme="dark"] #app-view #dashboard-view .shortcut-icon {
  border-color: color-mix(in srgb, var(--shortcut-accent) 55%, #34445f) !important;
  background: color-mix(in srgb, var(--shortcut-accent) 28%, #172238) !important;
  color: color-mix(in srgb, var(--shortcut-accent) 70%, #fff) !important;
}

html[data-theme="dark"] #app-view #dashboard-view .shortcut:hover,
html[data-theme="dark"] #app-view #dashboard-view .shortcut:focus-visible {
  border-color: color-mix(in srgb, var(--shortcut-accent) 72%, #fff) !important;
  background: color-mix(in srgb, var(--shortcut-accent) 24%, #172238) !important;
  transform: translateY(-2px) !important;
}

html[data-theme="dark"] #app-view #dashboard-view .dashboard-card.sales {
  background: linear-gradient(135deg, #15362e, #152033 72%) !important;
}

html[data-theme="dark"] #app-view #dashboard-view .dashboard-card.cash {
  background: linear-gradient(135deg, #2a2147, #152033 72%) !important;
}

html[data-theme="dark"] #app-view #dashboard-view .dashboard-card.records {
  background: linear-gradient(135deg, #172e52, #152033 72%) !important;
}

html[data-theme="dark"] #app-view #dashboard-view .dashboard-card.receive {
  background: linear-gradient(135deg, #14393e, #152033 72%) !important;
}

html[data-theme="dark"] #app-view #dashboard-view .dashboard-card.pay {
  background: linear-gradient(135deg, #40242e, #152033 72%) !important;
}

html[data-theme="dark"] #app-view #dashboard-view .dashboard-card > span,
html[data-theme="dark"] #app-view #dashboard-view .dashboard-card > small,
html[data-theme="dark"] #app-view #dashboard-view .shortcut > span:not(.shortcut-icon) {
  color: #a8b8cf !important;
}

html[data-theme="dark"] #app-view #dashboard-view .finance-pie::after {
  background: #151f32 !important;
}

html[data-theme="dark"] #app-view #dashboard-view .finance-pie-item.receive {
  border-color: #29634f !important;
  background: linear-gradient(135deg, #15362e, #17243a) !important;
}

html[data-theme="dark"] #app-view #dashboard-view .finance-pie-item.pay {
  border-color: #78414a !important;
  background: linear-gradient(135deg, #40242e, #17243a) !important;
}

html[data-theme-variant="black"] #app-view #dashboard-view {
  --dash-page: #050608;
  --dash-ink: #f0f6fc;
  --dash-muted: #8b949e;
  --dash-line: #30363d;
  background: #050608 !important;
}

html[data-theme-variant="black"] #app-view #dashboard-view :is(
  .board-welcome, .dashboard-actions, .dashboard-chart, .finance-pie-card,
  .board-panel, .shortcut, .dashboard-card, .finance-pie-item
) {
  border-color: #30363d !important;
  background: #0d1117 !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .34) !important;
}

html[data-theme-variant="black"] #app-view #dashboard-view .board-welcome {
  border-left-color: #58a6ff !important;
  background: linear-gradient(105deg, #0d1117, #101722 62%, #0d1d1b) !important;
}

html[data-theme-variant="black"] #app-view #dashboard-view .shortcut {
  border-color: color-mix(in srgb, var(--shortcut-accent) 48%, #30363d) !important;
  background: color-mix(in srgb, var(--shortcut-accent) 10%, #0d1117) !important;
}

html[data-theme-variant="black"] #app-view #dashboard-view .shortcut:hover {
  border-color: color-mix(in srgb, var(--shortcut-accent) 72%, #fff) !important;
  background: color-mix(in srgb, var(--shortcut-accent) 18%, #0d1117) !important;
}

html[data-theme-variant="black"] #app-view #dashboard-view .finance-pie::after {
  background: #0d1117 !important;
}

html[data-theme="light"][data-theme-variant="whatsapp"] #app-view #dashboard-view {
  --dash-page: #f0f2f5;
  --dash-ink: #111b21;
  --dash-muted: #667781;
  --dash-line: #d8e0e5;
  background: #f0f2f5 !important;
}

html[data-theme="light"][data-theme-variant="whatsapp"] #app-view #dashboard-view :is(
  .board-welcome, .dashboard-actions, .dashboard-chart, .finance-pie-card,
  .board-panel, .shortcut, .dashboard-card, .finance-pie-item
) {
  border-color: #d8e0e5 !important;
  background: #fff !important;
  box-shadow: 0 10px 26px rgba(17, 27, 33, .08) !important;
}

html[data-theme="light"][data-theme-variant="whatsapp"] #app-view #dashboard-view .board-welcome {
  border-left-color: #00a884 !important;
  background: linear-gradient(105deg, #fff, #f2fcf8 62%, #eaf7fb) !important;
}

html[data-theme="light"][data-theme-variant="whatsapp"] #app-view #dashboard-view .shortcut {
  border-color: color-mix(in srgb, var(--shortcut-accent) 38%, #d8e0e5) !important;
  background: color-mix(in srgb, var(--shortcut-accent) 7%, #fff) !important;
}

html[data-theme="light"][data-theme-variant="whatsapp"] #app-view #dashboard-view .shortcut:hover {
  border-color: #00a884 !important;
  background: #eafaf4 !important;
}

html[data-theme="light"][data-theme-variant="whatsapp"] #app-view #dashboard-view .finance-pie::after {
  background: #fff !important;
}

html[data-theme="light"][data-theme-variant="whatsapp"] #app-view #dashboard-view .dashboard-welcome-icon {
  background: #dff8ef !important;
  color: #008069 !important;
}

html[data-theme="light"][data-theme-variant="whatsapp"] #app-view #dashboard-view .dashboard-welcome-icon.with-image {
  border-color: rgba(0, 128, 105, .28) !important;
  background: #fff !important;
  box-shadow: 0 7px 17px rgba(0, 128, 105, .14) !important;
}

html[data-theme="light"][data-theme-variant="whatsapp"] #app-view #dashboard-view .dashboard-section-title > div > span {
  color: #008069 !important;
}

html[data-theme="light"][data-theme-variant="whatsapp"] #app-view #dashboard-view .board-welcome .big-action {
  border-color: #008069 !important;
  background: linear-gradient(135deg, #008069, #00a884) !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(0, 168, 132, .2) !important;
}

html[data-theme="light"][data-theme-variant="whatsapp"] #app-view #dashboard-view .board-welcome .big-action svg:first-child {
  background: #fff !important;
  color: #008069 !important;
}
