/* ==========================================================================
   layout.css
   Page-level structural layout: containers, grids, the auth split-screen
   shell. Component-level visuals (cards, buttons, inputs) live in
   components.css.
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

/* ---- Auth shell ---------------------------------------------------------
   Two-column split screen used by login / signup / forgot-password /
   OTP-style pages. Left = brand panel, right = form panel.
   Maps to a shared Razor layout, e.g. _AuthLayout.cshtml, with
   @RenderBody() inside .auth-shell__form-panel. */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 47%) 1fr;
}

.auth-shell__brand-panel {
  background-color: var(--color-navy-900);
  color: var(--color-text-on-dark);
  padding: var(--space-7) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.auth-shell__form-panel {
  background-color: var(--color-bg-page);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.auth-shell__form-panel-inner {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* ---- Dashboard shell -----------------------------------------------------
   Fixed dark sidebar + scrolling content column. Used by every internal
   admin/ops page (Truck Owners, Trucks, Shippers, Loads, Matches,
   Destinations, Reports, Dashboard itself). Maps to a shared Razor layout,
   e.g. _DashboardLayout.cshtml, with @RenderBody() inside
   .dashboard-shell__content. */
.dashboard-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
}

.dashboard-shell__sidebar {
  background-color: var(--color-navy-900);
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  padding: var(--space-5) 0;
}

.dashboard-shell__main {
  min-width: 0; /* allow the data table to scroll instead of blowing out the grid */
  display: flex;
  flex-direction: column;
}

.dashboard-shell__content {
  padding: var(--space-6) var(--space-6) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* ---- Top header bar -------------------------------------------------------
   Sticky search/notifications bar above the page content. Maps to
   partials/_TopHeader.cshtml. */
.top-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-height);
  background-color: var(--color-white);
  border-bottom: var(--border-width) solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: 0 var(--space-6);
}

/* ---- Page header (breadcrumb + title + subtitle + primary action) -------- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ---- Stat cards grid ------------------------------------------------------- */
.stat-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

/* ---- Filter bar ------------------------------------------------------------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* ---- Table card (wraps the data table so it can scroll horizontally on
   narrow viewports without breaking the page layout) ------------------------ */
.table-card {
  background-color: var(--color-bg-card);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}
