/* ============================================================================
   folio-exchange.css
   Production stylesheet for the Folio Exchange rebrand of DataMover.

   Strategy:
     1. Define FX tokens (sage primary, ink neutrals, Inter + JetBrains Mono).
     2. Override Bootstrap defaults so existing markup looks FX without rewrite.
     3. Add FX-specific classes (.fx-shell, .fx-card, .fx-table, .fx-hero, etc.)
        used by the rewritten _Layout and key views.

   Load order in _Layout.cshtml:
       bootstrap.min.css
       bootstrap-icons.min.css
       folio-exchange.css       <-- this file, last so it wins
   ============================================================================ */

/* Fonts ---------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* =================================================================
   1.  Design tokens
   ================================================================= */
:root {
  /* Brand · CTR/NY navy (matches new.ctrny.com + crm.ctrny.com re-map) */
  --fx-brand-50:  #EDF1F5;
  --fx-brand-100: #D6DEE6;
  --fx-brand-200: #A9B8C6;
  --fx-brand-300: #7A90A4;
  --fx-brand-400: #3D5366;
  --fx-brand-500: #2D4154;
  --fx-brand-600: #1F3245;
  --fx-brand-700: #162534;
  --fx-brand-800: #0F1C2B;
  --fx-brand-900: #0A131E;
  --fx-brand:     var(--fx-brand-700);
  --fx-brand-ink: #ffffff;

  /* Accent · CTR/NY red (primary actions / CTA, as on crm.ctrny.com) */
  --fx-accent-50:  #FCEAEB;
  --fx-accent-400: #FF4D57;
  --fx-accent-500: #F82D39;
  --fx-accent-600: #BC141E;
  --fx-accent-700: #A8101A;
  --fx-accent:     var(--fx-accent-600);

  /* Ink / neutrals (cool, shared with Folio CRM) */
  --fx-bg:        #F7F7F5;
  --fx-bg-elev:   #FBFBF9;
  --fx-surface:   #FFFFFF;
  --fx-surface-2: #F4F4F1;
  --fx-surface-3: #EDEDE8;
  --fx-fg:        #0E1411;
  --fx-fg-strong: #06090A;
  --fx-fg-muted:  #5B6770;
  --fx-fg-faint:  #94A0AB;
  --fx-border:        #E5E5E0;
  --fx-border-strong: #D1D1CB;
  --fx-divider:       #EFEFEA;

  /* Semantic */
  --fx-positive:    #16A34A;
  --fx-positive-bg: #E7F6EC;
  --fx-warning:     #D97706;
  --fx-warning-bg:  #FDF1DF;
  --fx-danger:      #DC2626;
  --fx-danger-bg:   #FCEAEA;
  --fx-info:        #0284C7;
  --fx-info-bg:     #E1F1FA;

  /* Type */
  --fx-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --fx-font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, 'Courier New', monospace;

  /* Radii / shadows */
  --fx-radius-xs: 3px;
  --fx-radius-sm: 5px;
  --fx-radius-md: 7px;
  --fx-radius-lg: 9px;
  --fx-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --fx-shadow-md: 0 2px 6px rgba(15, 23, 42, 0.06);
  --fx-shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

  /* Bootstrap-compatible aliases so existing .btn-primary etc. work */
  --bs-primary:        var(--fx-accent);
  --bs-primary-rgb:    188, 20, 30;
  --bs-success:        var(--fx-positive);
  --bs-danger:         var(--fx-danger);
  --bs-warning:        var(--fx-warning);
  --bs-info:           var(--fx-info);
  --bs-body-bg:        var(--fx-bg);
  --bs-body-color:     var(--fx-fg);
  --bs-body-font-family: var(--fx-font-sans);
  --bs-border-color:   var(--fx-border);
  --bs-border-radius:  var(--fx-radius-md);
  --bs-link-color:     var(--fx-brand-700);
  --bs-link-hover-color: var(--fx-brand-800);
}

/* =================================================================
   2.  Global base
   ================================================================= */
