:root {
  --bg: #0a0c10;
  --surface: #12161c;
  --surface2: #181e27;
  --border: #2a3140;
  --text: #e8eaef;
  --muted: #8b93a3;
  --accent: #2dd4bf;
  --accent-dim: #115e59;
  --danger: #f87171;
  --warn: #fbbf24;
  --ok: #4ade80;
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); border-radius: 3px; }
::-webkit-scrollbar-thumb { background: var(--accent-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
* { scrollbar-width: thin; scrollbar-color: var(--accent-dim) var(--surface); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.top {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface2) 0%, var(--surface) 100%);
  box-shadow: 0 1px 0 rgba(45, 212, 191, 0.06);
}
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 0.75rem;
  flex-wrap: wrap;
  margin-left: auto;
}
.app-clock {
  flex: 0 0 auto;
  min-width: 9.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding: 0.35rem 0.65rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.nav-link-admin {
  font-size: 0.875rem;
}
.btn-logout-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.btn-logout-icon:hover {
  color: var(--accent);
  background: rgba(45, 212, 191, 0.12);
}
.btn-logout-icon:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn-restart-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  margin-right: 0.5rem;
}
.btn-restart-icon:hover {
  color: var(--accent);
  background: rgba(45, 212, 191, 0.12);
}
.btn-restart-icon:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn-restart-icon.is-loading svg {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Restart Progress Modal ── */
.restart-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.restart-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.restart-modal {
  background: var(--card-bg, #13161c);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 2rem 2.25rem 1.75rem;
  width: min(420px, calc(100vw - 2rem));
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  transform: translateY(12px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  opacity: 0;
}
.restart-modal-backdrop.is-open .restart-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.restart-modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.restart-modal-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(45, 212, 191, 0.12);
  color: var(--accent, #2dd4bf);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.restart-modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg, #e8eaf0);
  margin: 0;
}
.restart-modal-subtitle {
  font-size: 0.75rem;
  color: var(--muted, #6b7280);
  margin: 0;
}
.restart-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.restart-step {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.6rem 0;
  position: relative;
}
.restart-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 11px;
  top: 32px;
  bottom: -8px;
  width: 1px;
  background: rgba(255,255,255,0.07);
}
.restart-step-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, border-color 0.3s;
  border: 1.5px solid rgba(255,255,255,0.12);
  background: transparent;
  margin-top: 1px;
}
.restart-step.is-pending .restart-step-indicator {
  border-color: rgba(255,255,255,0.1);
}
.restart-step.is-running .restart-step-indicator {
  border-color: var(--accent, #2dd4bf);
  background: rgba(45, 212, 191, 0.08);
}
.restart-step.is-running .restart-step-indicator svg {
  animation: spin 0.9s linear infinite;
  color: var(--accent, #2dd4bf);
}
.restart-step.is-done .restart-step-indicator {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}
.restart-step.is-error .restart-step-indicator {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}
.restart-step-body {
  flex: 1;
  min-width: 0;
}
.restart-step-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg, #e8eaf0);
  line-height: 1.4;
}
.restart-step.is-pending .restart-step-label {
  color: var(--muted, #6b7280);
}
.restart-step-detail {
  font-size: 0.72rem;
  color: var(--muted, #6b7280);
  margin-top: 2px;
  min-height: 1em;
}
.restart-modal-footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
}
.restart-modal-close {
  padding: 0.45rem 1.1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: var(--muted, #6b7280);
  font-size: 0.825rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.restart-modal-close:hover {
  color: var(--fg, #e8eaf0);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.04);
}
.restart-modal-close:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.logout-form-icon {
  margin: 0;
  display: inline-flex;
  flex-shrink: 0;
}
.tenant-select {
  min-width: 10rem;
  font-size: 0.875rem;
}
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.brand-link {
  display: flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}
.brand-logo-img {
  display: block;
  height: clamp(52px, 9vw, 84px);
  width: auto;
  max-width: min(340px, 58vw);
  object-fit: contain;
  object-position: left center;
}
.brand-sub { font-weight: 500; opacity: 0.85; }
.logo { color: var(--accent); font-size: 1.05rem; }
.muted { color: var(--muted); font-weight: 400; font-size: 0.9rem; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  align-items: center;
}
.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover {
  color: var(--text);
  background: rgba(45, 212, 191, 0.08);
}
.nav-link.is-active {
  color: var(--accent);
  background: rgba(45, 212, 191, 0.12);
  font-weight: 500;
}
.nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.strategy-back {
  margin: 0 0 0.75rem;
}
.strategy-back a {
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: none;
}
.strategy-back a:hover {
  color: var(--accent);
}

.main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}
.main.main-wide {
  max-width: min(1120px, 96vw);
}
.foot {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 1rem;
}
.lead { color: var(--muted); margin: 0 0 1.5rem; font-size: 0.95rem; }
.lead.tight { margin-bottom: 0.75rem; }
.tight-top { margin-top: 0.5rem !important; }

.dash-page-head {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.dash-page-head .hero-top {
  margin-bottom: 0;
}
.dash-page-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.hero > .pulse-row:first-child {
  margin-top: 0.35rem;
}
.hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.hero-top h1 {
  margin: 0;
}
.clock {
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding: 0.35rem 0.65rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.kbd {
  font-size: 0.8em;
  font-weight: 500;
}

.pulse-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.pulse-row--summary {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
/* Keep titles on one line across columns (neutral cards were vertically centered vs taller neighbours). */
.pulse-row--summary .pulse {
  align-items: flex-start;
}
.pulse {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.pulse--neutral { align-items: center; }
.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 0.35rem;
  flex-shrink: 0;
  background: var(--muted);
}
.pulse--live .pulse-dot,
.pulse--warn .pulse-dot {
  background: var(--ok);
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.45);
}
.pulse--off .pulse-dot,
.pulse--unknown .pulse-dot {
  background: #64748b;
}
.pulse-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.pulse-k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.pulse-v { font-size: 0.9rem; font-weight: 500; line-height: 1.35; }
.pulse-sub { font-weight: 400; color: var(--muted); font-size: 0.85rem; }

.card-compact { padding: 1rem 1.25rem; margin-bottom: 1rem; }
.tenants-table-title {
  margin: 1.5rem 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
}
.dash-integrations {
  margin-bottom: 1rem;
}
.dash-integ-title {
  font-size: 1rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--muted);
  margin: 0 0 0.55rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.chip {
  font-size: 0.78rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.chip-ok {
  border-color: rgba(74, 222, 128, 0.35);
  color: #86efac;
  background: rgba(22, 101, 52, 0.2);
}
.chip-off {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.22);
}
.chip-muted {
  border-color: rgba(100, 116, 139, 0.4);
  color: var(--muted);
  background: rgba(30, 41, 59, 0.35);
  font-size: 0.72rem;
  padding: 0.25rem 0.5rem;
}
.muted-card {
  padding: 0.75rem 1rem;
  border-style: dashed;
}

.kv-tight { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.row-tight { margin-top: 0.65rem; }
.input-inline {
  width: auto;
  min-width: 10rem;
  max-width: 100%;
}
.runner-controls {
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.runner-feedback {
  margin-top: 0.85rem;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.5;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  position: relative;
  overflow: hidden;
  animation: rfSlideIn 0.18s ease;
}
@keyframes rfSlideIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}
.runner-feedback[hidden] { display: none !important; }
.runner-feedback--ok {
  background: linear-gradient(135deg, rgba(20,83,45,0.38) 0%, rgba(6,78,59,0.28) 100%);
  border: 1px solid rgba(52,211,153,0.28);
  box-shadow: 0 0 0 1px rgba(52,211,153,0.06), 0 4px 16px rgba(0,0,0,0.28);
  color: #6ee7b7;
}
.runner-feedback--err {
  background: linear-gradient(135deg, rgba(127,29,29,0.38) 0%, rgba(88,28,135,0.15) 100%);
  border: 1px solid rgba(248,113,113,0.32);
  box-shadow: 0 0 0 1px rgba(248,113,113,0.06), 0 4px 16px rgba(0,0,0,0.28);
  color: #fca5a5;
}
.runner-feedback--loading {
  background: linear-gradient(135deg, rgba(6,78,59,0.32) 0%, rgba(14,116,144,0.22) 100%);
  border: 1px solid rgba(45,212,191,0.28);
  box-shadow: 0 0 0 1px rgba(45,212,191,0.05), 0 4px 16px rgba(0,0,0,0.28);
  color: #99f6e4;
}
.runner-feedback--loading::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #2dd4bf 50%, transparent 100%);
  background-size: 200% 100%;
  animation: rfShimmer 1.6s ease-in-out infinite;
}
@keyframes rfShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.rf-spinner {
  flex-shrink: 0;
  width: 14px; height: 14px;
  border: 2px solid rgba(45,212,191,0.25);
  border-top-color: #2dd4bf;
  border-radius: 50%;
  animation: rfSpin 0.75s linear infinite;
}
@keyframes rfSpin {
  to { transform: rotate(360deg); }
}
.rf-dot {
  flex-shrink: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
}
.runner-feedback--ok .rf-dot {
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74,222,128,0.55);
}
.runner-feedback--err .rf-dot {
  background: #f87171;
  box-shadow: 0 0 6px rgba(248,113,113,0.55);
}
.rf-text { flex: 1; }

.dash-pulse-multiline {
  display: block;
  font-size: 0.82rem;
  line-height: 1.45;
  font-weight: 500;
}
.dash-table-below {
  margin-top: 1rem;
}
.table-wrap {
  overflow-x: auto;
  margin-top: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.dash-table th,
.dash-table td {
  padding: 0.5rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.dash-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dash-table tbody tr:last-child td { border-bottom: none; }
.dash-table tfoot td {
  border-top: 1px solid var(--border);
  border-bottom: none;
  padding-top: 0.6rem;
}
.pnl-pos { color: #86efac; font-variant-numeric: tabular-nums; }
.pnl-neg { color: #fecaca; font-variant-numeric: tabular-nums; }

.env-stat { margin: 0; font-size: 0.95rem; }
.stat-num { font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.small-code { font-size: 0.78rem; word-break: break-all; }

.env-title {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
}
.env-dialog-status {
  padding: 0.7rem 1.1rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.env-dialog-status-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.env-dialog-status-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.env-dialog-status-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.env-dialog-status-blurb {
  font-size: 0.72rem;
  line-height: 1.35;
  margin: 0;
}
.env-dialog-status-hint {
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--text-dim);
  margin: 0.05rem 0 0;
  word-break: break-word;
}

.env-intro {
  margin: -0.5rem 0 1.25rem;
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 40rem;
}

.env-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 520px) {
  .env-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .env-cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.env-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 7.5rem;
  padding: 1.1rem 0.85rem;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.env-card--active {
  border-color: rgba(59, 130, 246, 0.34);
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 38%),
    radial-gradient(circle at bottom left, rgba(34, 197, 94, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(14, 27, 43, 0.97), rgba(10, 19, 31, 0.98));
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.08), 0 10px 26px rgba(6, 18, 30, 0.28);
}
.env-card:hover {
  border-color: rgba(45, 212, 191, 0.45);
  background: var(--surface2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.env-card--active:hover {
  border-color: rgba(96, 165, 250, 0.48);
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 40%),
    radial-gradient(circle at bottom left, rgba(34, 197, 94, 0.12), transparent 44%),
    linear-gradient(180deg, rgba(16, 31, 49, 0.98), rgba(11, 22, 35, 0.99));
  box-shadow: 0 12px 30px rgba(8, 22, 36, 0.32);
}

.env-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.env-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.35rem;
  height: 3.35rem;
  color: var(--accent);
}

.env-card-brand-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.env-card-brand-img--raster,
.env-card-brand-img--vector {
  width: 2.75rem;
  height: 2.75rem;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.env-dialog-brand-img.env-card-brand-img--raster,
.env-dialog-brand-img.env-card-brand-img--vector {
  width: 2.5rem;
  height: 2.5rem;
}

.env-dialog-brand-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.env-card-label {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.env-card--active .env-card-label {
  color: #f8fffd;
}

.env-dialog {
  max-width: min(520px, 94vw);
  width: 100%;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.env-dialog::backdrop {
  background: rgba(6, 8, 12, 0.72);
  backdrop-filter: blur(4px);
}

.env-dialog-inner {
  display: flex;
  flex-direction: column;
  max-height: min(85vh, 720px);
}

.env-dialog-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem 0.75rem;
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.env-dialog-head-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.env-dialog-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.env-dialog-close {
  padding: 0.35rem 0.55rem;
  min-width: auto;
  line-height: 1;
  font-size: 1rem;
}

.env-dialog-body {
  padding: 1rem 1.1rem 1.15rem;
  overflow-y: auto;
}

.env-telegram-auth {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding-top: 14px;
}

.env-telegram-auth__head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.env-telegram-auth__title {
  color: var(--text);
  font-weight: 700;
}

.env-card-brand-img--telegram-reader {
  filter: saturate(0.45) sepia(0.2) hue-rotate(-18deg) brightness(1.08);
}

.env-telegram-auth__form {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.env-telegram-auth__form .btn {
  white-space: nowrap;
}

.env-telegram-auth__form:nth-of-type(2) {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr) auto;
}

.env-telegram-auth__form--single {
  grid-template-columns: 1fr;
}

@media (max-width: 760px) {
  .env-telegram-auth__form,
  .env-telegram-auth__form:nth-of-type(2) {
    grid-template-columns: 1fr;
  }
}

.env-dialog--compact .env-dialog-inner {
  max-height: none;
}

.env-dialog--compact .env-dialog-body {
  overflow-y: visible;
}

/* Tooltips στο dialog: θέση/επίπεδο ρυθμίζονται από JS (fixed) ώστε να μην κόβονται από overflow */
.env-dialog .env-key-tip {
  z-index: 2147483646;
}

.env-form .env-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.15rem;
  margin-bottom: 1rem;
  background: var(--surface);
}
.env-form .env-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.env-form .env-section-title--with-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.env-section-brand-icon {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  flex-shrink: 0;
}
.flash-ok {
  margin: 0 0 1rem;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  color: #6ee7b7;
}
.strategy-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.strategy-head-actions {
  display: flex;
  gap: 0.5rem;
}
.strategy-head h1 {
  margin: 0 0 0.35rem;
}
.strategy-lead {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 42rem;
}
.strategy-overview-head {
  align-items: flex-end;
}
.strategy-preset-card {
  margin-bottom: 1rem;
}
.strategy-model-card-wrap {
  margin-bottom: 1rem;
}
.strategy-section-heading {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}
.strategy-model-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.strategy-model-grid--triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .strategy-model-grid--triple {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .strategy-model-grid {
    grid-template-columns: 1fr;
  }
}
.strategy-model-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 11rem;
  padding: 1rem 1rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(10, 16, 28, 0.92));
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.strategy-model-card:hover {
  transform: translateY(-1px);
  border-color: rgba(45, 212, 191, 0.28);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}
.strategy-model-card--active {
  border-color: rgba(45, 212, 191, 0.82);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.16), 0 16px 34px rgba(7, 10, 20, 0.28);
}
.strategy-model-card--copy.strategy-model-card--active {
  border-color: rgba(251, 191, 36, 0.82);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.16), 0 16px 34px rgba(7, 10, 20, 0.28);
}
.strategy-model-input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.strategy-model-pill {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.26rem 0.55rem;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.14);
  color: #99f6e4;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.strategy-model-pill--waka {
  background: rgba(96, 165, 250, 0.16);
  color: #bfdbfe;
}
.strategy-model-pill--mourou {
  background: rgba(45, 212, 191, 0.14);
  color: #99f6e4;
}
.strategy-model-pill--copy {
  background: rgba(251, 191, 36, 0.13);
  color: #fde68a;
}
.strategy-model-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.strategy-model-text {
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.88rem;
}
.strategy-preset-card .strategy-section-heading {
  margin-bottom: 0.75rem;
}
.strategy-preset-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}
@media (max-width: 720px) {
  .strategy-preset-row {
    grid-template-columns: 1fr;
  }
}
.strategy-preset-opt {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface2);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.strategy-preset-opt:hover {
  border-color: rgba(255, 255, 255, 0.12);
}
.strategy-preset-opt--active {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.03);
}
.strategy-preset-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.strategy-preset-name {
  font-weight: 600;
  font-size: 0.92rem;
}
.strategy-preset-desc {
  line-height: 1.35;
}
.strategy-sliders-card {
  margin-bottom: 0;
}
.strategy-optional-card {
  overflow: hidden;
}
.strategy-optional-card > summary {
  cursor: pointer;
  list-style: none;
  margin: -1.25rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
}
.strategy-optional-card > summary::-webkit-details-marker {
  display: none;
}
.strategy-optional-card > summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  margin-right: 0.45rem;
  color: var(--accent);
}
.strategy-optional-card[open] > summary::before {
  content: "−";
}
.strategy-optional-body {
  padding-top: 1.15rem;
}
.strategy-optional-group {
  margin-bottom: 1.15rem;
}
.strategy-optional-group:last-child {
  margin-bottom: 0;
}
.strategy-optional-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.strategy-optional-footer p {
  margin: 0;
  max-width: 42rem;
}
.strategy-slider-block {
  margin-bottom: 1.1rem;
}
.strategy-slider-block:last-child {
  margin-bottom: 0;
}
.strategy-slider-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.strategy-slider-label-row label {
  font-size: 0.88rem;
  font-weight: 500;
}
.strategy-slider-value {
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  color: var(--accent);
  min-width: 3rem;
  text-align: right;
}
.strategy-range {
  width: 100%;
  height: 0.45rem;
  border-radius: 999px;
  accent-color: var(--accent);
  cursor: pointer;
}
.strategy-range-scale {
  position: relative;
  display: block;
  height: 1rem;
  font-size: 0.74rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.strategy-range-scale__label {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}
.strategy-range-scale__label--min {
  transform: none;
}
.strategy-range-scale__label--max {
  transform: translateX(-100%);
}
.strategy-copy-risk-slider .strategy-slider-label-row {
  margin-bottom: 0;
}
.strategy-overview-actions {
  margin-top: 0.5rem;
}
.strategy-section-copy {
  margin: 0 0 0.9rem;
}
.strategy-product-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.strategy-products-card {
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.14), transparent 34%),
    linear-gradient(160deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.98));
}
.strategy-products-head {
  margin-bottom: 1rem;
}
.strategy-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
@media (max-width: 860px) {
  .strategy-product-grid {
    grid-template-columns: 1fr;
  }
}
.strategy-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 15rem;
  padding: 1.1rem 1.1rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.strategy-product-card:hover {
  transform: translateY(-1px);
  border-color: rgba(45, 212, 191, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
}
.strategy-product-card--active {
  border-color: rgba(45, 212, 191, 0.82);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.2), 0 14px 36px rgba(7, 10, 20, 0.32);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(7, 16, 28, 0.98));
}
.strategy-product-card--locked {
  opacity: 0.68;
  cursor: not-allowed;
}
.strategy-product-input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.strategy-product-pill {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.14);
  color: #99f6e4;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.strategy-product-pill--copy {
  background: rgba(251, 191, 36, 0.13);
  color: #fde68a;
}
.strategy-product-title {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.strategy-product-text {
  line-height: 1.5;
  color: var(--text);
}
.strategy-product-points {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: auto;
  color: var(--muted);
  font-size: 0.88rem;
}
.strategy-product-points span::before {
  content: "• ";
  color: var(--accent);
}
.strategy-product-lock {
  color: #fcd34d;
  font-size: 0.82rem;
  line-height: 1.4;
}
.strategy-copy-card {
  border-color: rgba(251, 191, 36, 0.18);
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.1), transparent 30%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(15, 23, 42, 0.96));
}
.strategy-copy-model-wrap {
  border-color: rgba(251, 191, 36, 0.18);
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(15, 23, 42, 0.96));
}
.strategy-copy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 1rem;
}
.strategy-copy-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.strategy-copy-panel[hidden] {
  display: none !important;
}
@media (max-width: 720px) {
  .strategy-copy-panel {
    grid-template-columns: 1fr;
  }
}
.field-stack {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.field-stack__label {
  font-size: 0.86rem;
  font-weight: 600;
}
.field-stack__hint {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}
.strategy-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--surface);
  overflow: hidden;
}
.strategy-section summary {
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-weight: 600;
  list-style: none;
  background: var(--surface2);
}
.strategy-section summary::-webkit-details-marker {
  display: none;
}
.strategy-section summary::before {
  content: "▸ ";
  color: var(--accent);
}
.strategy-section[open] summary::before {
  content: "▾ ";
}
.strategy-fields {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.field-row {
  display: grid;
  grid-template-columns: minmax(8rem, 22%) 1fr;
  gap: 0.75rem 1rem;
  align-items: start;
}
.field-row--strat {
  align-items: start;
}
.strat-label-col {
  position: relative;
  min-width: 0;
}
.strat-field-tip-btn {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  text-align: left;
  cursor: help;
  border-radius: 4px;
}
.strat-field-tip-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.field-label--strat {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  padding-top: 0.35rem;
  pointer-events: none;
}
.strat-field-tip {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 40;
  max-width: min(340px, 92vw);
  padding: 0.55rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}
@media (hover: hover) and (pointer: fine) {
  .strat-field-tip-host:hover .strat-field-tip,
  .strat-field-tip-host:focus-within .strat-field-tip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}
.strat-field-tip-host.strat-field-tip--open .strat-field-tip {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
@media (max-width: 720px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}
.field-label {
  font-size: 0.8rem;
  color: var(--muted);
  padding-top: 0.35rem;
}
.field-control .input,
.field-control textarea {
  width: 100%;
}
.field-control .toggle.toggle--strat-bool {
  align-self: flex-start;
  margin-top: 0.15rem;
}
.strategy-actions {
  margin-top: 1.5rem;
}
.tenant-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-top: 1.5rem;
}
.tenants-table-wrap {
  overflow-x: auto;
}
.tenants-table-wrap .tenant-table {
  min-width: 680px;
}
.tenant-table th,
.tenant-table td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  text-align: left;
}
.tenant-table th {
  color: var(--muted);
  font-weight: 500;
}
.tenant-table code.small {
  font-size: 0.75rem;
  word-break: break-all;
}
.tenant-row-clickable {
  cursor: pointer;
}
.tenant-row-clickable:hover {
  background: rgba(255, 255, 255, 0.04);
}
.tenant-row-clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.admin-user-table td.admin-user-actions {
  cursor: default;
  white-space: nowrap;
}
.admin-user-action-btns {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.admin-user-inline-form {
  display: inline;
  margin: 0;
}
.admin-user-detail .admin-user-kv dt {
  min-width: 9rem;
}
.admin-user-page-actions .btn.danger {
  min-width: 9rem;
}
.tabular-nums {
  font-variant-numeric: tabular-nums;
}
.env-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}
.env-row[hidden] {
  display: none;
}
@media (min-width: 640px) {
  .env-row {
    grid-template-columns: minmax(160px, 1fr) minmax(220px, 2fr);
    align-items: stretch;
    gap: 0.75rem;
  }
}
.env-key-cell {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  padding: 0.35rem 0.2rem 0.35rem 0;
}
.env-key-cell.env-key-tip-host {
  position: relative;
}
.env-key-tip-btn {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: help;
  border-radius: 4px;
}
.env-key-tip-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.env-key-tip {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 40;
  max-width: min(320px, 85vw);
  padding: 0.55rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}
