/* R9 Finance surface. Visual hierarchy only; data and interaction ownership stay unchanged. */

body.owner-shell-v1:not(.auth-required):has(#moduleStage[data-active-module-tab-panel^="finance-"]) {
  --finance-r9-blue: #367fa0;
  --finance-r9-blue-soft: rgb(221 237 242 / 82%);
  --finance-r9-green: #24775f;
  --finance-r9-green-soft: rgb(220 238 228 / 82%);
  --finance-r9-coral: #c96558;
  --finance-r9-coral-soft: rgb(248 226 220 / 82%);
  --finance-r9-copper: #a97843;
  --finance-r9-copper-soft: rgb(240 229 214 / 82%);
  --finance-r9-gold: #b58a38;
  --finance-r9-surface: var(--cc-surface);
  --finance-r9-surface-soft: color-mix(in srgb, var(--cc-surface-muted) 82%, transparent);
  --finance-r9-control-bg: rgb(255 254 247 / 84%);
  --finance-r9-control-bg-hover: rgb(255 255 252 / 94%);
  --finance-r9-control-edge: rgb(43 82 78 / 30%);
  --finance-r9-control-focus: rgb(36 119 95 / 22%);
  --finance-r9-action-start: #176f72;
  --finance-r9-action-end: #155664;
  --finance-r9-action-ink: #f4fffd;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required):has(#moduleStage[data-active-module-tab-panel^="finance-"]) {
  --finance-r9-blue: #72b7c4;
  --finance-r9-blue-soft: rgb(38 91 105 / 55%);
  --finance-r9-green: #67c69b;
  --finance-r9-green-soft: rgb(29 88 70 / 52%);
  --finance-r9-coral: #e18172;
  --finance-r9-coral-soft: rgb(104 52 48 / 52%);
  --finance-r9-copper: #d5ad68;
  --finance-r9-copper-soft: rgb(100 76 42 / 48%);
  --finance-r9-gold: #e0bb75;
  --finance-r9-control-bg: rgb(7 26 32 / 68%);
  --finance-r9-control-bg-hover: rgb(11 36 43 / 82%);
  --finance-r9-control-edge: rgb(123 184 180 / 34%);
  --finance-r9-control-focus: rgb(103 198 155 / 24%);
  --finance-r9-action-start: #2b8d86;
  --finance-r9-action-end: #1f6573;
  --finance-r9-action-ink: #f1fffb;
}

body.owner-shell-v1:not(.auth-required) .finance-grid {
  gap: 12px;
  align-items: start;
}

body.owner-shell-v1:not(.auth-required) .finance-grid .panel {
  min-width: 0;
  border: 1px solid var(--cc-line);
  border-radius: 4px;
  background: var(--finance-r9-surface);
  box-shadow: var(--r9-shadow, 0 12px 30px rgba(21, 38, 31, 0.08));
  backdrop-filter: blur(18px) saturate(112%);
  -webkit-backdrop-filter: blur(18px) saturate(112%);
}