html, body {
  font-family: var(--fx-font-sans);
  background: var(--fx-bg);
  color: var(--fx-fg);
  font-size: 13px;          /* power-user density */
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body { margin-bottom: 0; }   /* override site.css's 40px */
code, pre, .mono, .font-monospace { font-family: var(--fx-font-mono); font-size: 0.93em; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--fx-font-sans);
  color: var(--fx-fg-strong);
  letter-spacing: -0.01em;
  font-weight: 600;
}
h1 { font-size: 22px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
h4 { font-size: 15px; }
h5 { font-size: 13px; }
h6 { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fx-fg-muted); }

a { color: var(--fx-brand-700); text-decoration: none; }
a:hover { color: var(--fx-brand-800); text-decoration: underline; }

::selection { background: var(--fx-brand-100); color: var(--fx-brand-900); }

/* =================================================================
   3.  Bootstrap overrides — make existing markup look FX
   ================================================================= */

/* Buttons */
.btn {
  border-radius: var(--fx-radius-md);
  font-weight: 500;
  font-size: 12.5px;
  padding: 0.36rem 0.75rem;
  transition: background .12s, border-color .12s, color .12s;
}
.btn-sm { font-size: 11.5px; padding: 0.22rem 0.55rem; }
.btn-lg { font-size: 14px;   padding: 0.5rem 1rem; }

.btn-primary {
  background: var(--fx-accent);
  border-color: var(--fx-accent);
  color: #fff;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active {
  background: var(--fx-accent-700);
  border-color: var(--fx-accent-700);
  color: #fff;
}
.btn-outline-primary {
  color: var(--fx-brand-700);
  border-color: var(--fx-border-strong);
  background: var(--fx-surface);
}
.btn-outline-primary:hover {
  background: var(--fx-brand-50);
  border-color: var(--fx-brand-300);
  color: var(--fx-brand-700);
}
.btn-outline-secondary {
  color: var(--fx-fg);
  border-color: var(--fx-border-strong);
  background: var(--fx-surface);
}
.btn-outline-secondary:hover {
  background: var(--fx-surface-2);
  border-color: var(--fx-border-strong);
  color: var(--fx-fg-strong);
}
.btn-success { background: var(--fx-positive); border-color: var(--fx-positive); }
.btn-danger  { background: var(--fx-danger);   border-color: var(--fx-danger); }
.btn-warning { background: var(--fx-warning);  border-color: var(--fx-warning); color: #fff; }
.btn-link    { color: var(--fx-brand-700); }
.btn-check:checked + .btn-outline-primary,
.btn-outline-primary.active {
  background: var(--fx-brand);
  border-color: var(--fx-brand);
  color: #fff;
}

/* Forms */
.form-label, .form-check-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--fx-fg-strong);
  margin-bottom: 4px;
}
.form-label.fw-medium { font-weight: 500; }
.form-control, .form-select {
  font-family: var(--fx-font-sans);
  font-size: 12.5px;
  padding: 0.34rem 0.6rem;
  background: var(--fx-surface);
  color: var(--fx-fg);
  border: 1px solid var(--fx-border-strong);
  border-radius: var(--fx-radius-md);
  min-height: 30px;
}
.form-control.font-monospace, .form-control.mono { font-family: var(--fx-font-mono); font-size: 11.5px; }
.form-control:focus, .form-select:focus {
  border-color: var(--fx-brand-400);
  box-shadow: 0 0 0 3px rgba(22, 37, 52, 0.14);
  outline: 0;
}
.form-check-input { border: 1px solid var(--fx-border-strong); }
.form-check-input:checked {
  background-color: var(--fx-brand);
  border-color: var(--fx-brand);
}
.form-text { color: var(--fx-fg-muted); font-size: 10.5px; }
.input-group-text {
  background: var(--fx-surface-2);
  border-color: var(--fx-border-strong);
  color: var(--fx-fg-muted);
  font-size: 11.5px;
}

/* Cards */
.card {
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-lg);
  box-shadow: none;
}
.card.shadow-sm { box-shadow: var(--fx-shadow-sm); }
.card-header {
  background: var(--fx-bg-elev);
  border-bottom: 1px solid var(--fx-divider);
  font-size: 12px;
  font-weight: 600;
  color: var(--fx-fg-strong);
  padding: 0.5rem 0.85rem;
}
.card-body  { padding: 0.85rem; }

