/* ui-kit.css v2 — GLBEX unified UI kit (master: glbex-blueprint; see UI_STANDARD.md)
   PURPOSE: PI-D — one look across every surface; agents use these classes, never restyle.
   BASE = the projects app template (Ben 2026-07-06: "the most stable and steady") —
   tokens lifted from projects /static/style.css v74. Copied VERBATIM into each repo's
   static/. Changes = blueprint PR presented to Ben. */

:root {
  --primary: #4f46e5; --primary-light: #eef2ff;
  --primary-border: #c7d2fe; --primary-text: #4338ca;
  --bg-page: #fafafa; --bg-white: #ffffff; --bg-subtle: #f9fafb; --bg-muted: #f3f4f6;
  --border: #e5e7eb; --border-light: #f3f4f6;
  --text-primary: #111111; --text-secondary: #374151;
  --text-muted: #6b7280; --text-faint: #9ca3af;
  --success: #16a34a; --success-bg: #dcfce7; --success-border: #bbf7d0;
  --error: #dc2626; --error-bg: #fee2e2; --error-border: #fecaca;
  --warning: #d97706; --warning-bg: #fffbeb; --warning-border: #fde68a;
  --radius: 8px; --ctl-h: 40px;
  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg-page); color: var(--text-secondary);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
h1 { font-size: 20px; color: var(--text-primary); margin: 0 0 var(--s3); }
h2 { font-size: 16px; color: var(--text-primary); margin: var(--s4) 0 var(--s2); }

.card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--s3); margin-bottom: var(--s3);
}

/* Buttons — ONE height (40px). Three variants only (projects two-tier + danger). */
.btn, .btn-primary, .btn-danger {
  display: inline-flex; align-items: center; justify-content: center;
  height: var(--ctl-h); padding: 0 20px; border-radius: var(--radius);
  border: none; font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.btn { background: var(--bg-muted); color: var(--text-secondary); font-weight: 500; }
.btn:hover { background: var(--border); }
.btn-primary { background: var(--primary); color: #ffffff; }
.btn-primary:hover { opacity: 0.9; }
.btn-danger { background: var(--error); color: #ffffff; }
.btn-danger:hover { opacity: 0.9; }
.btn:disabled, .btn-primary:disabled, .btn-danger:disabled { opacity: 0.5; cursor: not-allowed; }

/* Filters/inputs — same 40px footprint as buttons so bars line up as one row. */
.filter, input[type="text"], input[type="search"], input[type="number"],
input[type="date"], select {
  height: var(--ctl-h); padding: 0 12px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg-white);
  font-family: inherit; font-size: 14px; color: var(--text-secondary);
}
input:focus, select:focus, .filter:focus {
  outline: none; border-color: var(--primary-border);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-bottom: 20px; }
.filter-bar .grow { flex: 2; }

/* Tables — projects header style; values CENTERED under their column (Ben's rule).
   .cell-text = the ONLY exception, for long free-text columns (titles, notes). */
table { width: 100%; border-collapse: collapse; background: var(--bg-white); }
thead th {
  text-align: center; font-size: 12px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em; padding: 12px 20px;
  border-bottom: 1px solid var(--border); background: var(--bg-subtle);
  position: sticky; top: 0;
}
tbody td {
  text-align: center; font-size: 14px; padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-subtle); }
th.cell-text, td.cell-text { text-align: left; }
.cell-main { font-weight: 600; color: var(--text-primary); }
.cell-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Status pills — one shape for every state word (projects semantic trios). */
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; }
.pill-ok { background: var(--success-bg); color: var(--success); }
.pill-warn { background: var(--warning-bg); color: var(--warning); }
.pill-bad { background: var(--error-bg); color: var(--error); }
.pill-muted { background: var(--bg-muted); color: var(--text-muted); }
.pill-primary { background: var(--primary-light); color: var(--primary-text); }

/* Monospace source/id tags (projects res-source-tag) */
.tag-mono { display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; background: var(--bg-muted); color: var(--text-secondary);
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace; }