@media (hover: hover) and (pointer: fine) {
  .env-key-tip-host:hover .env-key-tip,
  .env-key-tip-host:focus-within .env-key-tip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}
.env-key-tip-host.env-key-tip--open .env-key-tip {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.env-key-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  pointer-events: none;
}
.env-val-cell {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  min-width: 0;
}
.env-val-cell .env-val { flex: 1; min-width: 0; }
.env-val { min-width: 0; }
select.input.env-val-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 2.35rem;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 1rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}
select.input.env-val-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.25);
}
.btn-browse { flex-shrink: 0; align-self: center; font-size: 0.78rem; padding: 0.45rem 0.6rem; }
.env-secret {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  letter-spacing: 0.12em;
}
.env-token-textarea {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.72rem;
  resize: vertical;
  word-break: break-all;
  line-height: 1.4;
  width: 100%;
}
.env-secret::placeholder {
  color: var(--muted);
  letter-spacing: 0.02em;
  opacity: 0.85;
}
.env-field-note {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-dim);
}
.env-actions {
  margin-top: 1.25rem;
  padding-top: 0.5rem;
}

.env-page-form {
  margin: 0;
  padding: 0;
  border: 0;
  min-height: 0;
}
.env-card-hint {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  margin-top: 0.2rem;
}
.env-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
}
.env-row--dialog:last-child {
  margin-bottom: 0;
}
@media (max-width: 639px) {
  .env-val-cell { flex-direction: column; align-items: stretch; }
  .btn-browse { align-self: flex-start; }
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .card-wide { grid-column: 1 / -1; }
}
.grid.grid-stack {
  grid-template-columns: 1fr;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
  font-size: 0.9rem;
}
.kv dt { color: var(--muted); margin: 0; }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}
.inline { font-size: 0.85rem; color: var(--muted); }

.input, textarea.input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
}
textarea.input.tall { min-height: 420px; resize: vertical; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.82rem; }

.btn {
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}
.btn.primary {
  background: var(--accent-dim);
  color: var(--text);
  border: 1px solid var(--accent);
}
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger {
  background: #3f1d1d;
  color: #fecaca;
  border: 1px solid var(--danger);
}
.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn:hover { filter: brightness(1.08); }

.out {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  overflow: auto;
  max-height: 240px;
  white-space: pre-wrap;
  word-break: break-word;
}

.form-stack { display: flex; flex-direction: column; gap: 1rem; }
.field label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.hint { font-size: 0.75rem; color: var(--muted); display: block; margin-top: 0.25rem; }

