/*
FLAMBERGE — Shared Design Token System (v2, human-readable pass)
Owner: Flamberge Intelligence Pte Ltd
Classification: TRADE SECRET

Every engine's interface shares this base identity. Only --accent
changes per engine. Revised from v1 to read as an approachable daily
tool rather than a cockpit instrument panel — softer surfaces, a
warm readable sans-serif as the primary voice throughout, and
monospace reserved only for the handful of places where character
alignment genuinely matters (exact IDs, timestamps).
*/

:root {
  --bg: #16181D;
  --surface: #1E2128;
  --surface-border: #2C303A;
  --text-primary: #EDEEF0;
  --text-secondary: #9CA1AC;
  --text-tertiary: #6B7080;
  --grey: #454B58;

  --amber: #E8A23D;
  --amber-soft: rgba(232, 162, 61, 0.14);
  --red: #E2685F;
  --red-soft: rgba(226, 104, 95, 0.14);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-data: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;

  --radius: 10px;
  --radius-sm: 6px;
}

:root[data-engine="silmaril"] {
  --accent: #6FC6DB;
  --accent-soft: rgba(111, 198, 219, 0.14);
  --accent-strong: rgba(111, 198, 219, 0.35);
}

:root[data-engine="medusa"] {
  --accent: #B34252;
  --accent-soft: rgba(179, 66, 82, 0.14);
  --accent-strong: rgba(179, 66, 82, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.data { font-family: var(--font-data); font-variant-numeric: tabular-nums; }

.status-strip {
  height: 3px;
  width: 100%;
  background: var(--accent);
  transition: background 0.5s ease;
}
.status-strip.yellow  { background: var(--amber); }
.status-strip.red     { background: var(--red); }
.status-strip.unknown { background: var(--grey); }

.topbar {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: 18px var(--space-lg);
  border-bottom: 1px solid var(--surface-border);
  flex-wrap: wrap;
}

.topbar .brand { font-weight: 600; font-size: 15px; color: var(--text-primary); }
.topbar .brand span { color: var(--text-tertiary); font-weight: 400; }

.engine-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 20px;
}

.status-summary {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 14px;
}
.status-summary .value { color: var(--text-primary); font-weight: 500; }
.status-summary .value.critical { color: var(--red); }
.status-summary .value.warning { color: var(--amber); }

.container { max-width: 1280px; margin: 0 auto; padding: var(--space-lg); }

.grid { display: grid; grid-template-columns: 1fr; gap: var(--space-lg); }
@media (min-width: 900px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .full-width { grid-column: 1 / -1; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-header {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--surface-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-header h2 { margin: 0; font-size: 14px; font-weight: 600; color: var(--text-primary); }
.card-header .subtext { font-size: 13px; color: var(--text-tertiary); }

.card-body { max-height: 480px; overflow-y: auto; }

.empty-state { padding: 40px var(--space-lg); text-align: center; color: var(--text-tertiary); font-size: 14px; }
.empty-state .empty-title { color: var(--text-secondary); font-weight: 500; margin-bottom: 4px; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left;
  padding: 10px var(--space-md);
  color: var(--text-tertiary);
  font-weight: 500;
  font-size: 12px;
  border-bottom: 1px solid var(--surface-border);
  position: sticky;
  top: 0;
  background: var(--surface);
}
td { padding: 11px var(--space-md); border-bottom: 1px solid var(--surface-border); color: var(--text-secondary); }
td.primary { color: var(--text-primary); }
tr:last-child td { border-bottom: none; }

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 9px;
  vertical-align: middle;
}
.status-dot.accent { background: var(--accent); }
.status-dot.yellow  { background: var(--amber); }
.status-dot.red     { background: var(--red); }
.status-dot.grey    { background: var(--grey); }

.demo-banner { background: var(--amber-soft); color: var(--amber); padding: 12px var(--space-lg); font-size: 13.5px; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-border); border-radius: 4px; }
