/* Dashboard-only layout. Breakpoints follow usable content width, not the monitor. */
@media (min-width: 721px) {
  .ops-dashboard .ops-dashboard-main {
    container: dashboard-main / inline-size;
    min-width: 0;
  }

  .ops-dashboard .ops-hero,
  .ops-dashboard .ops-hero.without-funds {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    box-shadow: 0 2px 8px #172b4208;
    background: #fff;
  }

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

  .ops-dashboard .ops-stock-primary,
  .ops-dashboard .ops-hero-side,
  .ops-dashboard .ops-hero-main {
    min-width: 0;
    padding: 16px;
    background: #fff;
    grid-column: auto;
  }

  .ops-dashboard .ops-hero-heading { font-size: 14px; margin-bottom: 8px; }
  .ops-dashboard .ops-stock-overview {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 16px;
    margin-top: 0;
  }
  .ops-dashboard .ops-hero-figure { flex-wrap: wrap; gap: 6px; }
  .ops-dashboard .ops-hero-figure strong { font-size: 44px; white-space: normal; overflow-wrap: anywhere; }
  .ops-dashboard .ops-stock-delta { font-size: 12px; }
  .ops-dashboard .ops-stock-cost-item { flex-wrap: wrap; padding: 8px 0; border-radius: 0; }
  .ops-dashboard .ops-stock-cost-item.is-emphasis { border: 0; border-top: 1px solid #e1e7ed; background: transparent; }
  .ops-dashboard .ops-stock-cost-item > span,
  .ops-dashboard .ops-stock-cost-item.is-secondary > span { flex: 1 1 auto; font-size: 13px; overflow: visible; white-space: normal; }
  .ops-dashboard .ops-stock-cost-value { font-size: 15px; }
  .ops-dashboard .ops-stock-cost-item.is-secondary .ops-stock-cost-value { font-size: 13px; }
  .ops-dashboard .ops-funds-hero-head { flex-wrap: wrap; gap: 4px 8px; }
  .ops-dashboard .ops-funds-hero-head .ops-hero-heading { margin-bottom: 0; }
  .ops-dashboard .ops-hero-side > .ops-funds-list {
    grid-template-rows: repeat(3, minmax(36px, 1fr)) minmax(58px, auto);
    gap: 0;
  }
  .ops-dashboard .ops-funds-row { flex-wrap: wrap; gap: 4px 12px; padding: 8px 4px; }
  .ops-dashboard .ops-funds-row span { font-size: 13px; white-space: normal; }
  .ops-dashboard .ops-funds-row b { margin-left: auto; font-size: 17px; }
  .ops-dashboard .ops-funds-row.ops-funds-closing { padding: 10px; border-radius: 4px; }
  .ops-dashboard .ops-funds-closing b { font-size: 27px; }
  .ops-dashboard .ops-funds-closing.negative { background: #fff3f1; border-color: #ebc6c0; }
  .ops-dashboard .ops-hero-rollup { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ops-dashboard .ops-rollup-card { grid-template-columns: 88px minmax(0, 1fr); border-radius: 4px; }
  .ops-dashboard .ops-rollup-card h4 { padding: 8px; gap: 4px; }
  .ops-dashboard .ops-rollup-card h4 i { display: none; }
  .ops-dashboard .ops-rollup-card h4 span { font-size: 13px; white-space: nowrap; }
  .ops-dashboard .ops-rollup-row { min-height: 27px; gap: 8px; flex-wrap: wrap; }
  .ops-dashboard .ops-rollup-row span { font-size: 13px; }
  .ops-dashboard .ops-rollup-row b { font-size: 14px; margin-left: auto; }
  .ops-dashboard .ops-rollup-due { flex-wrap: wrap; gap: 6px; }
  .ops-dashboard .ops-rollup-due > span,
  .ops-dashboard .ops-rollup-due button { font-size: 12px; }
  .ops-dashboard .ops-rollup-due button { min-height: 30px; }

  .ops-dashboard .ops-metal-section {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .ops-dashboard .ops-section-label { margin-top: 4px; font-size: 14px; }
  .ops-dashboard .ops-cols { align-items: start; gap: 14px; }
  .ops-dashboard .ops-cols:has(.ops-panel.is-empty) { grid-template-columns: minmax(0, 1fr); }
  .ops-dashboard .ops-panel {
    container: dashboard-queue / inline-size;
    min-width: 0;
    box-shadow: none;
    border-radius: 6px;
  }
  .ops-dashboard .ops-panel header { padding: 12px; background: #fff; }
  .ops-dashboard .ops-panel header h3 { font-size: 16px; }
  .ops-dashboard .ops-panel-total b { font-size: 21px; }
  .ops-dashboard .ops-panel-total small { font-size: 12px; }
  .ops-dashboard .ops-queue { min-height: 0; padding: 0; gap: 0; }
  .ops-dashboard .ops-panel.is-empty header { border-bottom: 0; padding-bottom: 4px; }
  .ops-dashboard .ops-panel.is-empty .ops-panel-total { flex-direction: row; align-items: center; gap: 8px; }
  .ops-dashboard .ops-panel.is-empty .ops-panel-total b { color: #637180; font-size: 15px; }
  .ops-dashboard .ops-empty { min-height: 0; padding: 0 12px 12px; color: #526175; font-size: 13px; text-align: left; justify-content: start; }

  .ops-dashboard .ops-queue-columns,
  .ops-dashboard .ops-ledger-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 70px 90px 90px 86px;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
  }
  .ops-dashboard .ops-queue-columns { color: #526175; font-size: 12px; background: #f4f7fa; border-block: 1px solid #e1e7ed; }
  .ops-dashboard .ops-queue-columns > span:not(:first-child) { text-align: right; }
  .ops-dashboard .ops-queue-columns > span:last-child { text-align: center; }
  .ops-dashboard .ops-ledger-item {
    position: static;
    min-height: 62px;
    margin: 0;
    border: 0;
    border-bottom: 1px solid #e5eaf0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    transform: none;
  }
  .ops-dashboard .ops-ledger-item::before { display: none; }
  .ops-dashboard .ops-ledger-item:hover { background: #f5f9fc; transform: none; box-shadow: none; }
  .ops-dashboard .ops-ledger-item .ops-qmain { min-width: 0; }
  .ops-dashboard .ops-ledger-item .ops-qmain strong { font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
  .ops-dashboard .ops-ledger-item .ops-qmain small { display: block; font-size: 12px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
  .ops-dashboard .ops-queue-quantity,
  .ops-dashboard .ops-queue-price { margin: 0; min-width: 0; text-align: right; font-family: var(--num-font); font-size: 14px; font-variant-numeric: tabular-nums; white-space: normal; overflow-wrap: anywhere; }
  .ops-dashboard .ops-queue-quantity small { font-size: 11px; font-weight: 500; }
  .ops-dashboard .ops-queue-price { font-weight: 650; }
  .ops-dashboard .ops-qactions { display: flex; justify-content: end; gap: 4px; }
  .ops-dashboard .ops-qactions button { min-height: 32px; min-width: 40px; padding: 4px; font-size: 12px; border-radius: 4px; }
  .ops-dashboard .ops-more-items { gap: 0; }
  .ops-dashboard .ops-more-list { margin: 0; }

  .schedule-rail-day-toggle small,
  .schedule-rail-day-preview { font-size: 12px; }
  .schedule-rail-item-kind,
  .schedule-rail-item-kind.sale,
  .schedule-rail-item-kind.payment,
  .schedule-rail-item-kind.pricing { color: #526175; font-size: 12px; }
  .schedule-rail-item-detail strong { font-size: 14px; }
  .schedule-rail-item-detail small { font-size: 13px; }
  .schedule-rail-item.is-completed { opacity: 1; color: #657180; }

  @container dashboard-main (max-width: 1099px) {
    .ops-dashboard .ops-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ops-dashboard .ops-hero-main { grid-column: 1 / -1; border-top: 1px solid #d7e0ea; }
    .ops-dashboard .ops-hero.without-funds .ops-hero-main { grid-column: auto; border-top: 0; }
    .ops-dashboard .ops-hero-rollup { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ops-dashboard .ops-hero.without-funds .ops-hero-rollup { grid-template-columns: 1fr; }
    .ops-dashboard .ops-rollup-due { grid-column: 1 / -1; }
    .ops-dashboard .ops-cols { grid-template-columns: minmax(0, 1fr); }
  }
  @container dashboard-main (max-width: 599px) {
    .ops-dashboard .ops-hero,
    .ops-dashboard .ops-hero.without-funds { grid-template-columns: minmax(0, 1fr); }
    .ops-dashboard .ops-hero-main,
    .ops-dashboard .ops-hero.without-funds .ops-hero-main { grid-column: auto; border-top: 1px solid #d7e0ea; }
    .ops-dashboard .ops-stock-primary,
    .ops-dashboard .ops-hero-side { border-right: 0; border-bottom: 1px solid #d7e0ea; }
    .ops-dashboard .ops-hero-rollup { grid-template-columns: minmax(0, 1fr); }
  }
  @container dashboard-queue (max-width: 499px) {
    .ops-dashboard .ops-queue-columns { display: none; }
    .ops-dashboard .ops-ledger-item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 86px; gap: 8px; }
    .ops-dashboard .ops-ledger-item .ops-qmain { grid-column: 1 / 3; }
    .ops-dashboard .ops-queue-quantity { grid-column: 3; }
    .ops-dashboard .ops-queue-price { text-align: left; }
    .ops-dashboard .ops-queue-price::before { content: attr(data-label); display: block; margin-bottom: 2px; color: #526175; font-size: 11px; font-weight: 500; }
  }
}

@media (min-width: 721px) and (max-width: 1050px) {
  body:has(.ops-dashboard) .brand-home { flex: 0 0 auto; width: auto; max-width: none; }
  body:has(.ops-dashboard) .brand-home h1 { font-size: 18px; white-space: nowrap; }
  .ops-dashboard .ops-actionbar { flex-wrap: wrap; }
  .ops-dashboard .ops-action-primary-group { flex-wrap: wrap; }
}