body.owner-shell-v1:not(.auth-required) .finance-grid .panel::before,
body.owner-shell-v1:not(.auth-required) .finance-grid .panel::after {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .finance-grid .command-console-head {
  min-width: 0;
}

body.owner-shell-v1:not(.auth-required) .finance-grid .command-console-head h3 {
  margin: 0;
  color: var(--cc-ink);
  font-size: 17px;
  line-height: 1.3;
}

body.owner-shell-v1:not(.auth-required) .finance-grid .command-console-head p {
  color: var(--cc-ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

/* Quick entry is a compact financial instrument, not a generic admin form. */
body.owner-shell-v1:not(.auth-required) .finance-quick-panel:not(.tab-panel-hidden) {
  overflow: hidden;
  padding: 0 16px 12px;
  border-top: 3px solid var(--finance-r9-copper);
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel > .command-console-head {
  align-items: center;
  margin: 0 -16px 14px;
  padding: 13px 16px 12px;
  border-bottom: 1px solid var(--cc-line);
  background: linear-gradient(90deg, var(--finance-r9-copper-soft), transparent 42%);
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel > .command-console-head p {
  margin: 2px 0 0;
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel .command-actions {
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel :is(#financeQuickSubmit, #financeRefresh) {
  min-height: 40px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 800;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel #financeQuickSubmit {
  padding-inline: 17px;
  border-color: color-mix(in srgb, var(--finance-r9-action-start) 78%, white);
  background: linear-gradient(135deg, var(--finance-r9-action-start), var(--finance-r9-action-end));
  color: var(--finance-r9-action-ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 20%), 0 6px 14px rgb(18 77 79 / 18%);
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel #financeRefresh {
  padding-inline: 12px;
  border-color: var(--finance-r9-control-edge);
  background: color-mix(in srgb, var(--finance-r9-control-bg) 56%, transparent);
  color: var(--cc-ink-soft);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 10%);
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel #financeQuickSubmit:hover {
  border-color: color-mix(in srgb, var(--finance-r9-action-start) 64%, white);
  background: linear-gradient(135deg, color-mix(in srgb, var(--finance-r9-action-start) 90%, white), var(--finance-r9-action-end));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 24%), 0 8px 18px rgb(18 77 79 / 24%);
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel #financeRefresh:hover {
  border-color: var(--finance-r9-blue);
  background: var(--finance-r9-control-bg-hover);
  color: var(--finance-r9-blue);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%);
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel :is(#financeQuickSubmit, #financeRefresh):focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--finance-r9-control-focus), inset 0 1px 0 rgb(255 255 255 / 20%);
}

body.owner-shell-v1:not(.auth-required) .finance-entry-row {
  grid-template-columns:
    minmax(132px, 1fr)
    minmax(104px, .8fr)
    minmax(220px, 2fr)
    minmax(132px, 1fr)
    minmax(150px, 1.15fr)
    minmax(104px, .8fr);
  align-items: start;
  gap: 8px 10px;
  margin: 0 0 2px;
}

body.owner-shell-v1:not(.auth-required) .finance-entry-row .field {
  display: grid;
  min-width: 0;
  min-height: 0;
  align-content: start;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) .finance-entry-row .field small {
  margin: 0 0 0 1px;
  color: var(--cc-ink-faint);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  transition: color 140ms ease;
}

body.owner-shell-v1:not(.auth-required) .finance-entry-row .field:focus-within small {
  color: var(--finance-r9-green);
}

body.owner-shell-v1:not(.auth-required) .finance-entry-row .field :is(input, select) {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--finance-r9-control-edge);
  border-radius: 4px;
  outline: 0;
  background: var(--finance-r9-control-bg);
  color: var(--cc-ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 34%), 0 1px 2px rgb(14 49 43 / 5%);
  font-size: 13px;
  line-height: 1.3;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

body.owner-shell-v1:not(.auth-required) .finance-entry-row .field :is(input, select):hover {
  border-color: color-mix(in srgb, var(--finance-r9-control-edge) 65%, var(--finance-r9-blue));
  background: var(--finance-r9-control-bg-hover);
}

body.owner-shell-v1:not(.auth-required) .finance-entry-row .field :is(input, select):focus {
  border-color: var(--finance-r9-green);
  background: var(--finance-r9-control-bg-hover);
  box-shadow: 0 0 0 3px var(--finance-r9-control-focus), inset 0 1px 0 rgb(255 255 255 / 30%);
}

body.owner-shell-v1:not(.auth-required) .finance-entry-row input::placeholder {
  color: color-mix(in srgb, var(--cc-ink-faint) 72%, transparent);
  opacity: 1;
}

body.owner-shell-v1:not(.auth-required) .finance-entry-row :is(#financeEntryDate, #financeEntryAmount) {
  font-family: var(--cc-font-mono, "Cascadia Mono", monospace);
  font-variant-numeric: tabular-nums;
}

body.owner-shell-v1:not(.auth-required) .finance-entry-row #financeEntryAmount {
  font-size: 15px;
  font-weight: 800;
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel .quick-category-strip {
  display: flex;
  min-height: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 3px;
  padding: 9px 0 8px;
  border: 0;
  border-top: 1px solid var(--cc-line);
  border-bottom: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel .quick-category-strip .category-preset {
  min-width: 0;
  min-height: 30px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--finance-r9-control-edge);
  border-radius: 3px;
  background: color-mix(in srgb, var(--finance-r9-control-bg) 72%, transparent);
  color: var(--cc-ink-soft);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 16%);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel .quick-category-strip .category-preset:hover,
body.owner-shell-v1:not(.auth-required) .finance-quick-panel .quick-category-strip .category-preset:focus-visible {
  transform: translateY(-1px);
  border-color: var(--finance-r9-copper);
  outline: 0;
  background: var(--finance-r9-copper-soft);
  color: var(--finance-r9-copper);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%), 0 4px 10px rgb(67 50 30 / 10%);
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel > .row {
  min-height: 30px;
  margin: 0;
  padding: 7px 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cc-ink-faint);
  font-size: 10px;
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel > .row > .tag {
  min-height: 22px;
  padding: 2px 7px;
  border-color: var(--cc-line-strong);
  border-radius: 3px;
  background: transparent;
  color: var(--cc-ink-faint);
  font-size: 9px;
}

@media (min-width: 921px) and (max-width: 1180px) {
  body.owner-shell-v1:not(.auth-required) .finance-entry-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 761px) and (max-width: 920px) {
  body.owner-shell-v1:not(.auth-required) .finance-entry-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1:not(.auth-required) .finance-entry-row .field:nth-child(3),
  body.owner-shell-v1:not(.auth-required) .finance-entry-row .field:nth-child(5),
  body.owner-shell-v1:not(.auth-required) .finance-entry-row .field:nth-child(6) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) .finance-quick-panel:not(.tab-panel-hidden) {
    padding: 0 10px 10px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-quick-panel > .command-console-head {
    margin-inline: -10px;
    padding: 11px 10px 10px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-quick-panel > .command-console-head .command-actions {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body.owner-shell-v1:not(.auth-required) .finance-quick-panel #financeQuickSubmit {
    width: 100%;
  }

  body.owner-shell-v1:not(.auth-required) .finance-entry-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 8px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-entry-row .field:nth-child(3),
  body.owner-shell-v1:not(.auth-required) .finance-entry-row .field:nth-child(5),
  body.owner-shell-v1:not(.auth-required) .finance-entry-row .field:nth-child(6) {
    grid-column: 1 / -1;
  }

  body.owner-shell-v1:not(.auth-required) .finance-entry-row .field :is(input, select) {
    padding-inline: 9px;
    font-size: 12px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-entry-row #financeEntryAmount {
    font-size: 14px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-quick-panel .quick-category-strip {
    flex-wrap: nowrap;
    margin-top: 11px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body.owner-shell-v1:not(.auth-required) .finance-quick-panel .quick-category-strip::-webkit-scrollbar {
    display: none;
  }

  body.owner-shell-v1:not(.auth-required) .finance-quick-panel .quick-category-strip .category-preset {
    flex: 0 0 auto;
    min-height: 38px;
    height: 38px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-quick-panel > .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
  }
}

/* Final visibility guard after legacy finance rules. */
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-draft-delta,
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] [data-asset-draft-delta],
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-human-ledger,
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-save-preview {
  display: none !important;
}

/* ASSET-NET-CARD-DAY-CONTRAST-R1: the summary rail is a light ledger surface;
   do not let the retired dark workbench header bleed through the net card. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .asset-workbench-v2 .asset-balance-head {
  background: rgb(247 250 246 / 84%) !important;
  box-shadow: 0 8px 20px rgb(35 62 55 / 10%) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .asset-workbench-v2 .ring.asset-net-ring {
  background:
    linear-gradient(135deg, rgb(255 252 241 / 86%), rgb(225 211 170 / 62%)),
    url("../assets/paper-fibers-open.png") center / 124px 124px repeat !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .asset-workbench-v2 .ring.asset-net-ring :is(span, b) {
  color: var(--cc-ink, #183b3f) !important;
}

/* The ledger is the task. Put its two cards ahead of secondary controls. */
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-panel-v2 {
  display: flex !important;
  flex-direction: column;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head { order: 1; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-editor-controls { order: 2; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-draft-totals { order: 3; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] [data-asset-clearance-sheet] { order: 4; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-actions { order: 5; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-clearance-toolbar { order: 6; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-note-field { order: 7; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-paste-assist { order: 8; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] #assetSnapshotLookupResult { order: 9; }

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] > .asset-capture-actions-bottom {
  display: none !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-panel-v2 {
  display: flex !important;
  flex-direction: column;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head { order: 1; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-editor-controls { order: 2; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-draft-totals { order: 3; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] [data-asset-clearance-sheet] { order: 4; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-actions { order: 5; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-clearance-toolbar { order: 6; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-note-field { order: 7; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-paste-assist { order: 8; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] #assetSnapshotLookupResult { order: 9; }

/* Asset / liability is a workbench, not a decorated report. */
body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 {
  display: grid;
  gap: 16px;
  padding: 0;
  background: transparent;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 .asset-balance-head {
  border: 0;
  border-radius: 6px;
  background: linear-gradient(115deg, #0d3f43, #14655f 70%, #1d756d);
  box-shadow: 0 14px 32px rgb(10 48 48 / 22%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 .ring.asset-net-ring,
body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 .asset-balance-kpis .kpi {
  min-height: 110px;
  border-color: rgb(224 245 234 / 18%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 .ring.asset-net-ring {
  box-shadow: inset 4px 0 #d3a553;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 :is(.ring.asset-net-ring b, .asset-balance-kpis .kpi strong) {
  color: #fffdf5;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 :is(.ring.asset-net-ring span, .asset-balance-kpis .kpi span) {
  color: var(--cc-ink-soft);
}

/* Final readable-label override: the asset workbench stylesheet has an older
   !important rule loaded later than this module's base theme. */
body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2.asset-workbench-v2 :is(.ring.asset-net-ring span, .asset-balance-kpis .kpi span) {
  color: var(--cc-ink-soft) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 .asset-inherited-note {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 12px 16px;
  border-left: 3px solid #c79a55;
  border-radius: 3px;
  background: rgb(255 253 247 / 78%);
  color: #35504e;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 .asset-inherited-note strong {
  color: #173d3d;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-body-grid-v2 {
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, .82fr) !important;
  gap: 20px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-panel-v2 {
  display: block !important;
  padding: 24px !important;
  border: 1px solid rgb(41 89 82 / 20%) !important;
  border-radius: 6px !important;
  background: rgb(255 253 247 / 94%) !important;
  box-shadow: 0 12px 28px rgb(25 63 57 / 10%) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-panel-v2 > * + * {
  margin-top: 16px;
}

/* Keep the first viewport for the actual ledger. Totals already explain the math. */
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] :is(.asset-human-ledger, .asset-draft-delta, [data-asset-draft-delta], .asset-save-preview) {
  display: none !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head {
  grid-template-columns: minmax(0, 1fr) 170px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgb(41 89 82 / 16%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head :is(.section-kicker, p) {
  display: block;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head h4 {
  margin: 3px 0 0;
  color: #163d3d;
  font-size: 24px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head p {
  margin: 5px 0 0;
  color: #617674;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-editor-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-editor-controls .mini-action {
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 3px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-editor-controls .mini-action.primary {
  border-color: #12635c;
  background: #12635c;
  color: #fff;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-editor-controls span {
  width: 100%;
  color: #70817e;
  font-size: 12px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] :is(.asset-draft-totals, .asset-draft-delta) {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid rgb(41 89 82 / 16%);
  border-radius: 4px;
  overflow: hidden;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] :is(.asset-draft-totals, .asset-draft-delta) > span {
  min-height: 58px;
  padding: 10px 12px;
  border-right: 1px solid rgb(41 89 82 / 14%);
  background: rgb(246 250 247 / 70%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] :is(.asset-draft-totals, .asset-draft-delta) > span:last-child {
  border-right: 0;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-save-preview {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid rgb(41 89 82 / 16%);
  border-radius: 4px;
  background: #f3f7f3;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgb(41 89 82 / 14%);
  border-radius: 4px;
  background: #f8faf7;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-clearance-toolbar {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgb(41 89 82 / 14%);
  border-radius: 4px;
  background: #f8faf7;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-clearance-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-clearance-toolbar > .tag {
  grid-column: 1 / -1;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-grid {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 16px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-section {
  width: 100% !important;
  min-width: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid rgb(41 89 82 / 18%) !important;
  border-radius: 6px !important;
  background: #fffdf8 !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-section[data-asset-clearance-section="liability"] {
  border-color: rgb(170 81 70 / 26%) !important;
  background: #fffafa !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 0 18px;
  border-bottom: 1px solid rgb(41 89 82 / 14%);
  background: #f4f8f5;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] [data-asset-clearance-section="liability"] .asset-section-title {
  border-color: rgb(170 81 70 / 16%);
  background: #fcf5f3;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-quick-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid rgb(41 89 82 / 12%);
  background: rgb(248 251 249 / 80%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-header {
  display: none !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-rows {
  display: grid;
  gap: 10px;
  padding: 14px 18px 18px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1.35fr) minmax(126px, .65fr) auto;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgb(41 89 82 / 16%);
  border-radius: 4px;
  background: #fff;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-row-reference {
  grid-column: 1;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 3px;
  background: #f4f8f5;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-snapshot-note {
  grid-column: 2 / 4;
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-snapshot-amount {
    grid-column: 1;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-row-reference,
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-snapshot-note {
    grid-column: 1 / -1;
  }
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-entry-reference-panel {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-card {
  padding: 18px;
  border: 1px solid rgb(41 89 82 / 18%);
  border-radius: 6px;
  background: rgb(255 253 247 / 94%);
  box-shadow: 0 10px 24px rgb(25 63 57 / 8%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-card .asset-column-head {
  padding-bottom: 12px;
  border-bottom: 1px solid rgb(41 89 82 / 14%);
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-body-grid-v2 {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-entry-reference-panel {
    position: static;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] :is(.asset-draft-totals, .asset-draft-delta) {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] :is(.asset-draft-totals, .asset-draft-delta) > span {
    border-right: 0;
    border-bottom: 1px solid rgb(41 89 82 / 14%);
  }
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .finance-entry-row .field :is(input, select) {
  color-scheme: dark;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 8%), 0 5px 14px rgb(0 0 0 / 10%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .finance-quick-panel > .command-console-head {
  background: linear-gradient(90deg, var(--finance-r9-copper-soft), rgb(7 25 31 / 28%) 42%, transparent 78%);
}

/* Overview summary: make the first business action visible without a hero wall. */
body.owner-shell-v1:not(.auth-required) .finance-overview-summary {
  padding: 14px 16px 16px;
  border-top: 3px solid var(--finance-r9-copper);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-summary > .command-console-head {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 14px;
  margin-bottom: 11px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--cc-line);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions {
  display: flex;
  max-width: 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions::-webkit-scrollbar {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions :is(a, button) {
  min-height: 36px;
  padding-inline: 10px;
  border: 1px solid var(--cc-line-strong);
  border-radius: 4px;
  background: var(--finance-r9-surface-soft);
  color: var(--cc-ink-soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions :is(a, button):hover,
body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions :is(a, button):focus-visible {
  border-color: var(--finance-r9-blue);
  background: var(--finance-r9-blue-soft);
  color: var(--finance-r9-blue);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: end;
  gap: 9px;
  margin: 0 0 11px;
  padding: 9px 10px;
  border: 1px solid var(--cc-line);
  border-radius: 5px;
  background: var(--finance-r9-surface-soft);
}

body.owner-shell-v1:not(.auth-required) .finance-month-picker {
  min-width: 0;
}

body.owner-shell-v1:not(.auth-required) .finance-month-picker .field,
body.owner-shell-v1:not(.auth-required) .finance-month-picker input,
body.owner-shell-v1:not(.auth-required) #financeMonthSelect,
body.owner-shell-v1:not(.auth-required) #financeMonthSelect-chart,
body.owner-shell-v1:not(.auth-required) #financeCalendarMonthSelect {
  width: 156px;
  min-width: 156px;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-range-control {
  min-width: 0;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-control-label {
  display: block;
  margin-bottom: 5px;
  color: var(--cc-ink-soft);
  font-size: 10px;
  font-weight: 700;
}

body.owner-shell-v1:not(.auth-required) .finance-range-control {
  display: flex;
  min-height: 40px;
  align-items: stretch;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--cc-line-strong);
  border-radius: 4px;
  background: color-mix(in srgb, var(--finance-r9-surface) 88%, transparent);
}

body.owner-shell-v1:not(.auth-required) .finance-range-control button {
  min-width: 56px;
  min-height: 32px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--cc-ink-soft);
  font-size: 11px;
}

body.owner-shell-v1:not(.auth-required) .finance-range-control button[aria-pressed="true"],
body.owner-shell-v1:not(.auth-required) .finance-range-control button.active {
  background: var(--finance-r9-blue-soft);
  color: var(--finance-r9-blue);
  font-weight: 800;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--cc-line);
  border-radius: 4px;
  background: color-mix(in srgb, var(--cc-surface-strong) 72%, transparent);
  box-shadow: inset 0 1px rgb(255 255 255 / 6%);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi {
  position: relative;
  min-height: 82px;
  padding: 13px 16px;
  border: 0;
  border-right: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi:last-child {
  border-right: 0;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 0;
  width: 2px;
  height: 38px;
  background: var(--kpi-tone, var(--finance-r9-blue));
}

body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi:nth-child(1) { --kpi-tone: var(--finance-r9-coral); }
body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi:nth-child(2) { --kpi-tone: var(--finance-r9-green); }
body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi:nth-child(3) { --kpi-tone: var(--finance-r9-copper); }
body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi:nth-child(4) { --kpi-tone: var(--finance-r9-blue); }

body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi span {
  display: block;
  color: var(--cc-ink-soft);
  font-size: 10px;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi strong {
  display: block;
  margin-top: 5px;
  color: var(--kpi-tone);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-range-summary {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-range-summary > span {
  min-width: 0;
  padding: 7px 9px;
  border-right: 1px solid var(--cc-line);
  color: var(--cc-ink-soft);
  font-size: 10px;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-range-summary > span:last-child {
  border-right: 0;
}

/* Overview secondary blocks become readable rails instead of equal-weight cards. */
body.owner-shell-v1:not(.auth-required) :is(.finance-overview-ledger, .finance-overview-hot-days, .finance-overview-anomalies, .finance-overview-assets) {
  padding: 13px 14px;
}

body.owner-shell-v1:not(.auth-required) :is(.finance-overview-ledger, .finance-overview-hot-days, .finance-overview-anomalies, .finance-overview-assets) h3 {
  margin: 0;
  color: var(--cc-ink);
  font-size: 15px;
}

body.owner-shell-v1:not(.auth-required) :is(.finance-overview-ledger, .finance-overview-hot-days, .finance-overview-anomalies, .finance-overview-assets) > p {
  display: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-summary,
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets
) > .command-console-head p {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--cc-line);
  border-radius: 3px;
  background: color-mix(in srgb, var(--cc-surface-muted) 52%, transparent);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions .mini-action {
  min-height: 34px;
  padding-inline: 11px;
  border: 0;
  border-right: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--cc-ink-soft);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions .mini-action:last-child {
  border-right: 0;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions .mini-action:hover,
body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions .mini-action:focus-visible {
  background: var(--finance-r9-blue-soft);
  color: var(--cc-ink);
}

body.owner-shell-v1:not(.auth-required) .finance-record-row,
body.owner-shell-v1:not(.auth-required) .finance-hot-day-row,
body.owner-shell-v1:not(.auth-required) .finance-overview-anomaly-list > .row,
body.owner-shell-v1:not(.auth-required) .finance-overview-asset-list > .row {
  min-height: 44px;
  padding: 7px 0;
  border-bottom: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
}

body.owner-shell-v1:not(.auth-required) .finance-record-row:hover,
body.owner-shell-v1:not(.auth-required) .finance-hot-day-row:hover {
  background: var(--finance-r9-surface-soft);
  box-shadow: inset 3px 0 0 var(--finance-r9-blue);
}

body.owner-shell-v1:not(.auth-required) .finance-record-actions {
  gap: 5px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-record-actions .mini-action {
  min-height: 30px;
  padding-inline: 8px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-record-actions .mini-action:hover,
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-record-actions .mini-action:focus-visible {
  border: 0;
  background: var(--finance-r9-blue-soft);
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-record-actions .mini-action.danger {
  border: 0;
  background: transparent;
  color: var(--finance-r9-coral);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-record-actions .tag {
  min-height: 30px;
  padding-inline: 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.finance-overview-ledger, .finance-overview-hot-days, .finance-overview-anomalies, .finance-overview-assets) > .command-console-head .mini-action,
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-hot-day-row > .mini-action {
  min-height: 32px;
  padding-inline: 7px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  box-shadow: inset 0 -1px var(--cc-line-strong);
  color: var(--cc-accent);
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 > .asset-capture-actions-bottom {
  border: 1px solid var(--cc-line-strong);
  border-radius: 4px;
  background: color-mix(in srgb, var(--cc-surface-strong) 94%, transparent);
  box-shadow: 0 -12px 30px color-mix(in srgb, var(--cc-ink) 10%, transparent);
  backdrop-filter: blur(18px) saturate(112%);
  -webkit-backdrop-filter: blur(18px) saturate(112%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 > .asset-capture-actions-bottom {
  background: rgb(7 27 35 / 94%);
  box-shadow: 0 -16px 34px rgb(0 4 7 / 38%);
}

/* Asset workbench: remove decorative charts and card piles in favor of scan-ready bands. */
body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-head {
  grid-template-columns: minmax(210px, .72fr) minmax(0, 2.28fr);
  gap: 0;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--cc-line-strong);
  border-radius: 4px;
  background: color-mix(in srgb, var(--cc-surface-strong) 76%, transparent);
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .ring.asset-net-ring {
  display: flex;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 92px;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 18px;
  border: 0;
  border-right: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
  box-shadow: inset 3px 0 var(--finance-r9-blue);
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .ring.asset-net-ring::before {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .ring.asset-net-ring span {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--cc-ink-soft);
  font-size: 11px;
  line-height: 1.2;
  text-align: left;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .ring.asset-net-ring b {
  overflow: hidden;
  color: var(--cc-ink);
  font-size: 27px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis .kpi {
  display: grid;
  min-width: 0;
  min-height: 92px;
  align-content: center;
  gap: 6px;
  padding: 12px 14px;
  border: 0;
  border-right: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis .kpi:last-child {
  border-right: 0;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis .kpi:nth-child(3) {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis .kpi span {
  color: var(--cc-ink-soft);
  font-size: 10px;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis .kpi strong {
  overflow: hidden;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 :is(.asset-task-switcher, .asset-view-tabs) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--cc-line);
  border-radius: 3px;
  background: color-mix(in srgb, var(--cc-surface-muted) 56%, transparent);
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 :is(.asset-task-switcher, .asset-view-tabs) a {
  display: grid;
  min-height: 38px;
  place-items: center;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--cc-ink-soft);
  text-decoration: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 :is(.asset-task-switcher, .asset-view-tabs) a:last-child {
  border-right: 0;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 :is(.asset-task-switcher, .asset-view-tabs) a:is(.active, [aria-pressed="true"]) {
  background: var(--finance-r9-blue-soft);
  box-shadow: inset 0 -2px var(--finance-r9-copper);
  color: var(--cc-ink);
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 :is(
  .asset-capture-panel-v2,
  .asset-entry-reference-panel,
  .asset-view-panel-v2,
  .asset-history-panel
) {
  border-color: var(--cc-line);
  border-radius: 4px;
  background: color-mix(in srgb, var(--cc-surface) 90%, transparent);
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 :is(
  .asset-human-ledger,
  .asset-ledger-section,
  .asset-save-preview,
  .asset-current-context,
  .asset-monthly-reconciliation,
  .asset-reference-card,
  .asset-status-card,
  .asset-history-filter,
  .asset-history-comparison
) {
  border-radius: 2px;
  background: color-mix(in srgb, var(--cc-surface-muted) 54%, transparent);
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 :is(.asset-flow-label, .asset-mode-note, .asset-reconcile-guide),
body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 > .asset-capture-actions-bottom .tag {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 :is(
  .asset-capture-head p,
  .asset-capture-head .section-kicker,
  .asset-current-context > strong,
  .asset-human-ledger > small,
  .asset-reference-hint
) {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 :is(
  .asset-clearance-toolbar .mini-action,
  .asset-clearance-toolbar .hud-button,
  .asset-quick-presets .mini-action,
  .asset-section-title .mini-action,
  .asset-capture-actions .hud-button,
  .asset-capture-actions .mini-action
) {
  border-radius: 2px;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-workflow-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--cc-line);
  border-radius: 3px;
  background: color-mix(in srgb, var(--cc-surface-muted) 48%, transparent);
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-workflow-strip > .tag:first-child {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-workflow-strip > .tag:not(:first-child) {
  grid-column: 1 / -1;
  min-height: 30px;
  padding: 6px 9px;
  border: 0;
  border-bottom: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 .asset-workflow-strip .mini-action {
  min-height: 38px;
  padding-inline: 8px;
  border: 0;
  border-right: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 .asset-workflow-strip .mini-action:last-child {
  border-right: 0;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-current-context {
  display: flex;
  gap: 14px;
  padding: 7px 0;
  border: 0;
  border-bottom: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .tag {
  border-radius: 2px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 > .asset-capture-actions-bottom .hud-button {
  min-height: 40px;
  border-radius: 2px;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 > .asset-capture-actions-bottom .hud-button.danger {
  border-color: var(--finance-r9-coral);
  background: var(--finance-r9-coral);
  color: #fff;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 > .asset-capture-actions-bottom .hud-button:not(.danger) {
  border-color: var(--cc-line-strong);
  background: transparent;
  color: var(--cc-ink);
}

/* Calendar surface. Existing FullCalendar/fallback markup remains the source of truth. */
body.owner-shell-v1:not(.auth-required) .finance-calendar-panel:not(.tab-panel-hidden),
body.owner-shell-v1:not(.auth-required) :is(.finance-calendar-detail-panel, .finance-calendar-detail-records-panel):not(.tab-panel-hidden) {
  height: auto;
  align-self: start;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-panel:not(.tab-panel-hidden) {
  overflow: hidden;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-toolbar {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) auto minmax(0, auto);
  gap: 7px;
  align-items: end;
  padding: 10px 12px;
  border-bottom: 1px solid var(--cc-line);
  background: var(--finance-r9-surface-soft);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-month-field {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(156px, 220px);
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cc-ink-soft);
  font-size: 10px;
  font-weight: 700;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-month-field > span {
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-month-field input {
  width: 156px;
  min-width: 156px;
  border: 1px solid var(--cc-line-strong);
  background: color-mix(in srgb, var(--finance-r9-surface) 90%, transparent);
  color: var(--cc-ink);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-range {
  align-self: center;
  color: var(--cc-ink-faint);
  font-size: 10px;
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-panel:not(.tab-panel-hidden) .finance-calendar-scroll {
  min-width: 0;
  overflow: visible;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-scroll .finance-calendar-v2 {
  min-width: 0;
  padding: 9px;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc {
  color: var(--cc-ink);
  font-size: 12px;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-toolbar {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-col-header-cell-cushion,
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day-number {
  padding: 6px 7px;
  color: var(--cc-ink-soft);
  font-size: 11px;
  text-decoration: none;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day-frame {
  min-height: 76px;
  background: color-mix(in srgb, var(--finance-r9-surface) 84%, transparent);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day:hover .fc-daygrid-day-frame {
  background: var(--finance-r9-surface-soft);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-day-today {
  background: rgba(35, 131, 101, 0.08);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-day-today .fc-daygrid-day-number {
  color: var(--finance-r9-green);
  font-weight: 800;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day:focus-within,
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day[aria-selected="true"],
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day[data-selected="true"],
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day.is-selected,
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day.selected {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--finance-r9-blue);
  outline-offset: -2px;
  background: var(--finance-r9-blue-soft);
  box-shadow: inset 0 0 0 1px rgba(47, 99, 213, 0.32);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day[aria-selected="true"]::after,
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day[data-selected="true"]::after,
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day.is-selected::after,
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day.selected::after {
  content: "已选";
  position: absolute;
  top: 4px;
  right: 5px;
  padding: 2px 4px;
  background: var(--finance-r9-blue);
  color: #ffffff;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.1;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .finance-calendar-event {
  margin: 2px 3px;
  border: 0;
  border-radius: 3px;
  padding: 2px 5px;
  font-size: 10px;
  font-weight: 700;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .finance-calendar-event.is-expense {
  background: var(--finance-r9-coral-soft);
  color: var(--finance-r9-coral);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .finance-calendar-event.is-income {
  background: var(--finance-r9-green-soft);
  color: var(--finance-r9-green);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel:not(.tab-panel-hidden) {
  padding: 14px;
  border-top: 3px solid var(--finance-r9-copper);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel:not(.tab-panel-hidden) > .command-console-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--cc-line);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel:not(.tab-panel-hidden) .finance-day-list {
  min-height: 0;
  max-height: none;
  overflow: visible;
}

body.owner-shell-v1:not(.auth-required) :is(.finance-calendar-detail-panel, .finance-calendar-detail-records-panel):not(.tab-panel-hidden) .finance-calendar-detail-records__list {
  max-height: clamp(240px, 42vh, 560px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel:not(.tab-panel-hidden) .finance-record-row {
  min-height: 48px;
}

/* Chart view: a deliberate set of visual reading tracks, not a single donut. */
body.owner-shell-v1:not(.auth-required) .finance-chart-overview-panel {
  padding: 15px 16px;
  border-top: 3px solid var(--finance-r9-copper);
}

body.owner-shell-v1:not(.auth-required) .finance-chart-head {
  grid-template-columns: minmax(230px, .7fr) minmax(330px, 1.3fr);
  gap: 14px;
  align-items: end;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cc-line);
}

body.owner-shell-v1:not(.auth-required) .finance-chart-range-actions {
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--cc-line);
  border-radius: 5px;
  background: var(--finance-r9-surface-soft);
}

body.owner-shell-v1:not(.auth-required) .finance-chart-kpis {
  gap: 8px;
  margin-top: 12px;
  border: 0;
}

body.owner-shell-v1:not(.auth-required) .finance-chart-kpis > div {
  min-height: 68px;
  padding: 9px 11px;
  border: 1px solid var(--cc-line);
  border-top: 3px solid var(--kpi-tone, var(--finance-r9-blue));
  border-radius: 3px;
  background: color-mix(in srgb, var(--cc-surface-strong) 76%, transparent);
}

body.owner-shell-v1:not(.auth-required) .finance-chart-kpis > div:nth-child(1) { --kpi-tone: var(--finance-r9-green); }
body.owner-shell-v1:not(.auth-required) .finance-chart-kpis > div:nth-child(2) { --kpi-tone: var(--finance-r9-coral); }
body.owner-shell-v1:not(.auth-required) .finance-chart-kpis > div:nth-child(3) { --kpi-tone: var(--finance-r9-copper); }
body.owner-shell-v1:not(.auth-required) .finance-chart-kpis > div:nth-child(4) { --kpi-tone: var(--finance-r9-blue); }

body.owner-shell-v1:not(.auth-required) .finance-chart-kpis strong {
  color: var(--kpi-tone);
  font-size: 20px;
}

body.owner-shell-v1:not(.auth-required) .finance-chart-structure {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 14px;
  margin-top: 14px;
}

body.owner-shell-v1:not(.auth-required) .finance-chart-composition {
  padding-right: 14px;
  border-right: 1px solid var(--cc-line);
}

body.owner-shell-v1:not(.auth-required) .finance-chart-composition .category-chart {
  min-height: 220px;
}

body.owner-shell-v1:not(.auth-required) .finance-chart-composition .chart-bar-row {
  min-height: 38px;
  border-bottom: 1px solid var(--cc-line);
}

body.owner-shell-v1:not(.auth-required) .finance-chart-composition .chart-donut {
  border-color: var(--cc-line-strong);
}

body.owner-shell-v1:not(.auth-required) .finance-chart-drilldown {
  min-width: 0;
}

/* Desktop two-column calendar/detail composition. */
@media (min-width: 1181px) {
  body.owner-shell-v1:not(.auth-required) .finance-grid:has(.finance-calendar-panel:not(.tab-panel-hidden)) {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-panel:not(.tab-panel-hidden) {
    grid-column: span 8;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel:not(.tab-panel-hidden) {
    grid-column: span 4;
  }
}

@media (max-width: 1180px) and (min-width: 761px) {
  body.owner-shell-v1:not(.auth-required) .finance-overview-kpis,
  body.owner-shell-v1:not(.auth-required) .finance-chart-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi:nth-child(2) {
    border-right: 0;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi:nth-child(-n + 2) {
    border-bottom: 1px solid var(--cc-line);
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-filter-bar {
    grid-template-columns: minmax(170px, 1fr) auto;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-range-control {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) .finance-grid {
    gap: 9px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-summary,
  body.owner-shell-v1:not(.auth-required) .finance-chart-overview-panel {
    padding: 11px 10px 12px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-summary > .command-console-head,
  body.owner-shell-v1:not(.auth-required) .finance-chart-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions {
    justify-content: flex-start;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-filter-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1:not(.auth-required) .finance-month-picker .field,
  body.owner-shell-v1:not(.auth-required) .finance-month-picker input,
  body.owner-shell-v1:not(.auth-required) #financeMonthSelect,
  body.owner-shell-v1:not(.auth-required) #financeMonthSelect-chart,
  body.owner-shell-v1:not(.auth-required) #financeCalendarMonthSelect {
    width: 100%;
    min-width: 0;
  }

  body.owner-shell-v1:not(.auth-required) .finance-range-control {
    width: 100%;
    overflow-x: auto;
  }

  body.owner-shell-v1:not(.auth-required) .finance-range-control button {
    flex: 1 0 64px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-kpis,
  body.owner-shell-v1:not(.auth-required) .finance-chart-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi {
    min-height: 68px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi strong,
  body.owner-shell-v1:not(.auth-required) .finance-chart-kpis strong {
    font-size: 17px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-range-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-range-summary > span:nth-child(2n) {
    border-right: 0;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-toolbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-range {
    grid-column: 1 / -1;
    padding-top: 3px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-month-field input {
    width: 100%;
    min-width: 0;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-month-field {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-month-field > span {
    display: none;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-scroll {
    overflow-x: clip !important;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-scroll .finance-calendar-v2 {
    width: 100%;
    min-width: 0;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day-frame {
    min-height: 64px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .finance-calendar-event .fc-event-title {
    width: 100%;
    overflow: visible;
    font-size: 9px;
    line-height: 1.05;
    text-align: center;
    text-indent: 0;
    text-overflow: clip;
    white-space: normal;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .finance-calendar-event {
    margin: 1px;
    padding: 1px 2px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-chart-structure {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1:not(.auth-required) .finance-chart-composition {
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--cc-line);
    padding-bottom: 12px;
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 {
    padding-bottom: calc(var(--cc-mobile-nav-height, 58px) + 24px);
    scroll-margin-bottom: var(--cc-mobile-content-bottom-clearance, 82px);
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-head {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .ring.asset-net-ring {
    min-height: 76px;
    padding: 12px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--cc-line);
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .ring.asset-net-ring b {
    font-size: 24px;
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis .kpi {
    min-height: 70px;
    padding: 10px 12px;
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis .kpi:nth-child(2) {
    border-right: 0;
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis .kpi:nth-child(-n + 2) {
    border-bottom: 1px solid var(--cc-line);
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis .kpi:nth-child(4) {
    grid-column: 1 / -1;
    border-right: 0;
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 > .asset-capture-actions-bottom {
    bottom: calc(var(--cc-mobile-nav-height, 58px) + 8px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 8px;
    border-radius: 4px;
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 > .asset-capture-actions-bottom > :last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.owner-shell-v1:not(.auth-required) .finance-grid * {
    transition-duration: 0.01ms !important;
  }
}

/* R9.2 art pass: indexed ledger material, quieter copy and deliberate controls. */
body.owner-shell-v1:not(.auth-required):has(#moduleStage[data-active-module-tab-panel^="finance-"]) {
  --finance-r9-surface: rgb(248 250 245 / 76%);
  --finance-r9-surface-soft: rgb(241 246 241 / 60%);
  --finance-r9-ledger-line: rgb(35 82 76 / 8%);
  --finance-r9-command: rgb(16 57 59 / 96%);
  --finance-r9-command-end: rgb(25 78 75 / 92%);
  --finance-r9-command-ink: #f5faf5;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required):has(#moduleStage[data-active-module-tab-panel^="finance-"]) {
  --finance-r9-surface: rgb(5 27 34 / 64%);
  --finance-r9-surface-soft: rgb(9 39 45 / 52%);
  --finance-r9-ledger-line: rgb(137 205 193 / 8%);
  --finance-r9-command: rgb(5 30 36 / 88%);
  --finance-r9-command-end: rgb(14 58 62 / 84%);
  --finance-r9-command-ink: #eef8f3;
}

body.owner-shell-v1:not(.auth-required) .finance-grid .panel {
  border-color: color-mix(in srgb, var(--cc-line-strong) 82%, transparent);
  background: linear-gradient(112deg, color-mix(in srgb, var(--finance-r9-surface) 96%, transparent), var(--finance-r9-surface));
  box-shadow:
    inset 0 1px rgb(255 255 255 / 42%),
    0 16px 34px rgb(15 50 46 / 10%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .finance-grid .panel {
  box-shadow:
    inset 0 1px rgb(220 255 247 / 6%),
    0 18px 38px rgb(0 5 8 / 28%);
}

body.owner-shell-v1:not(.auth-required) .finance-grid .panel:not(.chart-panel):not(.finance-calendar-panel) {
  position: relative;
  isolation: isolate;
}

body.owner-shell-v1:not(.auth-required) .finance-grid .panel:not(.chart-panel):not(.finance-calendar-panel)::after {
  content: "";
  display: block;
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: 58px;
  height: 58px;
  pointer-events: none;
  background: none;
  clip-path: polygon(38% 0, 100% 0, 100% 100%);
  opacity: .34;
}

body.owner-shell-v1:not(.auth-required) .finance-grid .panel:not(.chart-panel):not(.finance-calendar-panel) > * {
  position: relative;
  z-index: 1;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-summary > .command-console-head,
body.owner-shell-v1:not(.auth-required) :is(
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets
) > .command-console-head {
  border-bottom: 1px solid rgb(226 242 235 / 16%);
  background: linear-gradient(112deg, var(--finance-r9-command), var(--finance-r9-command-end));
  box-shadow: inset 4px 0 var(--finance-r9-copper), inset 0 1px rgb(255 255 255 / 8%);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-summary > .command-console-head {
  margin: -14px 0 12px;
  padding: 13px 15px 12px 18px;
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets
) > .command-console-head {
  margin: -13px 0 10px;
  padding: 11px 12px 10px 16px;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-summary > .command-console-head h3,
body.owner-shell-v1:not(.auth-required) :is(
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets
) > .command-console-head h3 {
  color: var(--finance-r9-command-ink);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions {
  border-color: rgb(231 243 237 / 18%);
  background: rgb(255 255 255 / 6%);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions .mini-action {
  border-right-color: rgb(231 243 237 / 16%);
  color: rgb(239 247 243 / 84%);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions .mini-action:hover,
body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions .mini-action:focus-visible {
  background: rgb(255 255 255 / 12%);
  color: #ffffff;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-kpis {
  border-color: color-mix(in srgb, var(--cc-line-strong) 86%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--finance-r9-surface) 86%, white 5%), var(--finance-r9-surface));
  box-shadow: inset 0 1px rgb(255 255 255 / 48%), 0 10px 24px rgb(17 53 49 / 7%);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi::before {
  top: 13px;
  width: 3px;
  height: 44px;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi span {
  color: var(--cc-ink-faint);
  font-weight: 800;
}

body.owner-shell-v1:not(.auth-required) .finance-grid :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  border-color: var(--finance-r9-control-edge);
  border-radius: 2px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--finance-r9-green) 8%, transparent), transparent 16px),
    var(--finance-r9-control-bg);
  box-shadow: inset 3px 0 color-mix(in srgb, var(--finance-r9-green) 34%, transparent), inset 0 1px rgb(255 255 255 / 28%);
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

body.owner-shell-v1:not(.auth-required) .finance-grid :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):hover {
  border-color: color-mix(in srgb, var(--finance-r9-blue) 62%, var(--finance-r9-control-edge));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--finance-r9-blue) 9%, transparent), transparent 18px),
    var(--finance-r9-control-bg-hover);
}

body.owner-shell-v1:not(.auth-required) .finance-grid :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus {
  outline: 0;
  border-color: var(--finance-r9-green);
  background: var(--finance-r9-control-bg-hover);
  box-shadow: inset 3px 0 var(--finance-r9-green), 0 0 0 3px var(--finance-r9-control-focus), 0 8px 18px rgb(17 74 67 / 8%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-grid .workbench-actions .mini-action,
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-record-actions .mini-action,
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-hot-day-row > .mini-action,
body.owner-shell-v1:not(.auth-required) #moduleStage #financeBudgetSubmit {
  min-height: 32px;
  padding-inline: 10px;
  border: 1px solid color-mix(in srgb, var(--finance-r9-control-edge) 86%, transparent);
  border-radius: 2px;
  background: color-mix(in srgb, var(--finance-r9-control-bg) 72%, transparent);
  box-shadow: inset 0 1px rgb(255 255 255 / 14%);
  color: var(--cc-ink-soft);
  font-weight: 800;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-grid .workbench-actions .mini-action:hover,
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-grid .workbench-actions .mini-action:focus-visible,
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-record-actions .mini-action:hover,
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-record-actions .mini-action:focus-visible,
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-hot-day-row > .mini-action:hover,
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-hot-day-row > .mini-action:focus-visible,
body.owner-shell-v1:not(.auth-required) #moduleStage #financeBudgetSubmit:hover,
body.owner-shell-v1:not(.auth-required) #moduleStage #financeBudgetSubmit:focus-visible {
  border-color: var(--finance-r9-blue);
  background: var(--finance-r9-blue-soft);
  box-shadow: inset 0 1px rgb(255 255 255 / 18%), 0 6px 14px rgb(20 77 73 / 10%);
  color: var(--cc-ink);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets
) > .command-console-head .workbench-actions .mini-action {
  border-color: rgb(231 243 237 / 18%);
  background: rgb(255 255 255 / 7%);
  box-shadow: none;
  color: rgb(239 247 243 / 86%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets
) > .command-console-head .workbench-actions .mini-action:hover,
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets
) > .command-console-head .workbench-actions .mini-action:focus-visible {
  border-color: rgb(231 243 237 / 32%);
  background: rgb(255 255 255 / 14%);
  box-shadow: none;
  color: #ffffff;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-record-actions .mini-action.danger {
  border-color: color-mix(in srgb, var(--finance-r9-coral) 54%, transparent);
  background: color-mix(in srgb, var(--finance-r9-coral-soft) 68%, transparent);
  color: var(--finance-r9-coral);
}

body.owner-shell-v1:not(.auth-required) .finance-record-row,
body.owner-shell-v1:not(.auth-required) .finance-hot-day-row,
body.owner-shell-v1:not(.auth-required) .finance-overview-anomaly-list > .row,
body.owner-shell-v1:not(.auth-required) .finance-overview-asset-list > .row {
  padding-inline: 6px;
  transition: background 140ms ease, box-shadow 140ms ease;
}

body.owner-shell-v1:not(.auth-required) .finance-record-row:hover,
body.owner-shell-v1:not(.auth-required) .finance-hot-day-row:hover {
  background: color-mix(in srgb, var(--finance-r9-blue-soft) 42%, transparent);
  box-shadow: inset 3px 0 var(--finance-r9-blue);
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel > .command-console-head p,
body.owner-shell-v1:not(.auth-required) .finance-quick-panel > .row.muted-row,
body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel > .command-console-head p {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day:focus-within,
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day[aria-selected="true"],
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day[data-selected="true"],
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day.is-selected,
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day.selected {
  outline-color: var(--finance-r9-blue);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--finance-r9-blue) 76%, transparent), 0 0 18px var(--finance-r9-control-focus);
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) .finance-grid {
    padding-bottom: calc(var(--cc-mobile-nav-height, 58px) + 28px);
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-summary > .command-console-head {
    margin: -11px -10px 10px;
    padding: 12px 10px 11px 14px;
  }

  body.owner-shell-v1:not(.auth-required) :is(
    .finance-overview-ledger,
    .finance-overview-hot-days,
    .finance-overview-anomalies,
    .finance-overview-assets
  ) > .command-console-head {
    margin: -13px -14px 9px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions::after {
    content: "";
    flex: 0 0 10px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-grid .panel:not(.chart-panel):not(.finance-calendar-panel)::after {
    width: 42px;
    height: 42px;
    opacity: .24;
  }
}

/* R9.3 cross-tab header system: every Finance workflow reads as one instrument. */
body.owner-shell-v1:not(.auth-required) :is(
  .finance-quick-panel,
  .finance-calendar-detail-panel,
  .finance-chart-overview-panel,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel,
  [data-tab-panel="finance-ledger"],
  [data-tab-panel="finance-budget"]
) > .command-console-head {
  border-bottom: 1px solid rgb(226 242 235 / 16%);
  background: linear-gradient(112deg, var(--finance-r9-command), var(--finance-r9-command-end));
  box-shadow: inset 4px 0 var(--finance-r9-copper), inset 0 1px rgb(255 255 255 / 8%);
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-chart-overview-panel,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel,
  [data-tab-panel="finance-ledger"],
  [data-tab-panel="finance-budget"]
) > .command-console-head {
  margin: -15px -16px 12px;
  padding: 13px 15px 12px 18px;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel > .command-console-head {
  margin: -14px -14px 11px;
  padding: 12px 13px 11px 17px;
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-quick-panel,
  .finance-calendar-detail-panel,
  .finance-chart-overview-panel,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel,
  [data-tab-panel="finance-ledger"],
  [data-tab-panel="finance-budget"]
) > .command-console-head h3 {
  color: var(--finance-r9-command-ink);
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-chart-overview-panel,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel,
  [data-tab-panel="finance-ledger"],
  [data-tab-panel="finance-budget"]
) > .command-console-head :is(.section-kicker, .finance-overview-control-label, .field > small, .tag) {
  color: rgb(222 238 231 / 68%);
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-quick-panel,
  .finance-calendar-detail-panel,
  .finance-chart-overview-panel,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel,
  [data-tab-panel="finance-ledger"],
  [data-tab-panel="finance-budget"]
) > .command-console-head p {
  display: none;
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-chart-overview-panel,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel,
  [data-tab-panel="finance-ledger"],
  [data-tab-panel="finance-budget"]
) > .command-console-head .workbench-actions,
body.owner-shell-v1:not(.auth-required) .finance-chart-head .finance-chart-range-actions {
  border-color: rgb(231 243 237 / 18%);
  background: rgb(255 255 255 / 6%);
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-chart-overview-panel,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel,
  [data-tab-panel="finance-ledger"],
  [data-tab-panel="finance-budget"]
) > .command-console-head .workbench-actions .mini-action {
  border-color: rgb(231 243 237 / 18%);
  background: rgb(255 255 255 / 7%);
  box-shadow: none;
  color: rgb(239 247 243 / 86%);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-panel > h3 {
  margin: -16px -16px 0;
  padding: 13px 15px 12px 18px;
  border-bottom: 1px solid rgb(226 242 235 / 16%);
  background: linear-gradient(112deg, var(--finance-r9-command), var(--finance-r9-command-end));
  box-shadow: inset 4px 0 var(--finance-r9-copper), inset 0 1px rgb(255 255 255 / 8%);
  color: var(--finance-r9-command-ink);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-toolbar {
  border-color: color-mix(in srgb, var(--cc-line-strong) 84%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--finance-r9-surface-soft) 88%, white 4%), var(--finance-r9-surface-soft));
}

body.owner-shell-v1:not(.auth-required) .finance-chart-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--cc-line-strong) 84%, transparent);
  border-radius: 4px;
  background: var(--finance-r9-surface-soft);
}

body.owner-shell-v1:not(.auth-required) .finance-chart-kpis > div {
  min-height: 76px;
  border: 0;
  border-right: 1px solid var(--cc-line);
  border-top: 3px solid var(--kpi-tone, var(--finance-r9-blue));
  border-radius: 0;
  background: transparent;
}

body.owner-shell-v1:not(.auth-required) .finance-chart-kpis > div:last-child {
  border-right: 0;
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-trends-shell,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel,
  .finance-quick-context,
  [data-tab-panel="finance-ledger"],
  [data-tab-panel="finance-budget"]
) {
  background: linear-gradient(112deg, color-mix(in srgb, var(--finance-r9-surface) 96%, transparent), var(--finance-r9-surface));
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .finance-grid :is(.row.muted-row, .empty-state, .finance-ledger-inspector__empty) {
  color: #9bb7b2;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .finance-grid :is(.row.muted-row, .empty-state, .finance-ledger-inspector__empty) small {
  color: #8ca9a5;
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) :is(
    .finance-chart-overview-panel,
    .finance-budget-visual-panel,
    .finance-chart-reading-panel,
    [data-tab-panel="finance-ledger"],
    [data-tab-panel="finance-budget"]
  ) > .command-console-head {
    margin: -11px -10px 10px;
    padding: 12px 10px 11px 14px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-panel > h3 {
    margin: -16px -16px 0;
    padding: 12px 10px 11px 14px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-chart-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1:not(.auth-required) .finance-chart-kpis > div:nth-child(2n) {
    border-right: 0;
  }

  body.owner-shell-v1:not(.auth-required) .finance-chart-kpis > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--cc-line);
  }
}

/* R9.4 calendar instrument: richer date states, measured ornament and a stable detail rail. */
body.owner-shell-v1:not(.auth-required) .finance-calendar-panel:not(.tab-panel-hidden) {
  position: relative;
  isolation: isolate;
  border-color: color-mix(in srgb, var(--cc-line-strong) 92%, transparent);
  background: var(--finance-r9-surface);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-panel:not(.tab-panel-hidden)::after {
  content: "";
  display: block;
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: 76px;
  height: 52px;
  background: none;
  clip-path: polygon(38% 0, 100% 0, 100% 100%);
  opacity: .44;
  pointer-events: none;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-panel:not(.tab-panel-hidden) > * {
  position: relative;
  z-index: 1;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-toolbar {
  grid-template-columns: 44px minmax(190px, 1fr) auto 44px;
  gap: 8px;
  align-items: center;
  padding: 11px 13px 9px;
  border-bottom-color: color-mix(in srgb, var(--cc-line-strong) 72%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--finance-r9-surface-soft) 90%, white 4%), var(--finance-r9-surface-soft));
  box-shadow: inset 0 1px rgb(255 255 255 / 28%);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-toolbar .finance-month-nav {
  width: 44px;
  min-width: 44px;
  min-height: 40px;
  padding: 0;
  border-radius: 2px;
  border-color: color-mix(in srgb, var(--finance-r9-control-edge) 94%, transparent);
  background: color-mix(in srgb, var(--finance-r9-control-bg) 76%, transparent);
  color: var(--cc-ink-soft);
  font-size: 18px;
  box-shadow: inset 0 1px rgb(255 255 255 / 18%);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-toolbar .finance-month-nav:hover,
body.owner-shell-v1:not(.auth-required) .finance-calendar-toolbar .finance-month-nav:focus-visible {
  border-color: var(--finance-r9-blue);
  background: var(--finance-r9-blue-soft);
  color: var(--finance-r9-blue);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-month-field {
  grid-template-columns: auto minmax(156px, 230px);
  gap: 9px;
  font-size: 11px;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-month-field input {
  width: 100%;
  min-width: 156px;
  border-left: 3px solid var(--finance-r9-copper);
  border-radius: 2px;
  font-weight: 800;
}

body.owner-shell-v1:not(.auth-required) #moduleStage #financeCalendarMonthApply {
  min-height: 40px;
  padding-inline: 17px;
  border-radius: 2px;
  border-color: color-mix(in srgb, var(--finance-r9-action-start) 78%, white);
  background: linear-gradient(135deg, var(--finance-r9-action-start), var(--finance-r9-action-end));
  color: var(--finance-r9-action-ink);
  box-shadow: inset 0 1px rgb(255 255 255 / 20%), 0 7px 16px rgb(18 77 79 / 18%);
  font-weight: 800;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-range {
  grid-column: 1 / -1;
  padding: 1px 0 0 52px;
  color: var(--cc-ink-faint);
  font-size: 10px;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-scroll .finance-calendar-v2 {
  padding: 10px 12px 12px;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-scrollgrid {
  overflow: hidden;
  border-color: color-mix(in srgb, var(--cc-line-strong) 92%, transparent);
  border-radius: 3px;
  background: color-mix(in srgb, var(--finance-r9-surface) 78%, transparent);
  box-shadow: inset 0 1px rgb(255 255 255 / 22%);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-col-header-cell {
  border-color: rgb(222 239 233 / 13%);
  background: linear-gradient(112deg, color-mix(in srgb, var(--finance-r9-command) 96%, transparent), var(--finance-r9-command-end));
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-col-header-cell-cushion {
  padding: 9px 7px;
  color: rgb(239 248 243 / 88%);
  font-size: 11px;
  font-weight: 800;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc :is(.fc-day-sat, .fc-day-sun) .fc-daygrid-day-frame {
  background:
    linear-gradient(112deg, color-mix(in srgb, var(--finance-r9-copper-soft) 28%, transparent), transparent 54%),
    color-mix(in srgb, var(--finance-r9-surface) 84%, transparent);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day-frame {
  min-height: 84px;
  background:
    linear-gradient(112deg, rgb(255 255 255 / 6%), transparent 48%),
    color-mix(in srgb, var(--finance-r9-surface) 84%, transparent);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day:hover .fc-daygrid-day-frame {
  background:
    linear-gradient(112deg, color-mix(in srgb, var(--finance-r9-blue-soft) 52%, transparent), transparent 72%),
    var(--finance-r9-surface-soft);
  box-shadow: inset 3px 0 var(--finance-r9-blue);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day-number {
  display: inline-grid;
  min-width: 26px;
  height: 26px;
  margin: 4px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--cc-ink-soft);
  font-size: 11px;
  line-height: 1;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-day-today {
  background: color-mix(in srgb, var(--finance-r9-green-soft) 48%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--finance-r9-green) 36%, transparent);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-day-today .fc-daygrid-day-number {
  border-color: var(--finance-r9-green);
  background: var(--finance-r9-green);
  color: #ffffff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--finance-r9-green) 16%, transparent);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-day-other {
  opacity: .42;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .finance-calendar-event {
  margin: 2px 4px;
  border-left: 3px solid currentColor;
  border-radius: 2px;
  padding: 3px 5px;
  box-shadow: inset 0 1px rgb(255 255 255 / 12%);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .finance-calendar-event.is-expense {
  background: linear-gradient(90deg, color-mix(in srgb, var(--finance-r9-coral-soft) 94%, transparent), color-mix(in srgb, var(--finance-r9-coral-soft) 58%, transparent));
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .finance-calendar-event.is-income {
  background: linear-gradient(90deg, color-mix(in srgb, var(--finance-r9-green-soft) 94%, transparent), color-mix(in srgb, var(--finance-r9-green-soft) 58%, transparent));
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel:not(.tab-panel-hidden) {
  overflow: hidden;
  min-width: 0;
  container-name: finance-calendar-detail;
  container-type: inline-size;
  background:
    linear-gradient(112deg, rgb(255 255 255 / 8%), transparent 48%),
    var(--finance-r9-surface);
}

/* The day's ledger is a distinct card with one predictable scroll rail. */
body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-records {
  display: flex;
  width: 100%;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--cc-line-strong) 82%, transparent);
  border-top: 3px solid var(--finance-r9-copper);
  border-radius: 4px;
  background: color-mix(in srgb, var(--finance-r9-surface-soft) 78%, transparent);
  box-shadow: inset 0 1px rgb(255 255 255 / 18%);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-records-panel:not(.tab-panel-hidden) {
  align-self: start;
  margin-top: 0;
  overflow: hidden;
  padding: 14px;
  border-top: 3px solid var(--finance-r9-copper);
  background:
    linear-gradient(112deg, rgb(255 255 255 / 8%), transparent 48%),
    var(--finance-r9-surface);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-records-panel:not(.tab-panel-hidden) .finance-calendar-detail-records__list {
  flex: 1 1 auto;
  overflow-y: scroll !important;
  overflow-x: hidden !important;
}

/* The shared art frame marks nested lists as clipped; the ledger card owns its scroll rail. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .finance-calendar-detail-records-panel:not(.tab-panel-hidden) > .finance-calendar-detail-records__list[data-art-frame-owner="true"][data-art-tier="nested"] {
  overflow-y: scroll !important;
  overflow-x: hidden !important;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-records__head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px 8px;
  border-bottom: 1px solid var(--cc-line);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-records__head h3 {
  margin: 2px 0 0;
  color: var(--cc-ink);
  font-size: 14px;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-records__list {
  min-height: 0;
  max-height: clamp(240px, 42vh, 560px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 4px;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel:not(.tab-panel-hidden) :is(div, form, header, label, span, strong, small, p, button) {
  min-width: 0;
  writing-mode: horizontal-tb;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .stacked-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--cc-line-strong) 82%, transparent);
  border-radius: 3px;
  background: var(--finance-r9-surface-soft);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .stacked-kpis .kpi {
  min-height: 76px;
  border: 0;
  border-top: 3px solid var(--finance-r9-coral);
  border-right: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .stacked-kpis .kpi:last-child {
  border-top-color: var(--finance-r9-green);
  border-right: 0;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-editor {
  width: 100%;
  margin: 12px 0;
  padding: 12px;
  border-color: color-mix(in srgb, var(--cc-line-strong) 82%, transparent);
  border-left: 3px solid var(--finance-r9-copper);
  border-radius: 3px;
  background: color-mix(in srgb, var(--finance-r9-surface-soft) 86%, transparent);
  box-shadow: inset 0 1px rgb(255 255 255 / 20%);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-editor header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--cc-line);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-editor header > div > small,
body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-editor__status:not([data-kind]) {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-editor header .hud-button {
  width: auto;
  min-height: 38px;
  padding-inline: 12px;
  border-radius: 2px;
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-entry-row {
  width: 100%;
  margin-top: 1px;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-editor__status[data-kind] {
  margin: 0;
  padding: 8px 9px;
  border-left: 3px solid var(--finance-r9-blue);
  background: color-mix(in srgb, var(--finance-r9-blue-soft) 46%, transparent);
  font-size: 10px;
}

@media (min-width: 1181px) and (max-width: 1380px) {
  body.owner-shell-v1:not(.auth-required) .finance-calendar-panel:not(.tab-panel-hidden) {
    grid-column: span 7;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel:not(.tab-panel-hidden) {
    grid-column: span 5;
  }
}

@media (min-width: 761px) and (max-width: 1380px) {
  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel:not(.tab-panel-hidden) {
    display: block;
    grid-template-columns: none;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel:not(.tab-panel-hidden) > :is(.command-console-head, .kpis, .finance-day-editor, .finance-day-list) {
    width: 100%;
    grid-column: auto;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-entry-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container finance-calendar-detail (max-width: 460px) {
  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-editor header,
  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-entry-row {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-editor header .hud-button {
    width: 100%;
    white-space: normal;
  }
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) .finance-calendar-toolbar {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    padding: 9px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-toolbar .finance-month-nav {
    width: 40px;
    min-width: 40px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-month-field {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage #financeCalendarMonthApply {
    grid-column: 1 / -1;
    width: 100%;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-range {
    padding-left: 0;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-scroll .finance-calendar-v2 {
    padding: 8px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day-frame {
    min-height: 60px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-col-header-cell-cushion {
    padding: 7px 2px;
    font-size: 10px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day-number {
    min-width: 23px;
    height: 23px;
    margin: 2px;
    font-size: 10px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-editor header,
  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-entry-row {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-editor header .hud-button {
    width: 100%;
  }
}

/* R10 finance ornaments: varied curved motifs without obscuring ledger data. */
body.owner-shell-v1:not(.auth-required) :is(
  .finance-overview-kpis,
  .asset-workbench-v2 .asset-balance-kpis,
  .finance-chart-kpis
) {
  background-image:
    radial-gradient(ellipse 118px 56px at 100% 0, transparent 69%, var(--r96-gold-line) 70% 71%, transparent 72%),
    radial-gradient(ellipse 76px 114px at 100% 0, transparent 69%, var(--r96-gold-line-soft) 70% 71%, transparent 72%),
    radial-gradient(ellipse 76px 36px at 0 100%, transparent 69%, var(--r96-gold-line-soft) 70% 71%, transparent 72%),
    radial-gradient(circle at calc(100% - 44px) 34px, var(--r96-gold-point) 0 2px, transparent 3px),
    linear-gradient(112deg, rgb(255 255 255 / 8%), transparent 62%);
  background-repeat: no-repeat;
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-overview-summary,
  .finance-chart-overview-panel,
  .finance-calendar-panel,
  .asset-workbench-v2
) {
  background-image:
    radial-gradient(circle at 92% 13%, transparent 0 34px, var(--r96-gold-line) 35px 36px, transparent 37px 45px, var(--r96-gold-line-soft) 46px 47px, transparent 48px),
    radial-gradient(ellipse 62px 30px at 92% 13%, transparent 66%, var(--r96-gold-line-soft) 67% 68%, transparent 69%),
    radial-gradient(ellipse 30px 60px at 92% 13%, transparent 66%, var(--r96-gold-line-soft) 67% 68%, transparent 69%),
    radial-gradient(circle at 92% 13%, var(--r96-gold-point) 0 2px, transparent 3px),
    linear-gradient(118deg, rgb(255 255 255 / 6%), transparent 58%);
  background-repeat: no-repeat;
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets,
  .finance-calendar-detail-panel,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel
) {
  background-image:
    radial-gradient(ellipse 8px 17px at 100% 50%, transparent 61%, var(--r96-gold-line-soft) 63% 67%, transparent 69%),
    linear-gradient(112deg, rgb(255 255 255 / 5%), transparent 58%);
  background-position: right top, 0 0;
  background-repeat: repeat-y, no-repeat;
  background-size: 13px 36px, auto;
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-overview-primary-actions,
  .finance-overview-range-control,
  .asset-workbench-v2 .asset-task-switcher,
  .asset-workbench-v2 .asset-view-tabs,
  .finance-chart-range-actions
) {
  background-image:
    radial-gradient(ellipse 16px 7px at 50% 100%, transparent 62%, var(--r96-gold-line) 64% 67%, transparent 69%),
    linear-gradient(180deg, rgb(255 255 255 / 5%), transparent 62%);
  background-position: left bottom, 0 0;
  background-repeat: repeat-x, no-repeat;
  background-size: 34px 12px, auto;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-panel > h3,
body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel > .command-console-head {
  background-image:
    radial-gradient(ellipse 98px 44px at 100% 0, transparent 68%, var(--r96-gold-line) 69% 70%, transparent 71%),
    radial-gradient(ellipse 58px 94px at 100% 0, transparent 68%, var(--r96-gold-line-soft) 69% 70%, transparent 71%),
    linear-gradient(112deg, rgb(15 57 59 / 97%), rgb(25 76 76 / 92%));
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) :is(
  .finance-overview-summary,
  .finance-chart-overview-panel,
  .finance-calendar-panel,
  .asset-workbench-v2,
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets,
  .finance-calendar-detail-panel,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel
) {
  background-color: rgb(5 25 32 / 68%);
}

@media (max-width: 640px) {
  body.owner-shell-v1:not(.auth-required) :is(
    .finance-overview-summary,
    .finance-chart-overview-panel,
    .finance-calendar-panel,
    .asset-workbench-v2
  ) {
    background-position: 135% -20px, 135% -20px, 135% -20px, 135% -20px, 0 0;
  }

  body.owner-shell-v1:not(.auth-required) :is(
    .finance-overview-ledger,
    .finance-overview-hot-days,
    .finance-overview-anomalies,
    .finance-overview-assets,
    .finance-calendar-detail-panel,
    .finance-budget-visual-panel,
    .finance-chart-reading-panel
  ) {
    background-size: 10px 30px, auto;
  }
}

/* R10.1 finance filigree: fan, braided arc and double-corner motifs by workflow. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(.finance-overview-kpis, .asset-workbench-v2 .asset-balance-kpis, .finance-chart-kpis) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-image:
    conic-gradient(from 184deg at 0 100%, transparent 0 8deg, var(--r101-gold-soft) 8deg 10deg, transparent 10deg 20deg, var(--r101-gold-mid) 20deg 22deg, transparent 22deg 34deg, var(--r101-gold-soft) 34deg 36deg, transparent 36deg 50deg, var(--r101-gold-mid) 50deg 52deg, transparent 52deg 68deg),
    radial-gradient(ellipse 118px 56px at 100% 0, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 76px 114px at 100% 0, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(circle at calc(100% - 44px) 34px, var(--r101-gold-strong) 0 2px, transparent 3px),
    linear-gradient(112deg, rgb(255 255 255 / 8%), transparent 62%);
  background-position: left bottom, center, center, center, 0 0;
  background-repeat: no-repeat;
  background-size: 128px 78px, auto, auto, auto, auto;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.finance-overview-kpis, .asset-workbench-v2 .asset-balance-kpis, .finance-chart-kpis) > * {
  position: relative;
  z-index: 1;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-summary,
  .finance-chart-overview-panel,
  .asset-workbench-v2
) {
  background-image:
    radial-gradient(circle at 91% 14%, transparent 0 34px, var(--r101-gold-mid) 35px 36px, transparent 37px 45px, var(--r101-gold-soft) 46px 47px, transparent 48px),
    radial-gradient(ellipse 66px 31px at 91% 14%, transparent 66%, var(--r101-gold-soft) 67% 68%, transparent 69%),
    radial-gradient(ellipse 31px 64px at 91% 14%, transparent 66%, var(--r101-gold-soft) 67% 68%, transparent 69%),
    radial-gradient(ellipse 116px 54px at 0 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 72px 110px at 0 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(circle at 91% 14%, var(--r101-gold-strong) 0 2px, transparent 3px),
    linear-gradient(118deg, rgb(255 255 255 / 7%), transparent 58%) !important;
  background-repeat: no-repeat;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets,
  .finance-calendar-detail-panel,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel
) {
  background-image:
    radial-gradient(ellipse 112px 52px at 100% 0, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 70px 108px at 100% 0, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(ellipse 94px 44px at 0 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 56px 90px at 0 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(circle at calc(100% - 40px) 31px, var(--r101-gold-strong) 0 1.5px, transparent 2.5px),
    linear-gradient(112deg, rgb(255 255 255 / 5%), transparent 58%) !important;
  background-position: center;
  background-repeat: no-repeat;
  background-size: auto;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-primary-actions,
  .finance-overview-range-control,
  .asset-workbench-v2 .asset-task-switcher,
  .asset-workbench-v2 .asset-view-tabs,
  .finance-chart-range-actions
) {
  background-image:
    conic-gradient(from 183deg at 0 100%, transparent 0 8deg, var(--r101-gold-soft) 8deg 10deg, transparent 10deg 20deg, var(--r101-gold-mid) 20deg 22deg, transparent 22deg 34deg, var(--r101-gold-soft) 34deg 36deg, transparent 36deg 50deg, var(--r101-gold-mid) 50deg 52deg, transparent 52deg 66deg),
    radial-gradient(ellipse 98px 46px at 100% 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 60px 94px at 100% 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(circle at calc(100% - 24px) 50%, transparent 0 9px, var(--r101-gold-mid) 10px 11px, transparent 12px 16px, var(--r101-gold-soft) 17px 18px, transparent 19px),
    linear-gradient(180deg, rgb(255 255 255 / 5%), transparent 62%);
  background-position: left bottom, right bottom, right bottom, right center, 0 0;
  background-repeat: no-repeat;
  background-size: 116px 70px, auto, auto, auto, auto;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-calendar-v2.fc {
  background-image:
    radial-gradient(ellipse 132px 62px at 100% 0, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 82px 126px at 100% 0, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(ellipse 112px 52px at 0 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 68px 106px at 0 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%);
  background-repeat: no-repeat;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-calendar-panel > h3,
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-calendar-detail-panel > .command-console-head {
  background-image:
    radial-gradient(ellipse 104px 48px at 100% 0, transparent 68%, var(--r101-gold-mid) 69% 70%, transparent 71%),
    radial-gradient(ellipse 62px 100px at 100% 0, transparent 68%, var(--r101-gold-soft) 69% 70%, transparent 71%),
    radial-gradient(circle at 18px 50%, transparent 0 8px, var(--r101-gold-soft) 9px 10px, transparent 11px 15px, var(--r101-gold-soft) 16px 17px, transparent 18px),
    linear-gradient(112deg, rgb(15 57 59 / 97%), rgb(25 76 76 / 92%));
  background-repeat: no-repeat;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .finance-calendar-panel > h3,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .finance-calendar-detail-panel > .command-console-head {
  background-image:
    radial-gradient(ellipse 104px 48px at 100% 0, transparent 68%, var(--r101-gold-mid) 69% 70%, transparent 71%),
    radial-gradient(ellipse 62px 100px at 100% 0, transparent 68%, var(--r101-gold-soft) 69% 70%, transparent 71%),
    radial-gradient(circle at 18px 50%, transparent 0 8px, var(--r101-gold-soft) 9px 10px, transparent 11px 15px, var(--r101-gold-soft) 16px 17px, transparent 18px),
    linear-gradient(112deg, rgb(5 27 34 / 94%), rgb(15 61 65 / 86%));
}

@media (max-width: 640px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage :is(.finance-overview-kpis, .asset-workbench-v2 .asset-balance-kpis, .finance-chart-kpis) {
    background-position: -30px 110%, 145% -22px, 145% -22px, 145% -22px, 0 0;
    background-size: 100px 62px, auto, auto, auto, auto;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .finance-overview-summary,
    .finance-chart-overview-panel,
    .asset-workbench-v2
  ) {
    background-position: 138% -18px, 138% -18px, 138% -18px, -54px 112%, -54px 112%, 138% -18px, 0 0;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .finance-overview-ledger,
    .finance-overview-hot-days,
    .finance-overview-anomalies,
    .finance-overview-assets,
    .finance-calendar-detail-panel,
    .finance-budget-visual-panel,
    .finance-chart-reading-panel
  ) {
    background-position: 142% -18px, 142% -18px, -52px 112%, -52px 112%, 142% -18px, 0 0;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .finance-overview-primary-actions,
    .finance-overview-range-control,
    .asset-workbench-v2 .asset-task-switcher,
    .asset-workbench-v2 .asset-view-tabs,
    .finance-chart-range-actions
  ) {
    background-size: 88px 54px, auto, auto, auto, auto;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .finance-calendar-v2.fc {
    background-position: 145% -20px, 145% -20px, -62px 112%, -62px 112%;
  }
}

body.owner-shell-v1:not(.auth-required) .finance-category-manager-panel {
  border-top: 3px solid var(--finance-r9-green);
}

body.owner-shell-v1:not(.auth-required) .finance-category-manager-panel > .command-console-head {
  margin: -14px -16px 0;
  padding: 13px 16px 12px;
  border-bottom: 1px solid var(--cc-line);
  background: linear-gradient(90deg, var(--finance-r9-green-soft), transparent 48%);
}

body.owner-shell-v1:not(.auth-required) .finance-category-manager-panel :is(input, select) {
  border-color: var(--finance-r9-control-edge);
  background: var(--finance-r9-control-bg);
}

body.owner-shell-v1:not(.auth-required) .finance-category-manager-panel :is(input, select):focus {
  border-color: var(--finance-r9-green);
  box-shadow: 0 0 0 3px var(--finance-r9-control-focus);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .finance-category-manager-panel {
  background: color-mix(in srgb, var(--finance-r9-surface) 90%, transparent);
}

@media (max-width: 640px) {
  body.owner-shell-v1:not(.auth-required) .finance-category-manager-panel > .command-console-head {
    align-items: flex-start;
  }
}

/* R10.2 keeps the filter workflow clean while framing it with two distinct motifs. */
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-overview-filter-bar {
  background-image:
    conic-gradient(from 184deg at 0 100%, transparent 0 9deg, var(--r101-gold-soft) 9deg 11deg, transparent 11deg 24deg, var(--r101-gold-mid) 24deg 26deg, transparent 26deg 41deg, var(--r101-gold-soft) 41deg 43deg, transparent 43deg 58deg),
    radial-gradient(circle at calc(100% - 28px) 26px, transparent 0 11px, var(--r101-gold-mid) 12px 13px, transparent 14px 19px, var(--r101-gold-soft) 20px 21px, transparent 22px),
    radial-gradient(circle at calc(100% - 28px) 26px, var(--r101-gold-strong) 0 1.5px, transparent 2.5px),
    radial-gradient(ellipse 106px 50px at 100% 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 66px 102px at 100% 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    linear-gradient(112deg, rgb(255 255 255 / 5%), transparent 58%);
  background-position: left bottom, right top, right top, center, center, 0 0;
  background-repeat: no-repeat;
  background-size: 112px 68px, auto, auto, auto, auto, auto;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .finance-overview-filter-bar {
  background-color: rgb(5 25 32 / 68%);
}

@media (max-width: 640px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .finance-overview-filter-bar {
    background-position: -38px 112%, 132% -8px, 132% -8px, 140% 116%, 140% 116%, 0 0;
    background-size: 88px 54px, auto, auto, auto, auto, auto;
  }
}

/* R10.4: narrow cards keep their content inside the real card boundary. */
/* The base panel uses two-axis auto scrolling. In these overview cards the
 * vertical scrollbar gutter otherwise creates a false 16px horizontal track. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-summary,
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets
) {
  overflow-x: hidden;
  overflow-y: auto;
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .finance-overview-summary > .command-console-head,
  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .finance-overview-ledger,
    .finance-overview-hot-days,
    .finance-overview-anomalies,
    .finance-overview-assets
  ) > .command-console-head {
    margin-inline: 0;
  }
}

/* R10.5 amount legibility: reserve a real numeric column in every finance composition bar. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-grid,
  [data-overview-canvas-widget="finance"]
) .bar-row {
  grid-template-columns: minmax(72px, 112px) minmax(72px, 1fr) minmax(96px, max-content);
  gap: 12px;
  min-width: 0;
  padding: 7px 10px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-grid,
  [data-overview-canvas-widget="finance"]
) .bar-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--cc-ink-soft, #536a67);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-grid,
  [data-overview-canvas-widget="finance"]
) .bar-row > .bar-track {
  min-width: 0;
  border-color: color-mix(in srgb, var(--cc-accent, #2f7774) 24%, var(--cc-line, #d7dfdb));
  background: color-mix(in srgb, var(--cc-accent, #2f7774) 8%, var(--cc-surface-muted, #edf2ef));
  box-shadow: inset 0 1px 2px rgb(14 44 43 / 8%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-grid,
  [data-overview-canvas-widget="finance"]
) .bar-row > strong {
  min-width: 96px;
  padding-left: 10px;
  border-left: 1px solid color-mix(in srgb, var(--cc-line-strong, #bdcbc5) 78%, transparent);
  color: var(--cc-ink, #173c3e) !important;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-grid,
  [data-overview-canvas-widget="finance"]
) .bar-row > strong {
  border-left-color: rgb(137 187 181 / 24%);
  color: #eef8f5 !important;
}

@media (max-width: 640px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .finance-grid,
    [data-overview-canvas-widget="finance"]
  ) .bar-row {
    grid-template-columns: minmax(62px, .8fr) minmax(64px, 1.25fr) minmax(82px, max-content);
    gap: 7px;
    padding: 7px 8px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .finance-grid,
    [data-overview-canvas-widget="finance"]
  ) .bar-row > strong {
    min-width: 82px;
    padding-left: 7px;
    font-size: 12px;
  }
}

/* R10.7 responsive truth: one page scroll, readable history, and deliberate danger states. */
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 :is(
  .asset-history-panel,
  .asset-history-filter,
  .asset-history-summary > div,
  .asset-history-comparison,
  .asset-history-detail,
  .asset-history-list,
  .asset-history-row
) {
  border-color: rgb(126 196 189 / 22%);
  background: rgb(5 25 32 / 72%);
  color: #eaf5f1;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 :is(
  .asset-history-summary span,
  .asset-history-comparison span,
  .asset-history-comparison small,
  .asset-history-detail-head span,
  .asset-history-row small
) {
  color: #9db9b4;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 :is(
  .asset-history-summary strong,
  .asset-history-comparison strong,
  .asset-history-detail-head strong,
  .asset-history-row strong,
  .asset-history-row b
) {
  color: #eef8f5;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 :is(
  .asset-history-row:hover,
  .asset-history-row.active,
  .asset-history-row[data-asset-history-active="true"]
) {
  border-color: rgb(121 201 189 / 42%);
  background: rgb(17 58 62 / 82%);
  box-shadow: inset 3px 0 0 var(--r9-brass, #b48645);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-void-confirmation [data-finance-void-phrase-input] {
  border-color: color-mix(in srgb, var(--cc-danger, #c96558) 58%, var(--cc-line-strong));
  border-bottom-color: var(--cc-danger, #c96558);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-void-confirmation [data-finance-void-phrase-input]:focus {
  border-color: var(--cc-danger, #c96558);
  box-shadow: inset 0 -2px var(--cc-danger, #c96558), 0 0 0 3px rgb(201 101 88 / 16%);
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 :is(
    .asset-history-list,
    .asset-view-panel-v2 .asset-detail-list
  ) {
    max-height: none;
    overflow: visible;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .finance-ledger-v2__actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .finance-ledger-v2__action {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 11px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .finance-cashflow-column > small,
    .finance-net-labels,
    .finance-category-trend-labels
  ) {
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
  }
}

/* Final specificity layer for the selected date and narrow inspector. */
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc :is(
  .fc-daygrid-day[aria-selected="true"],
  .fc-daygrid-day[data-selected="true"],
  .fc-daygrid-day.is-selected,
  .fc-daygrid-day.selected
) .fc-daygrid-day-frame {
  background: color-mix(in srgb, var(--finance-r9-blue-soft) 76%, var(--finance-r9-surface) 24%) !important;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--finance-r9-blue) 82%, transparent) !important;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc :is(
  .fc-daygrid-day[aria-selected="true"],
  .fc-daygrid-day[data-selected="true"],
  .fc-daygrid-day.is-selected,
  .fc-daygrid-day.selected
) .fc-daygrid-day-number {
  border-color: var(--finance-r9-blue) !important;
  background: var(--finance-r9-blue) !important;
  color: #ffffff !important;
  font-weight: 900;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2-fallback button[data-selected="true"] {
  border: 2px solid var(--finance-r9-blue);
  background: var(--finance-r9-blue);
  color: #ffffff;
  box-shadow: 0 0 0 3px var(--finance-r9-control-focus);
  font-weight: 900;
}

html:not([data-theme="night"]) body.owner-shell-v1:not(.auth-required) :is(
  .finance-month-picker input[type="month"],
  .finance-calendar-month-field input
) {
  color-scheme: light !important;
}

body.owner-shell-v1:not(.auth-required) .finance-ledger-inspector__edit .finance-entry-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

body.owner-shell-v1:not(.auth-required) .finance-ledger-inspector__edit .command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.owner-shell-v1:not(.auth-required) .finance-ledger-inspector__edit .command-actions .hud-button {
  flex: 1 1 112px;
  min-width: 112px;
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) .finance-ledger-inspector__footer {
  width: 100%;
  min-width: 0;
}

body.owner-shell-v1:not(.auth-required) .finance-ledger-inspector__footer .finance-ledger-v2__actions {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
}

body.owner-shell-v1:not(.auth-required) .finance-ledger-inspector__footer .finance-ledger-v2__action {
  flex: 1 1 88px;
  min-width: 88px;
  min-height: 36px;
  padding: 6px 10px;
  white-space: nowrap;
}

/* Single-editor balance sheet: keep the editable form readable beside history. */
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-body-grid-v2 {
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .9fr) !important;
  align-items: start;
  gap: 16px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-panel-v2 {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-entry-reference-panel {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

/* Long-history reference card: show more periods without stretching the page. */
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-card[data-asset-reference-history="true"] {
  min-height: 300px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-history-list {
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--finance-r9-copper, #b48645) rgb(41 89 82 / 10%);
  padding-right: 4px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-history-list::-webkit-scrollbar {
  width: 8px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-history-list::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: var(--finance-r9-copper, #b48645);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-history-list::-webkit-scrollbar-track {
  border-radius: 8px;
  background: rgb(41 89 82 / 10%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-row small b {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-asset-amount {
  color: #16735d;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-liability-amount {
  color: #b0473e;
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-card[data-asset-reference-history="true"] {
    min-height: 0;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-history-list {
    max-height: 280px;
  }
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-view-panel-v2 {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
  gap: 16px;
  align-items: end;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head h4 {
  max-width: none;
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-human-ledger {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-body-grid-v2 {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] :is(.asset-capture-panel-v2, .asset-entry-reference-panel, .asset-view-panel-v2) {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head h4 {
    white-space: normal;
  }
}

/* Keep comparison metadata out of the editing flow. */
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-draft-delta,
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] [data-asset-draft-delta],
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-human-ledger,
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-save-preview {
  display: none !important;
}
