/* Dashboard UX layer. Kept separate so it can be rolled back without touching legacy styles. */

@media (min-width: 721px) {
  .app-shell > .app-main {
    container-type: inline-size;
  }

  /* Dashboard is a scanning surface; wide ledgers keep the larger app width. */
  .ops-dashboard {
    width: min(100%, 1280px);
    margin-inline: auto;
  }

  .ops-dashboard,
  .ops-dashboard-main {
    gap: 14px;
  }

  .ops-actionbar {
    top: var(--app-header-height);
    z-index: 20;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    margin: -4px 0 0;
    padding: 7px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
  }

  .ops-action-primary-group {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
  }

  .ops-actionbar .ops-btn {
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 7px;
    font-size: 12.5px;
  }

  .ops-tools-menu {
    position: relative;
    flex: 0 0 auto;
    margin-left: auto;
  }

  .ops-tools-menu > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid #cfd9e4;
    border-radius: 7px;
    background: #f7fafc;
    color: var(--text);
    font-size: 12.5px;
    font-weight: 850;
    cursor: pointer;
    list-style: none;
  }

  .ops-tools-menu > summary::-webkit-details-marker {
    display: none;
  }

  .ops-tools-menu[open] > summary,
  .ops-tools-menu > summary:hover {
    border-color: var(--gold-accent);
    background: var(--gold);
    color: var(--gold-deep);
  }

  .ops-tools-menu[open] > summary span {
    transform: rotate(180deg);
  }

  .ops-tools-popover {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 50;
    display: grid;
    gap: 5px;
    width: 214px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(16, 24, 40, 0.16);
  }

  .ops-tools-popover .ops-btn {
    justify-content: space-between;
    width: 100%;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }

  .ops-tools-popover .ops-btn:hover {
    border-color: var(--line);
    background: var(--surface-soft);
  }

  .ops-hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 1.04fr);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(16, 24, 40, 0.09), var(--shadow-hairline);
  }

  .ops-stock-primary,
  .ops-hero-side,
  .ops-hero-main {
    padding: 15px 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  }

  .ops-hero-main,
  .ops-hero-side {
    gap: 8px;
  }

  .ops-hero-heading {
    min-height: 20px;
    font-size: 12px;
  }

  .ops-hero-figure {
    min-width: 0;
    margin-top: 6px;
    gap: 6px;
  }

  .ops-hero-figure strong {
    flex: 0 0 auto;
    min-width: auto;
    font-size: clamp(32px, 2.9cqw, 42px);
    white-space: nowrap;
  }

  .ops-hero-figure em {
    flex: 0 0 auto;
    font-size: 16px;
    white-space: nowrap;
  }

  .ops-stock-delta {
    min-height: 25px;
    margin-top: 8px;
    padding: 4px 9px;
    font-size: 11px;
  }

  .ops-stock-formula {
    gap: 3px;
    margin-top: 11px;
  }

  .ops-stock-formula span,
  .ops-stock-formula .ops-formula-node {
    padding: 6px 4px;
    border-color: transparent;
    background: #f7f9fb;
    box-shadow: none;
  }

  .ops-stock-formula .ops-formula-node {
    border-color: #c9d7e4;
    background: #ffffff;
  }

  .ops-stock-formula span.current {
    border-color: var(--gold-accent);
    background: var(--gold);
  }

  .ops-stock-formula small {
    font-size: 9px;
  }

  .ops-stock-formula b {
    font-size: 11.5px;
  }

  .ops-cost-row {
    gap: 10px;
    padding: 9px 0;
  }

  .ops-cost-row.is-emphasis {
    margin-top: 4px;
    padding: 10px;
  }

  .ops-rollup-card {
    grid-template-columns: 80px minmax(0, 1fr);
  }

  .ops-rollup-list {
    padding: 4px 8px;
  }

  .ops-rollup-row {
    min-height: 21px;
  }

  .ops-rollup-row span {
    font-size: 10.5px;
  }

  .ops-rollup-row b {
    font-size: 12px;
  }

  .ops-rollup-due {
    min-height: 34px;
    flex-wrap: nowrap;
    padding: 4px 7px;
  }

  .ops-rollup-due button {
    min-height: 24px;
    padding: 3px 7px;
    font-size: 10.5px;
  }

  .ops-funds-panel,
  .ops-schedule-preview {
    border-radius: 8px;
  }

  .ops-funds-primary,
  .ops-funds-due,
  .ops-funds-status {
    padding: 9px 12px 8px;
  }

  .ops-funds-figure strong {
    font-size: 27px;
  }

  .ops-funds-note {
    padding-top: 2px;
    padding-bottom: 3px;
  }
}