.banner {
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.banner.ok {
  background: #042f2e;
  border: 1px solid var(--accent-dim);
  color: #99f6e4;
}
.banner.err {
  background: #3f1d1d;
  border: 1px solid #7f1d1d;
  color: #fecaca;
}
.banner.warn {
  background: #2a2510;
  border: 1px solid #854d0e;
  color: #fde68a;
}

code {
  font-size: 0.85em;
  background: var(--bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.small { font-size: 0.8rem; }
.pad-x { padding-left: 0.75rem; padding-right: 0.75rem; }

.files-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 880px) {
  .files-layout { grid-template-columns: 1fr; }
}

.files-sidebar {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  max-height: calc(100vh - 9rem);
  overflow: auto;
  padding: 0.75rem 0 1rem;
}
.files-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.75rem;
  margin: 0 0 0.5rem;
  gap: 0.5rem;
}
.files-sidebar-header h2 {
  padding: 0;
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.files-sidebar ul {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}
.files-sidebar li { margin: 0; }
.files-sidebar li a {
  display: block;
  padding: 0.4rem 0.75rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  line-height: 1.35;
  border-left: 3px solid transparent;
  word-break: break-word;
}
.files-sidebar li a:hover { color: var(--text); background: var(--bg); }
.files-sidebar li a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--bg);
}
.files-sidebar .meta {
  font-size: 0.68rem;
  color: var(--muted);
  display: block;
  padding: 0 0.75rem 0.35rem 0.9rem;
  line-height: 1.3;
}

.log-panel {
  margin: 0;
  padding: 1rem;
  min-height: 280px;
  max-height: calc(100vh - 11rem);
  overflow: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.58;
  font-size: 0.84rem;
}

.runner-log-preview {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-height: 280px;
  max-height: calc(100vh - 11rem);
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.08), transparent 34%),
    rgba(2, 6, 23, 0.74);
}

.runner-log-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.runner-log-metric,
.runner-log-section,
.runner-log-raw {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.64);
}

.runner-log-metric {
  padding: 0.78rem 0.82rem;
  border-left: 3px solid rgba(148, 163, 184, 0.44);
}

.runner-log-metric--ok { border-left-color: #22c55e; }
.runner-log-metric--info { border-left-color: #38bdf8; }
.runner-log-metric--warn { border-left-color: #f59e0b; }
.runner-log-metric--error { border-left-color: #f87171; }

.runner-log-metric span,
.runner-log-section h3,
.runner-log-kv dt,
.runner-log-event small,
.runner-log-raw summary {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.runner-log-metric strong {
  display: block;
  margin-top: 0.3rem;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.runner-log-section {
  padding: 0.85rem;
}

.runner-log-section--warning {
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(69, 43, 12, 0.24);
}

.runner-log-section h3 {
  margin: 0 0 0.7rem;
}

.runner-log-kv {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

.runner-log-kv div {
  display: grid;
  grid-template-columns: minmax(7.25rem, 0.36fr) minmax(0, 1fr);
  gap: 0.75rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.runner-log-kv div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.runner-log-kv dt,
.runner-log-kv dd {
  min-width: 0;
}

.runner-log-kv dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.runner-log-events {
  display: grid;
  gap: 0.55rem;
}

.runner-log-event {
  padding: 0.72rem 0.76rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-left: 3px solid rgba(148, 163, 184, 0.44);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.42);
}

.runner-log-event--ok { border-left-color: #22c55e; }
.runner-log-event--info { border-left-color: #38bdf8; }
.runner-log-event--warn { border-left-color: #f59e0b; }
.runner-log-event--error { border-left-color: #f87171; }

.runner-log-event__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.runner-log-event__top strong {
  color: var(--text);
  font-size: 0.86rem;
}

.runner-log-event__top span {
  flex: 0 0 auto;
  color: #a7f3d0;
  font-size: 0.72rem;
  font-weight: 800;
}

.runner-log-event p {
  margin: 0.34rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.runner-log-event small {
  display: block;
  margin-top: 0.35rem;
  text-transform: none;
}

.runner-log-raw {
  padding: 0.75rem;
}

.runner-log-raw summary {
  cursor: pointer;
  color: var(--text);
}

.runner-log-raw .log-panel {
  min-height: 160px;
  max-height: 380px;
  margin-top: 0.75rem;
  background: rgba(2, 6, 23, 0.76);
}

.files-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}
.files-hero h1 {
  margin-bottom: 0.35rem;
}
.files-kicker {
  margin: 0 0 0.25rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.files-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.files-tenant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.files-tenant-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 150px;
  padding: 1rem;
  text-decoration: none;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.12), transparent 42%),
    linear-gradient(165deg, rgba(24, 30, 39, 0.98) 0%, rgba(18, 22, 28, 0.98) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.files-tenant-card:hover,
.files-tenant-card.is-active {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.files-tenant-card.is-active {
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.22), 0 16px 42px rgba(0, 0, 0, 0.26);
}
.files-tenant-card:focus-visible {
  outline: 2px solid rgba(45, 212, 191, 0.72);
  outline-offset: 3px;
}
.files-tenant-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.files-tenant-card__top > span:first-child {
  min-width: 0;
}
.files-tenant-card__top strong {
  display: block;
  overflow-wrap: anywhere;
}
.files-tenant-card__health {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  min-width: 7.5rem;
}
.files-health-test-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.6rem;
  min-height: 1.75rem;
  border: 1px solid rgba(45, 212, 191, 0.38);
  border-radius: 999px;
  background: rgba(17, 94, 89, 0.28);
  color: #ccfbf1;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.files-health-test-btn:hover,
.files-health-test-btn:focus-visible {
  border-color: rgba(45, 212, 191, 0.82);
  background: rgba(20, 184, 166, 0.22);
  color: #f8fafc;
  outline: none;
}
.files-health-test-btn:disabled {
  cursor: wait;
  opacity: 0.78;
  transform: none;
}
.files-health-test-btn.is-loading {
  border-color: rgba(148, 163, 184, 0.44);
  background: rgba(51, 65, 85, 0.34);
  color: rgba(226, 232, 240, 0.84);
}
.files-health-test-btn.is-ok {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(22, 101, 52, 0.26);
  color: #bbf7d0;
}
.files-health-test-btn.is-bad {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(127, 29, 29, 0.32);
  color: #fecaca;
}
.files-health-result {
  max-width: 9rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: right;
}
.files-health-result.is-ok {
  color: rgba(134, 239, 172, 0.92);
}
.files-health-result.is-bad {
  color: rgba(252, 165, 165, 0.95);
}
.files-tenant-id,
.files-tenant-card__meta,
.files-tenant-card__latest {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}
.files-tenant-card__meta--row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.metaapi-limit {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  border: 1px solid rgba(139, 147, 163, 0.2);
  background: rgba(10, 12, 16, 0.45);
  color: rgba(174, 182, 197, 0.82);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
}
.metaapi-limit-dot {
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: rgba(139, 147, 163, 0.8);
}
.metaapi-limit--ok .metaapi-limit-dot {
  background: rgba(74, 222, 128, 0.85);
}
.metaapi-limit--watch {
  color: rgba(253, 224, 71, 0.88);
  border-color: rgba(253, 224, 71, 0.22);
  background: rgba(113, 63, 18, 0.18);
}
.metaapi-limit--watch .metaapi-limit-dot,
.metaapi-limit--warn .metaapi-limit-dot {
  background: rgba(251, 191, 36, 0.9);
}
.metaapi-limit--warn {
  color: rgba(253, 230, 138, 0.95);
  border-color: rgba(251, 191, 36, 0.34);
  background: rgba(133, 77, 14, 0.24);
}
.metaapi-limit--limited {
  color: rgba(252, 165, 165, 0.95);
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(127, 29, 29, 0.24);
}
.metaapi-limit--limited .metaapi-limit-dot {
  background: rgba(248, 113, 113, 0.92);
}
.files-tenant-card__counts {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
}
.files-tenant-card__counts span {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: rgba(10, 12, 16, 0.78);
  border: 1px solid rgba(139, 147, 163, 0.22);
  color: var(--muted);
  font-size: 0.78rem;
}
.files-tenant-card__counts strong {
  color: var(--text);
}
.files-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: rgba(24, 30, 39, 0.9);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}
.files-status-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--muted);
}
.files-status--live,
.files-status--ok {
  color: #86efac;
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(22, 101, 52, 0.22);
}
.files-status--live .files-status-dot,
.files-status--ok .files-status-dot {
  background: var(--ok);
}
.files-status--warn {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(133, 77, 14, 0.25);
}
.files-status--warn .files-status-dot {
  background: var(--warn);
}
.files-status--off .files-status-dot,
.files-status--unknown .files-status-dot {
  background: var(--danger);
}
.files-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(420px, 0.9fr);
  gap: 1rem;
  align-items: start;
}
.files-browser {
  min-width: 0;
}
.files-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 0.9fr);
  gap: 1rem;
  align-items: end;
  margin-bottom: 0.8rem;
}
.files-toolbar h2,
.files-panel-head h2,
.files-preview-head h2 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}
.files-search-input {
  min-height: 2.55rem;
}
.files-filter-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.files-filter {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  cursor: pointer;
}
.files-filter:hover,
.files-filter.is-active {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(17, 94, 89, 0.42);
}
.files-tenant-panel {
  display: none;
}
.files-tenant-panel.is-active {
  display: block;
}
.files-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.files-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.copy-monitor {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(45, 212, 191, 0.13), transparent 34%),
    linear-gradient(160deg, rgba(8, 13, 22, 0.96), rgba(17, 24, 39, 0.96));
}
.copy-monitor--warn {
  border-color: rgba(248, 113, 113, 0.5);
  background:
    radial-gradient(circle at top left, rgba(248, 113, 113, 0.12), transparent 34%),
    linear-gradient(160deg, rgba(28, 12, 14, 0.94), rgba(17, 24, 39, 0.96));
}
.copy-monitor--starting {
  border-color: rgba(251, 191, 36, 0.48);
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.13), transparent 34%),
    linear-gradient(160deg, rgba(29, 20, 7, 0.94), rgba(17, 24, 39, 0.96));
}
.copy-monitor--muted {
  border-color: rgba(148, 163, 184, 0.24);
}
.copy-monitor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}
.copy-monitor-head h3,
.copy-monitor-flow h4,
.copy-monitor-card h4 {
  margin: 0;
}
.copy-monitor-head h3 {
  font-size: 1rem;
}
.copy-monitor-kicker {
  margin: 0 0 0.16rem;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.copy-monitor-pill {
  max-width: 44%;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  color: #ccfbf1;
  background: rgba(17, 94, 89, 0.38);
  border: 1px solid rgba(45, 212, 191, 0.35);
  font-size: 0.76rem;
  line-height: 1.35;
}
.copy-monitor--warn .copy-monitor-pill {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.3);
  border-color: rgba(248, 113, 113, 0.42);
}
.copy-monitor--starting .copy-monitor-pill {
  color: #fde68a;
  background: rgba(133, 77, 14, 0.3);
  border-color: rgba(251, 191, 36, 0.42);
}
.copy-monitor-warnings {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}
.copy-monitor-warnings p {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.2);
  border: 1px solid rgba(248, 113, 113, 0.24);
  font-size: 0.83rem;
}
.copy-monitor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}
.copy-monitor-card {
  min-width: 0;
  padding: 0.62rem 0.72rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-left: 4px solid rgba(148, 163, 184, 0.45);
  border-radius: 8px;
  background: rgba(10, 12, 16, 0.48);
}
.copy-monitor-card--ok {
  border-left-color: rgba(34, 197, 94, 0.9);
}
.copy-monitor-card--bad {
  border-left-color: rgba(239, 68, 68, 0.9);
}
.copy-monitor-card--warn {
  border-left-color: rgba(251, 191, 36, 0.9);
}
.copy-monitor-card-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.copy-monitor-card-status span {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.16rem 0.42rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}
.copy-monitor-card--ok .copy-monitor-card-status span {
  color: #bbf7d0;
  background: rgba(22, 101, 52, 0.32);
}
.copy-monitor-card--bad .copy-monitor-card-status span {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.36);
}
.copy-monitor-card--warn .copy-monitor-card-status span {
  color: #fde68a;
  background: rgba(133, 77, 14, 0.34);
}
.copy-monitor-card h4,
.copy-monitor-flow h4 {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.copy-monitor-card p {
  margin: 0.35rem 0 0;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.35;
}
.copy-monitor-card span,
.copy-monitor-event span {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.74rem;
}
.copy-monitor-card small {
  display: block;
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: 0.72rem;
}
.copy-monitor-checks,
.copy-monitor-chat {
  margin-top: 0.72rem;
  padding: 0.72rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.28);
}
.copy-monitor-chat--clickable {
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.copy-monitor-chat--clickable:hover,
.copy-monitor-chat--clickable:focus-visible,
.copy-monitor-chat--clickable.is-selected {
  border-color: rgba(45, 212, 191, 0.42);
  background: rgba(8, 18, 26, 0.56);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.13);
  outline: none;
}
.copy-monitor-checks-head,
.copy-monitor-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.54rem;
}
.copy-monitor-checks-head h4,
.copy-monitor-chat-head h4 {
  margin: 0;
  color: #bfdbfe;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.copy-monitor-checks-head span,
.copy-monitor-chat-head span,
.copy-monitor-chat-empty {
  color: var(--muted);
  font-size: 0.74rem;
}
.copy-monitor-check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}
.copy-monitor-trade-flow {
  margin-top: 0.72rem;
  padding: 0.72rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.28);
}
.copy-monitor-trade-flow-list {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}
.copy-monitor-trade-flow-item {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  overflow: hidden;
  padding: 0.5rem 0.62rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.36);
}
.copy-monitor-trade-flow-item span {
  min-width: 0;
  max-width: 100%;
  color: #bfdbfe;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.copy-monitor-trade-flow-item strong {
  min-width: 0;
  max-width: 100%;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.copy-monitor-trade-flow-item small {
  display: -webkit-box;
  min-width: 0;
  max-width: 100%;
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.copy-monitor-trade-flow-item--bad {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(127, 29, 29, 0.14);
}
.copy-monitor-trade-flow-item--warn {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(133, 77, 14, 0.12);
}
.copy-monitor-trade-flow-item--ok {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(22, 101, 52, 0.12);
}
.copy-monitor-trade-flow-item--muted {
  opacity: 0.78;
}
.copy-monitor-check {
  display: grid;
  grid-template-columns: 0.55rem minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.4rem 0.48rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.38);
}
.copy-monitor-check-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}
.copy-monitor-check--ok .copy-monitor-check-dot {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}
.copy-monitor-check--warn .copy-monitor-check-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}
.copy-monitor-check strong {
  color: var(--text);
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.copy-monitor-chat-preview {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.copy-monitor-chat-line {
  position: relative;
  max-width: min(100%, 42rem);
  padding: 0.58rem 0.68rem 0.54rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px 14px 14px 5px;
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.86), rgba(17, 24, 39, 0.9));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}
.copy-monitor-chat-line::before {
  content: "";
  position: absolute;
  left: -0.33rem;
  bottom: 0.42rem;
  width: 0.62rem;
  height: 0.62rem;
  background: rgba(17, 24, 39, 0.9);
  border-left: 1px solid rgba(148, 163, 184, 0.18);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  transform: rotate(45deg);
}
.copy-monitor-chat-line--ignored {
  border-color: rgba(248, 113, 113, 0.28);
  background: linear-gradient(180deg, rgba(48, 32, 35, 0.86), rgba(26, 20, 25, 0.9));
}
.copy-monitor-chat-line--ignored::before {
  background: rgba(26, 20, 25, 0.9);
  border-left-color: rgba(248, 113, 113, 0.28);
  border-bottom-color: rgba(248, 113, 113, 0.28);
}
.copy-monitor-chat-line strong {
  display: inline-block;
  margin-right: 0.6rem;
  color: #e0f2fe;
  font-size: 0.78rem;
}
.copy-monitor-chat-line span {
  color: var(--muted);
  font-size: 0.72rem;
}
.copy-monitor-chat-line p {
  margin: 0.24rem 0 0;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-wrap;
}
.copy-monitor-chat-empty {
  margin: 0;
}
.copy-monitor-telegram {
  margin-top: 0.9rem;
  padding: 0.82rem;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.46);
}
.copy-monitor-telegram-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}
.copy-monitor-telegram-head h4 {
  margin: 0;
  color: #bfdbfe;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.copy-monitor-telegram-head span,
.copy-monitor-telegram-empty,
.copy-monitor-telegram-msg span {
  color: var(--muted);
  font-size: 0.75rem;
}
.copy-monitor-telegram-list {
  display: grid;
  gap: 0.48rem;
}
.copy-monitor-telegram-msg {
  padding: 0.58rem 0.62rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.32);
}
.copy-monitor-telegram-msg--queued {
  border-left: 3px solid rgba(45, 212, 191, 0.75);
}
.copy-monitor-telegram-msg--ignored {
  border-left: 3px solid rgba(148, 163, 184, 0.65);
}
.copy-monitor-telegram-msg__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.copy-monitor-telegram-msg__top strong {
  font-size: 0.8rem;
}
.copy-monitor-telegram-msg p {
  margin: 0.3rem 0 0;
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.45;
  word-break: break-word;
}
.copy-monitor-telegram-msg > span {
  display: block;
  margin-top: 0.32rem;
}
.copy-monitor-telegram-empty {
  margin: 0;
}
.copy-monitor-flow {
  margin-top: 0.9rem;
}
.copy-monitor-flow h4 {
  margin-bottom: 0.55rem;
}
.copy-monitor-event {
  padding: 0.62rem 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}
