/* Fairweather Supply — internal parts catalogue.
   Deliberately an internal line-of-business tool, not a consumer storefront:
   dense table, muted chrome, no marketing. W2 is the shop; this is the back
   office, and the two should not look like the same product. */

:root {
  --ink: #1b1f24;
  --dim: #6b7480;
  --line: #e3e6ea;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --accent: #2c5d8f;
  --ok: #2f7a4d;
  --low: #a8482f;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* --- chrome ------------------------------------------------------------- */

.topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
}

.org {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 0 10px;
}

.mark {
  width: 18px; height: 18px; border-radius: 4px;
  background: var(--accent);
}

.org .name { font-weight: 640; letter-spacing: -.01em; }

.env {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--dim); border: 1px solid var(--line);
  padding: 1px 7px; border-radius: 4px;
}

.nav { display: flex; gap: 22px; }

.nav a {
  display: block; padding: 0 0 10px;
  font-size: 13px; color: var(--dim); text-decoration: none;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); font-weight: 560; border-bottom-color: var(--accent); }

main { max-width: 1000px; margin: 0 auto; padding: 26px 24px 56px; }

/* --- page head ---------------------------------------------------------- */

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin-bottom: 16px;
}

h1 { margin: 0; font-size: 19px; font-weight: 620; letter-spacing: -.01em; }
.sub { margin: 3px 0 0; color: var(--dim); font-size: 13px; }

.toolbar { display: flex; align-items: center; gap: 10px; }

.pill {
  font-size: 12px; color: var(--dim);
  background: var(--panel); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 999px;
}

.btn {
  font: inherit; font-size: 13px;
  padding: 6px 12px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--panel); color: var(--dim);
}
.btn[disabled] { cursor: not-allowed; opacity: .7; }

/* --- table -------------------------------------------------------------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
}

table { width: 100%; border-collapse: collapse; }

th, td {
  padding: 9px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

thead th {
  font-size: 11px; font-weight: 620; letter-spacing: .06em;
  text-transform: uppercase; color: var(--dim);
  background: #fafbfc;
  position: sticky; top: 0;
}

thead th a { color: inherit; text-decoration: none; }
thead th a:hover { color: var(--ink); }

thead th.sorted { color: var(--accent); }
thead th.sorted a::after { content: " ↑"; font-size: 11px; }

tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfc; }

.num { text-align: right; font-variant-numeric: tabular-nums; }
.id { color: var(--dim); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.strong { font-weight: 560; }
.dim { color: var(--dim); }

.tag {
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
}
.tag.ok  { color: var(--ok);  background: #e8f4ec; }
.tag.low { color: var(--low); background: #fbeae5; }

/* --- notes + footer ----------------------------------------------------- */

.foot-note { margin-top: 18px; font-size: 13px; color: var(--dim); }
.foot-note p { margin: 0 0 6px; }
.foot-note em { color: var(--ink); font-style: normal; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em;
  background: #eef0f3; padding: 1px 6px; border-radius: 4px;
}

footer {
  border-top: 1px solid var(--line);
  margin-top: 34px; padding: 16px 24px;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: var(--dim);
  max-width: 1000px; margin-left: auto; margin-right: auto;
}

@media (max-width: 640px) {
  .nav { gap: 16px; overflow-x: auto; }
  main { padding: 20px 14px 44px; }
  .topbar { padding: 0 14px; }
}