@container (max-width: 1050px) and (min-width: 721px) {
  .ops-hero {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  }

  .ops-hero-main {
    grid-column: 1 / -1;
    border-top: 1px solid #d7e0ea;
  }

  .ops-hero-rollup {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-funds-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(250px, 0.85fr);
  }

  .ops-funds-status {
    grid-column: 1 / -1;
    border-top: 1px solid #d7e0ea;
  }

  .ops-funds-status-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  .ops-funds-status-list > div {
    display: grid;
    gap: 2px;
    border-bottom: 0;
  }
}

@container (max-width: 820px) and (min-width: 721px) {
  .ops-action-primary-group {
    gap: 5px;
  }

  .ops-actionbar .ops-btn,
  .ops-tools-menu > summary {
    padding-right: 9px;
    padding-left: 9px;
    font-size: 12px;
  }

  .ops-hero,
  .ops-funds-layout {
    grid-template-columns: 1fr;
  }

  .ops-hero-main,
  .ops-funds-status {
    grid-column: auto;
  }

  .ops-stock-primary,
  .ops-hero-side {
    border-right: 0;
    border-bottom: 1px solid #d7e0ea;
  }
}

@media (min-width: 721px) {
  .transactions-shell {
    scrollbar-gutter: stable;
  }

  .ledger-table {
    --ledger-actions-width: 120px;
    --ledger-actor-width: 74px;
    min-width: 1080px;
  }

  .ledger-table th:nth-child(2),
  .ledger-table td:nth-child(2) {
    width: 100px;
    min-width: 100px;
  }

  .ledger-table th:nth-child(2) .ledger-filter-menu {
    right: auto;
    left: 0;
  }

  .ledger-table th:nth-child(3),
  .ledger-table td:nth-child(3) {
    width: 66px;
  }

  .ledger-table th:nth-child(4),
  .ledger-table td:nth-child(4) {
    width: 80px;
  }

  .ledger-table th:nth-child(5),
  .ledger-table td:nth-child(5) {
    width: 72px;
  }

  .ledger-table th:nth-child(6),
  .ledger-table td:nth-child(6) {
    width: 145px;
  }

  .ledger-table th:nth-child(7),
  .ledger-table td:nth-child(7) {
    width: 70px;
  }

  .ledger-table th:nth-child(8),
  .ledger-table td:nth-child(8) {
    width: 105px;
  }

  .ledger-table th:nth-child(9),
  .ledger-table td:nth-child(9) {
    width: 85px;
  }

  .ledger-table th:nth-child(10),
  .ledger-table td:nth-child(10) {
    position: sticky;
    right: calc(var(--ledger-actions-width) + var(--ledger-actor-width));
    z-index: 5;
    width: 105px;
    min-width: 105px;
    background: #ffffff;
    box-shadow: -9px 0 16px rgba(16, 24, 40, 0.07);
  }

  .ledger-table th:nth-child(11),
  .ledger-table td:nth-child(11) {
    position: sticky;
    right: var(--ledger-actions-width);
    z-index: 5;
    width: 74px;
    min-width: 74px;
    background: #ffffff;
  }

  .ledger-table th:nth-child(12),
  .ledger-table td:nth-child(12) {
    position: sticky;
    right: 0;
    z-index: 6;
    width: 120px;
    min-width: 120px;
    padding-right: 5px;
    padding-left: 5px;
    background: #ffffff;
  }

  .ledger-table th:nth-child(10),
  .ledger-table th:nth-child(11),
  .ledger-table th:nth-child(12) {
    z-index: 12;
    background: #eef3f7;
  }

  .ledger-table tbody tr:nth-child(even) td:nth-child(10),
  .ledger-table tbody tr:nth-child(even) td:nth-child(11),
  .ledger-table tbody tr:nth-child(even) td:nth-child(12) {
    background: #fbfcfe;
  }

  .ledger-table tbody tr:hover td:nth-child(10),
  .ledger-table tbody tr:hover td:nth-child(11),
  .ledger-table tbody tr:hover td:nth-child(12) {
    background: #f4f8fb;
  }

  .ledger-table tbody tr.ledger-issue-row td:nth-child(10),
  .ledger-table tbody tr.ledger-issue-row td:nth-child(11),
  .ledger-table tbody tr.ledger-issue-row td:nth-child(12) {
    background: #f4f8fc;
  }

  .ledger-table tbody tr.ledger-issue-row:hover td:nth-child(10),
  .ledger-table tbody tr.ledger-issue-row:hover td:nth-child(11),
  .ledger-table tbody tr.ledger-issue-row:hover td:nth-child(12) {
    background: #edf5fb;
  }

  .ledger-table tbody tr.ledger-factory-row td:nth-child(10),
  .ledger-table tbody tr.ledger-factory-row td:nth-child(11),
  .ledger-table tbody tr.ledger-factory-row td:nth-child(12) {
    background: #f7fbff;
  }

  .ledger-table tbody tr.ledger-factory-row:hover td:nth-child(10),
  .ledger-table tbody tr.ledger-factory-row:hover td:nth-child(11),
  .ledger-table tbody tr.ledger-factory-row:hover td:nth-child(12) {
    background: #eef7ff;
  }

  .ledger-table tbody tr.transaction-deleted td:nth-child(10),
  .ledger-table tbody tr.transaction-deleted td:nth-child(11),
  .ledger-table tbody tr.transaction-deleted td:nth-child(12) {
    background: #f8fafc;
  }

  .ledger-table tbody tr.transaction-deleted:hover td:nth-child(10),
  .ledger-table tbody tr.transaction-deleted:hover td:nth-child(11),
  .ledger-table tbody tr.transaction-deleted:hover td:nth-child(12) {
    background: #f3f5f7;
  }

  .ledger-table.ledger-view-work {
    min-width: 920px;
  }

  .ledger-table.ledger-view-work th:nth-child(9),
  .ledger-table.ledger-view-work td:nth-child(9),
  .ledger-table.ledger-view-work th:nth-child(11),
  .ledger-table.ledger-view-work td:nth-child(11) {
    display: none;
  }

  .ledger-table.ledger-view-work th:nth-child(10),
  .ledger-table.ledger-view-work td:nth-child(10) {
    right: var(--ledger-actions-width);
  }

  .ledger-table td {
    min-height: 48px;
    padding: 9px 10px;
  }

  .ledger-table .row-actions {
    gap: 3px;
    width: 100%;
    min-width: 0;
  }

  .ledger-table .row-actions .mini-button {
    min-width: 32px;
    min-height: 25px;
    padding: 3px 4px;
    font-size: 11px;
  }
}