.copy-monitor-event strong {
  font-size: 0.8rem;
}
.copy-monitor-event p {
  margin: 0.25rem 0 0;
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.45;
  word-break: break-word;
}
.copy-monitor-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}
.copy-monitor-links a {
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.2);
  font-size: 0.76rem;
  text-decoration: none;
}
.copy-monitor-links a:hover {
  border-color: rgba(96, 165, 250, 0.45);
}
.files-file-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.files-file-section {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(10, 12, 16, 0.44);
  overflow: hidden;
}
.files-file-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: rgba(24, 30, 39, 0.72);
  border-bottom: 1px solid var(--border);
}
.files-file-section-head h3 {
  margin: 0;
  font-size: 0.88rem;
}
.files-file-section-head span {
  color: var(--muted);
  font-size: 0.78rem;
}
.files-file-list {
  max-height: 520px;
  overflow: auto;
}
.files-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  padding: 0.72rem 0.85rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(42, 49, 64, 0.68);
}
.files-file-row:last-child {
  border-bottom: none;
}
.files-file-row:hover,
.files-file-row.is-selected {
  background: rgba(45, 212, 191, 0.08);
}
.files-file-row.is-selected {
  box-shadow: inset 3px 0 0 var(--accent);
}
.files-file-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}
.files-file-kind {
  align-self: flex-start;
  padding: 0.12rem 0.38rem;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.14);
  color: #99f6e4;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.files-file-kind--log {
  background: rgba(45, 212, 191, 0.14);
  color: #99f6e4;
}
.files-file-kind--json {
  background: rgba(96, 165, 250, 0.14);
  color: #bfdbfe;
}
.files-file-kind--jsonl {
  background: rgba(129, 140, 248, 0.18);
  color: #bfdbfe;
}
.files-file-kind--txt,
.files-file-kind--md {
  background: rgba(244, 114, 182, 0.14);
  color: #f9a8d4;
}
.files-file-kind--file {
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}
.files-file-kind--data {
  background: rgba(96, 165, 250, 0.14);
  color: #bfdbfe;
}
.files-file-dir {
  color: var(--muted);
  font-size: 0.68rem;
  word-break: break-all;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.files-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
}
.files-file-path {
  color: var(--muted);
  font-size: 0.72rem;
  word-break: break-all;
}
.files-file-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.18rem;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}
.files-empty {
  margin: 0;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.86rem;
}
.files-empty--filtered {
  margin-top: 0.85rem;
  border: 1px dashed var(--border);
  border-radius: 12px;
  text-align: center;
}
.files-preview-card {
  position: sticky;
  top: 1rem;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 22, 28, 0.98), rgba(10, 12, 16, 0.98));
  padding: 1rem;
}
.files-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.files-preview-head p {
  margin: 0;
  word-break: break-all;
}
.files-preview-note {
  flex: 0 0 auto;
  padding: 0.32rem 0.55rem;
  border-radius: 8px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(125, 211, 252, 0.35);
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1.25;
}
.files-preview-empty {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 1rem;
  color: var(--muted);
}
.files-preview-empty strong {
  color: var(--text);
}
.files-preview-empty p {
  margin: 0.55rem 0 0;
}
.telegram-preview-thread {
  display: flex;
  flex-direction: column;
  gap: 0.78rem;
  min-height: 280px;
  max-height: calc(100vh - 11rem);
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.08), transparent 36%),
    rgba(2, 6, 23, 0.74);
}
.telegram-preview-bubble {
  position: relative;
  align-self: flex-start;
  width: fit-content;
  max-width: min(100%, 38rem);
  padding: 0.74rem 0.82rem 0.58rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px 16px 16px 5px;
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.96), rgba(17, 24, 39, 0.96));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}
.telegram-preview-bubble::before {
  content: "";
  position: absolute;
  left: -0.36rem;
  bottom: 0.5rem;
  width: 0.7rem;
  height: 0.7rem;
  background: rgba(17, 24, 39, 0.96);
  border-left: 1px solid rgba(148, 163, 184, 0.18);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  transform: rotate(45deg);
}
.telegram-preview-bubble--ignored {
  border-color: rgba(248, 113, 113, 0.3);
  background: linear-gradient(180deg, rgba(52, 35, 39, 0.96), rgba(26, 20, 25, 0.96));
}
.telegram-preview-bubble--ignored::before {
  background: rgba(26, 20, 25, 0.96);
  border-left-color: rgba(248, 113, 113, 0.3);
  border-bottom-color: rgba(248, 113, 113, 0.3);
}
.telegram-preview-bubble__top,
.telegram-preview-bubble__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.telegram-preview-bubble__top strong {
  min-width: 0;
  color: #f8fafc;
  font-size: 0.84rem;
}
.telegram-preview-bubble__top span,
.telegram-preview-bubble__meta {
  color: var(--muted);
  font-size: 0.72rem;
}
.telegram-preview-bubble p {
  margin: 0.34rem 0 0.5rem;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.telegram-preview-bubble__meta span {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
@media (max-width: 1180px) {
  .files-workbench,
  .files-toolbar,
  .files-file-columns,
  .copy-monitor-grid,
  .runner-log-card-grid {
    grid-template-columns: 1fr;
  }
  .files-preview-card {
    position: static;
  }
  .copy-monitor-pill {
    max-width: none;
  }
  .copy-monitor-head {
    flex-direction: column;
  }
  .copy-monitor-telegram-head,
  .copy-monitor-telegram-msg__top,
  .copy-monitor-checks-head,
  .copy-monitor-chat-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.24rem;
  }
  .copy-monitor-check-list,
  .copy-monitor-trade-flow-list,
  .copy-monitor-chat-line {
    grid-template-columns: 1fr;
  }
  .copy-monitor-chat-line span {
    text-align: left;
  }
}
@media (max-width: 720px) {
  .files-hero {
    align-items: stretch;
    flex-direction: column;
  }
  .files-tenant-card__top {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .files-tenant-card__health {
    align-items: flex-start;
    min-width: 0;
  }
  .files-health-result {
    max-width: none;
    text-align: left;
  }
  .files-file-row {
    grid-template-columns: 1fr;
  }
  .files-file-meta {
    align-items: flex-start;
  }
}

.mourou-training-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid rgba(45, 212, 191, 0.24);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(18, 22, 28, 0.98), rgba(8, 13, 22, 0.98));
}
.mourou-training-hero--warn {
  border-color: rgba(251, 191, 36, 0.38);
  background: linear-gradient(160deg, rgba(26, 21, 12, 0.98), rgba(8, 13, 22, 0.98));
}
.mourou-training-hero--off {
  border-color: rgba(148, 163, 184, 0.24);
}
.mourou-training-hero__copy {
  min-width: 0;
}
.mourou-training-hero h1 {
  margin-bottom: 0.3rem;
}
.mourou-training-progress {
  --mourou-progress: 0%;
  flex: 0 0 auto;
}
.mourou-training-progress__ring {
  position: relative;
  width: 108px;
  height: 108px;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 50%;
  background:
    conic-gradient(from -90deg, #2dd4bf 0, #38bdf8 var(--mourou-progress), rgba(51, 65, 85, 0.72) var(--mourou-progress) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 24px rgba(45, 212, 191, 0.12);
}
.mourou-training-progress__ring::after {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(8, 13, 22, 0.98));
}
.mourou-training-progress__ring strong,
.mourou-training-progress__ring span {
  position: relative;
  z-index: 1;
  display: block;
}
.mourou-training-progress__ring strong {
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.mourou-training-progress__ring span {
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
}
.training-registry-panel {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 22, 28, 0.98), rgba(10, 12, 16, 0.98));
}
.training-registry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.training-registry-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}
.training-registry-head p {
  margin: 0;
}
.training-registry-head > span {
  flex: 0 0 auto;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(45, 212, 191, 0.3);
  color: #ccfbf1;
  background: rgba(17, 94, 89, 0.24);
  font-size: 0.72rem;
  font-weight: 800;
}
.training-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.7rem;
}
.training-module-card {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.82rem;
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-left: 4px solid rgba(148, 163, 184, 0.5);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.34);
  transition: border-color 0.16s ease, background 0.16s ease;
}
.training-module-card:hover,
.training-module-card:focus-visible,
.training-module-card.is-active {
  border-color: rgba(45, 212, 191, 0.46);
  background: rgba(8, 18, 26, 0.62);
  outline: none;
}
.training-module-card--ok {
  border-left-color: #22c55e;
}
.training-module-card--warn {
  border-left-color: #f59e0b;
}
.training-module-card--off {
  border-left-color: #64748b;
}
.training-module-card__top,
.training-module-card__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.training-module-card__top strong {
  min-width: 0;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}
.training-module-card__top span {
  flex: 0 0 auto;
  color: #bfdbfe;
  font-size: 0.72rem;
  font-weight: 800;
}
.training-module-card__kind,
.training-module-card__foot {
  color: var(--muted);
  font-size: 0.72rem;
}
.training-module-card__body {
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.42;
}
.training-module-card__foot {
  padding-top: 0.35rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}