/* Tables */
.table {
  font-size: 12px;
  color: var(--fx-fg);
  margin-bottom: 0;
}
.table > :not(caption) > * > * {
  padding: 5px 10px;
  border-bottom-color: var(--fx-divider);
}
.table thead th {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fx-fg-muted);
  background: var(--fx-bg-elev);
  border-bottom: 1px solid var(--fx-border);
}
.table tbody tr:hover > * { background: var(--fx-surface-2); }
.table-hover > tbody > tr:hover > * { background: var(--fx-surface-2); }

/* Badges (Bootstrap) — softened, dotted */
.badge {
  font-weight: 500;
  font-size: 10.5px;
  padding: 0.22em 0.5em;
  border-radius: 999px;
}
.badge.bg-primary { background: var(--fx-brand-50) !important; color: var(--fx-brand-700) !important; }
.badge.bg-success { background: var(--fx-positive-bg) !important; color: var(--fx-positive) !important; }
.badge.bg-danger  { background: var(--fx-danger-bg)   !important; color: var(--fx-danger)   !important; }
.badge.bg-warning { background: var(--fx-warning-bg)  !important; color: var(--fx-warning)  !important; }
.badge.bg-info    { background: var(--fx-info-bg)     !important; color: var(--fx-info)     !important; }
.badge.bg-secondary { background: var(--fx-surface-3) !important; color: var(--fx-fg-muted) !important; }
.badge.text-dark { color: var(--fx-fg) !important; }

/* Alerts */
.alert {
  border: 1px solid;
  border-radius: var(--fx-radius-md);
  padding: 0.55rem 0.85rem;
  font-size: 12.5px;
}
.alert-success { background: var(--fx-positive-bg); border-color: rgba(22, 163, 74, 0.25);  color: var(--fx-fg); }
.alert-danger  { background: var(--fx-danger-bg);   border-color: rgba(220, 38, 38, 0.25);  color: var(--fx-fg); }
.alert-warning { background: var(--fx-warning-bg);  border-color: rgba(217, 119, 6, 0.25);  color: var(--fx-fg); }
.alert-info    { background: var(--fx-info-bg);     border-color: rgba(2, 132, 199, 0.20);  color: var(--fx-fg); }

/* Misc bootstrap utilities */
.text-primary   { color: var(--fx-brand-700) !important; }
.text-success   { color: var(--fx-positive) !important; }
.text-danger    { color: var(--fx-danger) !important; }
.text-warning   { color: var(--fx-warning) !important; }
.text-info      { color: var(--fx-info) !important; }
.text-muted     { color: var(--fx-fg-muted) !important; }
.bg-primary     { background: var(--fx-brand) !important; }
.bg-light       { background: var(--fx-surface-2) !important; }
.bg-dark        { background: #0B1220 !important; }
.border-primary { border-color: var(--fx-brand) !important; }

/* Dropdown menus */
.dropdown-menu {
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-md);
  box-shadow: var(--fx-shadow-md);
  font-size: 12.5px;
  padding: 4px;
}
.dropdown-item {
  border-radius: var(--fx-radius-sm);
  padding: 5px 10px;
  font-size: 12.5px;
  color: var(--fx-fg);
}
.dropdown-item:hover { background: var(--fx-surface-2); color: var(--fx-fg-strong); }
.dropdown-divider { border-color: var(--fx-divider); }

/* =================================================================
   4.  FX shell — two-row topbar (brand row + nav row)
   ================================================================= */
.fx-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--fx-bg);
}
.fx-topbar {
  flex-shrink: 0;
  background: var(--fx-surface);
  border-bottom: 1px solid var(--fx-border);
}
.fx-topbar-row1 {
  height: 46px;
  display: flex; align-items: center; gap: 14px;
  padding: 0 18px;
  border-bottom: 1px solid var(--fx-divider);
}
.fx-topbar-row2 {
  height: 38px;
  display: flex; align-items: stretch;
  padding: 0 10px;
}

