/* THUNDREX V58 design system.
   Tokens and controls for later dashboard phases.
   Loaded on the public homepage in V58.2. Dashboard pages are unchanged. */
:root {
  --tx-obsidian: #09090b;
  --tx-graphite: #18181b;
  --tx-graphite-2: #111113;
  --tx-raised: #1f1f23;
  --tx-orange: #ff6500;
  --tx-orange-deep: #c2410c;
  --tx-amber: #ffb347;
  --tx-silver: #e4e4e7;
  --tx-silver-dim: #a1a1aa;
  --tx-line: rgba(228, 228, 231, 0.14);
  --tx-line-strong: rgba(228, 228, 231, 0.28);
  --tx-ok: #86efac;
  --tx-warn: #ffb347;
  --tx-danger: #f87171;
  --tx-info: #93c5fd;
  --tx-radius: 4px;
  --tx-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --tx-font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --tx-mono: "Cascadia Mono", "Segoe UI Mono", ui-monospace, Consolas, monospace;
  --tx-focus: 0 0 0 3px rgba(255, 101, 0, 0.45);
  color-scheme: dark;
}

.tx-btn,
.tx-input,
.tx-card,
.tx-table,
.tx-badge,
.tx-dialog,
.tx-menu {
  font-family: var(--tx-font);
}

.tx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--tx-radius);
  border: 1px solid var(--tx-line-strong);
  background: var(--tx-graphite);
  color: var(--tx-silver);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.tx-btn:hover { background: var(--tx-raised); border-color: var(--tx-silver-dim); }
.tx-btn:focus-visible { outline: none; box-shadow: var(--tx-focus); }
.tx-btn-primary {
  background: var(--tx-orange);
  border-color: #ff8a3d;
  color: #140800;
}
.tx-btn-primary:hover { background: #ff7a1a; }
.tx-btn-ghost { background: transparent; }

.tx-input,
.tx-select,
.tx-textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: var(--tx-radius);
  border: 1px solid var(--tx-line-strong);
  background: var(--tx-obsidian);
  color: var(--tx-silver);
  font: 14px/1.4 var(--tx-font);
}
.tx-input:focus,
.tx-select:focus,
.tx-textarea:focus { outline: none; border-color: var(--tx-orange); box-shadow: var(--tx-focus); }
.tx-textarea { min-height: 96px; resize: vertical; }

.tx-card {
  background: var(--tx-graphite);
  border: 1px solid var(--tx-line);
  border-radius: var(--tx-radius);
  box-shadow: var(--tx-shadow);
}
.tx-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--tx-line);
  color: var(--tx-silver-dim);
  font: 11px/1 var(--tx-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tx-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tx-table th,
.tx-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--tx-line); }
.tx-table th { color: var(--tx-silver-dim); font-weight: 650; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.tx-table tr:hover td { background: rgba(255, 255, 255, 0.03); }

.tx-badge,
.tx-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 2px;
  border: 1px solid var(--tx-line-strong);
  color: var(--tx-silver);
  font: 11px/1 var(--tx-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tx-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tx-silver-dim);
}
.tx-status-live::before { background: var(--tx-ok); }
.tx-status-warn::before { background: var(--tx-warn); }
.tx-status-off::before { background: var(--tx-danger); }
.tx-badge-premium { color: #140800; background: var(--tx-amber); border-color: transparent; }

.tx-dialog {
  width: min(480px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--tx-line-strong);
  border-radius: var(--tx-radius);
  background: var(--tx-graphite);
  color: var(--tx-silver);
  box-shadow: var(--tx-shadow);
}
.tx-dialog::backdrop { background: rgba(9, 9, 11, 0.72); }
.tx-dialog-body { padding: 18px; }
.tx-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 18px; }

.tx-menu {
  min-width: 180px;
  padding: 6px;
  background: var(--tx-graphite);
  border: 1px solid var(--tx-line-strong);
  border-radius: var(--tx-radius);
}
.tx-menu a,
.tx-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--tx-silver);
  font: 13px/1.3 var(--tx-font);
  text-decoration: none;
  cursor: pointer;
}
.tx-menu a:hover,
.tx-menu button:hover { background: var(--tx-raised); }

.tx-tooltip {
  position: relative;
}
.tx-tooltip:hover::after,
.tx-tooltip:focus-visible::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  max-width: 220px;
  padding: 6px 8px;
  background: var(--tx-silver);
  color: var(--tx-obsidian);
  font: 12px/1.35 var(--tx-font);
  white-space: normal;
}

@media (prefers-reduced-motion: reduce) {
  .tx-btn { transition: none; }
}