.training-run-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 8px;
  background: rgba(8, 18, 26, 0.62);
}
.training-run-panel h2 {
  margin: 0 0 0.25rem;
  color: var(--text);
  font-size: 0.95rem;
}
.training-run-panel p {
  margin: 0;
}
.training-run-panel form {
  flex: 0 0 auto;
}
.training-auto-status {
  flex: 1 1 18rem;
  min-width: 16rem;
  display: grid;
  gap: 0.22rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.42);
}
.training-auto-status span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.training-auto-status strong {
  color: var(--text);
  font-size: 0.92rem;
}
.training-auto-status small {
  color: var(--muted);
  line-height: 1.35;
}
.training-auto-status--ok {
  border-color: rgba(45, 212, 191, 0.28);
  background: rgba(13, 148, 136, 0.1);
}
.training-auto-status--warn {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.09);
}
.training-auto-status--err {
  border-color: rgba(248, 113, 113, 0.32);
  background: rgba(127, 29, 29, 0.18);
}
.training-autonomy-panel {
  border-color: rgba(45, 212, 191, 0.2);
}
.training-autonomy-steps {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
}
.training-autonomy-step {
  min-width: 0;
  padding: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.36);
}
.training-autonomy-step span {
  display: inline-grid;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(51, 65, 85, 0.55);
  font-size: 0.72rem;
  font-weight: 800;
}
.training-autonomy-step strong,
.training-autonomy-step em {
  display: block;
  min-width: 0;
}
.training-autonomy-step strong {
  margin-top: 0.45rem;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.25;
}
.training-autonomy-step em {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}
.training-autonomy-step.is-ready {
  border-color: rgba(45, 212, 191, 0.32);
  background: rgba(13, 148, 136, 0.12);
}
.training-autonomy-step.is-ready span {
  color: #ccfbf1;
  background: rgba(20, 184, 166, 0.36);
}
.training-autonomy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.85rem;
}
.training-autonomy-grid div {
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.34);
}
.training-autonomy-grid span,
.training-autonomy-actions label span,
.training-autonomy-pending dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.training-autonomy-grid strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--text);
  font-size: 1rem;
}
.training-autonomy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: end;
  margin-top: 0.9rem;
}
.training-autonomy-actions form {
  display: flex;
  gap: 0.45rem;
  align-items: end;
}
.training-autonomy-actions label {
  display: grid;
  gap: 0.25rem;
}
.training-autonomy-actions select {
  min-height: 2.2rem;
  min-width: 10rem;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.72);
}
.training-autonomy-gates {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.training-autonomy-gates p {
  margin: 0;
}
.training-autonomy-pending {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}
.training-autonomy-pending h3 {
  margin: 0 0 0.55rem;
  color: var(--text);
  font-size: 0.88rem;
}
.training-autonomy-pending dl {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0;
}
.training-autonomy-pending div {
  min-width: 0;
}
.training-autonomy-pending dd {
  margin: 0.2rem 0 0;
  color: var(--text);
  overflow-wrap: anywhere;
  font-size: 0.8rem;
}
.mourou-training-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.mourou-training-metric {
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-left: 4px solid rgba(148, 163, 184, 0.5);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.54);
}
.mourou-training-metric--ok {
  border-left-color: #22c55e;
}
.mourou-training-metric--warn {
  border-left-color: #f59e0b;
}
.mourou-training-metric span,
.mourou-training-panel__head h2,
.mourou-training-kv dt,
.mourou-training-table th,
.mourou-training-example dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.mourou-training-metric strong {
  display: block;
  margin-top: 0.24rem;
  color: var(--text);
  font-size: 1.18rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.mourou-training-metric p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}
.mourou-training-layout,
.mourou-training-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.mourou-training-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.mourou-training-panel {
  min-width: 0;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 22, 28, 0.98), rgba(10, 12, 16, 0.98));
}
.mourou-training-layout .mourou-training-panel,
.mourou-training-two-col .mourou-training-panel {
  margin-bottom: 0;
}
.mourou-training-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}
.mourou-training-panel__head h2 {
  margin: 0;
  color: var(--text);
}
.mourou-training-panel__head p {
  margin: 0.3rem 0 0;
}
.mourou-training-status {
  flex: 0 0 auto;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}
.mourou-training-status--ok {
  color: #bbf7d0;
  background: rgba(22, 101, 52, 0.26);
  border: 1px solid rgba(74, 222, 128, 0.38);
}
.mourou-training-status--warn {
  color: #fde68a;
  background: rgba(133, 77, 14, 0.24);
  border: 1px solid rgba(251, 191, 36, 0.38);
}
.mourou-training-status--off {
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.3);
  border: 1px solid rgba(148, 163, 184, 0.24);
}
.mourou-training-bar {
  height: 0.72rem;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.68);
}
.mourou-training-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2dd4bf, #38bdf8);
}
.mourou-training-file-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.9rem 0 0;
}
.mourou-training-file-grid div {
  min-width: 0;
  padding: 0.72rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.36);
}
.mourou-training-file-grid dt,
.mourou-training-file-grid small {
  color: var(--muted);
  font-size: 0.72rem;
}
.mourou-training-file-grid dd {
  margin: 0.18rem 0;
  font-size: 0.8rem;
  word-break: break-word;
}
.mourou-training-file-grid a {
  color: #bfdbfe;
  text-decoration: none;
}
.mourou-training-file-grid a:hover {
  color: #e0f2fe;
}
.training-source-paths {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}
.training-source-paths h3 {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.training-source-paths dl {
  display: grid;
  gap: 0.38rem;
  margin: 0;
}
.training-source-paths dl div {
  display: grid;
  grid-template-columns: minmax(8rem, 0.28fr) minmax(0, 1fr);
  gap: 0.65rem;
}
.training-source-paths dt,
.training-source-paths dd {
  min-width: 0;
  margin: 0;
  font-size: 0.78rem;
}
.training-source-paths dt {
  color: var(--muted);
}
.training-source-paths dd {
  color: var(--text);
  overflow-wrap: anywhere;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}
.mourou-training-kv {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}
.mourou-training-kv div {
  display: grid;
  grid-template-columns: minmax(8rem, 0.36fr) minmax(0, 1fr);
  gap: 0.7rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.mourou-training-kv div:last-child {
  padding-bottom: 0;
  border-bottom: none;
}
.mourou-training-kv dd {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.mourou-training-checks {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mourou-training-checks li {
  position: relative;
  padding: 0.58rem 0.68rem 0.58rem 1.8rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.32);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.45;
}
.mourou-training-checks li::before {
  content: "";
  position: absolute;
  left: 0.72rem;
  top: 1rem;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: var(--accent);
}
.mourou-training-table-wrap {
  overflow-x: auto;
}
.mourou-training-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.mourou-training-table th,
.mourou-training-table td {
  padding: 0.58rem 0.7rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  text-align: left;
  vertical-align: top;
}
.mourou-training-table tbody tr:last-child td {
  border-bottom: none;
}
.mourou-training-table td {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.mourou-training-example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7rem;
}
.mourou-training-example {
  min-width: 0;
  padding: 0.72rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-left: 4px solid rgba(45, 212, 191, 0.72);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.36);
}
.mourou-training-example__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.mourou-training-example__top strong {
  color: var(--text);
}
.mourou-training-example__top span {
  flex: 0 0 auto;
  color: #bfdbfe;
  font-size: 0.72rem;
  font-weight: 800;
}
.mourou-training-example dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
  margin: 0.62rem 0 0;
}
.mourou-training-example dl div {
  min-width: 0;
  padding: 0.45rem;
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.6);
}
.mourou-training-example dd {
  margin: 0.12rem 0 0;
  color: var(--text);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}
