/* Console tokens. IBM Carbon Gray 100 + Primer-like frames. No marketing lime/serif. */
:root {
  color-scheme: dark;
  --bg: #161616;
  --bg-elev: #1c1c1c;
  --bg-alt: #1c1c1c;
  --card: #1c1c1c;
  --card-strong: #262626;
  --surface: #1c1c1c;
  --surface-elevated: #262626;
  --ink: #f4f4f4;
  --text: #f4f4f4;
  --muted: #8d8d8d;
  --line: #393939;
  --border: #393939;
  --accent: #f4f4f4;
  --accent-strong: #f4f4f4;
  --accent-ink: #161616;
  --accent-hover: #ffffff;
  --crit: #c97a7a;
  --danger: #c97a7a;
  --warn: #c4a35a;
  --info: #8a9bb0;
  --ok: #7a9e7e;
  --console-chrome-h: 2.5rem;
  --console-line: #393939;
  --console-ink: #f4f4f4;
  --console-accent: #f4f4f4;
  --console-muted: #8d8d8d;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Public Sans", "Segoe UI", sans-serif;
  --display: "Public Sans", "Segoe UI", sans-serif;
  --radius: 2px;
  --radius-sm: 2px;
  --space: 1rem;
  --shadow: none;
}

html {
  scrollbar-gutter: stable;
}

html,
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}

a { color: var(--ink); }

.app,
.stock-shell {
  max-width: none;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.5rem;
}

.app.app-route-wide,
.app.app-route-operations,
.app.wiki-app {
  max-width: none;
}

.app.wiki-app {
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1rem;
}

.header,
.app-route-header,
.wiki-route-header {
  margin-bottom: 1rem;
  padding: 0 0 0.75rem;
  min-height: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.wiki-route-header {
  position: sticky;
  top: var(--console-chrome-h);
  z-index: 120;
  background: var(--bg);
}

.app-route-brand-kicker,
.wiki-route-brand-kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.app-route-brand strong,
.wiki-route-brand strong,
h1 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0;
  color: var(--ink);
}

.app-route-brand span,
.wiki-route-brand span,
.app-route-user-copy span,
.app-route-date-chip {
  color: var(--muted);
}

.app-route-user-copy strong {
  color: var(--ink);
}

.app-route-nav {
  border-top: 1px solid var(--line);
  padding-top: 0.65rem;
}

.tab,
.app-route-header .tab,
.wiki-route-header .tab,
.stock-tab {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  min-height: auto;
  padding: 0.28rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
}

.tab.active,
.app-route-header .tab.active,
.wiki-route-header .tab.active,
.stock-tab.active {
  color: var(--accent-ink);
  background: var(--ink);
  border-color: var(--ink);
  font-weight: 500;
}

.panel,
.stock-panel,
.card,
.modal,
.drawer,
.wiki-board,
.wiki-article,
.task-card,
.kanban-column,
.checkin-board,
.service-desk-board,
.archive-board,
.kanban,
.checkin-card,
.kanban-card,
.client-login-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
}

button:not(.tab):not(.stock-tab),
.btn,
.stock-btn {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--accent-ink);
  border: 1px solid var(--ink);
}

button.secondary,
button.ghost,
.btn.secondary,
.button.ghost,
.stock-btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

input,
select,
textarea,
.stock-form-row input,
.stock-form-row select,
.stock-form-row textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius);
  font-family: var(--mono);
}

.table,
.stock-table {
  font-size: 0.92rem;
}

.table th,
.stock-table th {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line);
}

.badge,
.stock-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: transparent;
}

.app-route-session-chip {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-weight: 500;
}

.client-login-page {
  background: transparent;
}

.client-login-card {
  padding: 1.1rem 1.2rem;
}

#root {
  min-height: calc(100vh - var(--console-chrome-h));
}
