/* Keep wide content inside its own scrolling region, including RTL tables. */
.main-content,
.main-content > *,
.ops .grid-main > *,
.ops .metrics > *,
.ops .reconcile > * {
  min-width: 0;
}

.main-content .table-responsive {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.main-content .pagination {
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 0;
}

.main-content nav:has(> .d-sm-flex) > .d-sm-flex {
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}

.app-header .navbar > .container-fluid {
  gap: 8px 12px;
}

.app-header .navbar-brand {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.app-header .navbar > .container-fluid > .d-flex {
  flex-wrap: wrap;
  gap: 8px;
}

.ops {
  overflow-wrap: anywhere;
}

.ops .hero h1 { font-size: 32px; }
.ops .value { font-size: 30px; }
.ops .eyebrow, .ops .clock { letter-spacing: 0; }
.ops .section-head { flex-wrap: wrap; }
.ops .reconcile { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ops .metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ops .table { overflow-wrap: normal; }
.ops .table td { min-width: 80px; }

@media screen and (min-width: 992px) {
  .app-shell { flex-direction: row; }
  .app-shell > .sidebar {
    display: block;
    position: sticky;
    flex: 0 0 250px;
    width: 250px;
    height: 100dvh;
    min-height: 0;
    align-self: flex-start;
    border-radius: 0;
  }
}

@media screen and (max-width: 1199.98px) {
  .ops .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops .grid-main { grid-template-columns: minmax(0, 1fr); }
}

@media screen and (max-width: 991.98px) {
  .app-shell > .sidebar {
    max-width: calc(100% - 48px);
    height: 100dvh;
    min-height: 0;
  }
  .app-header { position: static; padding: 8px; }
  .main-content { padding: 16px; }
}

@media screen and (max-width: 575.98px) {
  .ops .hero h1 { font-size: 23px; }
  .ops .value { font-size: 23px; }
  .ops .reconcile { grid-template-columns: minmax(0, 1fr); }
  .ops .panel, .ops .hero { padding: 16px; }
  .app-header .navbar-brand { font-size: 17px; }
}

@media screen and (max-width: 399.98px) {
  .ops .metrics { grid-template-columns: minmax(0, 1fr); }
}