/* Wordmark */
.fx-wordmark {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--fx-fg-strong);
  text-decoration: none;
}
.fx-wordmark:hover { text-decoration: none; color: var(--fx-fg-strong); }
.fx-wordmark .glyph { display: inline-flex; }
.fx-wordmark .name {
  font-size: 16px; font-weight: 600; letter-spacing: -0.02em;
  line-height: 1;
}
.fx-wordmark .tag {
  font-family: var(--fx-font-mono);
  font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fx-fg-muted);
  padding-left: 8px;
  margin-left: 1px;
  border-left: 1px solid var(--fx-border-strong);
  line-height: 1;
}

/* Topbar search */
.fx-topbar-search {
  display: flex; align-items: center; gap: 7px;
  height: 28px; padding: 0 10px;
  background: var(--fx-surface-2);
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--fx-fg-faint);
  font-size: 12px;
  max-width: 340px;
  flex: 1;
}
.fx-topbar-search .bi { font-size: 13px; }
.fx-kbd {
  font-family: var(--fx-font-mono);
  font-size: 10px;
  padding: 1px 5px;
  background: var(--fx-surface);
  border: 1px solid var(--fx-border-strong);
  border-radius: 3px;
  color: var(--fx-fg-muted);
}

/* Topbar nav */
.fx-nav { display: flex; align-items: stretch; gap: 0; }
.fx-nav-item {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px;
  padding: 0 12px;
  color: var(--fx-fg-muted) !important;
  font-size: 12.5px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  text-decoration: none !important;
  white-space: nowrap;
}
.fx-nav-item:hover { color: var(--fx-fg-strong) !important; background: var(--fx-surface-2); }
.fx-nav-item.active {
  color: var(--fx-brand-700) !important;
  border-bottom-color: var(--fx-brand);
  background: var(--fx-brand-50);
}
.fx-nav-item .bi { font-size: 13px; }
.fx-nav-item .badge {
  background: var(--fx-surface-3) !important;
  color: var(--fx-fg-muted) !important;
  font-size: 10px;
}
.fx-nav-item.active .badge {
  background: var(--fx-brand) !important;
  color: #fff !important;
}

/* Topbar scheduler status pill */
.fx-status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 500;
  background: var(--fx-positive-bg);
  color: var(--fx-positive);
}
.fx-status-pill.warn   { background: var(--fx-warning-bg); color: var(--fx-warning); }
.fx-status-pill.danger { background: var(--fx-danger-bg);  color: var(--fx-danger); }
.fx-status-pill .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: fx-pulse 2.2s ease-out infinite;
}
@keyframes fx-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45); }
  70%  { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0);   }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);     }
}

/* Topbar env chip */
.fx-env-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px;
  background: var(--fx-brand-50);
  color: var(--fx-brand-700);
  border-radius: 999px;
  font-size: 11px; font-weight: 500;
  font-family: var(--fx-font-mono);
}
.fx-env-chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

/* User dropdown trigger */
.fx-user {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: none;
  color: var(--fx-fg-strong);
  padding: 0;
  cursor: pointer;
}
.fx-user-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--fx-brand-100);
  color: var(--fx-brand-700);
  font-size: 11px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.fx-user-meta { line-height: 1.15; text-align: left; }
.fx-user-meta .name { font-size: 11.5px; font-weight: 500; color: var(--fx-fg-strong); }
.fx-user-meta .sub  { font-size: 10.5px; color: var(--fx-fg-muted); }

/* =================================================================
   5.  Page chrome — body container, page header, breadcrumbs
   ================================================================= */
.fx-body {
  flex: 1;
  padding: 14px 18px 24px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}
.fx-breadcrumb {
  font-size: 11.5px;
  color: var(--fx-fg-muted);
  margin-bottom: 4px;
}
.fx-breadcrumb a { color: var(--fx-fg-muted); text-decoration: none; }
.fx-breadcrumb a:hover { color: var(--fx-fg-strong); }
.fx-breadcrumb .sep { margin: 0 6px; color: var(--fx-fg-faint); }
.fx-breadcrumb .current { color: var(--fx-fg); }

