/* =========================================================
   Global base styles for the new design.
   Loaded after tokens.css.
   ========================================================= */

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--color-slate-800);
  /* Solid fallback so the first paint isn't white before ::before kicks in
     (Firefox briefly paints body before pseudo-elements). The gradient
     itself lives on body::before below so it stays put while the page
     scrolls. */
  background: #f8fafc;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Fixed gradient backdrop.
 * Anchored to the viewport via position: fixed so it doesn't move when the
 * main content scrolls (e.g. on the Knowledge Bases page when an expanded
 * card pushes the column past 100vh). z-index: -1 keeps it behind every
 * other element without needing a stacking context on body. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    128.66deg,
    #f8fafc 0%,
    #c0dcf9 25%,
    #e2e8f0 50%,
    #c7e0f9 75%,
    #f8fafc 100%
  );
}

button,
textarea,
input,
select {
  font: inherit;
}

/* ---- App shell ---- */
.app-shell {
  box-sizing: border-box;
  min-height: 100vh;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  padding: 53px 24px 24px;
}

.app-shell > .sidebar {
  flex: 0 0 292px;
  position: sticky;
  top: 53px;
}

.app-root {
  flex: 0 1 916px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (max-width: 1280px) {
  .app-shell {
    max-width: none;
  }
  .app-root {
    flex: 1 1 auto;
  }
}

.main-content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
