/* Fabrixcore Control Plane — the layer ABOVE subscriber workspaces.
   Deep graphite surfaces, cool steel type, the X's cyan→blue as the only accent. */
:root {
  --bg: #07090d;
  --rail: #0b0f16;
  --panel: #0f141c;
  --panel-2: #131a24;
  --line: #1c2533;
  --line-2: #243043;
  --text: #e7edf5;
  --text-2: #a9b6c8;
  --muted: #6f7e93;
  --accent: #22d3ee;
  --accent-2: #1565ff;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 12px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 14px/1.55 Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--text); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 15px; margin-bottom: 14px; color: var(--text); }
h3 { font-size: 13px; margin: 18px 0 8px; color: var(--text-2); text-transform: uppercase; letter-spacing: .08em; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.strong { font-weight: 600; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }

/* ---- shell ---- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.rail { background: linear-gradient(180deg, #0c111a 0%, #080b11 100%); border-right: 1px solid var(--line); padding: 26px 16px 20px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand img { display: block; width: 184px; height: auto; margin: -18px 0 -14px -14px; }
.rail-label { font-size: 10px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); margin: 0 0 22px 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; color: var(--text-2); font-weight: 500; margin-bottom: 2px; border: 1px solid transparent; }
.nav-item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.nav-item:hover { background: #111824; color: var(--text); }
.nav-item.is-active { background: linear-gradient(90deg, rgba(34, 211, 238, .12), rgba(21, 101, 255, .06)); border-color: rgba(34, 211, 238, .22); color: #fff; }
.nav-item.is-active svg { color: var(--accent); }
.rail-foot { margin-top: auto; border-top: 1px solid var(--line); padding: 16px 4px 0; }
.op-name { font-weight: 600; margin: 0; }
.op-role { font-size: 12px; color: var(--accent); margin: 2px 0 8px; }
button.link { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
button.link:hover { color: var(--text); }
.main { min-width: 0; }
.top { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 36px; border-bottom: 1px solid var(--line); background: rgba(7, 9, 13, .86); position: sticky; top: 0; z-index: 2; backdrop-filter: blur(8px); }
.top h1 { font-size: 19px; }
.env { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); }
.env-production { border-color: rgba(248, 113, 113, .5); color: var(--bad); }
main { padding: 28px 36px 60px; max-width: 1280px; }

/* ---- panels ---- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px; }
.panel-warn { border-color: rgba(251, 191, 36, .28); background: linear-gradient(180deg, rgba(251, 191, 36, .05), var(--panel) 60%); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-2 > .panel { margin-bottom: 0; }
.grid-2 + .panel, .grid-2 + .grid-2 { margin-top: 18px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: block; position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: .55; }
a.stat:hover { border-color: var(--line-2); }
.stat-label { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0; }
.stat-value { font-size: 26px; font-weight: 600; margin: 8px 0 2px; color: #fff; letter-spacing: -.02em; }
.stat-context { font-size: 12px; color: var(--text-2); margin: 0; }
.stat-list { list-style: none; margin: 10px 0 6px; padding: 0; display: grid; gap: 4px; }
.stat-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--text-2); }
.stat-list strong { color: #fff; font-size: 16px; }
.hero-panel { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 26px 28px; margin-bottom: 18px; border-radius: var(--radius); border: 1px solid var(--line-2);
  background: radial-gradient(120% 140% at 100% 0%, rgba(21, 101, 255, .18), transparent 55%), radial-gradient(90% 120% at 0% 100%, rgba(34, 211, 238, .08), transparent 60%), var(--panel-2); }
.hero-title { font-size: 26px; letter-spacing: -.02em; margin: 0 0 6px; }
.hero-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--text-2); }

/* ---- lists / tables ---- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list li a { display: flex; gap: 10px; width: 100%; }
.list.compact li { padding: 7px 0; font-size: 13px; flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.dot-warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(251, 191, 36, .15); }
.dot-muted { background: var(--muted); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:hover td { background: rgba(255, 255, 255, .015); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table.mini td, .table.mini th { padding: 8px 10px; }
.table.health td { overflow-wrap: anywhere; }
.table.health td:first-child { min-width: 150px; }
.kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 16px; margin: 0 0 14px; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; }
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; }
.pill-ok { color: var(--ok); border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .08); }
.pill-warn { color: var(--warn); border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .08); }
.pill-bad { color: var(--bad); border-color: rgba(248, 113, 113, .35); background: rgba(248, 113, 113, .08); }
.pill-accent { color: var(--accent); border-color: rgba(34, 211, 238, .35); background: rgba(34, 211, 238, .08); }
.alert { border: 1px solid rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .07); color: #fde68a; border-radius: 9px; padding: 10px 12px; font-size: 13px; }
.link-accent { color: var(--accent); font-size: 13px; font-weight: 500; }

/* ---- forms ---- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.input { background: #0a0e14; border: 1px solid var(--line-2); color: var(--text); border-radius: 9px; padding: 9px 12px; font: inherit; min-width: 0; flex: 1 1 260px; }
.input:focus { outline: 2px solid rgba(34, 211, 238, .45); outline-offset: 1px; }
.check { display: flex; gap: 8px; align-items: center; color: var(--text-2); font-size: 13px; }
.form { display: grid; gap: 12px; max-width: 520px; }
.form label { display: grid; gap: 6px; color: var(--text-2); font-size: 13px; }
.btn { display: inline-block; background: #121a26; border: 1px solid var(--line-2); color: var(--text); padding: 9px 16px; border-radius: 9px; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { border-color: #33455f; }
.btn-primary { background: linear-gradient(135deg, var(--accent-2), #1a8cff 55%, var(--accent)); border-color: transparent; color: #fff; }
.btn-block { display: block; text-align: center; width: 100%; padding: 12px 16px; }
.steps { margin: 0 0 16px; padding-left: 20px; color: var(--text-2); }
.steps li { margin-bottom: 6px; }
.steps a { color: var(--accent); }
.sop-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sop-list a { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); height: 100%; }
.sop-list a:hover { border-color: rgba(34, 211, 238, .35); }
.sop { max-width: 860px; }
.sop h2 { font-size: 16px; margin: 26px 0 10px; }
.sop h3 { margin-top: 20px; }
.sop p, .sop li { color: var(--text-2); }
.sop code { background: #0a0e14; border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: 12px; color: var(--text); }
.sop table { width: 100%; border-collapse: collapse; margin: 10px 0 16px; }
.sop th, .sop td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sop th { color: var(--muted); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.note { border-left: 3px solid var(--accent); background: rgba(34, 211, 238, .06); padding: 10px 14px; border-radius: 6px; color: var(--text-2); margin: 12px 0; }

/* ---- sign-in ---- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(60% 50% at 50% 0%, rgba(21, 101, 255, .22), transparent 70%), radial-gradient(40% 40% at 80% 100%, rgba(34, 211, 238, .08), transparent 70%), var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: rgba(15, 20, 28, .92); border: 1px solid var(--line-2); border-radius: 16px; padding: 34px 32px 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
.auth-mark { display: block; width: 260px; max-width: 100%; height: auto; margin: -34px auto -22px; }
.auth-card .eyebrow { text-align: center; margin-top: 4px; }
.auth-card h1 { text-align: center; font-size: 22px; margin-bottom: 10px; }
.auth-card .muted { text-align: center; margin-bottom: 22px; }
.fine { font-size: 11px; color: var(--muted); text-align: center; margin: 18px 0 0; }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; min-width: 0; }
  .brand img { width: 132px; margin: -12px -6px -10px -10px; }
  .rail-label { display: none; }
  .rail nav { display: flex; gap: 4px; overflow-x: auto; width: 100%; min-width: 0; order: 3; scrollbar-width: none; }
  .nav-item { white-space: nowrap; padding: 8px 10px; }
  .rail-foot { margin: 0 0 0 auto; border: 0; padding: 0; text-align: right; }
  .op-role { display: none; }
  .top { padding: 0 16px; height: 60px; }
  main { padding: 18px 16px 40px; }
  .grid-2, .stats, .sop-list { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
}
