/* 450 Ledger R42.3.3 · desktop visual QA cleanup
   Scope: observed desktop Ledger presentation defects only. R42.1 card geometry remains unchanged.
*/

/* Keep the primary header action intact at desktop widths. */
.ledger-new{
  white-space:nowrap;
  flex-shrink:0;
}

/*
  The page header is editorial content, not a dashboard tile.
  Keep it directly on the Ledger canvas in every appearance mode.
*/
:root[data-genesis-appearance] body.ledger-page main.ledger-admin-main > header.ledger-admin-header{
  background:transparent!important;
  background-image:none!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}

/*
  Cards should sit directly on the Ledger canvas.
  Use appearance-aware specificity so the shared Light/Dark/Custom surface rules
  cannot repaint the pane as a large rounded tray behind the cards.
*/
:root[data-genesis-appearance] body.ledger-page .ledger-table-pane.cards-mode{
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  overflow:visible!important;
}

/* R42.2 follow-up: target the selectors that actually render Card title/routing text. */
:root[data-genesis-appearance="custom"] body.ledger-page #ledgerTable[data-view="cards"] .ledger-record-name strong{
  color:var(--ledger-card-text,#241b36)!important;
  opacity:1!important;
}
:root[data-genesis-appearance="custom"] body.ledger-page #ledgerTable[data-view="cards"] .ledger-record-name small{
  color:#554968!important;
  opacity:1!important;
  font-weight:600!important;
}
:root[data-genesis-appearance="custom"] body.ledger-page #ledgerTable[data-view="cards"] .ledger-record-id,
:root[data-genesis-appearance="custom"] body.ledger-page #ledgerTable[data-view="cards"] .ledger-cell{
  color:var(--ledger-card-text,#241b36)!important;
}
:root[data-genesis-appearance="custom"] body.ledger-page #ledgerTable[data-view="cards"] .ledger-cell::before{
  color:#5c506e!important;
  font-weight:850!important;
}

/* Preserve the intentional status-pill treatment from R42.2, with a stronger label. */
:root[data-genesis-appearance="custom"] body.ledger-page #ledgerTable[data-view="cards"] .ledger-status{
  color:#fff!important;
  font-weight:650!important;
}

/* R42.3.3: strengthen the editorial hierarchy on the Custom canvas. */
:root[data-genesis-appearance="custom"] body.ledger-page .ledger-eyebrow{
  color:#e8e9f4!important;
  opacity:1!important;
}
:root[data-genesis-appearance="custom"] body.ledger-page .ledger-admin-header p:last-child{
  color:#e2e3ef!important;
  opacity:1!important;
}
:root[data-genesis-appearance="custom"] body.ledger-page .ledger-search-wrap{
  color:#e7e8f3!important;
  opacity:1!important;
  font-weight:650!important;
}
:root[data-genesis-appearance="custom"] body.ledger-page .ledger-search-wrap input::placeholder{
  color:rgba(247,249,251,.74)!important;
  opacity:1!important;
}

/* Slightly separate the primary action from the lavender canvas. */
:root[data-genesis-appearance="custom"] body.ledger-page .ledger-new{
  background:color-mix(in srgb,var(--genesis-theme-accent) 76%,#302b49 24%)!important;
  border-color:color-mix(in srgb,var(--genesis-theme-accent) 68%,#29243f 32%)!important;
  color:#fff!important;
  font-weight:800!important;
}

/* Keep the toolbar grouped, but quieter than content. */
:root[data-genesis-appearance="custom"] body.ledger-page .ledger-toolbar{
  background:color-mix(in srgb,var(--genesis-theme-surface-2) 68%,transparent)!important;
  border-color:color-mix(in srgb,var(--genesis-theme-border) 46%,transparent)!important;
}

/* Sidebar support text should be readable without competing with navigation. */
body.ledger-page .ledger-brand small{
  color:#c8c8ce!important;
}
body.ledger-page .ledger-sidebar-group p{
  color:#c4c4ca!important;
  opacity:1!important;
}

/* Tighten the title-to-toolbar handoff without changing structure. */
@media(min-width:1101px){
  body.ledger-page .ledger-admin-header{
    padding-bottom:16px!important;
  }
}

@media(max-width:620px){
  .ledger-new{white-space:normal}
}