.fx-page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 12px; gap: 12px;
}
.fx-page-title {
  font-size: 19px;
  font-weight: 600;
  color: var(--fx-fg-strong);
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 8px;
}
.fx-page-sub  {
  font-size: 12px; color: var(--fx-fg-muted); margin-top: 2px;
}

/* =================================================================
   6.  FX cards (denser than Bootstrap .card)
   ================================================================= */
.fx-card {
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-lg);
}
.fx-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--fx-divider);
}
.fx-card-title {
  font-size: 12.5px; font-weight: 600;
  color: var(--fx-fg-strong);
  display: inline-flex; align-items: center; gap: 7px;
}
.fx-card-body { padding: 14px; }
.fx-card-foot {
  padding: 8px 14px;
  border-top: 1px solid var(--fx-divider);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; color: var(--fx-fg-muted);
}

/* =================================================================
   7.  FX tables (even denser than .table override)
   ================================================================= */
.fx-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  margin: 0;
}
.fx-table thead th {
  text-align: left;
  font-size: 10.5px; font-weight: 600;
  color: var(--fx-fg-muted);
  padding: 6px 10px;
  border-bottom: 1px solid var(--fx-border);
  background: var(--fx-bg-elev);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fx-table tbody td {
  padding: 5px 10px;
  border-bottom: 1px solid var(--fx-divider);
  color: var(--fx-fg);
  vertical-align: middle;
  line-height: 1.4;
}
.fx-table tbody tr:hover td { background: var(--fx-surface-2); }
.fx-table tbody tr:last-child td { border-bottom: 0; }
.fx-table td.num, .fx-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.fx-table td.mono { font-family: var(--fx-font-mono); font-size: 11.5px; }

/* Connector / status pills */
.fx-typepill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 18px; padding: 0 6px;
  font-size: 10.5px; font-weight: 600;
  border-radius: var(--fx-radius-xs);
  font-family: var(--fx-font-mono);
  letter-spacing: 0.02em;
  background: var(--fx-surface-2);
  color: var(--fx-fg-muted);
  border: 1px solid var(--fx-border);
}
.fx-typepill.rest { background: rgba(2, 132, 199, 0.10); color: #0369A1; border-color: transparent; }
.fx-typepill.soap { background: rgba(124, 58, 237, 0.10); color: #6D28D9; border-color: transparent; }
.fx-typepill.sftp { background: rgba(217, 119, 6, 0.10);  color: #B45309; border-color: transparent; }

.fx-tag {
  display: inline-flex; align-items: center; gap: 5px;
  height: 19px; padding: 0 7px;
  font-size: 10.5px; font-weight: 500;
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface-2); color: var(--fx-fg-muted);
  border: 1px solid var(--fx-border);
}
.fx-tag.positive { background: var(--fx-positive-bg); color: var(--fx-positive); border-color: transparent; }
.fx-tag.warning  { background: var(--fx-warning-bg);  color: var(--fx-warning);  border-color: transparent; }
.fx-tag.danger   { background: var(--fx-danger-bg);   color: var(--fx-danger);   border-color: transparent; }
.fx-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Tiny status dot */
.fx-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; vertical-align: middle; }
.fx-dot.ok   { background: var(--fx-positive); }
.fx-dot.warn { background: var(--fx-warning); }
.fx-dot.bad  { background: var(--fx-danger); }
.fx-dot.idle { background: var(--fx-fg-faint); }

/* =================================================================
   8.  Stats + scheduler hero
   ================================================================= */
.fx-stat {
  padding: 11px 14px;
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-lg);
}
.fx-stat-label {
  font-size: 10px; font-weight: 600;
  color: var(--fx-fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.fx-stat-value {
  font-family: var(--fx-font-mono);
  font-feature-settings: 'tnum';
  font-size: 22px; font-weight: 600;
  color: var(--fx-fg-strong);
  letter-spacing: -0.02em;
  margin-top: 4px;
  line-height: 1.1;
}
.fx-stat-foot { font-size: 11px; color: var(--fx-fg-muted); margin-top: 4px; }

.fx-hero {
  border-radius: var(--fx-radius-lg);
  border: 1px solid var(--fx-border);
  background: var(--fx-surface);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
}
.fx-hero.ok    { border-color: rgba(22, 163, 74, 0.30); background: linear-gradient(180deg, rgba(231, 246, 236, 0.55), var(--fx-surface)); }
.fx-hero.warn  { border-color: rgba(217, 119, 6, 0.30); background: linear-gradient(180deg, rgba(253, 241, 223, 0.55), var(--fx-surface)); }
.fx-hero.danger{ border-color: rgba(220, 38, 38, 0.30); background: linear-gradient(180deg, rgba(252, 234, 234, 0.55), var(--fx-surface)); }

.fx-hero-orb {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  position: relative;
  font-size: 24px;
}
.fx-hero.ok    .fx-hero-orb { color: var(--fx-positive); }
.fx-hero.warn  .fx-hero-orb { color: var(--fx-warning); }
.fx-hero.danger .fx-hero-orb { color: var(--fx-danger); }
.fx-hero-orb::after {
  content: ''; position: absolute; inset: -4px;
  border-radius: 50%; border: 1px solid currentColor; opacity: 0.25;
}

.fx-hero-status { font-size: 18px; font-weight: 600; color: var(--fx-fg-strong); letter-spacing: -0.01em; }
.fx-hero-sub    { font-size: 12px; color: var(--fx-fg-muted); margin-top: 2px; }

.fx-hero-meta { display: flex; gap: 24px; align-items: center; }

/* Responsive page grids (replace per-view inline grid styles) */
.fx-grid-stats     { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fx-grid-split     { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.fx-grid-split-rev { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; }
.fx-grid-half      { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

@media (max-width: 900px) {
  .fx-grid-stats { grid-template-columns: 1fr 1fr; }
  .fx-grid-split, .fx-grid-split-rev, .fx-grid-half { grid-template-columns: 1fr; }
  .fx-hero { grid-template-columns: auto 1fr; row-gap: 12px; }
  .fx-hero-meta { grid-column: 1 / -1; flex-wrap: wrap; gap: 14px 22px; }
  .fx-page-head { flex-wrap: wrap; gap: 10px; }
}
.fx-hero-meta dt {
  font-size: 10px; font-weight: 600;
  color: var(--fx-fg-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.fx-hero-meta dd {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--fx-fg-strong);
  font-variant-numeric: tabular-nums;
  font-family: var(--fx-font-mono);
  font-weight: 500;
}

.fx-uptime { display: inline-grid; grid-auto-flow: column; gap: 2px; }
.fx-uptime span { width: 5px; height: 16px; border-radius: 1.5px; background: var(--fx-positive); opacity: 0.85; }
.fx-uptime span.bad  { background: var(--fx-danger); }
.fx-uptime span.warn { background: var(--fx-warning); }
.fx-uptime span.idle { background: var(--fx-surface-3); }

/* =================================================================
   9.  Section header (e.g. tasks grouped by company)
   ================================================================= */
.fx-section-head {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 14px;
  background: var(--fx-bg-elev);
  border: 1px solid var(--fx-border);
  border-bottom: 0;
  border-radius: var(--fx-radius-lg) var(--fx-radius-lg) 0 0;
}
.fx-section-head .name { font-size: 13px; font-weight: 600; color: var(--fx-fg-strong); }
.fx-section-head .count { font-size: 11.5px; color: var(--fx-fg-muted); font-variant-numeric: tabular-nums; }
.fx-section-head .meta { display: flex; gap: 14px; margin-left: auto; font-size: 11.5px; color: var(--fx-fg-muted); }
.fx-section-head .meta b { color: var(--fx-fg); font-weight: 500; font-variant-numeric: tabular-nums; }
.fx-section-body {
  border: 1px solid var(--fx-border);
  border-radius: 0 0 var(--fx-radius-lg) var(--fx-radius-lg);
  background: var(--fx-surface);
  overflow: hidden;
}

/* =================================================================
   10. Pre/code blocks (log viewer)
   ================================================================= */
.fx-pre {
  background: var(--fx-surface-2);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-md);
  padding: 9px 11px;
  font-family: var(--fx-font-mono);
  font-size: 11.5px;
  color: var(--fx-fg);
  white-space: pre;
  overflow-x: auto;
  margin: 0;
}

.fx-log {
  background: #0B1220;
  color: #cbd5e1;
  font-family: var(--fx-font-mono);
  font-size: 11.5px;
  line-height: 18px;
  padding: 8px 0;
  border-radius: 0 0 var(--fx-radius-md) var(--fx-radius-md);
  max-height: 540px;
  overflow: auto;
}
.fx-log .line {
  display: grid;
  grid-template-columns: 40px 88px 36px 1fr;
  padding: 0 14px;
  min-height: 18px;
}
.fx-log .line .ln  { color: #475569; font-size: 10px; text-align: right; padding-right: 8px; user-select: none; }
.fx-log .line .ts  { color: #64748b; font-size: 11px; }
.fx-log .line .lvl { font-weight: 600; font-size: 10px; }
.fx-log .line.inf .lvl { color: #86efac; }
.fx-log .line.wrn .lvl { color: #fbbf24; }
.fx-log .line.err .lvl { color: #f87171; }
.fx-log .line.dbg .lvl { color: #94a3b8; }
.fx-log .line.wrn { background: rgba(217, 119, 6, 0.07); }
.fx-log .line.err { background: rgba(220, 38, 38, 0.10); }
.fx-log .line.wrn .msg { color: #fde68a; }
.fx-log .line.err .msg { color: #fecaca; }
.fx-log .line.dbg .msg { color: #94a3b8; }
.fx-log .line.section .msg { color: #64748b; font-weight: 500; }

/* Log header bar (dark) */
.fx-log-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 12px;
  background: #0F172A;
  color: #e2e8f0;
  border-radius: var(--fx-radius-md) var(--fx-radius-md) 0 0;
  font-size: 11.5px;
}
.fx-log-bar .legend {
  display: inline-flex; gap: 10px; font-size: 11px; color: #94a3b8;
}
.fx-log-bar .legend span { display: inline-flex; align-items: center; gap: 4px; }
.fx-log-bar input {
  height: 22px; padding: 0 8px;
  background: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0;
  border-radius: 5px;
  font-size: 11px;
}
.fx-log-bar .btn-dk {
  height: 22px; padding: 0 7px;
  background: #1e293b; border: 1px solid #334155; color: #e2e8f0;
  border-radius: 5px; font-size: 11px;
  display: inline-flex; align-items: center; gap: 4px;
  text-decoration: none;
}
.fx-log-bar .btn-dk:hover { background: #334155; color: #fff; }
.fx-log-bar .btn-dk.live { background: #14532d; border-color: transparent; }
.fx-log-bar .btn-dk.live.bad { background: #7f1d1d; }

/* =================================================================
   11. Login screen
   ================================================================= */
.fx-signin {
  min-height: 100vh;
  background: var(--fx-bg);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  overflow: hidden;
}
.fx-signin::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(900px 600px at 25% 25%, rgba(22, 37, 52, 0.10), transparent 60%),
    radial-gradient(700px 500px at 75% 75%, rgba(188, 20, 30, 0.05), transparent 60%);
  pointer-events: none;
}
.fx-signin::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(closest-side at 50% 50%, black 30%, transparent 90%);
          mask-image: radial-gradient(closest-side at 50% 50%, black 30%, transparent 90%);
  pointer-events: none;
}
.fx-signin-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 400px;
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-lg);
  box-shadow: var(--fx-shadow-lg);
  overflow: hidden;
}

/* =================================================================
   12. Utility helpers
   ================================================================= */
.fx-mono     { font-family: var(--fx-font-mono); }
.fx-pulse-bg { animation: fx-bg-pulse 2s ease-in-out infinite; }
@keyframes fx-bg-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.65; }
}
.fx-divider-v { width: 1px; height: 20px; background: var(--fx-border); align-self: center; }
.gap-1 { gap: 4px !important; }
.gap-2 { gap: 6px !important; }
.gap-3 { gap: 10px !important; }
