/* Q40: keep everyday entry and history visible. Presentation only. */
@media screen {
  .ledger-shell #app > .metric-grid,
  .ledger-shell .direct-home-stats .metric-grid {
    display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;
    border:1px solid #d6dce2;margin:10px 0;background:#f8fafb;
  }
  .ledger-shell #app > .metric-grid .metric-card,
  .ledger-shell .direct-home-stats .metric-card {
    display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 10px;
    min-height:0;padding:8px 12px;border:0;border-right:1px solid #d6dce2;
    margin:0;border-radius:0;background:transparent;align-content:start;
  }
  .ledger-shell #app > .metric-grid .metric-card:last-child,
  .ledger-shell .direct-home-stats .metric-card:last-child {border-right:0;}
  .ledger-shell #app > .metric-grid .metric-card > strong,
  .ledger-shell .direct-home-stats .metric-card > strong {
    font-size:18px;line-height:1.45;margin:0;font-variant-numeric:tabular-nums;
    overflow-wrap:anywhere;
  }
  .ledger-shell #app > .metric-grid .metric-card > :is(span,small,p),
  .ledger-shell .direct-home-stats .metric-card > :is(span,small,p) {
    font-size:14px;line-height:1.5;margin:0;min-width:0;
  }
  .ledger-shell #app > .metric-grid .metric-card > :is(small,p),
  .ledger-shell .direct-home-stats .metric-card > :is(small,p) {grid-column:1/-1;}
  #app.sheet-page #sheetHistorySection {
    margin-top:18px;padding-top:8px;border-top:2px solid #d6dce2;
    scroll-margin-top:12px;
  }
  .ledger-shell :is(#masterForm,#foundationForm,#uomForm) {
    gap:10px 14px;align-items:start;
  }
  .ledger-shell :is(#masterForm,#foundationForm,#uomForm) > label {
    gap:5px;min-width:0;font-size:15px;align-content:start;
  }
  .ledger-shell :is(#masterForm,#foundationForm,#uomForm) :is(input,select) {
    min-height:38px;font-size:16px;padding:7px 9px;border-radius:2px;
  }
  .ledger-shell :is(#masterForm,#foundationForm,#uomForm) textarea {
    min-height:72px;font-size:16px;padding:7px 9px;border-radius:2px;
  }
  .ledger-shell .direct-legacy-fields > h3 {font-size:17px;margin:10px 0;}
  @media(max-width:1000px) {
    .ledger-shell #app > .metric-grid,
    .ledger-shell .direct-home-stats .metric-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
  }
  @media(max-width:760px) {
    .ledger-shell :is(#masterForm,#foundationForm,#uomForm) :is(input,select) {min-height:44px;}
    .ledger-shell #app > .metric-grid .metric-card,
    .ledger-shell .direct-home-stats .metric-card {grid-template-columns:minmax(0,1fr);padding:8px;}
  }
}
