: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;
}
.latest-log {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
}
.latest-log a {
  color: var(--accent);
  text-decoration: none;
}
.latest-log a:hover { text-decoration: underline; }
.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-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;
}
.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;
}
@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.auto-refresh-on {
  background: rgba(22, 101, 52, 0.4);
  color: #86efac;
  border-color: rgba(74, 222, 128, 0.55);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.2);
}
.btn.auto-refresh-on:hover {
  filter: brightness(1.1);
}
.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;
}

.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--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-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-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 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-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 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--data {
  background: rgba(96, 165, 250, 0.14);
  color: #bfdbfe;
}
.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 {
    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-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;
  }
}

.main.main-narrow {
  max-width: 440px;
}
.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;
}
.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 1rem;
  border-bottom: 1px solid rgba(42, 49, 64, 0.65);
}
.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-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;
}
.mfb-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.8rem;
}
.mfb-tab {
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  padding: 0.3rem 0.65rem;
  border-radius: 0.45rem;
  font-size: 0.78rem;
  cursor: pointer;
}
.mfb-tab.is-active {
  border-color: rgba(34, 211, 238, 0.8);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.4);
  color: #a5f3fc;
}
.mfb-chart-wrap {
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: rgba(2, 6, 23, 0.4);
  padding: 0.55rem 0.65rem 0.45rem;
}
.mfb-chart-canvas {
  display: block;
  width: 100%;
  height: 220px;
}
.mfb-chart-meta {
  margin: 0.35rem 0 0;
}
.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;
}
.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-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);
}
.fx-chart-title {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.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-spark-placeholder {
  border: 1px dashed rgba(45, 212, 191, 0.25);
  border-radius: var(--radius);
  padding: 1rem 1rem 0.85rem;
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.04) 0%, transparent 100%);
}
.fx-spark-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.35rem;
  height: 120px;
  margin-bottom: 0.75rem;
}
.fx-spark-bar {
  flex: 1;
  min-height: 4px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.85) 0%, rgba(45, 212, 191, 0.2) 100%);
  height: var(--h);
  opacity: 0.9;
}
.fx-spark-caption {
  display: block;
  font-size: 0.78rem;
  text-align: center;
}
.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); }
