/* Enterprise pages: /team, /usage, /audit-log, /jobs, /sla, and the
   key settings on /developers. Additive over styles.css; every colour
   is a variable so the ledger reads the same in light and dark. */

.ent-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.ent-head .sub { margin: 4px 0 0; }
.ent-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); align-items: start; }
.ent-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); align-items: start; }
.ent-stack > * + * { margin-top: var(--s-4); }
.ent-empty { font-size: 13px; color: var(--muted); padding: 14px 0; }

/* forms */
.ent-form { display: grid; gap: 12px; }
.ent-form label { display: block; font-size: .68rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.ent-form input[type=text], .ent-form input[type=email], .ent-form input[type=number], .ent-form select, .ent-form textarea {
  width: 100%; padding: 9px 11px; font: inherit; font-size: 14px; color: var(--text);
  background: var(--surface); border: 1px solid var(--glass-line); border-radius: 0;
}
.ent-form textarea { min-height: 88px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.ent-form .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.ent-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ent-inline { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.ent-inline > * { flex: 1 1 160px; }
.ent-inline > .btn { flex: 0 0 auto; }

/* scope + role chips */
.scope-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.scope-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--glass-line); font-size: 12.5px; cursor: pointer; background: var(--surface); color: var(--text); user-select: none; }
.scope-chip input { margin: 0; accent-color: var(--pine); }
.scope-chip.on { border-color: var(--pine); color: var(--ink); background: var(--sage-wash); }
.scope-chip.write { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.role-chip { display: inline-block; padding: 2px 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; border: 1px solid var(--glass-line); color: var(--muted); }
.role-chip.owner { border-color: var(--pine); color: var(--pine); }
.role-chip.admin { color: var(--ink); border-color: var(--ink); }
.kind-tag { display: inline-block; padding: 1px 6px; font-size: 11px; border: 1px solid var(--glass-line); color: var(--muted); margin-left: 6px; vertical-align: middle; }
.kind-tag.sandbox { color: var(--pine); border-color: var(--pine); }

/* tables */
table.data.ent td.num, table.data.ent th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data.ent td.acts { text-align: right; white-space: nowrap; }
table.data.ent td.acts .btn + .btn { margin-left: 6px; }
table.data.ent .mono-sm { font-size: 12px; }
.status-chip.queued { background: var(--wash-deep); color: var(--muted); }
.status-chip.running { background: var(--sage-wash); color: var(--pine); }
.status-chip.done { background: var(--ok-bg); color: var(--ok); }
.status-chip.failed, .status-chip.cancelled { background: var(--flag-bg); color: var(--flag); }

/* charts: plain SVG, ink on paper */
.ent-chart { width: 100%; height: auto; display: block; }
.ent-chart .bar { fill: var(--pine); }
.ent-chart .bar.err { fill: var(--flag); }
.ent-chart .bar.dim { fill: var(--glass-line); }
.ent-chart .axis { stroke: var(--glass-line); stroke-width: 1; }
.ent-chart .lbl { font-size: 10px; fill: var(--muted); font-family: inherit; }
.ent-chart .val { font-size: 10px; fill: var(--ink); font-family: inherit; font-weight: 600; }
.ent-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.ent-legend i { display: inline-block; width: 10px; height: 10px; vertical-align: -1px; margin-right: 5px; background: var(--pine); }
.ent-legend i.err { background: var(--flag); }
.hbar-row { display: grid; grid-template-columns: minmax(140px, 1.2fr) 3fr auto; gap: 10px; align-items: center; font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--glass-line); }
.hbar-row:last-child { border-bottom: 0; }
.hbar-row .track { height: 10px; background: var(--wash-deep); position: relative; }
.hbar-row .fill { position: absolute; inset: 0 auto 0 0; background: var(--pine); }
.hbar-row .n { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }

/* the SLA sheet */
.sla-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.sla-figure { font-family: Abel, Figtree, sans-serif; font-size: 2.2rem; line-height: 1; color: var(--ink); }
.sla-figure small { display: block; font-family: inherit; font-size: .75rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-top: 6px; }
.sla-table td:first-child { font-weight: 600; color: var(--ink); }

/* the docs reference */
.api-ref td:first-child { white-space: nowrap; }
.ref-index li { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; padding: 4px 0; border-bottom: 1px solid var(--glass-line); color: var(--text); }
.ref-index li:last-child { border-bottom: 0; }
.ref-index li b { color: var(--pine); font-weight: 600; margin-right: 8px; }
.changelog li { padding: 6px 0 6px 14px; position: relative; font-size: 13.5px; }
.changelog li::before { content: ""; position: absolute; left: 0; top: 13px; width: 6px; height: 6px; background: var(--pine); }
.changelog h4 { margin: 14px 0 4px; font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.schema-list { columns: 3; column-gap: 18px; font-size: 13px; }
.schema-list li { break-inside: avoid; padding: 3px 0; }
.schema-list code { font-size: 12px; }
.schema-view { max-height: 420px; overflow: auto; }

.invite-link { display: flex; gap: 8px; align-items: center; }
.invite-link input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

.branding-preview { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--glass-line); }
.branding-preview img { max-height: 36px; max-width: 160px; }
.branding-preview .swatch { width: 18px; height: 18px; border: 1px solid var(--glass-line); }

@media (max-width: 900px) {
  .ent-grid, .ent-grid-3, .sla-grid, .ent-form-row { grid-template-columns: 1fr; }
  .schema-list { columns: 1; }
}
