/* ============================================================
   Librya — Base layer
   Loaded after tokens.css + components.css
   ============================================================ */

html { scroll-behavior: smooth; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
}

/* Headings */
h1, h2, h3, h4, h5 { color: var(--foreground); letter-spacing: -0.015em; }
h1 { font-size: 2rem; font-weight: 800; line-height: 1.15; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 600; }

/* Links */
a { color: var(--primary); text-decoration: none; transition: color 150ms; }
a:hover { color: var(--primary-dark); }

/* Page header used across dashboard pages */
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem;
}
.page-head h1 { font-size: 1.6rem; }
.page-head p { color: var(--muted-foreground); font-size: .9rem; margin: .25rem 0 0; }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Toolbar (search + filters) */
.toolbar {
  display: flex; gap: .75rem; flex-wrap: wrap; align-items: center;
  margin-bottom: 1.25rem;
}
.toolbar .input, .toolbar .select { max-width: 260px; }
.toolbar form { display: contents; }

/* Empty states */
.empty {
  text-align: center; padding: 3rem 1rem; color: var(--muted-foreground);
}
.empty strong { display: block; color: var(--foreground); margin-bottom: .25rem; }

/* Utility */
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: .5rem; }
.spacer { flex: 1; }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .8rem; }

/* Scrollbar tint */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: color-mix(in oklab, var(--primary) 25%, transparent); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: color-mix(in oklab, var(--primary) 40%, transparent); }
::-webkit-scrollbar-track { background: transparent; }