/* Dashboard primary row: inventory + closing funds + operating status. */
@media (min-width: 721px) {
  .ops-stock-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: 10px;
    flex: 1;
    margin-top: 6px;
  }

  .ops-stock-quantity {
    min-width: 0;
  }

  .ops-stock-quantity .ops-hero-figure {
    margin-top: 0;
  }

  .ops-stock-quantity .ops-stock-delta {
    width: fit-content;
    max-width: 100%;
  }

  .ops-stock-cost-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    min-width: 0;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  .ops-stock-cost-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
    padding: 7px;
    border: 0;
    border-radius: 6px;
    background: transparent;
  }

  .ops-stock-cost-item.is-emphasis {
    border: 1px solid #b9dccf;
    background: #edf8f3;
  }

  .ops-stock-cost-item.is-secondary {
    padding: 4px 4px 0;
  }

  .ops-stock-cost-item > span {
    flex: 1 1 auto;
    overflow: hidden;
    min-width: 0;
    color: #526175;
    font-size: 10.5px;
    font-weight: 850;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ops-stock-cost-item > b {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    margin: 0;
    text-align: right;
    white-space: nowrap;
  }

  .ops-stock-cost-item .ops-cost-main,
  .ops-stock-cost-item > b > small {
    justify-content: flex-end;
  }

  .ops-stock-cost-item .ops-cost-main {
    font-size: 12.5px;
  }

  .ops-stock-cost-item > b > small {
    margin: 0;
    font-size: 9.5px;
  }

  .ops-stock-cost-value {
    flex: 0 0 auto;
    color: var(--heading);
    font-family: var(--num-font);
    font-size: 11.5px;
    font-weight: 950;
    font-variant-numeric: tabular-nums;
  }

  .ops-stock-cost-item.is-secondary > span {
    color: var(--muted);
    font-size: 9.5px;
  }

  .ops-stock-cost-item.is-secondary .ops-cost-main {
    color: #526175;
    font-size: 10.5px;
  }

  .ops-stock-cost-item.is-secondary > b > small {
    color: var(--muted);
    font-size: 9px;
  }

  .ops-stock-cost-item.is-secondary .ops-stock-cost-value {
    color: #526175;
    font-size: 10.5px;
  }

  .ops-hero-funds {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
  }

  .ops-funds-hero-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .ops-funds-title span {
    color: var(--gold-accent);
  }

  .ops-hero-side > .ops-funds-list {
    display: grid;
    grid-template-rows: repeat(3, minmax(30px, 1fr)) minmax(42px, auto);
    align-items: stretch;
    justify-content: stretch;
    gap: 0;
    flex: 1;
    width: 100%;
    min-height: 0;
    margin-top: 6px;
    padding: 0;
  }

  .ops-funds-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    min-height: 30px;
    padding: 0 8px;
    border-top: 1px dashed rgba(180, 194, 209, 0.72);
  }

  .ops-funds-row:first-child {
    border-top: 0;
  }

  .ops-funds-row span {
    min-width: 0;
    color: var(--muted-strong);
    font-size: 11.5px;
    font-weight: 850;
    white-space: nowrap;
  }

  .ops-funds-row b {
    color: var(--heading);
    font-family: var(--num-font);
    font-size: 14.5px;
    font-weight: 950;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }

  .ops-funds-row.inflow b {
    color: #087b63;
  }

  .ops-funds-row.outflow b {
    color: #b83e36;
  }

  .ops-funds-row.ops-funds-closing {
    min-height: 42px;
    margin-top: 5px;
    padding: 0 10px;
    border: 1px solid #b9dccf;
    border-radius: 7px;
    background: #edf8f3;
  }

  .ops-funds-row.ops-funds-closing span,
  .ops-funds-row.ops-funds-closing b {
    color: #087b63;
  }

  .ops-funds-row.ops-funds-closing span {
    font-size: 12px;
  }

  .ops-funds-row.ops-funds-closing b {
    font-size: 19px;
  }

  .ops-funds-row.ops-funds-closing.negative span,
  .ops-funds-row.ops-funds-closing.negative b {
    color: var(--red);
  }

  .ops-hero.without-funds {
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.9fr);
  }
}