.mourou-training-example p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}
.mourou-training-summary {
  min-height: 260px;
  max-height: 640px;
  overflow: auto;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.76);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
}
@media (max-width: 980px) {
  .mourou-training-metrics,
  .mourou-training-layout,
  .mourou-training-two-col,
  .mourou-training-file-grid,
  .training-module-grid,
  .training-autonomy-steps,
  .training-autonomy-grid,
  .training-autonomy-pending dl {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .mourou-training-hero,
  .mourou-training-panel__head,
  .mourou-training-example__top,
  .training-registry-head,
  .training-run-panel,
  .training-module-card__top,
  .training-module-card__foot {
    align-items: flex-start;
    flex-direction: column;
  }
  .training-run-panel form,
  .training-auto-status,
  .training-run-panel .btn {
    width: 100%;
  }
  .training-autonomy-actions,
  .training-autonomy-actions form,
  .training-autonomy-actions label,
  .training-autonomy-actions .btn {
    width: 100%;
  }
  .training-autonomy-actions select {
    width: 100%;
  }
  .mourou-training-progress {
    width: 100%;
  }
  .mourou-training-progress__ring {
    width: 96px;
    height: 96px;
  }
  .mourou-training-kv div,
  .mourou-training-example dl,
  .training-source-paths dl div {
    grid-template-columns: 1fr;
  }
}

.main.main-narrow {
  max-width: 440px;
}
.main.main-login {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(10, 12, 16, 0.78), rgba(10, 12, 16, 0.96) 42%, #0a0c10 100%),
    linear-gradient(120deg, rgba(20, 184, 166, 0.14), transparent 32%, rgba(245, 158, 11, 0.08) 68%, transparent),
    #0a0c10;
}
.main.main-login + .foot {
  display: none;
}
.auth-card {
  padding: 1.5rem;
}
.auth-card h1 {
  margin-top: 0;
}
.top-minimal {
  justify-content: flex-start;
}
.top-minimal .app-clock {
  margin-left: auto;
}
.btn-sm {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
}
.row-wrap.form-stack {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
}
.row-wrap.form-stack label {
  min-width: 140px;
}
.site-shell {
  width: 100%;
  overflow: hidden;
}
.site-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(1220px, calc(100% - 2rem));
  min-height: 4.6rem;
  margin: 0 auto;
  padding: 0.75rem 0;
  backdrop-filter: blur(20px);
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  color: #f8fafc;
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: 0;
}
.site-brand img {
  width: 2.45rem;
  height: 2.45rem;
  display: block;
  object-fit: contain;
}
.site-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-left: auto;
}
.site-links a {
  color: #aab4c3;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 650;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
}
.site-links a:hover,
.site-links a:focus-visible {
  color: #f8fafc;
  background: rgba(148, 163, 184, 0.12);
  outline: none;
}
.site-login-btn {
  flex: 0 0 auto;
  color: #07110f;
  background: linear-gradient(135deg, #5eead4, #fbbf24);
  border: 1px solid rgba(153, 246, 228, 0.7);
  box-shadow: 0 14px 34px rgba(45, 212, 191, 0.2);
}
.site-hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 8rem);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(1.7rem, 4vw, 3rem) 0 clamp(1.8rem, 3.6vw, 2.55rem);
}
.site-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(10, 12, 16, 0.98) 0%, rgba(10, 12, 16, 0.9) 42%, rgba(10, 12, 16, 0.36) 72%, rgba(10, 12, 16, 0.92) 100%),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.08) 0 1px, transparent 1px 5rem),
    repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.06) 0 1px, transparent 1px 5rem);
}
.site-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(116deg, transparent 0 30%, rgba(45, 212, 191, 0.16) 30.5% 31.1%, transparent 31.6% 45%, rgba(251, 191, 36, 0.14) 45.5% 46%, transparent 46.5%),
    linear-gradient(180deg, rgba(2, 6, 23, 0), #0a0c10 98%);
  pointer-events: none;
}
.site-hero-copy {
  position: relative;
  z-index: 4;
  width: min(1220px, calc(100% - 2rem));
  margin: 0 auto;
  padding-right: min(36vw, 28rem);
  min-width: 0;
}
.site-eyebrow,
.login-card-kicker {
  margin: 0 0 0.6rem;
  color: #fbbf24;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.site-hero h1 {
  max-width: 15ch;
  margin: 0;
  color: #f8fafc;
  font-size: clamp(3rem, 6vw, 5.25rem);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: 0;
}
.site-hero-lead {
  max-width: 43rem;
  margin: 1.35rem 0 0;
  color: #c0cad8;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.6;
}
.site-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}
.site-hero-actions .btn,
.site-login-btn {
  min-height: 2.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.site-proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 48rem;
  margin-top: 1.35rem;
}
.site-proof-strip span {
  display: block;
  min-height: 4.2rem;
  padding: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(11, 17, 26, 0.58);
  color: #aeb8c8;
  font-size: 0.82rem;
  line-height: 1.45;
  backdrop-filter: blur(12px);
}
.site-proof-strip strong {
  display: block;
  color: #f8fafc;
  font-size: 0.88rem;
  letter-spacing: 0;
}
.site-hero-scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  perspective: 1200px;
}
.site-perspective {
  position: absolute;
  top: clamp(2.4rem, 8vh, 5.8rem);
  right: max(-23rem, -17vw);
  width: min(54vw, 44rem);
  height: min(70vh, 36rem);
  transform-style: preserve-3d;
  transform: rotateX(9deg) rotateY(-20deg) rotateZ(1deg);
}
.site-terminal {
  position: absolute;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(20, 29, 43, 0.98), rgba(8, 13, 22, 0.98));
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform-style: preserve-3d;
}
.site-terminal::after {
  content: "";
  position: absolute;
  inset: 0.55rem;
  border: 1px solid rgba(45, 212, 191, 0.1);
  border-radius: 7px;
  pointer-events: none;
}
.site-terminal--main {
  inset: 0 0 auto auto;
  width: min(100%, 43rem);
  min-height: 24rem;
  overflow: hidden;
}
.site-terminal--stats {
  left: -2.8rem;
  bottom: 2.2rem;
  width: 18rem;
  padding: 1rem;
  transform: translateZ(76px) rotateY(12deg);
}
.site-terminal--strategy {
  right: 1.8rem;
  bottom: -1.2rem;
  width: 20rem;
  padding: 1rem;
  transform: translateZ(112px) rotateY(-10deg);
}
.site-terminal--stats span,
.site-terminal--strategy span {
  color: #fbbf24;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.site-terminal--stats strong,
.site-terminal--strategy strong {
  display: block;
  margin-top: 0.4rem;
  color: #f8fafc;
  font-size: 1.05rem;
}
.site-terminal--stats small,
.site-terminal--strategy small {
  display: block;
  margin-top: 0.45rem;
  color: #aeb8c8;
  line-height: 1.45;
}
.site-terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  height: 2.85rem;
  padding: 0 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.58);
}
.site-terminal-bar span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #ef4444;
}
.site-terminal-bar span:nth-child(2) { background: #fbbf24; }
.site-terminal-bar span:nth-child(3) { background: #22c55e; }
.site-terminal-bar strong {
  margin-left: 0.45rem;
  color: #cbd5e1;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.site-terminal-body {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 0.9rem;
  padding: 1rem;
}
.site-terminal-side,
.site-terminal-chart {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.44);
}
.site-terminal-side {
  padding: 0.95rem;
}
.site-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.52rem;
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 999px;
  color: #86efac;
  background: rgba(22, 101, 52, 0.18);
  font-size: 0.68rem;
  font-weight: 800;
}
.site-terminal-side strong {
  display: block;
  margin-top: 1.2rem;
  color: #4ade80;
  font-size: 2.55rem;
  line-height: 1;
  letter-spacing: 0;
}
.site-terminal-side small {
  display: block;
  margin-top: 0.35rem;
  color: #aeb8c8;
}
.site-mini-bars {
  height: 7.5rem;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.42rem;
  align-items: end;
  margin-top: 1.2rem;
}
.site-mini-bars i {
  display: block;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, #38bdf8, #0f766e);
}
.site-terminal-chart {
  position: relative;
  min-height: 18rem;
  padding: 1rem;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, transparent 0 2.7rem, rgba(148, 163, 184, 0.1) 2.75rem 2.8rem),
    rgba(2, 6, 23, 0.45);
}
.site-chart-line {
  height: 9.8rem;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(45, 212, 191, 0.22), transparent),
    linear-gradient(100deg, transparent 0 8%, #38bdf8 8.5% 12%, transparent 12.5% 24%, #2dd4bf 24.5% 29%, transparent 29.5% 45%, #fbbf24 45.5% 50%, transparent 50.5%);
  clip-path: polygon(0 72%, 11% 62%, 21% 68%, 34% 42%, 48% 52%, 62% 26%, 77% 36%, 100% 12%, 100% 100%, 0 100%);
}
.site-chart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
  color: #94a3b8;
  font-size: 0.78rem;
}
.site-chart-row strong {
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
}
.site-preview-head,
.site-preview-foot,
.site-public-card-head,
.site-chart-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.site-preview-head span,
.site-public-card span,
.site-public-card-head span,
.site-preview-foot span,
.site-chart-meta span,
.site-strategy-card span {
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-public-card,
.site-feature,
.site-strategy-card,
.site-profile-form {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(11, 17, 26, 0.74);
}
.site-shell .pos {
  color: #4ade80;
}
.site-preview-foot {
  flex-wrap: wrap;
  margin-top: 1rem;
}
.site-preview-foot strong {
  color: #e2e8f0;
  letter-spacing: 0;
  text-transform: none;
}
.site-section {
  width: min(1220px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2.2rem, 6vw, 4.6rem) 0;
  border-top: 1px solid rgba(148, 163, 184, 0.13);
}
.site-section--stats {
  padding-top: 3rem;
}
.site-section-head {
  max-width: 54rem;
  margin-bottom: 1.4rem;
}
.site-section-head h2 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(1.85rem, 3.8vw, 3.1rem);
  line-height: 1.05;
  text-transform: none;
  letter-spacing: 0;
}
.site-section-head p:not(.site-eyebrow) {
  margin: 0.8rem 0 0;
  color: #aeb8c8;
  font-size: 1rem;
  line-height: 1.65;
}
.site-stats-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(14rem, 0.75fr) minmax(14rem, 0.75fr);
  gap: 1rem;
  perspective: 1200px;
}
.site-public-card {
  min-height: 12rem;
  padding: 1.1rem;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.22);
}
.site-public-card--wide {
  min-height: 18rem;
  transform: rotateX(1deg);
}
.site-public-card strong {
  display: block;
  margin-top: 0.6rem;
  color: #f8fafc;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.site-public-card p {
  margin: 0.8rem 0 0;
  color: #aeb8c8;
  font-size: 0.9rem;
}
.site-public-card-head strong {
  margin: 0;
  font-size: 0.9rem;
  color: #fbbf24;
}
.site-line-chart {
  position: relative;
  height: 11.8rem;
  margin-top: 1rem;
  overflow: hidden;
  border-radius: 8px;
  background:
    repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.12) 0 1px, transparent 1px 2.35rem),
    linear-gradient(180deg, rgba(56, 189, 248, 0.08), rgba(20, 184, 166, 0.08));
}
.site-line-chart::before {
  content: "";
  position: absolute;
  inset: 16% 5% 18%;
  background: linear-gradient(100deg, #38bdf8, #2dd4bf 58%, #fbbf24);
  clip-path: polygon(0 64%, 12% 58%, 24% 66%, 37% 44%, 50% 52%, 63% 28%, 78% 38%, 100% 14%, 100% 25%, 78% 49%, 63% 39%, 50% 64%, 37% 55%, 24% 78%, 12% 69%, 0 76%);
  opacity: 0.95;
}
.site-line-chart::after {
  content: "";
  position: absolute;
  inset: 54% 0 0;
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.12), transparent);
}
.site-chart-meta {
  margin-top: 0.7rem;
}
.site-profile-form {
  display: grid;
  grid-template-columns: minmax(10rem, 0.6fr) minmax(0, 1.4fr);
  gap: 0.85rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1rem;
}
.site-profile-form label {
  color: #e2e8f0;
  font-weight: 750;
}
.site-profile-control {
  display: flex;
  gap: 0.55rem;
}
.site-profile-control .input {
  min-width: 0;
}
.site-feature-grid,
.site-strategy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.site-feature,
.site-strategy-card {
  min-height: 14rem;
  padding: 1.15rem;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}
.site-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  color: #08110f;
  background: #2dd4bf;
  font-size: 0.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.site-feature h3,
.site-strategy-card h3 {
  margin: 1.05rem 0 0;
  color: #f8fafc;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}
.site-feature p,
.site-strategy-card p {
  margin: 0.75rem 0 0;
  color: #aeb8c8;
  font-size: 0.92rem;
  line-height: 1.55;
}
.site-strategy-card {
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.92), rgba(11, 17, 26, 0.86)),
    linear-gradient(135deg, rgba(56, 189, 248, 0.14), transparent 45%, rgba(251, 191, 36, 0.1));
}
.login-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(3, 7, 12, 0.72);
  backdrop-filter: blur(12px);
}
.login-modal-backdrop.is-open {
  display: flex;
}
.login-modal-card {
  position: relative;
  width: min(29rem, 100%);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  padding: clamp(1.2rem, 4vw, 1.6rem);
  background: linear-gradient(180deg, rgba(18, 24, 32, 0.99), rgba(10, 14, 21, 0.99));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
}
.login-modal-card h2 {
  margin: 0;
  color: #f8fafc;
  font-size: 1.75rem;
  line-height: 1.1;
  text-transform: none;
  letter-spacing: 0;
}
.login-modal-subtitle {
  margin: 0.6rem 0 1.15rem;
  color: #aeb8c8;
  font-size: 0.94rem;
  line-height: 1.55;
}
.login-modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.86);
  color: #cbd5e1;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.login-modal-close:hover,
.login-modal-close:focus-visible {
  color: #f8fafc;
  border-color: rgba(45, 212, 191, 0.55);
  outline: none;
}
.login-form {
  gap: 0.9rem;
}
.login-form label {
  color: #cbd5e1;
  font-weight: 600;
}
.login-form .btn {
  margin-top: 0.25rem;
  min-height: 2.9rem;
}
body.login-modal-active {
  overflow: hidden;
}
@media (max-width: 980px) {
  .site-stats-grid,
  .site-feature-grid,
  .site-strategy-grid {
    grid-template-columns: 1fr;
  }
  .site-hero {
    min-height: auto;
    padding: 2rem 0 2.4rem;
    align-items: flex-start;
  }
  .site-hero-copy {
    padding-right: 0;
    padding-top: min(38vh, 19rem);
  }
  .site-hero h1 {
    max-width: 12ch;
  }
  .site-hero-scene {
    height: 24rem;
    bottom: auto;
  }
  .site-perspective {
    top: 0.6rem;
    right: 50%;
    width: min(39rem, calc(100vw - 1rem));
    height: 22rem;
    transform: translateX(50%) scale(0.74) rotateX(8deg) rotateY(-16deg);
  }
  .site-stats-grid {
    gap: 0.8rem;
  }
  .site-public-card,
  .site-feature,
  .site-strategy-card {
    min-height: auto;
  }
}
@media (max-width: 720px) {
  .site-nav {
    width: min(100% - 1rem, 1220px);
    gap: 0.6rem;
  }
  .site-brand img {
    width: 2.25rem;
    height: 2.25rem;
  }
  .site-links {
    display: none;
  }
  .site-login-btn {
    margin-left: auto;
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }
  .site-hero,
  .site-section {
    width: min(100% - 1rem, 1220px);
  }
  .site-hero {
    width: 100%;
  }
  .site-hero-copy {
    width: min(100% - 1rem, 1220px);
    padding-top: 14.2rem;
  }
  .site-hero h1 {
    font-size: clamp(2.25rem, 11vw, 3.05rem);
    max-width: 11ch;
  }
  .site-hero-lead {
    margin-top: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
  }
  .site-proof-strip {
    display: none;
  }
  .site-profile-control {
    flex-direction: column;
  }
  .site-profile-control .btn {
    width: 100%;
  }
  .site-profile-form {
    grid-template-columns: 1fr;
  }
  .site-hero-actions .btn {
    flex: 1 1 10rem;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }
  .site-perspective {
    transform: translateX(50%) scale(0.62) rotateX(8deg) rotateY(-16deg);
  }
}
@media (max-width: 480px) {
  .site-nav {
    min-height: 4rem;
  }
  .site-brand img {
    width: 2.1rem;
    height: 2.1rem;
  }
  .site-brand span {
    max-width: 6.8rem;
    line-height: 1.05;
  }
  .site-login-btn {
    min-height: 2.35rem;
    font-size: 0.82rem;
  }
  .site-hero {
    padding-top: 1.1rem;
  }
  .site-hero-copy {
    padding-top: 13rem;
  }
  .site-preview-head,
  .site-preview-foot,
  .site-public-card-head,
  .site-chart-meta {
    align-items: flex-start;
    flex-direction: column;
  }
  .site-chart-sample {
    gap: 0.32rem;
  }
  .site-section-head h2 {
    font-size: 1.55rem;
  }
  .login-modal-backdrop {
    align-items: flex-end;
    padding: 0.5rem;
  }
  .login-modal-card {
    width: 100%;
    max-height: calc(100vh - 1rem);
    overflow: auto;
  }
}
@media (max-width: 340px) {
  .site-brand img {
    width: 2rem;
    height: 2rem;
  }
  .site-brand span {
    max-width: 5.4rem;
  }
  .site-login-btn {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }
  .site-hero-copy {
    padding-top: 15.2rem;
  }
}
.admin-user-table td {
  vertical-align: middle;
}

