/* ─────────────────────────────────────────────────────────────────
 * Team / Billing / Settings — minimal enterprise CSS
 * Uses only existing --d-* tokens. Type-led, tight tables, single rails.
 * ──────────────────────────────────────────────────────────────── */

/* ═══════════════════════════════════════════════════════════════
 *  Shared with docs/support (only what's needed if loaded standalone)
 * ══════════════════════════════════════════════════════════════ */
.ds2 .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.ds2 .dim  { color: var(--d-dim); }
.ds2 .ok   { color: var(--d-success); }

/* Row-end "more" button (used in roster + keys) */
.row-more {
  width: 28px; height: 28px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--d-dim);
  font-size: 1.1rem; line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  transition: background 130ms ease, color 130ms ease, border-color 130ms ease;
}
.row-more:hover { color: var(--d-ink); background: rgba(255,255,255,0.04); border-color: var(--d-line-2); }

/* ═══════════════════════════════════════════════════════════════
 *  TEAM
 * ══════════════════════════════════════════════════════════════ */

/* Hero key/value row */
.tm-hero-row {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--d-line);
  border-bottom: 1px solid var(--d-line);
}
.tm-fact {
  padding: 16px 18px 14px;
  border-right: 1px solid var(--d-line);
  display: flex; flex-direction: column; gap: 5px;
}
.tm-fact:last-child { border-right: none; }
.tm-fact .lab {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--d-dim);
}
.tm-fact .v {
  font-size: 1.32rem; font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--d-ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tm-fact .v small { font-size: 0.78rem; color: var(--d-muted); font-weight: 600; margin-left: 2px; }
.tm-fact .v.ok { color: var(--d-success); font-size: 1rem; }

/* Roster toolbar */
.tm-roster-tools {
  display: inline-flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
.tm-search {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--d-line);
  background: rgba(13,20,36,0.55);
  border-radius: 7px;
  min-width: 220px;
  transition: border-color 160ms ease;
}
.tm-search:focus-within { border-color: var(--d-accent); }
.tm-search svg { width: 13px; height: 13px; stroke: var(--d-muted); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tm-search input {
  background: transparent; border: none; outline: none;
  color: var(--d-ink);
  font-family: inherit; font-size: 0.78rem; flex: 1; min-width: 0;
}
.tm-search input::placeholder { color: rgba(196,210,235,0.42); }

.tm-filter {
  display: inline-flex;
  border: 1px solid var(--d-line);
  background: rgba(13,20,36,0.42);
  border-radius: 7px;
  padding: 2px;
  gap: 1px;
}
.tm-filter button {
  height: 26px; padding: 0 10px;
  border: none; border-radius: 5px;
  background: transparent;
  color: var(--d-muted);
  font-family: inherit; font-size: 0.7rem; font-weight: 700;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}
.tm-filter button:hover { color: var(--d-ink); }
.tm-filter button.active { background: var(--d-accent-soft); color: var(--d-ink); }

.tm-invite {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 14px;
  border: 1px solid transparent;
  background: var(--d-accent);
  color: #07101f;
  font-family: inherit; font-size: 0.78rem; font-weight: 750;
  border-radius: 7px;
  cursor: pointer;
  transition: background 160ms ease, transform 100ms ease;
}
.tm-invite:hover { background: #9fc8ff; }
.tm-invite:active { transform: scale(0.98); }
.tm-invite svg { width: 13px; height: 13px; }

/* Roster table */
.tm-table-wrap {
  border: 1px solid var(--d-line);
  border-radius: 10px;
  background: var(--d-panel-bg);
  overflow: hidden;
}
.tm-table { width: 100%; border-collapse: collapse; }
.tm-table thead th {
  text-align: left;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--d-dim);
  padding: 12px 16px;
  border-bottom: 1px solid var(--d-line);
  background: rgba(13,20,36,0.32);
}
.tm-table tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--d-line);
  font-size: 0.78rem;
  color: var(--d-muted);
  vertical-align: middle;
  height: 56px;
  box-sizing: border-box;
}
.tm-table tbody td.dim.mono {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  max-width: 0;
}
.tm-table tbody tr:last-child td { border-bottom: none; }
.tm-table tbody tr:hover td { background: rgba(255,255,255,0.018); cursor: pointer; }
.tm-table .who {
  display: flex; align-items: center; gap: 11px;
}
.tm-table .who .ava {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.66rem; font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.tm-table .who .ava.g1 { background: linear-gradient(135deg, #d99019, #875100); }
.tm-table .who .ava.g2 { background: linear-gradient(135deg, #2f7dd3, #133b66); }
.tm-table .who .ava.g3 { background: linear-gradient(135deg, #c75d18, #6b2f05); }
.tm-table .who .ava.g4 { background: linear-gradient(135deg, #16a36b, #095932); }
.tm-table .who .ava.g5 { background: linear-gradient(135deg, #6d5fd3, #3c3382); }
.tm-table .who .ava.g6 { background: linear-gradient(135deg, #c93c52, #6a1626); }
.tm-table .who .ava.g7 { background: linear-gradient(135deg, #1e7a8a, #0d3b44); }
.tm-table .who .ava.g8 { background: linear-gradient(135deg, #94283b, #4b101b); }
.tm-table .who .ava.g9 { background: linear-gradient(135deg, #4d6e1f, #243408); }
.tm-table .who .ava.ghost {
  background: transparent;
  border: 1.5px dashed rgba(122,139,176,0.42);
  color: var(--d-dim);
}
.tm-table .who .meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tm-table .who .n { font-size: 0.84rem; font-weight: 650; color: var(--d-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-table .who .e {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.66rem; color: var(--d-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tm-table .role {
  display: inline-flex;
  height: 22px; padding: 0 9px;
  border-radius: 5px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.66rem; font-weight: 800;
  letter-spacing: 0.04em;
  align-items: center;
  border: 1px solid transparent;
}
.tm-table .role.owner { color: var(--d-warning); background: var(--d-warning-soft); border-color: rgba(255,209,102,0.28); }
.tm-table .role.admin { color: var(--d-accent);  background: var(--d-accent-soft);  border-color: rgba(118,174,232,0.28); }
.tm-table .role.eng   { color: #b69bff;          background: rgba(169,139,255,0.10); border-color: rgba(169,139,255,0.28); }
.tm-table .role.view  { color: var(--d-muted);   background: rgba(122,139,176,0.10); border-color: rgba(122,139,176,0.24); }
.tm-table tr.pending td { opacity: 0.78; }
.tm-table tr.pending .who .n { color: var(--d-muted); font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.78rem; font-weight: 600; }

.tm-table-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 4px 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem; color: var(--d-dim);
  letter-spacing: 0.04em;
}

/* Roles + audit split */
.tm-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 32px;
}
.tm-roles ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; }
.tm-roles li {
  display: grid;
  grid-template-columns: 6px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--d-line);
}
.tm-roles li:last-child { border-bottom: 1px solid var(--d-line); }
.tm-roles .bullet { width: 6px; height: 28px; border-radius: 2px; }
.tm-roles .nm {
  font-size: 0.88rem; font-weight: 750;
  color: var(--d-ink);
  letter-spacing: -0.012em;
}
.tm-roles .d {
  font-size: 0.76rem; color: var(--d-muted);
  margin-top: 3px;
  line-height: 1.5;
}
.tm-roles .d strong { color: var(--d-ink); font-weight: 700; }
.tm-roles .ct {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 1.4rem; font-weight: 700;
  color: var(--d-ink);
  font-variant-numeric: tabular-nums;
  padding-right: 8px;
}

.tm-log { list-style: none; padding: 0; margin: 0; }
.tm-log li {
  display: grid;
  grid-template-columns: 92px 180px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--d-line);
}
.tm-log li:last-child { border-bottom: 1px solid var(--d-line); }
.tm-log .when {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem; color: var(--d-dim);
}
.tm-log .who {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 650;
  color: var(--d-ink);
}
.tm-log .who .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--d-accent);
}
.tm-log .who .dot.success { background: var(--d-success); }
.tm-log .who .dot.warn    { background: var(--d-warning); }
.tm-log .who .dot.danger  { background: var(--d-danger); }
.tm-log .what {
  font-size: 0.78rem; color: var(--d-muted);
  line-height: 1.5;
}
.tm-log .what strong { color: var(--d-ink); font-weight: 700; }
.tm-log .what code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem; color: var(--d-accent-2);
  background: rgba(118,174,232,0.08);
  padding: 1px 6px; border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════════
 *  BILLING
 * ══════════════════════════════════════════════════════════════ */
.bi-hero-actions {
  margin-top: 26px;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.bi-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 16px;
  border-radius: 7px;
  border: 1px solid var(--d-line);
  background: rgba(255,255,255,0.03);
  color: var(--d-ink);
  font-family: inherit; font-size: 0.78rem; font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 100ms ease;
}
.bi-btn:hover { border-color: var(--d-line-active); background: rgba(255,255,255,0.05); }
.bi-btn:active { transform: scale(0.98); }
.bi-btn svg { width: 14px; height: 14px; }
.bi-btn.primary { background: var(--d-accent); color: #07101f; border-color: transparent; }
.bi-btn.primary:hover { background: #9fc8ff; }

/* Invoices + Payment side-by-side wrapper (invoices on left, payment on right) */
.bi-split {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
@media (max-width: 1100px) {
  .bi-split { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* Usage meters */
.bi-meters {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 14px;
}
.bi-meters li {
  display: grid; gap: 10px;
  padding: 20px 24px;
  border: 1px solid var(--d-line);
  border-radius: 10px;
  background: var(--d-panel-bg);
}
.bi-meters .hd {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
}
.bi-meters .lab {
  font-size: 0.84rem; font-weight: 700;
  color: var(--d-ink);
  letter-spacing: -0.01em;
}
.bi-meters .r {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.bi-meters .v {
  font-size: 1.32rem; font-weight: 800;
  color: var(--d-ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}
.bi-meters .t { font-size: 0.78rem; color: var(--d-dim); }
.bi-meters .bar {
  height: 6px; border-radius: 999px;
  background: rgba(83,105,138,0.18);
  overflow: hidden;
}
.bi-meters .bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--d-accent), var(--d-accent-2));
  border-radius: 999px;
  animation: barGrow 900ms cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: left;
}
.bi-meters .foot {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 0.72rem; color: var(--d-muted);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.02em;
}

/* Filter row (re-uses tm filter, but local) */
.bi-inv-filters {
  display: inline-flex;
  border: 1px solid var(--d-line);
  background: rgba(13,20,36,0.42);
  border-radius: 7px;
  padding: 2px;
  gap: 1px;
}
.bi-inv-filters button {
  height: 26px; padding: 0 10px;
  border: none; border-radius: 5px;
  background: transparent;
  color: var(--d-muted);
  font-family: inherit; font-size: 0.7rem; font-weight: 700;
  cursor: pointer;
}
.bi-inv-filters button:hover { color: var(--d-ink); }
.bi-inv-filters button.active { background: var(--d-accent-soft); color: var(--d-ink); }

/* Invoices table */
.bi-table-wrap {
  border: 1px solid var(--d-line);
  border-radius: 10px;
  background: var(--d-panel-bg);
  overflow: hidden;
}
.bi-table { width: 100%; border-collapse: collapse; }
.bi-table thead th {
  text-align: left;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--d-dim);
  padding: 13px 18px;
  border-bottom: 1px solid var(--d-line);
  background: rgba(13,20,36,0.32);
}
.bi-table thead th.r { text-align: right; }
.bi-table tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--d-line);
  font-size: 0.82rem;
  color: var(--d-muted);
  vertical-align: middle;
}
.bi-table tbody tr:last-child td { border-bottom: none; }
.bi-table tbody tr:hover td { background: rgba(255,255,255,0.018); cursor: pointer; }
.bi-table td.r { text-align: right; }
.bi-table td.num { color: var(--d-ink); font-weight: 700; }
.bi-stat {
  display: inline-flex; align-items: center;
  height: 22px; padding: 0 9px;
  border-radius: 5px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.66rem; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.bi-stat.paid  { color: var(--d-success); background: var(--d-success-soft); }
.bi-stat.draft { color: var(--d-muted);   background: rgba(122,139,176,0.10); }
.bi-stat.due,
.bi-stat.open  { color: var(--d-warning); background: var(--d-warning-soft); }
.bi-stat.void  { color: var(--d-dim);     background: rgba(122,139,176,0.06); text-decoration: line-through; }
.bi-dl {
  width: 28px; height: 28px;
  border: 1px solid var(--d-line);
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
  color: var(--d-muted);
  cursor: pointer;
  display: grid; place-items: center;
  transition: color 160ms ease, border-color 160ms ease;
}
.bi-dl:hover { color: var(--d-ink); border-color: var(--d-line-active); }
.bi-dl svg { width: 13px; height: 13px; }
.bi-table-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 4px 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem; color: var(--d-dim);
}

/* Usage + Tax */
.bi-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}
.bi-card {
  padding: 20px 24px;
  border: 1px solid var(--d-line);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(118,174,232,0.12), rgba(118,174,232,0.02)),
    var(--d-panel-bg);
  margin-bottom: 18px;
}
.bi-card .brand {
  display: inline-block;
  height: 22px; padding: 0 9px;
  border-radius: 4px;
  background: linear-gradient(135deg, #1a1f71, #0d1145);
  color: #f3e8a3;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 22px;
  margin-bottom: 16px;
}
.bi-card .num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 1.1rem; font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--d-muted);
}
.bi-card .num .last4 { color: var(--d-ink); font-weight: 800; }
.bi-card .meta {
  margin-top: 10px;
  display: inline-flex; gap: 8px; align-items: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem; color: var(--d-muted);
}
.bi-card .meta strong { color: var(--d-ink); font-weight: 700; }
.bi-pay-meta { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; }
.bi-pay-meta li {
  display: grid; grid-template-columns: 120px 1fr; gap: 14px;
  align-items: baseline;
  padding: 12px 0;
  border-top: 1px solid var(--d-line);
}
.bi-pay-meta li:last-child { border-bottom: 1px solid var(--d-line); }
.bi-pay-meta .lab {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.66rem; color: var(--d-dim);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.bi-pay-meta .v { font-size: 0.84rem; color: var(--d-ink); }

.bi-detail-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; }
.bi-detail-list li {
  display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 18px;
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid var(--d-line);
}
.bi-detail-list li:last-child { border-bottom: 1px solid var(--d-line); }
.bi-detail-list .lab {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.66rem; color: var(--d-dim);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.bi-detail-list .v { font-size: 0.86rem; color: var(--d-ink); }

/* ═══════════════════════════════════════════════════════════════
 *  SETTINGS
 * ══════════════════════════════════════════════════════════════ */
.st-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 32px;
  align-items: flex-start;
}

.st-nav {
  display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 78px;
}
.st-nav-lab {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.62rem; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--d-dim);
  padding: 0 10px 10px;
  border-bottom: 1px solid var(--d-line);
  margin-bottom: 6px;
}
.st-nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--d-muted);
  font-family: inherit;
  font-size: 0.82rem; font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}
.st-nav-item:hover { background: rgba(255,255,255,0.025); color: var(--d-ink); }
.st-nav-item.active {
  background: var(--d-accent-soft);
  color: var(--d-ink);
  font-weight: 700;
  box-shadow: inset 2px 0 0 var(--d-accent);
}
.st-nav-item svg {
  width: 16px; height: 16px;
  flex-shrink: 0;
}
.st-nav-item.danger { color: var(--d-danger); margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--d-line); border-radius: 0 7px 7px 0; }
.st-nav-item.danger:hover { background: var(--d-danger-soft); color: var(--d-danger); }

/* Pages */
.st-pages { min-width: 0; }
.st-page { display: none; }
.st-page.active { display: block; animation: stPageIn 300ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes stPageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.st-page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--d-line);
}
.st-page-head h2 {
  margin: 0;
  font-size: 1.32rem; font-weight: 700;
  color: var(--d-ink);
  letter-spacing: -0.028em;
}
.st-page-head p {
  margin: 5px 0 0;
  font-size: 0.84rem; color: var(--d-muted);
  line-height: 1.5;
  max-width: 540px;
  flex: 1 1 320px;
}

/* Form grid */
.st-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px 28px;
  margin-bottom: 28px;
}
.st-field { display: grid; gap: 8px; }
.st-field .lab {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.66rem; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--d-dim);
}
.st-field input,
.st-field select,
.st-field textarea {
  height: 38px; padding: 0 12px;
  border: 1px solid var(--d-line-2);
  border-radius: 7px;
  background: rgba(5,8,15,0.62);
  color: var(--d-ink);
  font-family: inherit;
  font-size: 0.84rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  appearance: none;
}
.st-field input.mono, .st-field select.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.st-field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa8c4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  padding-right: 32px;
}
.st-field input:focus, .st-field select:focus {
  border-color: var(--d-accent);
  box-shadow: 0 0 0 3px rgba(118,174,232,0.14);
}
.st-field .hint {
  font-size: 0.72rem; color: var(--d-muted);
  line-height: 1.45;
}

.st-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--d-line);
}
.st-foot .saved {
  font-size: 0.7rem; color: var(--d-dim);
  letter-spacing: 0.02em;
}
.st-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 16px;
  border-radius: 7px;
  border: 1px solid var(--d-line);
  background: rgba(255,255,255,0.03);
  color: var(--d-ink);
  font-family: inherit; font-size: 0.78rem; font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 100ms ease;
}
.st-btn:hover { border-color: var(--d-line-active); background: rgba(255,255,255,0.05); }
.st-btn:active { transform: scale(0.98); }
.st-btn.primary { background: var(--d-accent); color: #07101f; border-color: transparent; }
.st-btn.primary:hover { background: #9fc8ff; }
.st-btn.danger {
  background: var(--d-danger-soft);
  border-color: rgba(255,139,139,0.32);
  color: var(--d-danger);
}
.st-btn.danger:hover { background: rgba(255,139,139,0.18); }
.st-btn.ghost { background: transparent; }
.st-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Row list (security, webhooks, notifs, integrations, data, danger) */
.st-rows {
  display: grid; gap: 1px;
  border-top: 1px solid var(--d-line);
}
.st-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--d-line);
}
.st-row .t {
  font-size: 0.88rem; font-weight: 700;
  color: var(--d-ink);
  letter-spacing: -0.012em;
}
.st-row .t code, .st-row .d code, .st-row .t.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.st-row .t.mono { font-size: 0.82rem; font-weight: 700; color: var(--d-ink); }
.st-row .d {
  margin-top: 4px;
  font-size: 0.76rem; color: var(--d-muted);
  line-height: 1.5;
}
.st-row .d code {
  font-size: 0.72rem;
  background: rgba(118,174,232,0.08);
  color: var(--d-accent-2);
  padding: 1px 6px; border-radius: 4px;
}
.st-row.danger { background: linear-gradient(90deg, rgba(255,139,139,0.04), transparent); padding-left: 14px; padding-right: 14px; margin: 0 -14px; border-radius: 8px; border-bottom-color: rgba(255,139,139,0.12); }
.st-row.danger .t { color: var(--d-ink); }

.st-tag {
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 10px;
  border-radius: 5px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.66rem; font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.st-tag.ok   { color: var(--d-success); background: var(--d-success-soft); border-color: rgba(118,227,163,0.28); }
.st-tag.warn { color: var(--d-warning); background: var(--d-warning-soft); border-color: rgba(255,209,102,0.28); }
.st-tag.dim  { color: var(--d-muted);   background: rgba(122,139,176,0.08); border-color: rgba(122,139,176,0.20); }

.st-link {
  background: transparent;
  border: 1px solid var(--d-line);
  color: var(--d-accent-2);
  padding: 6px 12px;
  border-radius: 6px;
  font-family: inherit; font-size: 0.72rem; font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}
.st-link:hover { border-color: var(--d-accent); background: var(--d-accent-soft); }

/* Notification switches */
.st-switches {
  display: inline-flex; gap: 6px;
}
.st-pill {
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--d-line);
  background: rgba(255,255,255,0.02);
  color: var(--d-dim);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  user-select: none;
  transition: all 160ms ease;
}
.st-pill:hover { color: var(--d-ink); border-color: var(--d-line-active); }
.st-pill.on {
  background: var(--d-accent-soft);
  border-color: rgba(118,174,232,0.42);
  color: var(--d-accent-2);
}

/* Settings table (API keys) */
.st-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--d-line);
  border-radius: 10px;
  background: var(--d-panel-bg);
  overflow: hidden;
}
.st-table thead th {
  text-align: left;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--d-dim);
  padding: 12px 16px;
  border-bottom: 1px solid var(--d-line);
  background: rgba(13,20,36,0.32);
}
.st-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--d-line);
  font-size: 0.78rem;
  color: var(--d-muted);
  vertical-align: middle;
}
.st-table tbody tr:last-child td { border-bottom: none; }
.st-table tbody tr:hover td { background: rgba(255,255,255,0.018); }
.st-table .t { font-size: 0.84rem; font-weight: 700; color: var(--d-ink); }
.st-table .k {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  margin-top: 3px;
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════════════════
 *  Responsive
 * ══════════════════════════════════════════════════════════════ */
@media (max-width: 880px) {
  .tm-hero-row { grid-template-columns: repeat(2, 1fr); }
  .tm-hero-row .tm-fact:nth-child(2n) { border-right: none; }
  .tm-bottom { grid-template-columns: 1fr; gap: 28px; }
  .bi-bottom { grid-template-columns: 1fr; gap: 28px; }
  .st-layout { grid-template-columns: 1fr; gap: 22px; }
  .st-nav { flex-direction: row; flex-wrap: wrap; position: static; gap: 4px; }
  .st-nav-lab { width: 100%; border-bottom: none; }
  .st-nav-item.danger { margin-top: 0; padding-top: 9px; border-top: none; }
}
@media (max-width: 760px) {
  .tm-hero-row { grid-template-columns: 1fr; }
  .tm-hero-row .tm-fact { border-right: none; border-bottom: 1px solid var(--d-line); }
  .tm-hero-row .tm-fact:last-child { border-bottom: none; }
  .tm-log li { grid-template-columns: 90px 1fr; }
  .tm-log .what { grid-column: 1 / -1; }
}
