/* Shared card art: one quiet hierarchy across every business module. */
body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 0;
  border: 1px solid color-mix(in srgb, var(--product-accent, #2f8f87) 30%, transparent) !important;
  border-radius: 10px;
  padding: 16px 16px 14px;
  background:
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--product-accent, #2f8f87) 10%, transparent) 0 1px, transparent 2px 34px),
    linear-gradient(135deg, color-mix(in srgb, var(--product-surface-soft, #f7faf5) 94%, transparent), color-mix(in srgb, var(--product-surface, #ffffff) 92%, transparent));
  box-shadow: 0 10px 24px rgb(27 69 67 / 8%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck)::before {
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, #c49a4b, var(--product-accent, #2f8f87));
  content: "";
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > h3,
body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > h4 {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  margin: -2px 0 12px;
  padding: 10px 12px 10px 14px;
  border: 1px solid color-mix(in srgb, var(--product-accent, #2f8f87) 22%, transparent);
  border-radius: 7px;
  background:
    radial-gradient(circle at 90% 50%, transparent 0 16px, color-mix(in srgb, #c49a4b 18%, transparent) 17px 18px, transparent 19px 30px),
    color-mix(in srgb, var(--product-surface-soft, #f7faf5) 82%, transparent);
  color: var(--product-text, #173b3e) !important;
  font-size: 15px;
  font-weight: 760;
  letter-spacing: .01em;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > h3::after,
body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > h4::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  width: 46px;
  height: 2px;
  background: #c49a4b;
  content: "";
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > .list,
body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > [data-list],
body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > .table-wrap {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) .row {
  min-width: 0;
  gap: 10px;
  padding: 10px 2px;
  border-bottom-color: color-mix(in srgb, var(--product-accent, #2f8f87) 18%, transparent) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) .row > span:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) .row strong {
  color: var(--product-text, #173b3e) !important;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) .row small {
  color: var(--product-muted, #6e7d7c) !important;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) .row .tag {
  flex: 0 0 auto;
  border-color: color-mix(in srgb, #c49a4b 38%, transparent);
  color: #8b6427 !important;
  font-variant-numeric: tabular-nums;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) .mini-action,
body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) button {
  min-height: 32px;
  padding-inline: 11px;
  border-radius: 6px;
  letter-spacing: .01em;
}

/* Compact KPI cards keep numbers visible even when the surrounding dashboard is narrow. */
body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel .stacked-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0 0 12px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel .stacked-kpis .kpi {
  min-width: 0;
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--product-accent, #2f8f87) 22%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--product-surface-soft, #f7faf5) 76%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel .stacked-kpis .kpi > span {
  color: var(--product-muted, #6e7d7c);
  font-size: 10px;
  line-height: 1.2;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel .stacked-kpis .kpi > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--product-text, #173b3e) !important;
  font-size: clamp(15px, 1.45vw, 18px) !important;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-tab-panel="overview-finance"] .stacked-kpis .kpi > strong {
  max-width: 100%;
  overflow: hidden !important;
  text-overflow: ellipsis;
  font-size: clamp(15px, 1.45vw, 18px) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-canvas-widget > .panel .stacked-kpis .kpi > strong {
  max-width: 100%;
  overflow: hidden !important;
  text-overflow: ellipsis;
  font-size: clamp(15px, 1.45vw, 18px) !important;
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel .overview-finance-recent {
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 7px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel .overview-finance-recent > strong {
  color: var(--product-text, #173b3e) !important;
  font-size: 12px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel .overview-finance-recent > .list {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel .stacked-kpis .kpi {
  background: rgb(12 54 58 / 66%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel .stacked-kpis .kpi > strong,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel .overview-finance-recent > strong {
  color: #f4f0e6 !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) {
  border-color: color-mix(in srgb, #79c8bd 32%, transparent) !important;
  background:
    radial-gradient(circle at 92% 8%, rgb(196 154 75 / 13%) 0 1px, transparent 2px 34px),
    linear-gradient(135deg, rgb(8 39 44 / 92%), rgb(7 28 35 / 88%));
  box-shadow: 0 12px 26px rgb(0 0 0 / 20%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > h3,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > h4 {
  color: #f4f0e6 !important;
  background: rgb(12 54 58 / 78%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) .row strong {
  color: #f4f0e6 !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) .row small {
  color: #b6c7c0 !important;
}

/* The overview canvas uses a sibling widget class; keep it on the same art system. */
body.owner-shell-v1:not(.auth-required) #moduleStage .overview-canvas-widget > .panel:not(.overview-command-deck) {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 0;
  border: 1px solid color-mix(in srgb, var(--product-accent, #2f8f87) 30%, transparent) !important;
  border-radius: 10px;
  padding: 16px 16px 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--product-surface-soft, #f7faf5) 94%, transparent), color-mix(in srgb, var(--product-surface, #fff) 92%, transparent));
  box-shadow: 0 10px 24px rgb(27 69 67 / 8%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-canvas-widget > .panel:not(.overview-command-deck)::before {
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, #c49a4b, var(--product-accent, #2f8f87));
  content: "";
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-canvas-widget > .panel:not(.overview-command-deck) > h3,
body.owner-shell-v1:not(.auth-required) #moduleStage .overview-canvas-widget > .panel:not(.overview-command-deck) > h4 {
  display: flex;
  align-items: center;
  min-height: 42px;
  margin: -2px 0 12px;
  padding: 10px 12px 10px 14px;
  border: 1px solid color-mix(in srgb, var(--product-accent, #2f8f87) 22%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--product-surface-soft, #f7faf5) 82%, transparent);
  color: var(--product-text, #173b3e) !important;
  font-size: 15px;
  font-weight: 760;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-canvas-widget > .panel:not(.overview-command-deck) > .list {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-canvas-widget > .panel:not(.overview-command-deck) .row strong {
  color: var(--product-text, #173b3e) !important;
  overflow-wrap: anywhere;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-canvas-widget > .panel:not(.overview-command-deck) .row small {
  color: var(--product-muted, #6e7d7c) !important;
  overflow-wrap: anywhere;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-overview-expense-breakdown="true"] {
  min-height: 0;
  max-height: min(300px, 42vh);
  display: grid;
  gap: 8px;
  padding-right: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-expense-category-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(112px, 160px) minmax(0, 1fr) minmax(74px, auto);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--product-accent, #2f8f87) 18%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--product-surface, #fff) 90%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-expense-category-name {
  min-width: 0;
  color: var(--product-text, #173b3e);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-expense-category-amount {
  color: var(--product-text, #173b3e);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-expense-category-row .bar-track {
  min-width: 0;
  height: 8px;
  border: 1px solid color-mix(in srgb, var(--product-accent, #2f8f87) 20%, transparent);
  background: color-mix(in srgb, var(--product-accent, #2f8f87) 8%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-expense-category-row .bar-track > i {
  background: linear-gradient(90deg, #2f9c93, #70bca5 62%, #c49a4b);
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .overview-canvas-widget [data-overview-expense-breakdown="true"] {
    max-height: min(260px, 38vh);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .overview-expense-category-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 10px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .overview-expense-category-row .bar-track {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .overview-canvas-widget > .panel:not(.overview-command-deck) {
    padding: 13px 12px 12px;
    border-radius: 8px;
  }
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) {
    padding: 13px 12px 12px;
    border-radius: 8px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > h3,
  body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > h4 {
    min-height: 38px;
    margin-bottom: 9px;
    padding: 8px 10px 8px 11px;
    font-size: 14px;
  }
}
