/* Urgent layout + scrollbar fixes — loads last */
/* ── Dashboard: stop grid stretch / chart bar spacing ── */
#app-view .grid-2,
.grid-2 {
  align-items: start !important;
  gap: 1rem !important;
  margin-bottom: 1rem !important;
}

#app-view .grid-2 > .card,
.grid-2 > .card {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 0 !important;
}

#app-view .grid-2 > .card .card-body,
.grid-2 > .card .card-body {
  flex: 0 1 auto !important;
  display: block !important;
  min-height: 0 !important;
}

#app-view .grid-2 > .card .card-body.card-body--chart,
#app-view .grid-2 > .card .card-body:has(.chart-hbar),
.grid-2 > .card .card-body.card-body--chart,
.grid-2 > .card .card-body:has(.chart-hbar) {
  display: block !important;
  flex: none !important;
  align-self: stretch !important;
  width: 100% !important;
  padding: 0.85rem 1rem !important;
}

#app-view .chart-hbar .chart-bar-container,
#app-view .card-body .chart-bar-container,
.card-body .chart-hbar .chart-bar-container,
.card-body .chart-bar-container {
  flex: none !important;
  justify-content: flex-start !important;
  gap: 0.5rem !important;
  min-height: 0 !important;
}

#app-view .dashboard-metrics-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.65rem !important;
  width: 100% !important;
}

#app-view .page-content > .card.mt-2,
#app-view .page-content > .card:last-child {
  margin-top: 1rem !important;
}

/* ── Scrollable dashboard tables — visible custom scrollbar ── */
#app-view .grid-2 > .card .card-body.no-padding,
#app-view .table-scroll,
#app-view .card-body.table-scroll {
  max-height: min(360px, 50vh) !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  scrollbar-width: thin !important;
  scrollbar-color: var(--ig-scroll-thumb, #ff5c1a) var(--ig-scroll-track, #0a0a0a) !important;
}

#app-view .grid-2 > .card .card-body.no-padding::-webkit-scrollbar,
#app-view .table-scroll::-webkit-scrollbar {
  width: 8px !important;
  height: 8px !important;
}

#app-view .grid-2 > .card .card-body.no-padding::-webkit-scrollbar-track,
#app-view .table-scroll::-webkit-scrollbar-track {
  background: var(--ig-scroll-track, #0a0a0a) !important;
  border-radius: 4px !important;
}

#app-view .grid-2 > .card .card-body.no-padding::-webkit-scrollbar-thumb,
#app-view .table-scroll::-webkit-scrollbar-thumb {
  background: var(--ig-scroll-thumb, #ff5c1a) !important;
  border-radius: 4px !important;
  border: 2px solid var(--ig-scroll-track, #0a0a0a) !important;
  min-height: 32px !important;
}

#app-view .grid-2 > .card .card-body.no-padding::-webkit-scrollbar-thumb:hover,
#app-view .table-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--ig-scroll-thumb-hover, #ff7a3d) !important;
}

/* Global scrollbar: see panel-visible-fix.css */

/* ── Landing: remove 88vh dead space before stats bar ── */
.hero-premium {
  min-height: auto !important;
  display: block !important;
  padding: calc(var(--nav-h, 60px) + 2rem) 0 0 !important;
}

.hero-inner.hero-split {
  flex: none !important;
  display: block !important;
}

@media (min-width: 1100px) {
  .hero-inner.hero-split {
    display: grid !important;
    grid-template-columns: 1fr minmax(320px, 400px) !important;
    gap: 2rem !important;
    align-items: start !important;
  }
}

.hero-copy {
  padding-bottom: 1.5rem !important;
}

.hero-stats {
  margin-top: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.tactical.ig-public-site {
  overflow-x: hidden;
}