/* Admin user list — card layout (replaces table) */
.admin-users-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.admin-user-card {
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(24, 30, 39, 0.98) 0%, var(--surface) 100%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}
.admin-user-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem 1rem;
  border-bottom: 1px solid rgba(42, 49, 64, 0.85);
}
.admin-user-card__identity {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}
.admin-user-card__avatar {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  background: linear-gradient(145deg, rgba(45, 212, 191, 0.22) 0%, rgba(17, 94, 89, 0.45) 100%);
  border: 1px solid rgba(45, 212, 191, 0.35);
  text-transform: uppercase;
}
.admin-user-card__titleblock {
  min-width: 0;
}
.admin-user-card__name {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  word-break: break-word;
  text-transform: none;
  color: var(--text);
}
.admin-user-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.admin-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.2);
}
.admin-badge--tenant code {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text);
}
.admin-badge--ok {
  border-color: rgba(74, 222, 128, 0.35);
  color: #86efac;
  background: rgba(22, 101, 52, 0.15);
}
.admin-badge--off {
  border-color: rgba(248, 113, 113, 0.35);
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.2);
}
.admin-badge--role-admin {
  border-color: rgba(45, 212, 191, 0.4);
  color: var(--accent);
  background: rgba(45, 212, 191, 0.1);
}
.admin-badge--role-user {
  border-color: rgba(139, 147, 163, 0.45);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.15);
}
.admin-user-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
}
.admin-user-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.65rem;
  margin: 0;
  padding: 0 1.35rem 0.65rem;
}
.admin-stat {
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(42, 49, 64, 0.55);
}
.admin-stat dt {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.admin-stat dd {
  margin: 0;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.35;
}
.admin-user-stats-source {
  margin: 0;
  padding: 0 1.35rem 1rem;
  border-bottom: 1px solid rgba(42, 49, 64, 0.65);
}
.admin-user-stats-source code {
  font-size: 0.78rem;
  color: var(--text);
  word-break: break-word;
}
.public-stats-main {
  max-width: min(1180px, 96vw);
}
.public-stats-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.public-stats-head h1 {
  margin-bottom: 0.2rem;
}
.public-stats-card {
  padding: 0;
  overflow: hidden;
}
.public-stats-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem 0.8rem;
  border-bottom: 1px solid var(--border);
}
.public-stats-card__head h2 {
  margin: 0;
}
.public-stats-table-wrap {
  overflow-x: auto;
}
.public-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.public-stats-table th,
.public-stats-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.public-stats-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.public-stats-table tbody tr:last-child td {
  border-bottom: none;
}
.public-stats-table td {
  font-variant-numeric: tabular-nums;
}
.public-stats-table td:first-child {
  min-width: 11rem;
  font-variant-numeric: normal;
}
.public-stats-table td:first-child strong,
.public-stats-table td:first-child span {
  display: block;
}
.public-profile-card {
  padding: 0;
  overflow: hidden;
}
.public-profile-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border);
}
.public-profile-head h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}
.public-profile-sub {
  margin: 0.25rem 0 0;
}
.public-profile-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 1.15rem;
}
.public-profile-kpis div {
  margin: 0;
  padding: 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(42, 49, 64, 0.7);
  background: rgba(0, 0, 0, 0.18);
}
.public-profile-kpis dt {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.public-profile-kpis dd {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.public-profile-updated {
  margin: 0;
  padding: 0 1.15rem 1rem;
}
.eyebrow {
  margin: 0 0 0.35rem;
  color: #93c5fd;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.public-stats-head--rich {
  margin-bottom: 1.15rem;
}
.public-profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.public-profile-hero__copy,
.public-viz-panel,
.public-detail-panel,
.public-tenant-card {
  border: 1px solid rgba(42, 49, 64, 0.82);
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(18, 22, 28, 0.96), rgba(12, 18, 28, 0.9));
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18);
}
.public-profile-hero__copy {
  padding: 1.15rem 1.25rem;
}
.public-profile-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.public-profile-title-row h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: none;
}
.public-profile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.9rem;
}
.public-profile-meta span {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 0.24rem 0.55rem;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.6);
  font-size: 0.74rem;
  font-weight: 800;
}
.public-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.public-kpi-tile {
  min-height: 6rem;
  padding: 0.85rem;
  border: 1px solid rgba(42, 49, 64, 0.74);
  border-radius: 8px;
  background: rgba(9, 13, 21, 0.72);
}
.public-kpi-tile span,
.public-kpi-tile strong,
.public-kpi-tile small {
  display: block;
}
.public-kpi-tile span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.public-kpi-tile strong {
  margin-top: 0.45rem;
  color: var(--text);
  font-size: 1.18rem;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.public-kpi-tile small {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.74rem;
}
.public-data-notes {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1rem;
}
.public-data-note {
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(251, 191, 36, 0.26);
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.08);
}
.public-data-note strong,
.public-data-note span {
  display: block;
}
.public-data-note strong {
  color: #fde68a;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.public-data-note span {
  margin-top: 0.25rem;
  color: #cbd5e1;
  font-size: 0.82rem;
  line-height: 1.45;
}
.public-visual-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.public-viz-panel {
  padding: 1rem;
}
.public-viz-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}
.public-viz-head h3,
.public-detail-panel h3,
.public-tenant-card__head h2 {
  margin: 0;
}
.public-viz-head h3,
.public-detail-panel h3 {
  color: var(--text);
  font-size: 0.9rem;
}
.public-viz-head span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}
.public-donut-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
}
.public-donut,
.public-mini-donut {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 16px 36px rgba(0, 0, 0, 0.2);
}
.public-donut {
  width: 132px;
  height: 132px;
}
.public-donut::after,
.public-mini-donut::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: #0a0c10;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}
.public-donut::after {
  width: 78px;
  height: 78px;
}
.public-mini-donut::after {
  width: 58px;
  height: 58px;
}
.public-donut span,
.public-mini-donut span {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  text-align: center;
  max-width: 72px;
  overflow-wrap: anywhere;
}
.public-donut--cash span {
  font-size: 0.78rem;
}
.public-unavailable {
  margin: 0.85rem 0 0;
  padding: 0.85rem;
  border: 1px dashed rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.38);
  font-size: 0.82rem;
  line-height: 1.45;
}
.public-unavailable--compact {
  margin-top: 0.65rem;
  padding: 0.72rem 0.8rem;
}
.public-legend {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.78rem;
}
.public-legend li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}
.public-legend i,
.public-chart-legend i {
  flex: 0 0 auto;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
}
.public-legend strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.legend-win { background: #22c55e; }
.legend-loss { background: #fb7185; }
.legend-flat { background: #94a3b8; }
.legend-buy { background: #38bdf8; }
.legend-sell { background: #f59e0b; }
.legend-other { background: #64748b; }
.legend-deposit { background: #14b8a6; }
.legend-withdraw { background: #f97316; }
.legend-profit { background: #22c55e; }
.public-chart-card {
  padding: 0;
  overflow: hidden;
  margin-bottom: 1rem;
  border-color: rgba(56, 189, 248, 0.22);
}
.public-chart-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem 0.8rem;
  border-bottom: 1px solid rgba(56, 189, 248, 0.16);
}
.public-chart-card__head h2 {
  margin: 0;
  font-size: 0.95rem;
}
.public-chart-card__head p {
  margin: 0.25rem 0 0;
}
.public-chart-body {
  padding: 1rem 1.15rem 1.15rem;
}
.public-chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 0.9rem;
  margin-bottom: 0.75rem;
}
.public-range-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  min-width: 0;
}
.public-chart-tabs,
.public-range-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem;
  border: 1px solid rgba(42, 49, 64, 0.78);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.28);
}
.public-chart-tab,
.public-range-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.public-chart-tab {
  padding: 0.38rem 0.66rem;
  font-size: 0.78rem;
}
.public-range-tab {
  padding: 0.32rem 0.52rem;
  font-size: 0.72rem;
  white-space: nowrap;
}
.public-chart-tab.is-active {
  color: #e0f2fe;
  border-color: rgba(56, 189, 248, 0.44);
  background: rgba(14, 165, 233, 0.14);
}
.public-range-tab.is-active {
  color: #dcfce7;
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(34, 197, 94, 0.12);
}
.public-chart-tab:hover,
.public-range-tab:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.76);
}
.public-custom-range {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}
.public-custom-range[hidden] {
  display: none;
}
.public-custom-range input {
  min-width: 8.6rem;
  height: 2rem;
  border: 1px solid rgba(42, 49, 64, 0.82);
  border-radius: 7px;
  background: rgba(2, 6, 23, 0.34);
  color: var(--text);
  font: inherit;
  padding: 0 0.42rem;
  color-scheme: dark;
}
.public-custom-range input:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.58);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}
.public-chart-wrap {
  position: relative;
  border: 1px solid rgba(42, 49, 64, 0.82);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.32);
  overflow: hidden;
}
.public-chart-canvas {
  display: block;
  width: 100%;
  height: 340px;
}
.public-chart-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-top: 0.7rem;
}
.public-chart-footer p {
  margin: 0;
}
.public-chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}
.public-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.public-chart-tooltip {
  position: absolute;
  z-index: 4;
  min-width: 120px;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.94);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
  color: var(--text);
  pointer-events: none;
}
.public-chart-tooltip strong,
.public-chart-tooltip span {
  display: block;
  white-space: nowrap;
}
.public-chart-tooltip strong {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}
.public-chart-tooltip span {
  margin-top: 0.12rem;
  font-size: 0.86rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.public-empty-chart {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: var(--muted);
}
.public-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.public-detail-panel {
  min-width: 0;
  padding: 1rem;
}
.public-panel-source {
  margin: 0.25rem 0 0;
}
.public-metric-divider {
  margin: 1.05rem 0 0;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(42, 49, 64, 0.72);
}
.public-metric-divider h4 {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 850;
}
.public-metric-divider p {
  margin: 0.25rem 0 0;
}
.public-detail-panel--wide {
  grid-column: 1 / -1;
}
.public-detail-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem;
  margin: 0.85rem 0 0;
}
.public-detail-list div {
  min-width: 0;
  padding: 0.65rem 0;
  border-top: 1px solid rgba(42, 49, 64, 0.72);
}
.public-detail-list dt {
  margin: 0 0 0.22rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}
.public-detail-list dd {
  margin: 0;
  color: var(--text);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.public-detail-list--advanced {
  margin-top: 0.7rem;
}
.public-bars {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.9rem;
}
.public-bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.95fr) minmax(120px, 1.4fr) minmax(70px, auto);
  gap: 0.65rem;
  align-items: center;
}
.public-bar-label {
  min-width: 0;
}
.public-bar-label strong,
.public-bar-label span {
  display: block;
}
.public-bar-label strong {
  font-size: 0.82rem;
}
.public-bar-label span {
  color: var(--muted);
  font-size: 0.7rem;
}
.public-bar-track {
  position: relative;
  min-width: 0;
  height: 0.54rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  overflow: hidden;
}
.public-bar-track i {
  display: block;
  min-width: 2px;
  height: 100%;
  border-radius: inherit;
  background: #38bdf8;
}
.public-bar-track i.pnl-pos { background: #22c55e; }
.public-bar-track i.pnl-neg { background: #fb7185; }
.public-bar-row > span {
  text-align: right;
  font-weight: 800;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.public-trades-table-wrap {
  overflow-x: auto;
  margin-top: 0.85rem;
}
.public-trades-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.public-trades-table th,
.public-trades-table td {
  padding: 0.62rem 0.7rem;
  border-bottom: 1px solid rgba(42, 49, 64, 0.72);
  text-align: left;
  white-space: nowrap;
}
.public-trades-table th {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.public-trades-table tbody tr:last-child td {
  border-bottom: none;
}
.public-tenant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.public-tenant-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.public-tenant-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(42, 49, 64, 0.72);
}
.public-tenant-card__head h2 {
  color: var(--text);
  font-size: 1rem;
}
.public-tenant-card__head p {
  margin: 0.25rem 0 0;
}
.public-tenant-card__body {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  padding: 1rem;
}
.public-mini-donut {
  width: 96px;
  height: 96px;
}
.public-tenant-mini-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
}
.public-tenant-mini-kpis div {
  min-width: 0;
}
.public-tenant-mini-kpis dt {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
}
.public-tenant-mini-kpis dd {
  margin: 0.18rem 0 0;
  color: var(--text);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.public-tenant-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding: 0.8rem 1rem;
  border-top: 1px solid rgba(42, 49, 64, 0.72);
}
@media (max-width: 980px) {
  .public-profile-hero,
  .public-visual-grid,
  .public-detail-grid {
    grid-template-columns: 1fr;
  }
  .public-detail-panel--wide {
    grid-column: auto;
  }
}
@media (max-width: 720px) {
  .public-profile-title-row,
  .public-chart-card__head,
  .public-chart-toolbar,
  .public-chart-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .public-donut-row,
  .public-tenant-card__body {
    grid-template-columns: 1fr;
  }
  .public-donut,
  .public-mini-donut {
    justify-self: center;
  }
  .public-chart-tabs,
  .public-range-tabs,
  .public-range-shell,
  .public-custom-range {
    width: 100%;
  }
  .public-chart-tab,
  .public-range-tab {
    flex: 1 1 auto;
  }
  .public-custom-range input {
    min-width: 0;
    width: 100%;
  }
  .public-chart-canvas {
    height: 285px;
  }
  .public-bar-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(42, 49, 64, 0.52);
  }
  .public-bar-row > span {
    text-align: left;
  }
  .public-tenant-mini-kpis {
    grid-template-columns: 1fr;
  }
}
.admin-user-card__body {
  padding: 1.15rem 1.35rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.admin-user-section {
  margin: 0;
}
.admin-user-section__title {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.admin-user-section__title--row {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.admin-user-section__lead {
  margin: -0.1rem 0 0.75rem;
  line-height: 1.45;
}
.admin-section-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
}
.admin-section-head-row--with-list {
  margin-bottom: 0.65rem;
}
.admin-strategy-page-form {
  margin: 0;
}
.admin-strategy-sections-form {
  margin: 0;
}
.admin-user-strategy-json {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.admin-user-strategy-json__title {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  font-weight: 600;
}
.admin-user-strategy-json-form {
  margin: 0;
}
.admin-user-strategy-json__textarea {
  width: 100%;
  min-height: 12rem;
  font-size: 0.78rem;
  line-height: 1.45;
}
.admin-user-strategy-scroll {
  padding: 0.25rem 0.35rem 0.25rem 0;
  border-radius: 8px;
  border: 1px solid rgba(42, 49, 64, 0.85);
  background: rgba(0, 0, 0, 0.18);
}
.admin-strat-sec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
}
.admin-strat-sec-row:last-child {
  border-bottom: none;
}
.admin-strat-sec-row__title {
  min-width: 0;
  line-height: 1.35;
  flex: 1;
}
/* On/off toggles (admin permissions) */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
}
.toggle__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}
.toggle__input:focus-visible + .toggle__track {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.toggle__track {
  position: relative;
  width: 2.75rem;
  height: 1.5rem;
  flex-shrink: 0;
  border-radius: 999px;
  background: #2a3140;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}
.toggle__input:checked + .toggle__track {
  background: linear-gradient(135deg, var(--accent-dim) 0%, #0d9488 100%);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(45, 212, 191, 0.25);
}
.toggle__thumb {
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.toggle__input:checked + .toggle__track .toggle__thumb {
  transform: translateX(1.25rem);
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
}
.toggle__text {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  min-width: 2.6rem;
}
.toggle__input:checked ~ .toggle__text {
  color: var(--accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.banner.ok {
  background: #042f2e;
  border: 1px solid var(--accent-dim);
  color: #99f6e4;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* Dashboard — portfolio / Myfxbook-style layout */
.main.main-fx.main-wide {
  max-width: min(1240px, 96vw);
}
.fx-dash-head {
  margin-bottom: 1.25rem;
}
.fx-dash-sub {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}
.fx-product-badge {
  display: inline-flex;
  align-items: center;
  margin-right: 0.45rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(45, 212, 191, 0.25);
  background: rgba(45, 212, 191, 0.12);
  color: #99f6e4;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.fx-status-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 1.25rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.fx-status-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  min-width: 0;
}
.fx-status-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
}
.fx-status-actions .btn-sm {
  white-space: nowrap;
}
.fx-live-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(74, 222, 128, 0.28);
  background: rgba(22, 101, 52, 0.16);
  color: #bbf7d0;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.fx-live-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.1), 0 0 14px rgba(74, 222, 128, 0.45);
}
.fx-live-refresh.is-warn {
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(120, 53, 15, 0.18);
  color: #fde68a;
}
.fx-live-refresh.is-warn .fx-live-dot {
  background: #fbbf24;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.1), 0 0 14px rgba(251, 191, 36, 0.36);
}
.mfb-chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 0.9rem;
  margin: 0 0 0.75rem;
}
.mfb-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
  padding: 0.18rem;
  border: 1px solid rgba(42, 49, 64, 0.72);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.32);
  width: fit-content;
  max-width: 100%;
}
.mfb-chart-toolbar .mfb-tabs {
  margin: 0;
}
.mfb-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0.38rem 0.72rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.mfb-tab.is-active {
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.22);
  color: #e5e7eb;
}
.mfb-tab:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.7);
}
.mfb-range-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  min-width: 0;
}
.mfb-range-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.16rem;
  border: 1px solid rgba(42, 49, 64, 0.72);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.24);
}
.mfb-range-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0.32rem 0.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.mfb-range-tab.is-active {
  border-color: rgba(20, 184, 166, 0.42);
  background: rgba(13, 148, 136, 0.16);
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.18);
  color: #d1fae5;
}
.mfb-range-tab:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.66);
}
.mfb-custom-range {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}
.mfb-custom-range[hidden] {
  display: none;
}
.mfb-custom-range input {
  min-width: 8.6rem;
  height: 2rem;
  border: 1px solid rgba(42, 49, 64, 0.82);
  border-radius: 7px;
  background: rgba(2, 6, 23, 0.34);
  color: var(--text);
  font: inherit;
  padding: 0 0.42rem;
  color-scheme: dark;
}
.mfb-custom-range input:focus {
  outline: none;
  border-color: rgba(20, 184, 166, 0.58);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}