@container (max-width: 1050px) and (min-width: 821px) {
  .ops-hero.without-funds {
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  }

  .ops-hero.without-funds .ops-hero-main {
    grid-column: auto;
    border-top: 0;
  }
}

@media (max-width: 720px) {
  .msh-card-list {
    gap: 6px;
  }

  .msh-ledger-card.msh-ledger-compact {
    overflow: hidden;
    padding: 0;
    border-radius: 12px;
  }

  .msh-ledger-summary {
    display: grid;
    gap: 6px;
    padding: 9px 10px;
    cursor: pointer;
    list-style: none;
  }

  .msh-ledger-summary::-webkit-details-marker {
    display: none;
  }

  .msh-ledger-summary:focus-visible {
    outline: 2px solid var(--msh-navy);
    outline-offset: -2px;
    border-radius: 10px;
  }

  .msh-ledger-compact-head {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .msh-ledger-compact-head .msh-ledger-date {
    display: grid;
    gap: 1px;
    font-family: var(--num-font);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    line-height: 1.08;
  }

  .msh-ledger-compact-head .msh-ledger-date small {
    color: var(--msh-faint);
    font-size: 9px;
    font-weight: 800;
  }

  .msh-ledger-compact-head strong {
    overflow: hidden;
    color: var(--msh-ink);
    font-size: 13.5px;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .msh-ledger-compact-head b {
    color: #020617;
    font-family: var(--num-font);
    font-size: 14px;
    font-weight: 950;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .msh-ledger-compact-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
  }

  .msh-ledger-compact-meta .msh-pill {
    min-width: 36px;
    min-height: 22px;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 9.5px;
  }

  .msh-ledger-product {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    color: var(--msh-sub);
    font-size: 10px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .msh-ledger-price {
    flex: 0 0 auto;
    color: var(--msh-ink);
    font-family: var(--num-font);
    font-size: 10.5px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .msh-ledger-price.secondary {
    color: var(--msh-sub);
  }

  .msh-ledger-compact-meta .msh-ledger-status {
    flex: 0 0 auto;
    margin-left: 0;
    font-size: 9.5px;
  }

  .msh-ledger-expanded {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px 9px;
    border-top: 1px dashed var(--msh-line2);
    background: #fbfcfe;
  }

  .msh-ledger-expanded-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .msh-ledger-expanded-copy strong {
    overflow: hidden;
    color: var(--msh-ink);
    font-size: 12px;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .msh-ledger-expanded-copy strong.msh-ledger-dollar {
    color: var(--msh-navy);
  }

  .msh-ledger-expanded-copy small {
    overflow: hidden;
    color: var(--msh-faint);
    font-size: 10px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .msh-ledger-expanded .msh-card-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .msh-ledger-expanded .msh-mini-action {
    min-height: 28px;
    padding: 5px 8px;
    border-radius: 7px;
    font-size: 11px;
  }
}

/* 거래내역 상단에서 품목과 거래 구분을 함께 빠르게 거른다. */
.ledger-quick-toolbar {
  justify-content: space-between;
  gap: 12px 18px;
}

.ledger-quick-filter-groups,
.ledger-quick-filter {
  display: flex;
  align-items: center;
}

.ledger-quick-filter-groups {
  min-width: 0;
  gap: 10px 18px;
  flex-wrap: wrap;
}

.ledger-quick-filter {
  gap: 8px;
}

.ledger-quick-filter-label {
  color: #526175;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.ledger-quick-toolbar .seg-btn {
  min-height: 34px;
  padding: 7px 14px;
  font-size: 12px;
  white-space: nowrap;
}

.ledger-quick-toolbar > .badge {
  margin-left: auto;
  white-space: nowrap;
}

.ledger-toolbar-tail {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  margin-left: auto;
}

.ledger-view-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  padding-left: 9px;
  border-left: 1px solid #d7e0ea;
}

.ledger-view-controls button {
  min-height: 29px;
  padding: 5px 8px;
  border: 1px solid #c8d3df;
  border-radius: 6px;
  background: #fff;
  color: #526175;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.ledger-view-controls button.is-active {
  border-color: #2a628d;
  background: #eaf3fa;
  color: #174e78;
}

.ledger-view-controls .ledger-date-warning {
  border-color: #e8ba68;
  color: #8a6010;
}

@media (max-width: 980px) {
  .ledger-quick-toolbar {
    align-items: flex-start;
  }

  .ledger-quick-toolbar > .badge {
    margin-left: 0;
  }

  .ledger-toolbar-tail {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .ledger-view-controls {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 720px) {
  .ledger-quick-filter-groups {
    width: 100%;
    gap: 8px;
  }

  .ledger-quick-filter {
    width: 100%;
  }

  .ledger-quick-filter .seg-group {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    flex: 1;
  }

  .ledger-quick-filter:first-child .seg-group {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ledger-quick-toolbar .seg-btn {
    padding-right: 8px;
    padding-left: 8px;
  }

  .msh-ledger-more-filters {
    margin-top: 9px;
    border-top: 1px solid var(--msh-line2);
  }

  .msh-ledger-more-filters > summary {
    padding: 9px 2px 0;
    color: var(--msh-sub);
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
  }

  .msh-ledger-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 9px;
  }

  .msh-ledger-filter-grid label {
    display: grid;
    gap: 4px;
    color: var(--msh-sub);
    font-size: 10px;
    font-weight: 850;
  }

  .msh-ledger-filter-grid label.wide,
  .msh-ledger-filter-toggles.wide {
    grid-column: 1 / -1;
  }

  .msh-ledger-filter-grid input,
  .msh-ledger-filter-grid select {
    min-width: 0;
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid var(--msh-line2);
    border-radius: 8px;
    background: #fff;
    color: var(--msh-ink);
    font-size: 12px;
    font-weight: 800;
  }

  .msh-ledger-filter-toggles {
    display: flex;
    gap: 6px;
  }

  .msh-ledger-filter-toggles button {
    min-height: 32px;
    padding: 5px 9px;
    border: 1px solid var(--msh-line2);
    border-radius: 8px;
    background: #fff;
    color: var(--msh-sub);
    font-size: 10px;
    font-weight: 900;
  }

  .msh-ledger-filter-toggles button.on {
    border-color: var(--msh-navy);
    background: var(--msh-navy-soft);
    color: var(--msh-navy);
  }

  .msh-ledger-filter-toggles button.warning {
    border-color: #e8ba68;
    color: #8a6010;
  }

  .msh-ledger-load-more {
    display: block;
    width: 100%;
    min-height: 42px;
    margin: 10px 0 0;
    border: 1px solid var(--msh-line2);
    border-radius: 11px;
    background: #fff;
    color: var(--msh-navy);
    font-size: 12px;
    font-weight: 950;
    cursor: pointer;
  }
}

/* Dashboard readability pass. Keep this layer visual-only for simple rollback. */
@media (min-width: 721px) {
  /* Keep dense operational screens readable on wide desktop monitors. */
  .app-shell > .app-main {
    width: min(100%, 1440px);
    justify-self: center;
  }

  /* Make navigation groups read as parents and their menu items as children. */
  .nav-group {
    gap: 4px;
  }

  .nav-group + .nav-group {
    margin-top: 2px;
  }

  .nav-group-toggle {
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid #dde5ed;
    border-radius: 7px;
    background: #f5f7fa;
    color: #30445b;
    font-size: 14px;
    font-weight: 950;
    box-shadow: inset 3px 0 0 #b8c6d5;
  }

  .nav-group-toggle:hover,
  .nav-group.has-active .nav-group-toggle {
    border-color: #cad8e5;
    background: #edf3f8;
    color: #163f61;
    box-shadow: inset 3px 0 0 var(--blue);
  }

  .nav-group-toggle i {
    color: #718196;
  }

  .nav-group-items {
    gap: 3px;
    margin: 3px 6px 8px 14px;
    padding: 2px 0 2px 10px;
    border-left: 1px solid #d4dee8;
  }

  .nav-group-items .sidebar-nav-item {
    width: 100%;
  }

  .nav-group-items .sidebar-nav-item .tab {
    min-height: 42px;
    padding: 8px 9px;
  }

  body.sidebar-collapsed .nav-group {
    margin-top: 0;
  }

  body.sidebar-collapsed .nav-group-items {
    margin: 0;
    padding: 0;
    border-left: 0;
  }

  .ops-hero-heading {
    color: #405268;
    font-size: 12px;
    font-weight: 900;
  }

  .ops-hero-heading span {
    font-size: 13px;
  }

  .ops-stock-primary,
  .ops-hero-side,
  .ops-hero-main {
    padding: 16px 18px;
  }

  .ops-stock-primary {
    display: flex;
    flex-direction: column;
  }

  .ops-hero-figure strong {
    font-size: clamp(44px, 4cqw, 52px);
  }

  .ops-stock-formula {
    margin-top: 12px;
  }

  .ops-stock-formula small {
    color: #66778a;
    font-size: 9.5px;
  }

  .ops-stock-formula b {
    font-size: 12.5px;
  }

  .ops-cost-row {
    padding: 8px 0;
  }

  .ops-cost-row.is-emphasis {
    padding: 9px 10px;
  }

  .ops-cost-row > span {
    color: #526175;
    font-size: 11.5px;
    font-weight: 850;
    line-height: 1.3;
  }

  .ops-cost-main {
    color: var(--heading);
    font-family: var(--num-font);
    font-size: 13px;
    font-weight: 950;
  }

  .ops-cost-row small {
    font-size: 10.5px;
  }

  .ops-rollup-card h4 span {
    font-size: 11.5px;
  }

  .ops-rollup-row {
    min-height: 25px;
  }

  .ops-rollup-row span {
    color: #526175;
    font-size: 11.5px;
  }

  .ops-rollup-row b {
    font-size: 13px;
  }

  .ops-funds-header,
  .ops-schedule-preview-header {
    min-height: 40px;
  }

  .ops-funds-primary,
  .ops-funds-due,
  .ops-funds-status {
    padding: 10px 13px 9px;
  }

  .ops-funds-note {
    color: #68788a;
    font-size: 10px;
  }

  .ops-funds-status-list span,
  .ops-funds-currencies span {
    color: #5d6d7f;
    font-size: 10.5px;
  }

  .ops-funds-status-list b {
    font-size: 12px;
  }

  .ops-schedule-day {
    min-height: 132px;
  }

  .ops-schedule-empty {
    min-height: 44px;
    color: #657589;
    font-size: 10px;
  }
}

@media (max-width: 720px) {
  .msh-screen {
    padding: 14px 14px 18px;
  }

  .msh-title small {
    color: #788696;
    font-size: 9px;
  }

  .msh-tick .k,
  .msh-stat .k,
  .msh-seclab {
    color: #6f7e90;
    font-size: 11.5px;
  }

  .msh-tick .v {
    font-size: 17px;
  }

  .msh-hero .big,
  .msh-stat .v {
    letter-spacing: 0;
  }

  .msh-hero .lab {
    font-size: 12px;
  }

  .msh-funds-head span {
    font-size: 12.5px;
  }

  .msh-funds-head small,
  .msh-funds > p,
  .msh-schedule-day > span small,
  .msh-stat > span {
    color: #6f7e90;
    font-size: 11px;
  }
}