.mfb-chart-wrap {
  position: relative;
  border: 1px solid rgba(42, 49, 64, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.68), rgba(2, 6, 23, 0.2)),
    rgba(2, 6, 23, 0.35);
  overflow: hidden;
}
.mfb-chart-canvas {
  display: block;
  width: 100%;
  height: 300px;
}
.mfb-chart-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 1rem;
  margin-top: 0.65rem;
}
.mfb-chart-meta {
  margin: 0;
  line-height: 1.4;
}
.mfb-chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}
.mfb-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.mfb-chart-legend i {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}
.mfb-chart-tooltip {
  position: absolute;
  z-index: 3;
  min-width: 118px;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.94);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
  color: var(--text);
  pointer-events: none;
}
.mfb-chart-tooltip strong,
.mfb-chart-tooltip span {
  display: block;
  white-space: nowrap;
}
.mfb-chart-tooltip strong {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}
.mfb-chart-tooltip span {
  margin-top: 0.12rem;
  font-size: 0.86rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.mfb-chart-tooltip .mfb-tooltip-sub {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}
.vps-donut-card {
  --disk-used: 0%;
  --disk-fill: #2dd4bf;
  --disk-fill-2: #60a5fa;
  --disk-rest: rgba(51, 65, 85, 0.72);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.9rem;
  min-width: 330px;
  padding: 0.88rem 1rem;
  border: 1px solid rgba(45, 212, 191, 0.24);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0%, rgba(45, 212, 191, 0.12), transparent 42%),
    linear-gradient(145deg, rgba(17, 24, 39, 0.96), rgba(8, 13, 22, 0.96));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}
.vps-donut-card--wide {
  justify-content: flex-start;
  margin-bottom: 1rem;
  max-width: 420px;
}
.vps-donut-card--warn {
  --disk-fill: #facc15;
  --disk-fill-2: #f59e0b;
  border-color: rgba(251, 191, 36, 0.42);
  background:
    radial-gradient(circle at 100% 0%, rgba(251, 191, 36, 0.15), transparent 44%),
    linear-gradient(145deg, rgba(30, 22, 10, 0.98), rgba(17, 24, 39, 0.96));
}
.vps-donut-card--danger {
  --disk-fill: #fb7185;
  --disk-fill-2: #ef4444;
  border-color: rgba(248, 113, 113, 0.52);
  background:
    radial-gradient(circle at 100% 0%, rgba(248, 113, 113, 0.17), transparent 44%),
    linear-gradient(145deg, rgba(33, 12, 18, 0.98), rgba(17, 24, 39, 0.96));
}
.vps-donut-card--off {
  --disk-fill: #94a3b8;
  --disk-fill-2: #64748b;
  border-color: rgba(148, 163, 184, 0.32);
}
.vps-donut-ring {
  position: relative;
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  border-radius: 50%;
  background:
    conic-gradient(from -90deg, var(--disk-fill) 0, var(--disk-fill-2) var(--disk-used), var(--disk-rest) var(--disk-used) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 22px rgba(45, 212, 191, 0.1);
}
.vps-donut-ring::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(8, 13, 22, 0.98));
}
.vps-donut-core {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  text-align: center;
}
.vps-donut-core strong {
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.vps-donut-core span {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.vps-donut-copy {
  min-width: 0;
  display: grid;
  gap: 0.22rem;
}
.vps-donut-copy strong {
  color: var(--text);
  font-size: 0.92rem;
}
.vps-donut-copy span:last-child {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}
.vps-donut-pill {
  justify-self: start;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  color: #ccfbf1;
  background: rgba(20, 184, 166, 0.18);
  border: 1px solid rgba(45, 212, 191, 0.26);
  font-size: 0.7rem;
  font-weight: 800;
}
.vps-donut-card--warn .vps-donut-pill {
  color: #fef3c7;
  background: rgba(180, 83, 9, 0.22);
  border-color: rgba(251, 191, 36, 0.38);
}
.vps-donut-card--danger .vps-donut-pill {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.28);
  border-color: rgba(248, 113, 113, 0.4);
}
@media (max-width: 720px) {
  .vps-donut-card {
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
  }
  .mfb-tabs {
    width: 100%;
  }
  .mfb-chart-toolbar {
    align-items: stretch;
  }
  .mfb-range-shell,
  .mfb-range-tabs,
  .mfb-custom-range {
    width: 100%;
  }
  .mfb-range-tabs {
    justify-content: space-between;
  }
  .mfb-tab {
    flex: 1 1 auto;
    padding-inline: 0.5rem;
  }
  .mfb-range-tab {
    flex: 1 1 auto;
    padding-inline: 0.35rem;
  }
  .mfb-custom-range input {
    flex: 1 1 0;
    min-width: 0;
  }
  .mfb-chart-canvas {
    height: 260px;
  }
  .mfb-chart-footer {
    align-items: flex-start;
  }
  .mfb-chart-legend {
    justify-content: flex-start;
  }
}
.fx-runner-feedback {
  margin-top: -0.25rem;
  margin-bottom: 1rem;
}
.fx-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.82rem;
}
.fx-badge--ok {
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(22, 101, 52, 0.18);
}
.fx-badge--warn {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(120, 53, 15, 0.22);
}
.fx-badge--off {
  border-color: rgba(148, 163, 184, 0.35);
  background: var(--surface2);
}
.fx-badge--neutral {
  background: var(--surface2);
}
.fx-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--muted);
}
.fx-badge--ok .fx-badge-dot {
  background: var(--ok);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}
.fx-badge--warn .fx-badge-dot {
  background: var(--warn);
}
.fx-badge--off .fx-badge-dot {
  background: #64748b;
}
.fx-badge-text strong {
  font-weight: 600;
  margin-right: 0.25rem;
}
.fx-grid {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1.25rem;
}
@media (max-width: 900px) {
  .fx-grid {
    grid-template-columns: 1fr;
  }
}
.fx-side {
  padding: 0;
  overflow: hidden;
}
.fx-side-head {
  padding: 0.85rem 1.15rem 0.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.fx-side-heading {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.fx-kv {
  margin: 0;
  padding: 1rem 1.15rem 1.1rem;
}
.fx-kv-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(42, 49, 64, 0.65);
  font-size: 0.88rem;
}
.fx-kv-row:last-child {
  border-bottom: none;
}
.fx-kv-row dt {
  margin: 0;
  color: var(--muted);
  font-weight: 400;
}
.fx-kv-row dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.fx-kv-divider {
  padding-top: 0.65rem;
  margin-top: 0.25rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid rgba(42, 49, 64, 0.65);
}
.fx-side-note {
  margin: 0;
  padding: 0.65rem 1.15rem 0.85rem;
  font-size: 0.76rem;
  line-height: 1.45;
  border-top: 1px solid var(--border);
}
.fx-side-note code {
  font-size: 0.72rem;
}
.fx-side-foot {
  margin: 0;
  padding: 0.65rem 1.15rem 1rem;
  font-size: 0.78rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
}
.fx-main-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}
.fx-chart-card,
.fx-table-card {
  margin: 0;
}
.mfb-performance-card {
  border-color: rgba(56, 189, 248, 0.2);
}
.fx-myfxbook-card {
  margin: 0;
  border: 1px solid rgba(45, 212, 191, 0.22);
  background: linear-gradient(160deg, rgba(13, 18, 28, 0.95) 0%, rgba(14, 28, 38, 0.82) 100%);
}
.fx-myfxbook-head {
  border-bottom-color: rgba(45, 212, 191, 0.18);
}
.fx-myfxbook-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}
@media (max-width: 880px) {
  .fx-myfxbook-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .fx-myfxbook-grid {
    grid-template-columns: 1fr;
  }
}
.fx-myfxbook-kpi {
  border: 1px solid rgba(42, 49, 64, 0.75);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  padding: 0.6rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.fx-myfxbook-kpi strong {
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.fx-myfxbook-meta {
  margin: 0.8rem 0 0;
  line-height: 1.4;
}
.fx-real-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 0.7rem;
}
.fx-real-stat {
  min-height: 4.65rem;
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(42, 49, 64, 0.7);
  background: rgba(0, 0, 0, 0.18);
}
.fx-real-stat span,
.fx-real-stat strong {
  display: block;
}
.fx-real-stat strong {
  margin-top: 0.3rem;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.fx-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem 0;
  border-bottom: 1px solid var(--border);
}
.mfb-chart-head {
  border-bottom-color: rgba(56, 189, 248, 0.15);
}
.mfb-source-pill {
  margin: 0 0 0.85rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: rgba(14, 165, 233, 0.1);
  color: #bae6fd;
  font-size: 0.7rem;
  font-weight: 800;
}
.fx-chart-title {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.mfb-chart-subtitle {
  margin: -0.55rem 0 0.85rem;
}
.fx-chart-body {
  padding: 1rem 1.15rem 1.15rem;
}
.fx-chart-lead {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  line-height: 1.45;
}
.fx-empty-chart {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.fx-empty-chart p {
  margin: 0 0 0.5rem;
}
.fx-section-title {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.fx-pos-title {
  padding: 0 0 0.5rem;
}
.fx-table-hint {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  line-height: 1.4;
}
.fx-table-wrap {
  margin-top: 0;
}
.fx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.fx-table th,
.fx-table td {
  padding: 0.55rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.fx-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fx-table tbody tr:last-child td {
  border-bottom: none;
}
.fx-table-muted td {
  font-size: 0.82rem;
  font-style: italic;
}
.fx-symbol-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.fx-sym-chip {
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tenant-row-actions { width: 2.5rem; text-align: center; }
.btn-tenant-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: color 0.15s, background 0.15s;
}
.btn-tenant-delete:hover { color: var(--danger); background: rgba(248,113,113,0.12); }
