/* ═══════════════════════════════════════════════════════════════════════
   FLUX v1 — COMPONENT LIBRARY  (fx-* prefix)
   Carbon canvas · Amber seam · Terminal density · Sharp typography
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

/* Numbers always monospace + tabular */
.tabular, .num, .price, .pnl, .percentage, [data-mono],
.fx-num, .num-flash {
  font-family: var(--mono) !important;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: 0;
}

a { color: var(--accent); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent-3); }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ── Carbon mesh backdrop ── */
.fx-mesh {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 800px 500px at 15% -5%, rgba(245, 184, 0, 0.05), transparent 60%),
    radial-gradient(ellipse 700px 400px at 85% 105%, rgba(20, 184, 166, 0.04), transparent 60%);
}
.fx-mesh::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 30%, black, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 30%, black, transparent 80%);
}
.fx-particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ── App Shell — grid sidebar + header + main ── */
.fx-app {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: var(--header-height) 1fr;
  grid-template-areas: "sidebar header" "sidebar main";
  min-height: 100vh;
  transition: grid-template-columns var(--t-base);
}
.fx-app.sb-collapsed { grid-template-columns: var(--sidebar-collapsed) 1fr; }
.fx-app.sb-hidden   { grid-template-columns: 0 1fr; }

/* Legacy alias selectors (so any template still using pm-/dz-/ent-/sb-/asp-/ta-/hero- resolves) */
.premium-app, .ent-app, .app-shell { extends: .fx-app; }
.premium-app, .ent-app, .app-shell {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: var(--header-height) 1fr;
  grid-template-areas: "sidebar header" "sidebar main";
  min-height: 100vh;
  transition: grid-template-columns var(--t-base);
}
.premium-app.sb-collapsed, .ent-app.sb-collapsed, .app-shell.sb-collapsed { grid-template-columns: var(--sidebar-collapsed) 1fr; }
.premium-app.sb-hidden, .ent-app.sb-hidden, .app-shell.sb-hidden { grid-template-columns: 0 1fr; }

/* ═══════════════════════════════════════════════════════════════════════
   HEADER — sticky glass + amber seam underneath
   ═══════════════════════════════════════════════════════════════════════ */
.fx-header, .pm-header, .topbar, .dz-topbar, .site-header {
  grid-area: header;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: var(--space-3);
  padding: 0 var(--space-4);
  position: sticky; top: 0;
  z-index: var(--z-header);
  height: var(--header-height);
}
/* Amber→teal seam under header */
.fx-header::after, .pm-header::after, .topbar::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 1px;
  background: var(--seam);
  opacity: 0.7;
  pointer-events: none;
}

.fx-header .brand, .pm-header .brand, .topbar .brand {
  display: flex; align-items: center; gap: var(--space-2);
  text-decoration: none;
  font-family: var(--display);
  font-weight: var(--font-bold);
  font-size: var(--text-md);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  flex-shrink: 0;
}
.fx-header .brand .mark {
  width: 22px; height: 22px;
  background: var(--accent);
  border-radius: 4px;
  display: grid; place-items: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
  color: var(--bg);
  position: relative;
}
.fx-header .brand .mark::after {
  content: '';
  position: absolute; bottom: -3px; left: 2px; right: 2px;
  height: 1px;
  background: var(--teal);
}
.fx-header .brand img, .pm-header .brand img, .topbar .brand-logo, .topbar img {
  width: 22px; height: 22px; border-radius: 4px;
  object-fit: contain;
}

.fx-header .sb-toggle, .pm-header .sb-toggle {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--dim);
  transition: all var(--t-fast);
}
.fx-header .sb-toggle:hover, .pm-header .sb-toggle:hover {
  background: var(--panel-3);
  color: var(--accent);
}

.fx-header .search, .pm-header .search, .topbar .search-bar {
  flex: 1; max-width: 360px; position: relative;
}
.fx-header .search input, .pm-header .search input {
  width: 100%; background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 6px 10px 6px 32px;
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  transition: all var(--t-fast);
  font-family: var(--mono);
}
.fx-header .search input::placeholder, .pm-header .search input::placeholder {
  color: var(--dimmer); font-family: var(--sans);
}
.fx-header .search input:focus, .pm-header .search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.fx-header .search .icon, .pm-header .search .icon {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%); color: var(--dimmer);
}

.fx-header .actions, .pm-header .actions, .topbar .nav-right {
  display: flex; align-items: center; gap: var(--space-1);
  margin-left: auto;
}
.fx-header .icon-btn, .pm-header .icon-btn, .topbar .icon-btn, .dz-icon-btn {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--dim);
  position: relative;
  transition: all var(--t-fast);
}
.fx-header .icon-btn:hover, .pm-header .icon-btn:hover, .dz-icon-btn:hover {
  background: var(--panel-3);
  color: var(--accent);
}
.fx-header .icon-btn .dot, .pm-header .icon-btn .dot {
  position: absolute; top: 6px; right: 6px;
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  border: 1.5px solid var(--bg-2);
}
@keyframes pulse-dot { 0%,100% { transform: scale(1); } 50% { transform: scale(1.4); } }

.fx-header .market-pill, .pm-header .market-pill {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 4px 10px;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: all var(--t-fast);
  font-family: var(--mono);
}
.fx-header .market-pill:hover, .pm-header .market-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.fx-header .market-pill .caret, .pm-header .market-pill .caret { font-size: 9px; opacity: 0.5; }

.fx-header .user-chip, .pm-header .user-chip, .topbar .user-menu {
  display: flex; align-items: center; gap: var(--space-2);
  padding: 3px 10px 3px 3px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all var(--t-fast);
  text-decoration: none;
  color: var(--ink);
}
.fx-header .user-chip:hover, .pm-header .user-chip:hover, .topbar .user-menu:hover {
  border-color: var(--accent);
}
.fx-header .user-chip .avatar, .pm-header .user-chip .avatar, .topbar .avatar {
  width: 24px; height: 24px; border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--bg);
  display: grid; place-items: center;
  font-weight: var(--font-bold);
  font-size: 11px;
  font-family: var(--mono);
}
.fx-header .user-chip .name, .pm-header .user-chip .name {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--ink);
  max-width: 140px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════
   SIDEBAR — fixed, dark, no glass, hairline dividers
   ═══════════════════════════════════════════════════════════════════════ */
.fx-sidebar, .pm-sidebar, .sidebar, .dz-sidebar {
  grid-area: sidebar;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}
.fx-sidebar-inner, .pm-sidebar .pm-sidebar-inner, .pm-sidebar .nav,
.sidebar .sb-body {
  flex: 1; padding: var(--space-3) var(--space-2);
  overflow-y: auto;
}
.fx-sidebar .nav-section, .pm-sidebar .nav-section, .sidebar .sb-group {
  margin-bottom: var(--space-4);
}
.fx-sidebar .nav-title, .pm-sidebar .nav-title, .sidebar .sb-group-title {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--dimmer);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: var(--space-2) var(--space-3);
  margin-bottom: 2px;
}
.fx-sidebar .nav-item, .pm-sidebar .nav-item, .sidebar .sb-link, .sidebar a.sb-link {
  display: flex; align-items: center; gap: var(--space-2);
  padding: 6px var(--space-3);
  border-radius: var(--r-sm);
  color: var(--dim);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  text-decoration: none !important;
  transition: all var(--t-fast);
  margin-bottom: 1px;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
}
.fx-sidebar .nav-item .ico, .pm-sidebar .nav-item .ico, .sidebar .sb-ico {
  width: 16px; text-align: center; font-size: 13px; flex-shrink: 0; opacity: 0.8;
}
.fx-sidebar .nav-item .lbl, .pm-sidebar .nav-item .lbl {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fx-sidebar .nav-item .badge, .pm-sidebar .nav-item .badge, .sidebar .notif-badge {
  flex-shrink: 0;
}
.fx-sidebar .nav-item:hover, .pm-sidebar .nav-item:hover, .sidebar .sb-link:hover {
  background: var(--panel);
  color: var(--ink);
}
.fx-sidebar .nav-item.active, .pm-sidebar .nav-item.active,
.sidebar .sb-link.active, .sidebar a.active {
  background: var(--panel-2);
  color: var(--accent);
}
/* Amber left bar on active — signature element */
.fx-sidebar .nav-item.active::before, .pm-sidebar .nav-item.active::before,
.sidebar .sb-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.fx-sidebar .nav-item .badge, .pm-sidebar .nav-item .badge, .sidebar .notif-badge {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--r-full);
  font-family: var(--mono);
}
.fx-sidebar .footer, .pm-sidebar .footer, .sidebar .sb-footer {
  padding: var(--space-2) var(--space-3);
  border-top: 1px solid var(--line);
  font-size: 10px;
  font-family: var(--mono);
  color: var(--dimmer);
}
.fx-sidebar .status, .pm-sidebar .status, .sidebar .sb-status {
  display: flex; align-items: center; gap: 6px;
}
.fx-sidebar .status .dot, .pm-sidebar .status .dot, .sidebar .status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--up);
  animation: pulse-dot 2s infinite;
}

/* Collapsed sidebar */
.fx-app.sb-collapsed .fx-sidebar .lbl,
.fx-app.sb-collapsed .fx-sidebar .nav-title,
.fx-app.sb-collapsed .fx-sidebar .name,
.fx-app.sb-collapsed .fx-sidebar .badge,
.fx-app.sb-collapsed .fx-sidebar .status span:not(.dot),
.premium-app.sb-collapsed .pm-sidebar .lbl,
.premium-app.sb-collapsed .pm-sidebar .nav-title,
.premium-app.sb-collapsed .pm-sidebar .name,
.premium-app.sb-collapsed .pm-sidebar .badge,
.premium-app.sb-collapsed .pm-sidebar .status span:not(.dot) { display: none; }
.fx-app.sb-collapsed .fx-sidebar .nav-item,
.premium-app.sb-collapsed .pm-sidebar .nav-item { justify-content: center; }

/* Sidebar collapsible groups (sb-*) — keep working */
.sb-group { margin-bottom: 4px; }
.sb-group-toggle {
  display: flex; align-items: center; gap: 6px;
  padding: 6px var(--space-3);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--dimmer);
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
  user-select: none;
}
.sb-group-toggle:hover { background: var(--panel); color: var(--ink); }
.sb-group-body {
  max-height: 0; overflow: hidden;
  transition: max-height var(--t-base);
  padding-left: 4px;
}
.sb-group.open .sb-group-body { max-height: 600px; overflow-y: auto; }
.sb-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); flex-shrink: 0; opacity: 0.6; }
.sb-dot.amber { background: var(--amber); }
.sb-arrow { margin-left: auto; font-size: 9px; transition: transform var(--t-base); opacity: 0.5; }
.sb-group.open .sb-arrow { transform: rotate(90deg); }
.sb-badge, .sb-new-badge {
  font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: var(--r-full);
  background: var(--accent-soft); color: var(--accent);
  margin-left: 4px; font-family: var(--mono);
}
.sb-new-badge { background: var(--amber-soft); color: var(--amber); }
.sb-link { padding: 6px var(--space-3) !important; font-size: var(--text-sm) !important; font-weight: 500; overflow: hidden; min-width: 0; }
.sb-link .lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sb-link .sb-ico { font-size: 13px; width: 16px; text-align: center; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════════════ */
.fx-main, .pm-main, .main-content, .dz-content {
  grid-area: main;
  padding: var(--space-4) var(--space-5);
  overflow-x: hidden;
  min-width: 0;
  width: 100%;
  max-width: var(--content-max);
}

/* Page header */
.fx-page-header, .pm-page-header, .page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
}
.fx-page-header .info, .pm-page-header .info { flex: 1; min-width: 220px; }
.fx-page-header .breadcrumb, .pm-page-header .breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dimmer);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.fx-page-header .breadcrumb a, .pm-page-header .breadcrumb a { color: var(--dimmer); }
.fx-page-header .breadcrumb a:hover, .pm-page-header .breadcrumb a:hover { color: var(--accent); }
.fx-page-header .breadcrumb .sep, .pm-page-header .breadcrumb .sep { opacity: 0.4; }
.fx-page-header .breadcrumb .current, .pm-page-header .breadcrumb .current { color: var(--accent); font-weight: 600; }
.fx-page-header h1, .pm-page-header h1, .page-title {
  font-family: var(--display);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  line-height: var(--leading-tight);
  margin-bottom: 4px;
}
.fx-page-header .subtitle, .pm-page-header .subtitle, .page-subtitle {
  font-size: var(--text-sm);
  color: var(--dim);
  line-height: var(--leading-normal);
}
.fx-page-header .actions, .pm-page-header .actions, .page-actions {
  display: flex; gap: var(--space-2); align-items: center; flex-shrink: 0;
}

/* Section header (smaller than page-header) */
.section-header { margin-bottom: var(--space-3); }
.section-header .eyebrow {
  font-family: var(--mono);
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 4px;
  display: inline-block;
}
.section-header h2 {
  font-family: var(--display);
  font-size: var(--text-md);
  font-weight: var(--font-bold);
  color: var(--ink);
  letter-spacing: var(--tracking-tight);
}
.section-eyebrow {
  font-family: var(--mono);
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent); margin-bottom: var(--space-2);
  display: inline-block;
}

/* ═══════════════════════════════════════════════════════════════════════
   CARDS — sharp corners, hairline borders, no glass
   ═══════════════════════════════════════════════════════════════════════ */
.fx-card, .pm-card, .card, .panel, .stat-card, .kpi-card, .widget,
.dz-card, .sa-card, .box, .glass-card, .premium-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.fx-card:hover, .pm-card:hover, .card:hover, .glass-card:hover, .premium-card:hover {
  border-color: var(--line-2);
}
.fx-card.aurora-focus, .glass-card.aurora-focus, .premium-card.aurora-focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}
.fx-card .head, .pm-card .head, .card-header, .card .header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--line);
}
.fx-card .head .title, .pm-card .head .title, .card-title, .card-header h2 {
  font-family: var(--display);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--ink);
  letter-spacing: var(--tracking-tight);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fx-card .head .actions, .pm-card .head .actions { display: flex; gap: var(--space-1); }

/* Panel (legacy alias used in admin) */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: var(--space-4); margin-bottom: var(--space-3); }
.panel .head, .panel > h2 {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm); font-weight: 700;
  color: var(--ink);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.panel h2 { font-size: var(--text-sm); font-weight: 700; color: var(--ink); }
.panel input, .panel select, .panel textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line);
  color: var(--ink); padding: 6px 10px; border-radius: var(--r-sm);
  font-size: var(--text-sm);
}
.panel input:focus, .panel select:focus, .panel textarea:focus {
  border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px var(--accent-soft);
}
.panel .button, .panel button { padding: 6px 12px; border-radius: var(--r-sm); font-size: var(--text-sm); font-weight: 600; cursor: pointer; border: 1px solid transparent; }
.panel .button.btn-glow, .panel button[type="submit"] { background: var(--accent); color: var(--bg); }
.panel .button.ghost, .panel button[type="button"] { background: var(--bg); border-color: var(--line); color: var(--dim); }

/* ═══════════════════════════════════════════════════════════════════════
   KPI GRID + KPI CARDS
   ═══════════════════════════════════════════════════════════════════════ */
.fx-kpi-grid, .pm-kpi-grid, .kpi-grid, .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.fx-kpi, .pm-kpi, .kpi, .stat-card, .kpi-card, .premium-kpi, .stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--space-3) var(--space-4);
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 84px;
  position: relative;
  transition: border-color var(--t-fast);
}
.fx-kpi:hover, .pm-kpi:hover, .kpi:hover, .stat-card:hover, .premium-kpi:hover {
  border-color: var(--accent);
}
.fx-kpi .label, .pm-kpi .label, .kpi-label, .stat-card .label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dimmer);
  margin-bottom: 4px;
}
.fx-kpi .value, .pm-kpi .value, .kpi-value, .stat-value, .big-number {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--ink);
  line-height: 1.1;
  margin: 4px 0;
}
.fx-kpi .value.primary, .kpi-value.primary { color: var(--accent); }
.fx-kpi .value.accent, .kpi-value.accent { color: var(--teal); }
.fx-kpi .value.up, .kpi-value.up { color: var(--up); }
.fx-kpi .value.down, .kpi-value.down { color: var(--down); }
.fx-kpi .value.warning, .kpi-value.warning { color: var(--amber); }
.fx-kpi .value.danger, .kpi-value.danger { color: var(--red); }
.fx-kpi .value.success, .kpi-value.success { color: var(--up); }
.fx-kpi .sub, .pm-kpi .sub, .kpi-sub, .stat-card .sub, .kpi-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
  margin-top: 2px;
}
.kpi-trend { font-family: var(--mono); font-size: 10px; font-weight: 600; }
.kpi-trend.up { color: var(--up); }
.kpi-trend.down { color: var(--down); }
.kpi-value.accent { color: var(--accent); }
.kpi-value.up { color: var(--up); }
.kpi-value.down { color: var(--down); }

/* Hero ribbon (admin overview) */
.hero-ribbon {
  display: flex; gap: 0; margin-bottom: var(--space-4);
  border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; background: var(--panel);
}
.hero-ribbon .ribbon-item {
  flex: 1; padding: var(--space-3) var(--space-4);
  border-right: 1px solid var(--line);
}
.hero-ribbon .ribbon-item:last-child { border-right: none; }
.hero-ribbon .ribbon-item .label { font-family: var(--mono); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dimmer); margin-bottom: 2px; }
.hero-ribbon .ribbon-item .value { font-family: var(--mono); font-size: var(--text-lg); font-weight: var(--font-bold); color: var(--ink); font-variant-numeric: tabular-nums; }
.hero-ribbon .ribbon-item .delta { font-family: var(--mono); font-size: 10px; color: var(--up); margin-top: 2px; }
.hero-ribbon .ribbon-item .delta.down { color: var(--down); }
.hero-ribbon .ribbon-sep { width: 1px; background: var(--line); }
@media (max-width: 768px) {
  .hero-ribbon { flex-direction: column; }
  .hero-ribbon .ribbon-item { border-right: none; border-bottom: 1px solid var(--line); }
  .hero-ribbon .ribbon-item:last-child { border-bottom: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   TABLES — sharp, mono numbers
   ═══════════════════════════════════════════════════════════════════════ */
.fx-table, .pm-table, .table, .dz-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.fx-table th, .pm-table th, .table th, .dz-table th,
.dz-content th {
  text-align: left;
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dimmer);
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.fx-table td, .pm-table td, .table td, .dz-table td,
.dz-content td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
}
.fx-table tbody tr:last-child td, .pm-table tbody tr:last-child td,
.table tbody tr:last-child td, .dz-table tbody tr:last-child td,
.dz-content tr:last-child td { border-bottom: none; }
.fx-table tbody tr:hover, .pm-table tbody tr:hover, .table tbody tr:hover,
.dz-table tbody tr:hover, .dz-content tr:hover td {
  background: var(--panel-2);
}
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.dz-content table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.dz-content a { color: var(--accent); text-decoration: none; }
.dz-content a:hover { text-decoration: underline; }
.dz-content tr:hover td { background: var(--panel-2); }

/* ═══════════════════════════════════════════════════════════════════════
   PILLS + BADGES
   ═══════════════════════════════════════════════════════════════════════ */
.fx-pill, .pm-pill, .pill, .badge, .tag, .status-badge, .chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fx-pill::before, .pm-pill::before, .pill::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor;
}
.fx-pill.success, .pm-pill.success, .pill.success, .pill.healthy, .badge.success,
.pill.published, .pill.active, .pill.approved, .pill.operational,
.chip.ok, .pill.ok { background: var(--up-soft); color: var(--up); border-color: rgba(20,184,166,0.25); }
.fx-pill.warning, .pm-pill.warning, .pill.warning, .pill.degraded, .badge.warning,
.pill.pending, .pill.pending_approval, .pill.draft, .chip.pending, .pill.pending { background: var(--amber-soft); color: var(--amber); border-color: rgba(245,184,0,0.25); }
.fx-pill.danger, .pm-pill.danger, .pill.danger, .pill.failed, .badge.danger,
.pill.critical, .pill.down, .pill.rejected, .chip.bad, .pill.bad { background: var(--down-soft); color: var(--down); border-color: rgba(246,92,92,0.25); }
.fx-pill.info, .pm-pill.info, .pill.info, .pill.scheduled, .chip.info, .pill.info { background: rgba(91,141,239,0.14); color: var(--blue); border-color: rgba(91,141,239,0.25); }
.fx-pill.neutral, .pm-pill.neutral, .pill.neutral, .pill.unknown, .pill.untested { background: var(--panel-3); color: var(--dim); }

/* Plain status words (no pill bg) */
.ok { color: var(--up); }
.bad { color: var(--down); }
.pos { color: var(--up); }
.neg { color: var(--down); }
.up { color: var(--up); }
.down { color: var(--down); }
.gold { color: var(--gold); }
.amber { color: var(--amber); }
.err { color: var(--red); }

/* ═══════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════ */
.fx-btn, .pm-btn, .btn, .dz-btn, .sa-btn, .button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-family: var(--sans);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all var(--t-fast);
  white-space: nowrap;
  line-height: 1.2;
}
.fx-btn:disabled, .pm-btn:disabled, .btn:disabled, .button:disabled { opacity: 0.5; cursor: not-allowed; }

.fx-btn.primary, .pm-btn.primary, .btn-primary, .btn-success, .dz-btn.primary,
.sa-btn.primary, .btn.primary, .btn-glow, .button.btn-glow {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.fx-btn.primary:hover, .pm-btn.primary:hover, .btn-primary:hover, .btn-glow:hover {
  background: var(--accent-3);
  border-color: var(--accent-3);
  transform: translateY(-1px);
  box-shadow: var(--shadow-cta);
}

.fx-btn.secondary, .pm-btn.secondary, .btn-secondary, .dz-btn.ghost,
.sa-btn.ghost, .btn.secondary, .btn.ghost, .ghost, .button.ghost {
  background: var(--bg);
  border-color: var(--line);
  color: var(--dim);
}
.fx-btn.secondary:hover, .pm-btn.secondary:hover, .btn-secondary:hover, .ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.fx-btn.danger, .pm-btn.danger, .btn-danger, .btn.danger {
  background: var(--down);
  color: var(--bg);
}
.fx-btn.danger:hover, .pm-btn.danger:hover, .btn-danger:hover { opacity: 0.9; transform: translateY(-1px); }

.fx-btn.success, .pm-btn.success, .btn-success {
  background: var(--up);
  color: var(--bg);
}

.fx-btn.warning, .pm-btn.warning, .btn-warning, .btn.warning {
  background: var(--amber);
  color: #1a1206;
  font-weight: var(--font-bold);
}

.fx-btn.ghost, .pm-btn.ghost, .btn.ghost {
  background: transparent;
  color: var(--dim);
}
.fx-btn.ghost:hover, .pm-btn.ghost:hover, .btn.ghost:hover {
  background: var(--panel-3);
  color: var(--ink);
}

.fx-btn.sm, .pm-btn.sm, .btn-sm, .btn.sm, .sm { padding: 4px 10px; font-size: var(--text-xs); }
.fx-btn.icon, .pm-btn.icon, .btn.icon { padding: 6px; }
.fx-btn.lg, .pm-btn.lg, .btn-lg { padding: 10px 20px; font-size: var(--text-md); }
.flat { padding: 4px 8px; font-size: var(--text-xs); background: none; border: none; color: var(--dim); cursor: pointer; }
.flat:hover { color: var(--accent); }
.fix { padding: 4px 10px; font-size: var(--text-xs); font-weight: 600; border-radius: var(--r-sm); background: var(--accent); color: var(--bg); border: none; cursor: pointer; }
.fix:hover { background: var(--accent-3); }

/* ═══════════════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════════════ */
.fx-input, .fx-select, .fx-textarea,
.pm-input, .pm-select, .pm-textarea,
.input, .dz-input, .sa-input,
.dz-content input[type="text"], .dz-content input[type="email"], .dz-content input[type="password"],
.dz-content input[type="number"], .dz-content input[type="url"], .dz-content input[type="tel"],
.dz-content select, .dz-content textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  font-family: var(--sans);
  font-size: var(--text-sm);
  transition: all var(--t-fast);
}
.fx-input:focus, .fx-select:focus, .fx-textarea:focus,
.pm-input:focus, .pm-select:focus, .pm-textarea:focus,
.input:focus, .dz-input:focus, input:focus, select:focus, textarea:focus,
.dz-content input:focus, .dz-content select:focus, .dz-content textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.fx-textarea, .pm-textarea, textarea { min-height: 72px; resize: vertical; font-family: var(--mono); font-size: var(--text-sm); }
.fx-label, .pm-label, .dz-label, .sa-label, label.f, label, .f {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--dimmer);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.fx-label.required::after, .pm-label.required::after, label.f.required::after { content: ' *'; color: var(--accent); }
input[type="checkbox"], input[type="radio"] { width: auto !important; margin-right: 6px; vertical-align: middle; }

/* Form grid */
.formgrid, .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.formgrid-full, .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .formgrid, .form-grid { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════════════════════════════
   TABS — sharp underline, mono labels
   ═══════════════════════════════════════════════════════════════════════ */
.fx-tabs, .pm-tabs, .tabs, .tab-bar {
  display: flex; flex-wrap: wrap; gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-4);
  overflow-x: auto;
}
.fx-tab, .pm-tab, .tab, .tab-link, .nav-tab, .admin-tab {
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  transition: all var(--t-fast);
  white-space: nowrap;
  text-decoration: none;
  position: relative;
}
.fx-tab:hover, .pm-tab:hover, .tab:hover { color: var(--ink); }
.fx-tab.active, .pm-tab.active, .tab.active, .tab-link.active, .admin-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Admin sidebar-tab layout */
.admin-layout { display: grid; grid-template-columns: 200px 1fr; gap: var(--space-3); }
.admin-sidebar { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: var(--space-2); position: sticky; top: calc(var(--header-height) + var(--space-3)); max-height: calc(100vh - 200px); overflow-y: auto; }
.admin-sidebar .admin-tab { display: flex; align-items: center; gap: var(--space-2); padding: 6px 10px; border-radius: var(--r-sm); color: var(--dim); font-size: var(--text-sm); font-weight: 500; cursor: pointer; transition: all var(--t-fast); white-space: nowrap; margin-bottom: 1px; text-decoration: none; border: none; border-bottom: none; text-transform: none; letter-spacing: normal; font-family: var(--sans); }
.admin-sidebar .admin-tab:hover { background: var(--panel-3); color: var(--ink); }
.admin-sidebar .admin-tab.active { background: var(--accent-soft); color: var(--accent); }
.admin-sidebar .admin-tab .ico { font-size: 13px; flex-shrink: 0; }
.admin-sidebar .admin-section-title { font-family: var(--mono); font-size: 10px; font-weight: 600; color: var(--dimmer); text-transform: uppercase; letter-spacing: 0.08em; padding: var(--space-2) var(--space-3); margin-top: var(--space-2); margin-bottom: 2px; }
.admin-content { min-width: 0; }
@media (max-width: 1024px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: relative; top: 0; max-height: 280px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   GRIDS
   ═══════════════════════════════════════════════════════════════════════ */
.fx-grid, .pm-grid, .grid, .wd-grid { display: grid; gap: var(--space-3); }
.fx-grid.cols-2, .pm-grid.cols-2, .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.fx-grid.cols-3, .pm-grid.cols-3, .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.fx-grid.cols-4, .pm-grid.cols-4, .grid.cols-4, .cols-4 { grid-template-columns: repeat(4, 1fr); }
.fx-grid.cols-5, .pm-grid.cols-5, .grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.fx-grid.auto, .pm-grid.auto, .grid.auto { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.wd-grid[class*="cols-"] { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
@media (max-width: 1280px) { .fx-grid.cols-4, .pm-grid.cols-4, .grid.cols-4, .cols-4 { grid-template-columns: repeat(3, 1fr); } .fx-grid.cols-5, .pm-grid.cols-5, .grid.cols-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1024px) { .fx-grid.cols-3, .pm-grid.cols-3, .grid.cols-3, .fx-grid.cols-4, .pm-grid.cols-4, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .fx-grid.cols-2, .fx-grid.cols-3, .fx-grid.cols-4, .fx-grid.cols-5, .pm-grid.cols-2, .pm-grid.cols-3, .pm-grid.cols-4, .pm-grid.cols-5, .grid.cols-2, .grid.cols-3, .grid.cols-4, .grid.cols-5 { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════════════════════════════
   EMPTY / LOADING / SKELETON
   ═══════════════════════════════════════════════════════════════════════ */
.fx-empty, .pm-empty, .empty, .no-data {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  color: var(--dimmer);
}
.fx-empty .icon, .pm-empty .icon, .empty .icon, .no-data .icon { font-size: 32px; margin-bottom: var(--space-2); opacity: 0.4; }
.fx-empty .title, .pm-empty .title, .empty .msg { font-size: var(--text-md); color: var(--dim); margin-bottom: var(--space-1); }
.fx-empty .sub, .pm-empty .sub, .empty .sub, .no-data .sub { font-size: var(--text-sm); color: var(--dimmer); }

.fx-spinner, .pm-spinner, .spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.fx-loading, .loading { display: flex; align-items: center; gap: var(--space-2); color: var(--dim); padding: var(--space-4); }

.skeleton, .pm-skeleton {
  background: linear-gradient(90deg, var(--panel-2) 0%, var(--panel-3) 50%, var(--panel-2) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s linear infinite;
  border-radius: var(--r-sm);
}
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-text { height: 10px; margin: 4px 0; border-radius: 4px; }
.skeleton-text.w-100 { width: 100%; }
.skeleton-text.w-75 { width: 75%; }
.skeleton-text.w-50 { width: 50%; }
.skeleton-block { height: 72px; border-radius: var(--r-sm); }

/* ═══════════════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════════════ */
.fx-modal-bg, .pm-modal-bg, .modal-bg, .modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center; justify-content: center;
  z-index: var(--z-modal-bg);
}
.fx-modal-bg.show, .pm-modal-bg.show, .modal-bg.show, .modal-backdrop.show { display: flex; }
.fx-modal, .pm-modal, .modal, .dz-modal {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: var(--space-4);
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow-2);
  position: relative;
}
.fx-modal h3, .pm-modal h3, .modal h3 {
  font-family: var(--display);
  font-size: var(--text-md);
  font-weight: var(--font-bold);
  color: var(--ink);
  margin-bottom: var(--space-3);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.fx-modal-actions, .pm-modal-actions, .modal-actions { display: flex; gap: var(--space-2); justify-content: flex-end; margin-top: var(--space-4); }

/* ═══════════════════════════════════════════════════════════════════════
   DROPDOWN
   ═══════════════════════════════════════════════════════════════════════ */
.dropdown-wrap, .dropdown-container { position: relative; }
.dropdown, .dropdown-menu, .menu, .popover {
  position: absolute;
  top: 100%; left: 0;
  margin-top: 4px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 4px;
  min-width: 180px;
  display: none;
  z-index: var(--z-dropdown);
  box-shadow: var(--shadow-md);
}
.dropdown.show, .dropdown-menu.show { display: block; }
.dropdown-item, .dropdown-menu a, .menu-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  color: var(--ink);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background var(--t-fast);
  text-decoration: none;
}
.dropdown-item:hover, .dropdown-menu a:hover { background: var(--panel-3); color: var(--accent); }
.dropdown-item .swatch, .theme-swatch {
  width: 12px; height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Theme dropdown */
.theme-switcher { position: relative; }
.theme-dropdown {
  position: absolute; top: 100%; right: 0;
  margin-top: 4px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 4px;
  min-width: 180px;
  display: none;
  z-index: var(--z-dropdown);
  box-shadow: var(--shadow-md);
}
.theme-switcher.open .theme-dropdown, .theme-dropdown.show { display: block; }
.theme-option {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--ink);
  transition: background var(--t-fast);
}
.theme-option:hover { background: var(--panel-3); }
.theme-btn { background: var(--bg) !important; border: 1px solid var(--line) !important; color: var(--dim) !important; width: 32px; height: 32px; border-radius: var(--r-sm) !important; cursor: pointer; display: grid; place-items: center; font-size: 13px; transition: all var(--t-fast); }
.theme-btn:hover { border-color: var(--accent) !important; color: var(--accent) !important; }

/* ═══════════════════════════════════════════════════════════════════════
   HERO + MARKETING SECTIONS
   ═══════════════════════════════════════════════════════════════════════ */
.fx-hero, .pm-hero, .hero, .jumbotron, .banner {
  position: relative;
  padding: var(--space-12) var(--space-4);
  margin-bottom: var(--space-6);
  overflow: hidden;
}
.fx-hero h1, .pm-hero h1, .hero h1 {
  font-family: var(--display);
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  letter-spacing: var(--tracking-tight);
  line-height: 1.05;
  margin-bottom: var(--space-3);
  color: var(--ink);
}
.fx-hero h1 .accent, .pm-hero h1 .accent { color: var(--accent); }
.fx-hero .subtitle, .pm-hero .subtitle, .hero p {
  font-size: var(--text-md);
  color: var(--dim);
  line-height: var(--leading-relaxed);
  max-width: 580px;
  margin-bottom: var(--space-5);
}
.fx-hero .badge, .pm-hero .badge, .hero .badge {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-full);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.fx-section, .pm-section, .section {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--line);
}
.fx-section h2, .pm-section h2, .section h2 {
  font-family: var(--display);
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-2);
}
.fx-section .sub, .pm-section .sub, .section .subtitle { font-size: var(--text-md); color: var(--dim); margin-bottom: var(--space-5); }

.fx-feature, .feature-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--space-4);
  transition: all var(--t-base);
}
.fx-feature:hover { border-color: var(--accent); transform: translateY(-2px); }
.fx-feature .icon { font-size: 24px; margin-bottom: var(--space-2); color: var(--accent); }
.fx-feature h3 { font-family: var(--display); font-size: var(--text-md); font-weight: var(--font-bold); margin-bottom: var(--space-2); letter-spacing: var(--tracking-tight); }
.fx-feature p { color: var(--dim); font-size: var(--text-sm); line-height: var(--leading-relaxed); }

/* Pricing cards */
.fx-pricing, .pm-pricing, .pricing-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--space-5);
  transition: all var(--t-base);
}
.fx-pricing.featured { border-color: var(--accent); }
.fx-pricing:hover { transform: translateY(-3px); border-color: var(--accent); }
.fx-pricing .plan-name { font-family: var(--mono); font-size: var(--text-xs); font-weight: 700; color: var(--dimmer); text-transform: uppercase; letter-spacing: var(--tracking-widest); }
.fx-pricing .price { font-family: var(--mono); font-size: var(--text-3xl); font-weight: var(--font-bold); margin: var(--space-2) 0; font-variant-numeric: tabular-nums; color: var(--ink); }
.fx-pricing .price .period { font-size: var(--text-sm); color: var(--dimmer); font-weight: var(--font-normal); }
.fx-pricing ul { list-style: none; margin: var(--space-4) 0; }
.fx-pricing li { padding: var(--space-2) 0; color: var(--dim); font-size: var(--text-sm); display: flex; align-items: center; gap: var(--space-2); border-bottom: 1px solid var(--line); }
.fx-pricing li:last-child { border-bottom: none; }
.fx-pricing li::before { content: '→'; color: var(--accent); font-family: var(--mono); font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════ */
.fx-footer, .pm-footer, .site-footer, .footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: var(--space-8) var(--space-5) var(--space-4);
  margin-top: var(--space-8);
}
.fx-footer .inner, .pm-footer .inner, .footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: var(--space-6);
}
.fx-footer h4, .pm-footer h4, .site-footer h4 {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--dimmer);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}
.fx-footer a, .pm-footer a, .site-footer .links a {
  display: block;
  font-size: var(--text-sm);
  color: var(--dim);
  margin-bottom: var(--space-2);
  text-decoration: none;
  transition: color var(--t-fast);
}
.fx-footer a:hover, .pm-footer a:hover, .site-footer .links a:hover { color: var(--accent); }
.fx-footer .copyright, .pm-footer .copyright, .site-footer .copyright {
  max-width: var(--content-max);
  margin: var(--space-6) auto 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--dimmer);
  text-align: center;
}
.fx-footer .footer-brand-col .footer-tagline, .pm-footer .footer-brand-col .footer-tagline { color: var(--dimmer); font-size: var(--text-sm); line-height: var(--leading-relaxed); margin-bottom: var(--space-3); }
.fx-footer .footer-social, .pm-footer .footer-social { display: flex; gap: var(--space-3); }
.fx-footer .footer-social-link, .pm-footer .footer-social-link { color: var(--dimmer); transition: color var(--t-fast); display: inline-flex; }
.fx-footer .footer-social-link:hover, .pm-footer .footer-social-link:hover { color: var(--accent); }
.fx-footer .footer-risk, .pm-footer .footer-risk { max-width: var(--content-max); margin: var(--space-6) auto 0; padding: var(--space-4); border-top: 1px solid var(--line); }
.fx-footer .footer-risk p, .pm-footer .footer-risk p { font-size: var(--text-xs); color: var(--dimmer); text-align: center; line-height: var(--leading-relaxed); }
.fx-footer .footer-risk strong, .pm-footer .footer-risk strong { color: var(--dim); font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }

/* ═══════════════════════════════════════════════════════════════════════
   MISC UTILITIES
   ═══════════════════════════════════════════════════════════════════════ */
.head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.body { padding: 0; }
.row { display: flex; align-items: center; gap: var(--space-2); }
.v   { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.k   { color: var(--dim); font-size: var(--text-sm); }
.key { font-family: var(--mono); font-size: 10px; font-weight: 600; color: var(--dimmer); text-transform: uppercase; letter-spacing: 0.06em; }
.meta { font-family: var(--mono); font-size: 10px; color: var(--dimmer); }
.copy { font-family: var(--mono); font-size: 10px; color: var(--accent); cursor: pointer; }
.name { font-weight: 600; color: var(--ink); }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--up); display: inline-block; animation: pulse-dot 2s ease-in-out infinite; }
.muted { color: var(--dim) !important; }
.right { text-align: right; }
.inline { display: inline; }
.updown { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.spark { width: 100%; height: 32px; }
.broker-card { padding: var(--space-3); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); }
.broker-card:hover { border-color: var(--accent); }

/* Flash messages */
.flash { padding: 8px 14px; border-radius: var(--r-sm); font-size: var(--text-sm); margin-bottom: var(--space-3); font-family: var(--mono); }
.flash.err, .flash.error { background: var(--down-soft); border: 1px solid rgba(246,92,92,0.25); color: var(--down); }
.flash.info { background: rgba(91,141,239,0.14); border: 1px solid rgba(91,141,239,0.25); color: var(--blue); }
.flash.ok, .flash.success { background: var(--up-soft); border: 1px solid rgba(20,184,166,0.25); color: var(--up); }

/* Connectors / recommendations / output (used by ea_doctor, ai_explainer, scanner) */
.fx-connector, .connector-card, .connector-grid { display: grid; gap: var(--space-3); }
.fx-connector, .connector-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: var(--space-3); }
.fx-connector:hover, .connector-card:hover { border-color: var(--accent); }
.fx-connector .name, .connector-card .name { font-size: var(--text-md); font-weight: var(--font-bold); margin-bottom: 4px; color: var(--ink); }
.fx-connector .meta, .connector-card .handle { color: var(--dimmer); font-size: var(--text-xs); margin-bottom: var(--space-2); font-family: var(--mono); }
.fx-rec, .rec-card { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-sm); padding: var(--space-3); margin-bottom: var(--space-2); }
.fx-rec.critical, .rec-card.critical { border-left-color: var(--red); }
.fx-rec.warning, .rec-card.medium { border-left-color: var(--amber); }
.fx-rec.info, .rec-card.low { border-left-color: var(--up); }
.fx-rec .r-title, .rec-card .rec-title { color: var(--ink); font-weight: var(--font-bold); font-size: var(--text-sm); margin-bottom: 4px; }
.fx-rec .r-action, .rec-card .rec-action { color: var(--dim); font-size: var(--text-xs); }
.fx-output, .output { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--space-3); font-family: var(--mono); font-size: var(--text-xs); white-space: pre-wrap; max-height: 280px; overflow-y: auto; }

/* Auth card */
.auth-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  max-width: 420px;
  margin: var(--space-12) auto;
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--seam);
}
.auth-card .auth-title { font-family: var(--display); font-size: var(--text-xl); font-weight: var(--font-bold); letter-spacing: var(--tracking-tight); margin-bottom: var(--space-2); color: var(--ink); }
.auth-card .auth-sub { color: var(--dim); font-size: var(--text-sm); margin-bottom: var(--space-5); }
.auth-card.wide { max-width: 640px; }
.auth-card.narrow { max-width: 360px; }

/* Content page (CMS) */
.content-page h1 { font-family: var(--display); font-size: var(--text-2xl); font-weight: var(--font-bold); letter-spacing: var(--tracking-tight); margin-bottom: var(--space-4); color: var(--ink); }
.content-page h2 { font-family: var(--display); font-size: var(--text-lg); margin-top: var(--space-6); margin-bottom: var(--space-3); color: var(--ink); }
.content-page h3 { font-family: var(--display); font-size: var(--text-md); margin-top: var(--space-5); margin-bottom: var(--space-2); color: var(--ink); }
.content-page p  { color: var(--dim); line-height: var(--leading-relaxed); margin-bottom: var(--space-3); }
.content-page ul, .content-page ol { margin: 0 0 var(--space-3) var(--space-5); color: var(--dim); }
.content-page li { margin-bottom: var(--space-1); line-height: var(--leading-relaxed); }
.content-page code { font-family: var(--mono); font-size: 0.9em; background: var(--panel-2); padding: 2px 6px; border-radius: 4px; color: var(--accent); }
.content-page pre { background: var(--panel-2); padding: var(--space-4); border-radius: var(--r-sm); overflow-x: auto; margin-bottom: var(--space-4); border: 1px solid var(--line); }
.content-page pre code { background: none; padding: 0; }
.content-page blockquote { border-left: 3px solid var(--accent); padding-left: var(--space-4); margin: var(--space-4) 0; color: var(--dim); font-style: italic; }
.content-page a { color: var(--accent); text-decoration: underline; }

/* Aurora blob (legacy — repurposed as subtle bg glow, no animation by default) */
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}
.aurora-blob.violet { background: rgba(245, 184, 0, 0.18); }
.aurora-blob.cyan   { background: rgba(20, 184, 166, 0.15); }
.aurora-blob.rose   { background: rgba(246, 92, 92, 0.12); }
.aurora-ribbon { display: none; }  /* legacy — replaced by .seam */
.aurora-seam::after, .aurora-top::before { display: none; }  /* legacy — replaced by .fx-header::after */
.particle-bg { display: none; }  /* legacy — replaced by .fx-mesh */

/* Toast container */
#pmToastContainer, #toastContainer {
  position: fixed; top: 56px; right: 16px; z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: var(--space-2);
  pointer-events: none; max-width: 360px;
}
.fx-toast, .pm-toast {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  color: var(--ink);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: var(--space-2);
}
.fx-toast.success, .pm-toast.success { border-left-color: var(--up); }
.fx-toast.error, .pm-toast.error   { border-left-color: var(--down); }
.fx-toast.warning, .pm-toast.warning { border-left-color: var(--amber); }
.fx-toast.info, .pm-toast.info    { border-left-color: var(--accent); }
.fx-toast .fx-toast-close, .pm-toast .pm-toast-close {
  margin-left: auto; cursor: pointer; color: var(--dimmer);
  background: none; border: none; font-size: 14px; line-height: 1;
}

/* Ticker flash */
.tick { transition: background 0.3s var(--ease-out); }
.tick.flash-up { animation: flash-up 0.6s var(--ease-out); }
.tick.flash-down { animation: flash-down 0.6s var(--ease-out); }
.pm-num, .num-flash { font-family: var(--mono); font-variant-numeric: tabular-nums; transition: color 0.3s var(--ease-out); }
.pm-num.flash-up, .num-flash.flash-up { animation: numFlashUp 0.7s var(--ease-out); }
.pm-num.flash-down, .num-flash.flash-down { animation: numFlashDown 0.7s var(--ease-out); }
@keyframes flash-up { 0% { background: var(--up-soft); } 100% { background: transparent; } }
@keyframes flash-down { 0% { background: var(--down-soft); } 100% { background: transparent; } }
@keyframes numFlashUp { 0% { color: var(--up); transform: translateY(-1px); } 100% { color: inherit; transform: translateY(0); } }
@keyframes numFlashDown { 0% { color: var(--down); transform: translateY(1px); } 100% { color: inherit; transform: translateY(0); } }

/* Reveal animations */
.fx-fade-in, .pm-fade-in, .reveal { animation: fadeInUp 0.5s var(--ease-out) both; }
.fx-fade-in-delay-1, .pm-fade-in-delay-1 { animation: fadeInUp 0.5s var(--ease-out) 0.1s both; }
.fx-fade-in-delay-2, .pm-fade-in-delay-2 { animation: fadeInUp 0.5s var(--ease-out) 0.2s both; }
.fx-fade-in-delay-3, .pm-fade-in-delay-3 { animation: fadeInUp 0.5s var(--ease-out) 0.3s both; }
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
.reveal.in { opacity: 1; transform: translateY(0); }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* asp-currency-pill (used by /static/currency.js) */
.asp-currency-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-sm);
  background: var(--bg); border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--mono); font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  font-variant-numeric: tabular-nums;
  cursor: pointer; transition: all var(--t-fast);
  white-space: nowrap;
}
.asp-currency-pill:hover { border-color: var(--accent); color: var(--accent); }
.asp-currency-pill .asp-flag { font-size: 13px; }
.asp-currency-pill .asp-code { color: var(--dim); font-size: 10px; margin-left: 4px; }
.asp-currency-pill .asp-rate { color: var(--accent); font-weight: 700; margin-left: 6px; }
.asp-currency-pill .asp-arrow { color: var(--dimmer); font-size: 9px; margin-left: 4px; }

/* Ticker (landing) */
.tk-item { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--line); font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: var(--text-sm); white-space: nowrap; transition: all var(--t-fast); }
.tk-item:hover { border-color: var(--accent); }
.tk-sym { color: var(--dim); font-weight: 600; }
.tk-px  { color: var(--ink); font-weight: 700; }
.tk-px.up { color: var(--up); }
.tk-px.down { color: var(--down); }
.cur-sym { font-family: var(--mono); font-weight: 700; color: var(--accent); display: inline-block; min-width: 1em; }

/* ta-* trading activity widget */
.ta-widget { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: var(--space-4); margin-bottom: var(--space-3); }
.ta-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); padding-bottom: var(--space-2); border-bottom: 1px solid var(--line); }
.ta-title { display: flex; align-items: center; gap: var(--space-2); font-family: var(--display); font-size: var(--text-md); font-weight: var(--font-bold); color: var(--ink); }
.ta-pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--dimmer); }
.ta-pulse.online { background: var(--up); animation: pulse-dot 2s infinite; }
.ta-pulse.offline { background: var(--dimmer); }
.ta-meta { font-family: var(--mono); font-size: 10px; color: var(--dim); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; }
.ta-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); margin-bottom: var(--space-3); }
.ta-stat { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--space-2) var(--space-3); }
.ta-stat-label { display: block; font-family: var(--mono); font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dimmer); margin-bottom: 2px; }
.ta-stat-value { display: block; font-family: var(--mono); font-size: var(--text-sm); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.ta-empty-banner { padding: var(--space-3); background: var(--amber-soft); border: 1px solid rgba(245,184,0,0.25); border-radius: var(--r-sm); color: var(--amber); font-size: var(--text-sm); display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.ta-ico { font-size: 14px; }
.ta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.ta-section { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--space-3); }
.ta-section h4 { font-family: var(--mono); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dimmer); margin-bottom: var(--space-2); }
.ta-list { list-style: none; padding: 0; margin: 0; }
.ta-list li { padding: 6px 0; font-size: var(--text-sm); color: var(--dim); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); }
.ta-list li:last-child { border-bottom: none; }
.ta-loading { color: var(--dimmer) !important; font-style: italic; }
.ta-symbol { font-family: var(--mono); font-weight: 700; color: var(--ink); font-size: var(--text-sm); }
.ta-time   { font-family: var(--mono); font-size: 10px; color: var(--dimmer); }
.ta-tag    { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: var(--r-sm); font-family: var(--mono); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.ta-tag.buy   { background: var(--up-soft); color: var(--up); }
.ta-tag.sell  { background: var(--down-soft); color: var(--down); }
.ta-tag.win   { background: var(--up-soft); color: var(--up); }
.ta-tag.loss  { background: var(--down-soft); color: var(--down); }
.ta-tag.hold  { background: var(--amber-soft); color: var(--amber); }
@media (max-width: 768px) {
  .ta-stats { grid-template-columns: repeat(2, 1fr); }
  .ta-grid  { grid-template-columns: 1fr; }
}

/* Market topbar */
.dz-topbar, .dz-topbar-v31 { display: flex; align-items: center; gap: var(--space-2); padding: 6px var(--space-4); background: var(--bg-2); border-bottom: 1px solid var(--line); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dz-brand-logo { width: 20px; height: 20px; border-radius: 3px; object-fit: contain; flex-shrink: 0; }
.dz-markets-dropdown { position: relative; display: inline-block; }
.dz-market-item { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--line); color: var(--ink); font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: var(--text-sm); white-space: nowrap; cursor: pointer; transition: all var(--t-fast); }
.dz-market-item:hover { border-color: var(--accent); }
.dz-market-item .sym { color: var(--dim); font-weight: 600; }
.dz-market-item .px  { color: var(--ink); font-weight: 700; }
.dz-market-item .chg { font-size: 10px; padding: 1px 4px; border-radius: 3px; font-weight: 600; }
.dz-market-item .chg.up { background: var(--up-soft); color: var(--up); }
.dz-market-item .chg.down { background: var(--down-soft); color: var(--down); }
.dz-backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--bg); }
.dz-shell { display: grid; grid-template-columns: var(--sidebar-width) 1fr; min-height: 100vh; background: var(--bg); }
.dz-content { padding: var(--space-4); overflow-x: hidden; min-width: 0; }
.dz-divider { font-family: var(--mono); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dimmer); padding: var(--space-3) 0 var(--space-2); border-bottom: 1px solid var(--line); margin-bottom: var(--space-3); }
.dz-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.dz-title { font-family: var(--display); font-size: var(--text-md); font-weight: 700; color: var(--ink); }
.dz-sub { font-family: var(--mono); font-size: var(--text-xs); color: var(--dim); margin-top: 2px; }
.dz-actions { display: flex; gap: var(--space-2); align-items: center; }
.dz-brand { display: flex; align-items: center; gap: var(--space-2); text-decoration: none; color: var(--ink); font-weight: 700; font-size: var(--text-sm); }
.dz-brand-ico { width: 24px; height: 24px; border-radius: var(--r-sm); background: var(--accent); display: grid; place-items: center; font-size: 13px; color: var(--bg); font-weight: 800; flex-shrink: 0; }
.dz-brand-text { white-space: nowrap; }
.dz-brand-tag { font-family: var(--mono); font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px; background: var(--accent-soft); color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.dz-crumbs { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; color: var(--dimmer); margin-left: var(--space-3); text-transform: uppercase; letter-spacing: 0.04em; }
.crumb-sep { opacity: 0.4; }
.crumb-cur { color: var(--accent); font-weight: 600; }
.dz-section-title { font-family: var(--mono); font-size: 10px; color: var(--dim); margin-left: var(--space-3); }
.dz-spacer { flex: 1; }
.dz-toggle-grp { display: flex; gap: 2px; }
.dz-toggle-grp a { padding: 3px 8px; font-family: var(--mono); font-size: 10px; border-radius: var(--r-sm); color: var(--dim); text-decoration: none; transition: all var(--t-fast); text-transform: uppercase; letter-spacing: 0.04em; }
.dz-toggle-grp a:hover, .dz-toggle-grp a.active { background: var(--accent-soft); color: var(--accent); }
.dz-both-dropdown { padding: 4px 10px; font-family: var(--mono); font-size: 10px; border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--line); color: var(--dim); cursor: pointer; text-decoration: none; transition: all var(--t-fast); text-transform: uppercase; letter-spacing: 0.04em; }
.dz-both-dropdown:hover { border-color: var(--accent); color: var(--accent); }
.dz-burger { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.dz-burger span { display: block; width: 18px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; transition: 0.3s; }
.dz-avatar { width: 24px; height: 24px; border-radius: var(--r-sm); background: var(--accent); display: grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--bg); flex-shrink: 0; }
.dz-user { display: flex; align-items: center; gap: var(--space-2); text-decoration: none; color: var(--ink); }
.dz-user-name { font-size: var(--text-sm); font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-signout { font-family: var(--mono); font-size: 10px; padding: 4px 8px; border-radius: var(--r-sm); border: 1px solid var(--line); background: none; color: var(--dim); cursor: pointer; font-weight: 600; transition: all var(--t-fast); text-transform: uppercase; letter-spacing: 0.04em; }
.dz-signout:hover { border-color: var(--red); color: var(--red); }
.dz-icon { width: 14px; height: 14px; display: inline-grid; place-items: center; font-size: 11px; flex-shrink: 0; }
.notif-badge { position: absolute; top: -2px; right: -2px; min-width: 14px; height: 14px; border-radius: var(--r-full); background: var(--red); color: #fff; font-family: var(--mono); font-size: 9px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }

/* Sidebar links need direct reset */
.dz-sidebar a, .pm-sidebar a { text-decoration: none !important; }
.dz-sidebar a:hover, .pm-sidebar a:hover { background: var(--panel); }
.dz-sidebar a.active, .pm-sidebar a.active { background: var(--panel-2); color: var(--accent); }

/* Swatch colour variants */
.swatch-blue     { background: #5B8DEF; }
.swatch-amber    { background: #F5B800; }
.swatch-green    { background: #14B8A6; }
.swatch-red      { background: #F65C5C; }
.swatch-violet   { background: #A78BFA; }
.swatch-uk       { background: #4F8CFF; }
.swatch-iris     { background: #F5B800; }
.swatch-grey     { background: #8B95A8; }
.swatch-purple   { background: #A78BFA; }
.swatch-porcelain{ background: #F7F5F0; border: 1px solid var(--line); }
.swatch-gold     { background: #D4AF37; }
.swatch-ocean    { background: #14B8A6; }
.swatch-midnight { background: #A78BFA; }
.swatch-rose     { background: #F65C5C; }

/* Status dot online (sidebar) */
.pm-sidebar .status .status-dot-online, .fx-sidebar .status .status-dot-online { background: var(--up); }

/* Misc bits */
.kpi-trend.up { color: var(--up); }
.kpi-trend.down { color: var(--down); }
.button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-sm); font-family: var(--sans); font-size: var(--text-sm); font-weight: 600; cursor: pointer; border: 1px solid transparent; text-decoration: none; transition: all var(--t-fast); white-space: nowrap; }
.button:disabled { opacity: 0.5; cursor: not-allowed; }
.button.btn-glow { background: var(--accent); color: var(--bg); border: none; }
.button.btn-glow:hover { background: var(--accent-3); }
.button.ghost { background: var(--bg); border: 1px solid var(--line); color: var(--dim); }
.button.ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Error page */
.pm-error-page { display: flex; align-items: center; justify-content: center; min-height: 56vh; text-align: center; padding: var(--space-6); }
.pm-error-box { max-width: 520px; }
.pm-error-code { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 88px; font-weight: 700; color: var(--accent); line-height: 1; margin-bottom: var(--space-3); }
.pm-error-title { font-family: var(--display); font-size: var(--text-lg); font-weight: 700; color: var(--ink); margin-bottom: var(--space-3); }
.pm-error-msg { color: var(--dim); font-size: var(--text-sm); margin-bottom: var(--space-5); line-height: var(--leading-relaxed); }
.pm-error-actions { display: flex; gap: var(--space-2); justify-content: center; flex-wrap: wrap; }

/* Install wizard */
.wiz-wrap { max-width: 880px; margin: 0 auto; padding: var(--space-6) var(--space-4); }
.wiz-wrap > h1 { font-family: var(--display); font-size: var(--text-2xl); font-weight: 700; letter-spacing: var(--tracking-tight); margin-bottom: var(--space-2); color: var(--ink); }
.wiz-wrap > .sub { color: var(--dim); font-family: var(--mono); font-size: var(--text-xs); margin-bottom: var(--space-5); line-height: var(--leading-relaxed); text-transform: uppercase; letter-spacing: 0.04em; }
.wiz-wrap .sub { color: var(--dim); font-size: var(--text-sm); margin-bottom: var(--space-3); line-height: var(--leading-relaxed); }
.wiz-progress { display: flex; align-items: center; gap: 0; margin-bottom: var(--space-5); }
.wiz-progress .step { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); font-family: var(--mono); font-size: var(--text-xs); color: var(--dimmer); font-weight: 600; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.04em; }
.wiz-progress .step .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--panel-3); color: var(--dim); display: grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 700; flex-shrink: 0; }
.wiz-progress .step.active { color: var(--accent); }
.wiz-progress .step.active .dot { background: var(--accent); color: var(--bg); }
.wiz-progress .step.done { color: var(--up); }
.wiz-progress .step.done .dot { background: var(--up); color: var(--bg); }
.wiz-progress .bar { flex: 1; height: 1px; background: var(--line); min-width: 16px; }
.wiz-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: var(--space-5); margin-bottom: var(--space-3); }
.wiz-card > h2 { font-family: var(--display); font-size: var(--text-md); font-weight: 700; color: var(--ink); margin-bottom: var(--space-2); text-transform: uppercase; letter-spacing: 0.04em; }
.wiz-card > h2 > span { color: var(--dimmer); font-weight: 400; font-size: var(--text-sm); text-transform: none; letter-spacing: normal; }
.wiz-summary { display: flex; gap: var(--space-2); margin-bottom: var(--space-3); flex-wrap: wrap; }
.wiz-summary .pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-sm); font-family: var(--mono); font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.wiz-summary .pill.pass { background: var(--up-soft); color: var(--up); }
.wiz-summary .pill.fail { background: var(--down-soft); color: var(--down); }
.wiz-summary .pill.warn { background: var(--amber-soft); color: var(--amber); }
.wiz-summary .pill .n { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: var(--text-md); }
.sudo-box { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--space-3); margin-bottom: var(--space-3); }
.sudo-box > label { display: block; font-family: var(--mono); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dimmer); margin-bottom: var(--space-2); }
.sudo-box input[type="password"] { width: 100%; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink); padding: 6px 10px; border-radius: var(--r-sm); font-size: var(--text-sm); margin-top: var(--space-2); font-family: var(--mono); }
.sudo-box input[type="password"]:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px var(--accent-soft); }
.sudo-box.sudo-authorized { border-color: var(--up); background: var(--up-soft); }
.sub-sudo { font-size: var(--text-xs); color: var(--dim); margin-bottom: var(--space-2); line-height: var(--leading-relaxed); }
.sudo-status { font-family: var(--mono); font-size: var(--text-xs); color: var(--up); margin-top: var(--space-2); font-weight: 600; }
.req-list { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-3); }
.req-row { display: grid; grid-template-columns: 24px 1fr auto auto; gap: var(--space-2); align-items: center; padding: 8px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); }
.req-row.pass { border-left: 2px solid var(--up); }
.req-row.fail { border-left: 2px solid var(--down); }
.req-row.warn { border-left: 2px solid var(--amber); }
.req-row .icon { font-size: 13px; text-align: center; }
.req-row .name { font-weight: 600; color: var(--ink); font-size: var(--text-sm); }
.req-row .detail { font-size: var(--text-xs); color: var(--dim); margin-top: 2px; font-family: var(--mono); }
.req-row .badge { font-family: var(--mono); font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: var(--r-sm); text-transform: uppercase; letter-spacing: 0.04em; }
.req-row .badge.req { background: var(--down-soft); color: var(--down); }
.req-row .badge.opt { background: var(--panel-3); color: var(--dim); }
.wiz-actions { display: flex; gap: var(--space-2); justify-content: flex-end; padding-top: var(--space-3); border-top: 1px solid var(--line); flex-wrap: wrap; }
.wiz-actions button { padding: 8px 16px; border-radius: var(--r-sm); font-family: var(--sans); font-size: var(--text-sm); font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: all var(--t-fast); }
.wiz-actions button:disabled { opacity: 0.5; cursor: not-allowed; }
.wiz-actions button.ghost { background: var(--bg); border-color: var(--line); color: var(--dim); }
.wiz-actions button.ghost:hover { border-color: var(--accent); color: var(--accent); }
.wiz-actions button[type="submit"]:not(.ghost), .wiz-actions button#btnNext { background: var(--accent); color: var(--bg); }
.wiz-actions button[type="submit"]:not(.ghost):hover, .wiz-actions button#btnNext:hover { background: var(--accent-3); }
.db-test-row { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.db-test-row .result { font-size: var(--text-xs); color: var(--dim); font-family: var(--mono); }
.advanced { margin-top: var(--space-3); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--space-2); background: var(--bg); }
.advanced > summary { cursor: pointer; font-family: var(--mono); font-size: var(--text-xs); font-weight: 600; color: var(--dim); padding: var(--space-2); user-select: none; text-transform: uppercase; letter-spacing: 0.04em; }
.advanced > summary:hover { color: var(--accent); }
.advanced[open] > summary { margin-bottom: var(--space-2); }
.advanced .wiz-card { background: transparent; border: none; padding: 0; margin: 0; }

/* install_done */
.done-wrap { max-width: 720px; margin: 0 auto; padding: var(--space-8) var(--space-4); }
.done-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--space-6); position: relative; overflow: hidden; }
.done-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--seam); }
.done-check { font-size: 40px; text-align: center; margin-bottom: var(--space-3); }
.done-card > h1 { font-family: var(--display); font-size: var(--text-xl); font-weight: 700; text-align: center; margin-bottom: var(--space-2); color: var(--ink); }
.done-card .sub { color: var(--dim); font-size: var(--text-sm); text-align: center; margin-bottom: var(--space-5); line-height: var(--leading-relaxed); }
.done-summary { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--space-3); margin-bottom: var(--space-3); }
.done-summary h3 { font-family: var(--mono); font-size: 10px; font-weight: 600; color: var(--dimmer); margin-bottom: var(--space-2); text-transform: uppercase; letter-spacing: 0.06em; }
.done-summary .row { display: flex; justify-content: space-between; gap: var(--space-3); padding: 6px 0; border-bottom: 1px solid var(--line); font-size: var(--text-sm); }
.done-summary .row:last-child { border-bottom: none; }
.done-warning { background: var(--amber-soft); border: 1px solid rgba(245,184,0,0.25); border-radius: var(--r-sm); padding: var(--space-3); margin-bottom: var(--space-3); }
.done-warning h3 { color: var(--amber); margin-bottom: var(--space-2); font-family: var(--mono); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.done-warning p { color: var(--dim); font-size: var(--text-sm); margin-bottom: var(--space-2); line-height: var(--leading-relaxed); }
.done-warning pre { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--space-2); font-family: var(--mono); font-size: var(--text-xs); color: var(--ink); overflow-x: auto; margin: var(--space-2) 0; }
.done-warning .opt { color: var(--dimmer); font-style: italic; }
.done-actions { text-align: center; margin: var(--space-5) 0; }
.done-actions button { padding: 10px 24px; font-family: var(--sans); font-size: var(--text-md); font-weight: 600; border-radius: var(--r-sm); background: var(--accent); color: var(--bg); border: none; cursor: pointer; transition: all var(--t-fast); }
.done-actions button:hover { background: var(--accent-3); }

/* JS false-positive classes (no-op) */
.cls, .pnlClass, .tagClass { }
.if, .else, .endif, .open, .for, .endfor, .set, .block, .endblock { all: unset; }

/* Sidebar bottom margin fix */
.pm-sidebar .pm-sidebar-inner { flex: 1; padding: var(--space-3) var(--space-2); overflow-y: auto; min-height: 0; }

/* Light theme refinements */
[data-theme="light"] .aurora-blob.violet { background: rgba(245, 184, 0, 0.10); }
[data-theme="light"] .aurora-blob.cyan   { background: rgba(20, 184, 166, 0.08); }
[data-theme="light"] .aurora-blob.rose   { background: rgba(246, 92, 92, 0.06); }

/* Focus rings — WCAG */
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: var(--r-sm); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--panel-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .fx-app, .premium-app, .ent-app, .app-shell, .dz-shell {
    grid-template-columns: 1fr !important;
    grid-template-areas: "header" "main" !important;
  }
  .fx-sidebar, .pm-sidebar, .sidebar, .dz-sidebar {
    position: fixed; top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh; height: 100dvh;
    transform: translateX(-100%);
    transition: transform var(--t-base);
    z-index: var(--z-overlay);
    box-shadow: var(--shadow-2);
  }
  .fx-app.sb-open .fx-sidebar, .premium-app.sb-open .pm-sidebar,
  .premium-app.sb-open .sidebar, .ent-app.sb-open .pm-sidebar,
  .ent-app.sb-open .sidebar, .dz-shell.sidebar-open .dz-sidebar {
    transform: translateX(0);
  }
  .fx-app.sb-open::before, .premium-app.sb-open::before, .ent-app.sb-open::before {
    content: '';
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    z-index: var(--z-sidebar);
    pointer-events: none;
    animation: fadeIn 0.15s var(--ease-out);
  }
  .fx-main, .pm-main, .main-content, .dz-content { width: 100%; max-width: 100%; padding: var(--space-3); }
  .fx-header .sb-toggle, .pm-header .sb-toggle { display: grid !important; }
  .fx-header .search, .pm-header .search { display: none; }
  .fx-footer .inner, .pm-footer .inner, .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1025px) {
  .fx-header .sb-toggle, .pm-header .sb-toggle { display: none !important; }
}
@media (max-width: 768px) {
  .fx-main, .pm-main, .main-content { padding: var(--space-3); width: 100%; }
  .fx-grid.cols-2, .fx-grid.cols-3, .fx-grid.cols-4, .fx-grid.cols-5,
  .pm-grid.cols-2, .pm-grid.cols-3, .pm-grid.cols-4, .pm-grid.cols-5,
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .grid.cols-5 { grid-template-columns: 1fr; }
  .fx-kpi-grid, .pm-kpi-grid, .kpi-grid, .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .fx-header, .pm-header { padding: 0 var(--space-3) !important; gap: var(--space-2) !important; }
  .fx-header .search, .pm-header .search { display: none; }
  .fx-header .market-pill, .pm-header .market-pill { display: none; }
  .fx-page-header, .pm-page-header, .page-header { flex-direction: column; }
  .fx-page-header h1, .pm-page-header h1 { font-size: var(--text-lg) !important; }
  .fx-hero h1, .pm-hero h1, .hero h1 { font-size: var(--text-2xl) !important; }
  .fx-hero, .pm-hero, .hero { padding: var(--space-6) var(--space-3) !important; }
  .fx-section h2, .pm-section h2, .section h2 { font-size: var(--text-lg) !important; }
  .fx-section, .pm-section, .section { padding: var(--space-5) var(--space-3) !important; }
  .fx-footer .inner, .pm-footer .inner, .footer-inner { grid-template-columns: 1fr 1fr !important; gap: var(--space-4) var(--space-5) !important; }
  .fx-footer .footer-brand-col, .pm-footer .footer-brand-col { grid-column: 1 / -1; }
  .fx-footer, .pm-footer, .site-footer { padding: var(--space-5) var(--space-3) !important; }
  .fx-page-header .breadcrumb, .pm-page-header .breadcrumb { display: none; }
  .fx-tabs, .pm-tabs, .tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .fx-tab, .pm-tab, .tab { white-space: nowrap; flex-shrink: 0; }
}
@media (max-width: 480px) {
  .fx-kpi-grid, .pm-kpi-grid, .kpi-grid, .stats-grid { grid-template-columns: 1fr; }
  .fx-header .user-chip .name, .pm-header .user-chip .name { display: none; }
  .fx-header .user-chip, .pm-header .user-chip { padding: 3px; }
  .fx-header .icon-btn, .pm-header .icon-btn { width: 28px; height: 28px; }
  .fx-card, .pm-card { padding: var(--space-3) !important; }
  .fx-kpi, .pm-kpi { padding: var(--space-3) !important; min-height: 72px; }
  .fx-kpi .value, .pm-kpi .value { font-size: var(--text-md) !important; }
  .fx-btn, .pm-btn, .btn { padding: 6px 10px; font-size: var(--text-xs); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}


/* ═══════════════════════════════════════════════════════════════════════
   FLUX v1.1 — LIVE TICKER MARQUEE
   Horizontal scrolling ticker bar. Track duplicates content for seamless
   infinite scroll. Pauses on hover. Disabled under prefers-reduced-motion.
   ═══════════════════════════════════════════════════════════════════════ */
.fx-ticker-bar {
  display: flex; align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: var(--space-4);
  overflow: hidden;
  height: 40px;
}
.fx-ticker-label {
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px;
  height: 100%;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  flex-shrink: 0;
}
.fx-ticker-live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--up);
  animation: pulse-dot 2s infinite;
}
.fx-ticker-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  /* Subtle left/right fade so items appear/disappear smoothly */
  mask-image: linear-gradient(90deg, transparent 0%, black 4%, black 96%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 4%, black 96%, transparent 100%);
}
.fx-ticker-track {
  display: flex; align-items: center;
  gap: var(--space-4);
  height: 100%;
  padding: 0 var(--space-4);
  white-space: nowrap;
  animation: fx-ticker-scroll 60s linear infinite;
  width: max-content;
}
.fx-ticker-bar:hover .fx-ticker-track {
  animation-play-state: paused;
}
@keyframes fx-ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.fx-ticker-track .tk-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-sm);
  white-space: nowrap;
  flex-shrink: 0;
}
.fx-ticker-track .tk-sym { color: var(--dim); font-weight: 600; }
.fx-ticker-track .tk-px  { color: var(--ink); font-weight: 700; }
.fx-ticker-track .tk-chg-up { color: var(--up); font-weight: 600; font-size: 10px; }
.fx-ticker-track .tk-chg-dn { color: var(--down); font-weight: 600; font-size: 10px; }

@media (prefers-reduced-motion: reduce) {
  .fx-ticker-track { animation: none; }
  .fx-ticker-viewport { overflow-x: auto; }
}

@media (max-width: 768px) {
  .fx-ticker-bar { height: 36px; }
  .fx-ticker-label { padding: 0 10px; font-size: 9px; }
  .fx-ticker-track .tk-item { font-size: 11px; padding: 3px 8px; }
}


/* ═══════════════════════════════════════════════════════════════════════
   LIQUID OBSIDIAN v2 — PRIVACY MODAL + GLASS SURFACES
   ═══════════════════════════════════════════════════════════════════════ */

/* Privacy modal — proper popup, not fixed banner */
.privacy-modal {
  max-width: 480px;
  width: 90%;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-brd);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  padding: 0;
  overflow: hidden;
  position: relative;
  animation: privacyModalIn 0.3s var(--ease-spring);
}
.privacy-modal::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--aurora-ribbon);
  background-size: 200% 100%;
  animation: aurora-flow 8s ease-in-out infinite;
}
@keyframes privacyModalIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.privacy-modal-header {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-5) var(--space-5) var(--space-3);
  border-bottom: 1px solid var(--glass-brd);
}
.privacy-modal-icon {
  font-size: 28px;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border-radius: var(--r-md);
  flex-shrink: 0;
}
.privacy-modal-header h3 {
  font-family: var(--display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}
.privacy-modal-sub {
  font-size: var(--text-sm);
  color: var(--dim);
}
.privacy-modal-close {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--dim);
  font-size: 20px;
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
  margin-left: auto;
}
.privacy-modal-close:hover {
  background: var(--panel-3);
  color: var(--ink);
}
.privacy-modal-body {
  padding: var(--space-4) var(--space-5);
}
.privacy-modal-body p {
  font-size: var(--text-base);
  color: var(--dim);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-3);
}
.privacy-modal-body p strong { color: var(--ink); }
.privacy-modal-links {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3);
  background: var(--panel-2);
  border-radius: var(--r-md);
  border: 1px solid var(--glass-brd);
}
.privacy-modal-link {
  font-size: var(--text-sm);
  color: var(--accent);
  text-decoration: none;
  transition: color var(--t-fast);
}
.privacy-modal-link:hover { color: var(--accent-3); }
.privacy-modal-actions {
  display: flex; gap: var(--space-2);
  justify-content: flex-end;
  padding: var(--space-3) var(--space-5) var(--space-5);
  border-top: 1px solid var(--glass-brd);
}
.privacy-modal-actions .pm-btn {
  padding: 10px 20px;
  font-size: var(--text-base);
  min-width: 100px;
}

/* Glass surface overrides — Liquid Obsidian uses real glass */
.fx-card, .pm-card, .card, .glass-card, .premium-card, .panel {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-brd) !important;
}
.fx-kpi, .pm-kpi, .kpi, .stat-card, .premium-kpi, .stat {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-brd) !important;
}
.fx-sidebar, .pm-sidebar, .sidebar, .dz-sidebar {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(var(--glass-blur)) !important;
  -webkit-backdrop-filter: blur(var(--glass-blur)) !important;
  border-right: 1px solid var(--glass-brd) !important;
}
.fx-header, .pm-header, .topbar, .dz-topbar, .site-header {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(var(--glass-blur)) !important;
  -webkit-backdrop-filter: blur(var(--glass-blur)) !important;
  border-bottom: 1px solid var(--glass-brd) !important;
}

/* Aurora seam under header — the signature element */
.fx-header::after, .pm-header::after, .topbar::after {
  background: var(--aurora-ribbon) !important;
  background-size: 200% 100% !important;
  animation: aurora-flow 10s ease-in-out infinite !important;
  height: 2px !important;
  opacity: 0.6 !important;
}
@keyframes aurora-flow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Brand mark — aurora gradient */
.fx-header .brand .mark {
  background: var(--grad-1) !important;
  color: #fff !important;
}
.fx-header .brand .mark::after {
  background: var(--aurora-c) !important;
}

/* Active nav item — aurora left bar */
.fx-sidebar .nav-item.active::before, .pm-sidebar .nav-item.active::before,
.sidebar .sb-link.active::before {
  background: var(--grad-1) !important;
  width: 3px !important;
}

/* Aurora blobs visible */
.aurora-blob.violet { background: rgba(110, 86, 247, 0.3) !important; opacity: 0.6 !important; animation: aurora-drift 20s ease-in-out infinite; }
.aurora-blob.cyan   { background: rgba(34, 211, 238, 0.25) !important; opacity: 0.5 !important; animation: aurora-drift 20s ease-in-out infinite; }
.aurora-blob.rose   { background: rgba(246, 92, 154, 0.2) !important; opacity: 0.4 !important; animation: aurora-drift 25s ease-in-out infinite; }
@keyframes aurora-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -20px) scale(1.1); }
  66%      { transform: translate(-20px, 20px) scale(0.95); }
}

/* Particle background — visible aurora mesh */
.fx-mesh {
  background:
    radial-gradient(ellipse 800px 500px at 15% -5%, rgba(110, 86, 247, 0.08), transparent 60%),
    radial-gradient(ellipse 700px 400px at 85% 105%, rgba(34, 211, 238, 0.06), transparent 60%),
    radial-gradient(ellipse 600px 400px at 50% 50%, rgba(246, 92, 154, 0.03), transparent 70%) !important;
}

/* Hero headline — aurora gradient text option */
.fx-hero h1 .accent, .pm-hero h1 .accent {
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Primary buttons — aurora gradient */
.fx-btn.primary, .pm-btn.primary, .btn-primary, .btn-glow {
  background: var(--grad-1) !important;
  color: #fff !important;
  border: none !important;
}
.fx-btn.primary:hover, .pm-btn.primary:hover, .btn-primary:hover, .btn-glow:hover {
  box-shadow: 0 8px 24px rgba(110, 86, 247, 0.4) !important;
  transform: translateY(-1px);
}

/* Auth card — aurora seam on top */
.auth-card::before {
  background: var(--aurora-ribbon) !important;
  background-size: 200% 100% !important;
  animation: aurora-flow 8s ease-in-out infinite !important;
  height: 3px !important;
}

/* KPI value accent colours */
.fx-kpi .value.primary, .pm-kpi .value.primary, .kpi-value.primary { color: var(--accent) !important; }
.fx-kpi .value.accent, .pm-kpi .value.accent, .kpi-value.accent { color: var(--cyan) !important; }
.fx-kpi .value.up, .kpi-value.up { color: var(--up) !important; }
.fx-kpi .value.down, .kpi-value.down { color: var(--down) !important; }

/* Light theme — soften glass */
[data-theme="light"] .aurora-blob.violet { background: rgba(110, 86, 247, 0.15) !important; }
[data-theme="light"] .aurora-blob.cyan   { background: rgba(34, 211, 238, 0.12) !important; }
[data-theme="light"] .fx-mesh { opacity: 0.5; }

/* ═════════════════════════════════════════════════════════════════
   v8.7.1 — RESPONSIVE FOOTER: 2-column layout on mobile/tablet
   ═════════════════════════════════════════════════════════════════ */

/* Tablet & mobile: 2-column grid for footer link groups */
@media (max-width: 900px) {
    .fx-footer .inner,
    .pm-footer .inner,
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-5) var(--space-6);
    }
    /* Brand column spans full width on top */
    .fx-footer .footer-brand-col,
    .pm-footer .footer-brand-col {
        grid-column: 1 / -1;
    }
}

/* Very small screens: still 2 columns but tighter spacing */
@media (max-width: 480px) {
    .fx-footer .inner,
    .pm-footer .inner,
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-4) var(--space-4);
    }
    .fx-footer .footer-brand-col,
    .pm-footer .footer-brand-col {
        grid-column: 1 / -1;
        margin-bottom: var(--space-3);
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   v110 PREMIUM — 3D DEPTH + GLASS COMPONENT SYSTEM
   ═══════════════════════════════════════════════════════════════════════
   Adds (additive — does NOT override existing .fx-card/.pm-card above):
     1. 3D card depth + perspective hover      → .fx-card-3d / .pm-card-3d
     2. Deep glass panels                     → .fx-glass-panel / .pm-glass-panel
     3. Staggered entrance animation          → .fx-enter / .pm-enter + .stagger-N
     4. Soft glow on active nav items         → .fx-nav-glow / .pm-nav-glow
     5. Smooth metric number transitions      → .fx-metric-value / .pm-metric-value
     6. Premium metric card                   → .fx-metric-card / .pm-metric-card
     7. Premium signal card                  → .fx-signal-card / .pm-signal-card
     8. Skeleton loaders (card/row/cell)      → .fx-skeleton-card / .fx-skeleton-row / .fx-skeleton-cell
     9. Empty state (icon+title+sub+action)   → .fx-empty-state / .pm-empty-state
     10. Error state (icon+msg+retry)         → .fx-error-state / .pm-error-state
     11. Premium data table (sticky + tabs)   → .fx-table-premium / .pm-table-premium
     12. Premium badge/pill variants          → .fx-badge / .pm-badge + .success/.warning/.danger/.info/.neutral
     13. Premium tab system (seam underline)  → .fx-tabs-premium / .pm-tabs-premium
     14. Premium dropdown/select              → .fx-select-premium / .pm-select-premium
     15. Premium modal/dialog                 → .fx-modal-premium / .pm-modal-premium
     16. Premium toast (progress + auto-hide)  → .fx-toast-premium / .pm-toast-premium
     17. Responsive: sidebar/table transform  → @media (max-width:1024px) / (max-width:768px)
   All animations are GPU-safe (transform/opacity only).
   Tokens come from tokens.css — no new custom properties introduced.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 1. 3D CARD DEPTH — layered shadows + subtle perspective tilt on hover ── */
.fx-card-3d, .pm-card-3d {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-brd);
  border-radius: var(--r-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 8px 24px rgba(0, 0, 0, 0.45),
    0 24px 56px rgba(0, 0, 0, 0.35);
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease-out),
              box-shadow 0.4s var(--ease-out),
              border-color 0.3s var(--ease-out);
  will-change: transform;
}
/* Layered highlight strip at top edge (the "machined alloy" lip) */
.fx-card-3d::before, .pm-card-3d::before {
  content: '';
  position: absolute;
  top: 0; left: var(--space-3); right: var(--space-3);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-highlight) 30%, var(--glass-highlight) 70%, transparent);
  pointer-events: none;
  border-radius: var(--r-full);
}
/* Subtle lift + tilt + accent glow on hover */
.fx-card-3d:hover, .pm-card-3d:hover {
  transform: perspective(900px) rotateX(2deg) translateY(-4px);
  border-color: var(--accent-soft);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 2px 4px rgba(0, 0, 0, 0.4),
    0 16px 40px rgba(0, 0, 0, 0.55),
    0 32px 80px rgba(0, 0, 0, 0.4),
    0 0 0 1px var(--accent-soft),
    0 8px 32px rgba(198, 242, 78, 0.08);
}
/* Variants — accent-tinted depth */
.fx-card-3d.accent, .pm-card-3d.accent {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 8px 24px rgba(0, 0, 0, 0.45),
    0 24px 56px rgba(0, 0, 0, 0.35),
    0 0 0 1px var(--accent-soft),
    0 8px 40px rgba(198, 242, 78, 0.12);
}
.fx-card-3d.up, .pm-card-3d.up {
  border-color: var(--up-soft);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 8px 24px rgba(0, 0, 0, 0.45),
    0 0 0 1px var(--up-soft),
    0 8px 40px rgba(52, 211, 153, 0.12);
}
.fx-card-3d.down, .pm-card-3d.down {
  border-color: var(--down-soft);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 8px 24px rgba(0, 0, 0, 0.45),
    0 0 0 1px var(--down-soft),
    0 8px 40px rgba(248, 113, 113, 0.12);
}

/* ── 2. DEEP GLASS PANELS — heavier backdrop blur for premium surfaces ── */
.fx-glass-panel, .pm-glass-panel {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(calc(var(--glass-blur) * 1.5)) saturate(140%);
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) * 1.5)) saturate(140%);
  border: 1px solid var(--glass-brd);
  border-radius: var(--r-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-premium);
  position: relative;
  overflow: hidden;
}
/* Frosted top edge — captures the seam glow */
.fx-glass-panel::before, .pm-glass-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--seam);
  opacity: 0.4;
  pointer-events: none;
}
.fx-glass-panel.flush, .pm-glass-panel.flush { padding: 0; }
.fx-glass-panel.flush > .head, .pm-glass-panel.flush > .head,
.fx-glass-panel.flush > .body, .pm-glass-panel.flush > .body {
  padding: var(--space-5) var(--space-6);
}

/* ── 3. STAGGERED ENTRANCE — fade-in + upward translate, N-item stagger ── */
.fx-enter, .pm-enter {
  opacity: 0;
  transform: translateY(16px);
  animation: fxEnter 0.5s var(--ease-out) forwards;
  will-change: opacity, transform;
}
.fx-enter.stagger-1, .pm-enter.stagger-1 { animation-delay: 0.04s; }
.fx-enter.stagger-2, .pm-enter.stagger-2 { animation-delay: 0.08s; }
.fx-enter.stagger-3, .pm-enter.stagger-3 { animation-delay: 0.12s; }
.fx-enter.stagger-4, .pm-enter.stagger-4 { animation-delay: 0.16s; }
.fx-enter.stagger-5, .pm-enter.stagger-5 { animation-delay: 0.20s; }
.fx-enter.stagger-6, .pm-enter.stagger-6 { animation-delay: 0.24s; }
.fx-enter.stagger-7, .pm-enter.stagger-7 { animation-delay: 0.28s; }
.fx-enter.stagger-8, .pm-enter.stagger-8 { animation-delay: 0.32s; }
.fx-enter.stagger-9, .pm-enter.stagger-9 { animation-delay: 0.36s; }
.fx-enter.stagger-10, .pm-enter.stagger-10 { animation-delay: 0.40s; }
.fx-enter.stagger-11, .pm-enter.stagger-11 { animation-delay: 0.44s; }
.fx-enter.stagger-12, .pm-enter.stagger-12 { animation-delay: 0.48s; }
@keyframes fxEnter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 4. SOFT GLOW ON ACTIVE NAV ITEMS — extends .nav-item.active ── */
.fx-nav-glow, .pm-nav-glow {
  position: relative;
  transition: background var(--t-fast), color var(--t-fast);
}
.fx-nav-glow:hover, .pm-nav-glow:hover {
  background: var(--accent-soft);
  color: var(--ink);
}
.fx-nav-glow.active, .pm-nav-glow.active {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: 0 0 24px rgba(198, 242, 78, 0.18) inset;
}
/* Soft outer halo on the active item (radial glow, GPU-safe) */
.fx-nav-glow.active::after, .pm-nav-glow.active::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 1px var(--accent-soft), 0 0 32px rgba(198, 242, 78, 0.18);
  opacity: 0.9;
  pointer-events: none;
  transition: opacity var(--t-base);
}

/* ── 5. SMOOTH METRIC NUMBER TRANSITIONS — color + transform only ── */
.fx-metric-value, .pm-metric-value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-weight: var(--font-bold);
  letter-spacing: var(--tracking-tight);
  display: inline-block;
  transition: color 0.4s var(--ease-out), transform 0.4s var(--ease-spring);
  will-change: color, transform;
}
.fx-metric-value.flash-up, .pm-metric-value.flash-up {
  color: var(--up);
  animation: fxMetricUp 0.7s var(--ease-out);
}
.fx-metric-value.flash-down, .pm-metric-value.flash-down {
  color: var(--down);
  animation: fxMetricDown 0.7s var(--ease-out);
}
@keyframes fxMetricUp   { 0% { color: var(--up); transform: translateY(-2px); } 100% { color: inherit; transform: translateY(0); } }
@keyframes fxMetricDown { 0% { color: var(--down); transform: translateY(2px); }  100% { color: inherit; transform: translateY(0); } }

/* ── 6. PREMIUM METRIC CARD — large number + label + trend + glow ── */
.fx-metric-card, .pm-metric-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-brd);
  border-radius: var(--r-lg);
  padding: var(--space-5) var(--space-5) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  overflow: hidden;
  transition: border-color var(--t-fast), transform var(--t-base), box-shadow var(--t-base);
  box-shadow: var(--shadow-1);
}
/* Radial accent glow in the top-right (decorative, GPU-safe) */
.fx-metric-card::after, .pm-metric-card::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-slow);
}
.fx-metric-card:hover, .pm-metric-card:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-premium);
}
.fx-metric-card:hover::after, .pm-metric-card:hover::after { opacity: 1; }
.fx-metric-card .label, .pm-metric-card .label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dimmer);
}
.fx-metric-card .value, .pm-metric-card .value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--ink-strong);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
}
.fx-metric-card .value.sm, .pm-metric-card .value.sm { font-size: var(--text-xl); }
.fx-metric-card .value.lg, .pm-metric-card .value.lg { font-size: var(--text-3xl); }
.fx-metric-card .value.up, .pm-metric-card .value.up   { color: var(--up); }
.fx-metric-card .value.down, .pm-metric-card .value.down { color: var(--down); }
.fx-metric-card .value.accent, .pm-metric-card .value.accent { color: var(--accent); }
.fx-metric-card .trend, .pm-metric-card .trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.fx-metric-card .trend.up, .pm-metric-card .trend.up    { color: var(--up); }
.fx-metric-card .trend.down, .pm-metric-card .trend.down { color: var(--down); }
.fx-metric-card .trend.flat, .pm-metric-card .trend.flat { color: var(--dimmer); }
.fx-metric-card .spark, .pm-metric-card .spark {
  height: 28px;
  margin-top: var(--space-1);
  opacity: 0.85;
}

/* ── 7. PREMIUM SIGNAL CARD — direction + confidence + strategy + regime ── */
.fx-signal-card, .pm-signal-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-brd);
  border-radius: var(--r-lg);
  padding: var(--space-5);
  overflow: hidden;
  transition: border-color var(--t-fast), transform var(--t-base), box-shadow var(--t-base);
  box-shadow: var(--shadow-1);
}
.fx-signal-card:hover, .pm-signal-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-premium);
}
/* Direction tinted border */
.fx-signal-card.buy, .pm-signal-card.buy  { border-left: 3px solid var(--up); }
.fx-signal-card.sell, .pm-signal-card.sell { border-left: 3px solid var(--down); }
.fx-signal-card.neutral, .pm-signal-card.neutral { border-left: 3px solid var(--dimmer); }
.fx-signal-card .head, .pm-signal-card .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.fx-signal-card .pair, .pm-signal-card .pair {
  font-family: var(--display);
  font-size: var(--text-md);
  font-weight: var(--font-bold);
  color: var(--ink-strong);
  letter-spacing: var(--tracking-tight);
}
.fx-signal-card .direction, .pm-signal-card .direction {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid transparent;
}
.fx-signal-card .direction.buy, .pm-signal-card .direction.buy {
  background: var(--up-soft);
  color: var(--up);
  border-color: rgba(52, 211, 153, 0.3);
}
.fx-signal-card .direction.sell, .pm-signal-card .direction.sell {
  background: var(--down-soft);
  color: var(--down);
  border-color: rgba(248, 113, 113, 0.3);
}
.fx-signal-card .direction.neutral, .pm-signal-card .direction.neutral {
  background: var(--panel-3);
  color: var(--dim);
}
.fx-signal-card .strategy, .pm-signal-card .strategy {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--dim);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fx-signal-card .regime, .pm-signal-card .regime {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--panel-3);
  color: var(--dim);
  border: 1px solid var(--line);
}
.fx-signal-card .confidence, .pm-signal-card .confidence {
  margin-top: var(--space-3);
}
.fx-signal-card .confidence .label, .pm-signal-card .confidence .label {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--dimmer);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.fx-signal-card .confidence .label .pct, .pm-signal-card .confidence .label .pct {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.fx-signal-card .confidence .bar, .pm-signal-card .confidence .bar {
  height: 6px;
  border-radius: var(--r-full);
  background: var(--panel-3);
  overflow: hidden;
  position: relative;
}
.fx-signal-card .confidence .fill, .pm-signal-card .confidence .fill {
  height: 100%;
  border-radius: inherit;
  background: var(--seam);
  transition: width 0.6s var(--ease-out);
  width: 0;
}
.fx-signal-card .footer, .pm-signal-card .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--dimmer);
}
.fx-signal-card .footer .time, .pm-signal-card .footer .time { font-variant-numeric: tabular-nums; }

/* ── 8. SKELETON LOADING — card / row / cell placeholders with shimmer ── */
.fx-skeleton-card, .pm-skeleton-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--space-5);
  overflow: hidden;
  position: relative;
}
.fx-skeleton-card::after, .pm-skeleton-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 20%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 80%,
    transparent 100%);
  background-size: 200% 100%;
  animation: fxShimmer 1.6s linear infinite;
  pointer-events: none;
}
.fx-skeleton-card .sk-line, .pm-skeleton-card .sk-line {
  height: 12px;
  border-radius: var(--r-sm);
  background: var(--panel-3);
  margin-bottom: var(--space-2);
}
.fx-skeleton-card .sk-line.w-100, .pm-skeleton-card .sk-line.w-100 { width: 100%; }
.fx-skeleton-card .sk-line.w-75, .pm-skeleton-card .sk-line.w-75  { width: 75%; }
.fx-skeleton-card .sk-line.w-50, .pm-skeleton-card .sk-line.w-50  { width: 50%; }
.fx-skeleton-card .sk-line.w-25, .pm-skeleton-card .sk-line.w-25  { width: 25%; }
.fx-skeleton-card .sk-line.h-lg, .pm-skeleton-card .sk-line.h-lg  { height: 28px; margin-top: var(--space-2); }
.fx-skeleton-card .sk-block, .pm-skeleton-card .sk-block {
  height: 60px;
  border-radius: var(--r-sm);
  background: var(--panel-3);
  margin: var(--space-3) 0;
}
.fx-skeleton-row, .pm-skeleton-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: var(--space-3);
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.fx-skeleton-row::after, .pm-skeleton-row::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 50%,
    transparent 100%);
  background-size: 200% 100%;
  animation: fxShimmer 1.6s linear infinite;
  pointer-events: none;
}
.fx-skeleton-cell, .pm-skeleton-cell {
  height: 12px;
  border-radius: var(--r-sm);
  background: var(--panel-3);
}
.fx-skeleton-cell.w-100, .pm-skeleton-cell.w-100 { width: 100%; }
.fx-skeleton-cell.w-75, .pm-skeleton-cell.w-75  { width: 75%; }
.fx-skeleton-cell.w-50, .pm-skeleton-cell.w-50  { width: 50%; }
@keyframes fxShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── 9. EMPTY STATE — icon + title + subtitle + optional action ── */
.fx-empty-state, .pm-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-12) var(--space-5);
  gap: var(--space-3);
}
.fx-empty-state .icon, .pm-empty-state .icon {
  width: 64px;
  height: 64px;
  border-radius: var(--r-full);
  background: var(--panel-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 28px;
  color: var(--dim);
  margin-bottom: var(--space-2);
}
.fx-empty-state .title, .pm-empty-state .title {
  font-family: var(--display);
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--ink);
  letter-spacing: var(--tracking-tight);
}
.fx-empty-state .subtitle, .pm-empty-state .subtitle {
  font-size: var(--text-sm);
  color: var(--dim);
  line-height: var(--leading-relaxed);
  max-width: 420px;
}
.fx-empty-state .actions, .pm-empty-state .actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

/* ── 10. ERROR STATE — icon + message + retry ── */
.fx-error-state, .pm-error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-12) var(--space-5);
  gap: var(--space-3);
}
.fx-error-state .icon, .pm-error-state .icon {
  width: 64px;
  height: 64px;
  border-radius: var(--r-full);
  background: var(--down-soft);
  border: 1px solid rgba(248, 113, 113, 0.25);
  display: grid;
  place-items: center;
  font-size: 28px;
  color: var(--down);
  margin-bottom: var(--space-2);
}
.fx-error-state .title, .pm-error-state .title {
  font-family: var(--display);
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--ink);
  letter-spacing: var(--tracking-tight);
}
.fx-error-state .message, .pm-error-state .message {
  font-size: var(--text-sm);
  color: var(--dim);
  line-height: var(--leading-relaxed);
  max-width: 520px;
  font-family: var(--mono);
}
.fx-error-state .actions, .pm-error-state .actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

/* ── 11. PREMIUM DATA TABLE — sticky header, tabular nums, row highlight ── */
.fx-table-premium, .pm-table-premium {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--text-sm);
  background: transparent;
  border: 1px solid var(--glass-brd);
  border-radius: var(--r-md);
  overflow: hidden;
}
.fx-table-premium thead th, .pm-table-premium thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dimmer);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
.fx-table-premium thead th.num, .pm-table-premium thead th.num { text-align: right; }
.fx-table-premium td, .pm-table-premium td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
}
.fx-table-premium td.num, .pm-table-premium td.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  text-align: right;
  letter-spacing: 0;
}
.fx-table-premium tbody tr:last-child td, .pm-table-premium tbody tr:last-child td { border-bottom: none; }
.fx-table-premium tbody tr, .pm-table-premium tbody tr {
  transition: background var(--t-fast);
}
.fx-table-premium tbody tr:hover, .pm-table-premium tbody tr:hover {
  background: var(--accent-soft);
}
/* Optional zebra striping for dense tables */
.fx-table-premium.zebra tbody tr:nth-child(odd),
.pm-table-premium.zebra tbody tr:nth-child(odd) { background: rgba(255, 255, 255, 0.012); }
.fx-table-premium.zebra tbody tr:nth-child(odd):hover,
.pm-table-premium.zebra tbody tr:nth-child(odd):hover { background: var(--accent-soft); }
/* Scroll container with sticky headers */
.fx-table-scroll, .pm-table-scroll {
  max-height: 560px;
  overflow: auto;
  border: 1px solid var(--glass-brd);
  border-radius: var(--r-md);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

/* ── 12. PREMIUM BADGE/PILL SYSTEM — status variants ── */
.fx-badge, .pm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.2;
}
.fx-badge::before, .pm-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.fx-badge.success, .pm-badge.success { background: var(--up-soft); color: var(--up); border-color: rgba(52, 211, 153, 0.3); }
.fx-badge.warning, .pm-badge.warning { background: var(--amber-soft); color: var(--amber); border-color: rgba(251, 191, 36, 0.3); }
.fx-badge.danger, .pm-badge.danger  { background: var(--down-soft); color: var(--down); border-color: rgba(248, 113, 113, 0.3); }
.fx-badge.info, .pm-badge.info     { background: var(--blue-soft); color: var(--blue); border-color: rgba(96, 165, 250, 0.3); }
.fx-badge.neutral, .pm-badge.neutral { background: var(--panel-3); color: var(--dim); border-color: var(--line); }
.fx-badge.accent, .pm-badge.accent  { background: var(--accent-soft); color: var(--accent); border-color: rgba(198, 242, 78, 0.3); }
/* Live dot — pulsing accent dot for "live data" badges */
.fx-badge.live::before, .pm-badge.live::before {
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-soft);
  animation: fxLiveDot 1.6s ease-out infinite;
}
@keyframes fxLiveDot {
  0%   { box-shadow: 0 0 0 0 rgba(198, 242, 78, 0.6); }
  70%  { box-shadow: 0 0 0 6px rgba(198, 242, 78, 0); }
  100% { box-shadow: 0 0 0 0 rgba(198, 242, 78, 0); }
}
/* Outline variant (no fill, just colored border + text) */
.fx-badge.outline, .pm-badge.outline {
  background: transparent;
  border-color: currentColor;
}
.fx-badge.outline::before, .pm-badge.outline::before { display: none; }

/* ── 13. PREMIUM TAB SYSTEM — signal-seam underline indicator ── */
.fx-tabs-premium, .pm-tabs-premium {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-5);
  position: relative;
  overflow-x: auto;
  scrollbar-width: thin;
}
.fx-tabs-premium .fx-tab, .fx-tabs-premium .pm-tab,
.pm-tabs-premium .fx-tab, .pm-tabs-premium .pm-tab {
  position: relative;
  padding: 10px 18px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--t-fast);
}
.fx-tabs-premium .fx-tab:hover, .fx-tabs-premium .pm-tab:hover,
.pm-tabs-premium .fx-tab:hover, .pm-tabs-premium .pm-tab:hover { color: var(--ink); }
/* The signal-seam underline indicator */
.fx-tabs-premium .fx-tab::after, .fx-tabs-premium .pm-tab::after,
.pm-tabs-premium .fx-tab::after, .pm-tabs-premium .pm-tab::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 12px; right: 12px;
  height: 2px;
  background: var(--seam);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--t-base);
  border-radius: var(--r-full);
}
.fx-tabs-premium .fx-tab.active, .fx-tabs-premium .pm-tab.active,
.pm-tabs-premium .fx-tab.active, .pm-tabs-premium .pm-tab.active {
  color: var(--accent);
}
.fx-tabs-premium .fx-tab.active::after, .fx-tabs-premium .pm-tab.active::after,
.pm-tabs-premium .fx-tab.active::after, .pm-tabs-premium .pm-tab.active::after {
  transform: scaleX(1);
}
/* Optional count badge on a tab */
.fx-tabs-premium .fx-tab .count, .fx-tabs-premium .pm-tab .count,
.pm-tabs-premium .fx-tab .count, .pm-tabs-premium .pm-tab .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 16px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: var(--r-full);
  background: var(--panel-3);
  color: var(--dim);
  font-size: 9px;
  font-weight: 700;
}
.fx-tabs-premium .fx-tab.active .count, .fx-tabs-premium .pm-tab.active .count,
.pm-tabs-premium .fx-tab.active .count, .pm-tabs-premium .pm-tab.active .count {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ── 14. PREMIUM DROPDOWN / SELECT — custom-styled native select + wrapper ── */
.fx-select-premium, .pm-select-premium {
  position: relative;
  display: inline-block;
}
.fx-select-premium select, .pm-select-premium select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-brd);
  border-radius: var(--r-sm);
  color: var(--ink);
  padding: 8px 36px 8px 12px;
  font-family: var(--sans);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.fx-select-premium select:hover, .pm-select-premium select:hover { border-color: var(--line-2); }
.fx-select-premium select:focus, .pm-select-premium select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.fx-select-premium::after, .pm-select-premium::after {
  content: '▾';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dimmer);
  font-size: 10px;
  pointer-events: none;
}
.fx-select-premium select option, .pm-select-premium select option {
  background: var(--bg-2);
  color: var(--ink);
  padding: 8px;
}
.fx-select-premium.sm select, .pm-select-premium.sm select {
  padding: 5px 30px 5px 10px;
  font-size: var(--text-xs);
}
.fx-select-premium.lg select, .pm-select-premium.lg select {
  padding: 11px 40px 11px 14px;
  font-size: var(--text-base);
}
.fx-select-premium.block, .pm-select-premium.block { display: block; width: 100%; }

/* ── 15. PREMIUM MODAL/DIALOG — glass backdrop + centered + animated ── */
.fx-modal-premium-bg, .pm-modal-premium-bg {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal-bg);
  background: var(--overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
}
.fx-modal-premium-bg.show, .pm-modal-premium-bg.show {
  opacity: 1;
  visibility: visible;
}
.fx-modal-premium, .pm-modal-premium {
  position: relative;
  z-index: var(--z-modal);
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 80px);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(calc(var(--glass-blur) * 1.5));
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) * 1.5));
  border: 1px solid var(--glass-brd);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition: opacity var(--t-slow), transform var(--t-slow);
}
.fx-modal-premium-bg.show .fx-modal-premium,
.fx-modal-premium-bg.show .pm-modal-premium,
.pm-modal-premium-bg.show .fx-modal-premium,
.pm-modal-premium-bg.show .pm-modal-premium {
  opacity: 1;
  transform: translateY(0) scale(1);
}
/* Signal seam accent at top of modal */
.fx-modal-premium::before, .pm-modal-premium::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--seam);
  opacity: 0.7;
  pointer-events: none;
}
.fx-modal-premium .head, .pm-modal-premium .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--line);
}
.fx-modal-premium .head .title, .pm-modal-premium .head .title {
  font-family: var(--display);
  font-size: var(--text-md);
  font-weight: var(--font-bold);
  color: var(--ink-strong);
  letter-spacing: var(--tracking-tight);
}
.fx-modal-premium .head .close, .pm-modal-premium .head .close {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  background: none;
  border: none;
  color: var(--dim);
  cursor: pointer;
  font-size: 18px;
  transition: background var(--t-fast), color var(--t-fast);
}
.fx-modal-premium .head .close:hover, .pm-modal-premium .head .close:hover {
  background: var(--panel-3);
  color: var(--ink);
}
.fx-modal-premium .body, .pm-modal-premium .body {
  padding: var(--space-5) var(--space-6);
  overflow-y: auto;
  flex: 1;
  color: var(--ink);
}
.fx-modal-premium .body p, .pm-modal-premium .body p {
  color: var(--dim);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-3);
}
.fx-modal-premium .actions, .pm-modal-premium .actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--line);
}
.fx-modal-premium.sm, .pm-modal-premium.sm { max-width: 420px; }
.fx-modal-premium.lg, .pm-modal-premium.lg { max-width: 720px; }
.fx-modal-premium.xl, .pm-modal-premium.xl { max-width: 920px; }

/* ── 16. PREMIUM TOAST — slide-in + auto-dismiss progress bar ── */
#pmToastContainer.fx-toast-premium-container,
#pmToastContainer.pm-toast-premium-container,
.fx-toast-premium-container,
.pm-toast-premium-container {
  position: fixed;
  top: calc(var(--header-height) + var(--space-2));
  right: var(--space-4);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
  max-width: 380px;
  width: calc(100% - 32px);
}
.fx-toast-premium, .pm-toast-premium {
  position: relative;
  pointer-events: auto;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(calc(var(--glass-blur) * 1.25));
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) * 1.25));
  border: 1px solid var(--glass-brd);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  padding: var(--space-3) var(--space-4) var(--space-4);
  box-shadow: var(--shadow-premium);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  overflow: hidden;
  opacity: 0;
  transform: translateX(120%);
  animation: fxToastIn 0.35s var(--ease-out) forwards;
}
.fx-toast-premium.success, .pm-toast-premium.success { border-left-color: var(--up); }
.fx-toast-premium.error, .pm-toast-premium.error   { border-left-color: var(--down); }
.fx-toast-premium.warning, .pm-toast-premium.warning { border-left-color: var(--amber); }
.fx-toast-premium.info, .pm-toast-premium.info     { border-left-color: var(--accent); }
.fx-toast-premium .icon, .pm-toast-premium .icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  font-size: 14px;
  border-radius: 50%;
}
.fx-toast-premium.success .icon, .pm-toast-premium.success .icon { color: var(--up); background: var(--up-soft); }
.fx-toast-premium.error .icon, .pm-toast-premium.error .icon   { color: var(--down); background: var(--down-soft); }
.fx-toast-premium.warning .icon, .pm-toast-premium.warning .icon { color: var(--amber); background: var(--amber-soft); }
.fx-toast-premium.info .icon, .pm-toast-premium.info .icon     { color: var(--accent); background: var(--accent-soft); }
.fx-toast-premium .body, .pm-toast-premium .body {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}
.fx-toast-premium .body .title, .pm-toast-premium .body .title {
  font-weight: var(--font-semibold);
  color: var(--ink-strong);
  margin-bottom: 2px;
}
.fx-toast-premium .close, .pm-toast-premium .close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--dimmer);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px;
  transition: color var(--t-fast);
}
.fx-toast-premium .close:hover, .pm-toast-premium .close:hover { color: var(--ink); }
/* Auto-dismiss progress bar — sits at bottom of toast, scales 1→0 over TTL */
.fx-toast-premium .progress, .pm-toast-premium .progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(1);
  opacity: 0.7;
}
.fx-toast-premium.success .progress, .pm-toast-premium.success .progress { background: var(--up); }
.fx-toast-premium.error .progress, .pm-toast-premium.error .progress   { background: var(--down); }
.fx-toast-premium.warning .progress, .pm-toast-premium.warning .progress { background: var(--amber); }
.fx-toast-premium.info .progress, .pm-toast-premium.info .progress     { background: var(--accent); }
.fx-toast-premium.auto .progress, .pm-toast-premium.auto .progress {
  animation: fxToastProgress 5s linear forwards;
}
.fx-toast-premium.leaving, .pm-toast-premium.leaving {
  animation: fxToastOut 0.3s var(--ease) forwards;
}
@keyframes fxToastIn {
  from { opacity: 0; transform: translateX(120%); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fxToastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(120%); }
}
@keyframes fxToastProgress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ── 17. RESPONSIVE — tablet sidebar collapse, mobile drawer, table card transform ── */

/* Tablet (≤1024px): collapse sidebar to icon-only rail */
@media (max-width: 1024px) {
  .fx-app, .premium-app, .ent-app, .app-shell {
    grid-template-columns: var(--sidebar-collapsed) 1fr;
  }
  /* Hide nav labels, center icons */
  .fx-sidebar .nav-item .label,
  .pm-sidebar .nav-item .label,
  .sidebar .sb-link .label {
    display: none;
  }
  /* Premium metric cards reduce padding on tablet */
  .fx-metric-card .value, .pm-metric-card .value { font-size: var(--text-xl); }
  .fx-metric-card .value.lg, .pm-metric-card .value.lg { font-size: var(--text-2xl); }
  /* Tables: switch to horizontal scroll inside card container */
  .fx-table-scroll, .pm-table-scroll { max-height: 480px; }
}

/* Mobile (≤768px): drawer-style sidebar (off-canvas) + table card-transform */
@media (max-width: 768px) {
  /* App shell: drop sidebar from grid — JS toggles .sb-open to slide it in */
  .fx-app, .premium-app, .ent-app, .app-shell {
    grid-template-columns: 1fr;
    grid-template-areas: "header" "main";
  }
  /* Sidebar becomes a fixed off-canvas drawer */
  .fx-sidebar, .pm-sidebar, .sidebar, .dz-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    max-width: 80vw;
    z-index: var(--z-sidebar);
    transform: translateX(-100%);
    transition: transform var(--t-base);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
  }
  .fx-app.sb-open .fx-sidebar,
  .fx-app.sb-open .pm-sidebar,
  .premium-app.sb-open .fx-sidebar,
  .premium-app.sb-open .pm-sidebar,
  .app-shell.sb-open .fx-sidebar,
  .app-shell.sb-open .pm-sidebar {
    transform: translateX(0);
  }
  /* Show nav labels again in drawer */
  .fx-sidebar .nav-item .label,
  .pm-sidebar .nav-item .label,
  .sidebar .sb-link .label {
    display: inline;
  }
  /* Premium metric cards become single-column stack */
  .fx-metric-card, .pm-metric-card {
    padding: var(--space-4);
  }
  .fx-metric-card .value, .pm-metric-card .value { font-size: var(--text-xl); }
  .fx-metric-card .value.lg, .pm-metric-card .value.lg { font-size: var(--text-2xl); }
  /* Signal cards tighten */
  .fx-signal-card, .pm-signal-card { padding: var(--space-4); }
  /* Glass panels reduce padding */
  .fx-glass-panel, .pm-glass-panel { padding: var(--space-4); border-radius: var(--r-lg); }
  .fx-modal-premium, .pm-modal-premium {
    max-width: 100%;
    margin: 0;
    border-radius: var(--r-lg);
  }
  .fx-modal-premium-bg, .pm-modal-premium-bg { padding: var(--space-3); }
  /* TABLE CARD-TRANSFORM — each row becomes a stacked card */
  .fx-table-premium.card-mobile,
  .pm-table-premium.card-mobile,
  .fx-table.card-mobile,
  .pm-table.card-mobile {
    border: none;
    background: transparent;
    border-radius: 0;
  }
  .fx-table-premium.card-mobile thead,
  .pm-table-premium.card-mobile thead,
  .fx-table.card-mobile thead,
  .pm-table.card-mobile thead {
    display: none;
  }
  .fx-table-premium.card-mobile tbody,
  .pm-table-premium.card-mobile tbody,
  .fx-table.card-mobile tbody,
  .pm-table.card-mobile tbody { display: flex; flex-direction: column; gap: var(--space-3); }
  .fx-table-premium.card-mobile tr,
  .pm-table-premium.card-mobile tr,
  .fx-table.card-mobile tr,
  .pm-table.card-mobile tr {
    display: flex;
    flex-wrap: wrap;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-brd);
    border-radius: var(--r-md);
    padding: var(--space-3);
  }
  .fx-table-premium.card-mobile td,
  .pm-table-premium.card-mobile td,
  .fx-table.card-mobile td,
  .pm-table.card-mobile td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 6px 0;
    border-bottom: 1px solid var(--line);
    font-size: var(--text-sm);
  }
  .fx-table-premium.card-mobile td:last-child,
  .pm-table-premium.card-mobile td:last-child,
  .fx-table.card-mobile td:last-child,
  .pm-table.card-mobile td:last-child { border-bottom: none; }
  /* Row label is supplied via data-label="Col Name" → ::before */
  .fx-table-premium.card-mobile td::before,
  .pm-table-premium.card-mobile td::before,
  .fx-table.card-mobile td::before,
  .pm-table.card-mobile td::before {
    content: attr(data-label);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--dimmer);
  }
  /* Toast container narrows further */
  .fx-toast-premium-container, .pm-toast-premium-container {
    left: var(--space-3);
    right: var(--space-3);
    max-width: none;
    width: auto;
  }
  /* Empty / error states tighten padding */
  .fx-empty-state, .pm-empty-state,
  .fx-error-state, .pm-error-state {
    padding: var(--space-8) var(--space-4);
  }
}

/* Very small screens (≤480px): tighten metric + table paddings */
@media (max-width: 480px) {
  .fx-metric-card, .pm-metric-card { padding: var(--space-3); }
  .fx-metric-card .value, .pm-metric-card .value { font-size: var(--text-lg); }
  .fx-metric-card .value.lg, .pm-metric-card .value.lg { font-size: var(--text-xl); }
  .fx-glass-panel, .pm-glass-panel { padding: var(--space-3); border-radius: var(--r-md); }
  .fx-card-3d, .pm-card-3d { padding: var(--space-4); border-radius: var(--r-md); }
  .fx-modal-premium .head, .fx-modal-premium .body, .fx-modal-premium .actions,
  .pm-modal-premium .head, .pm-modal-premium .body, .pm-modal-premium .actions {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

/* ── PREFERS-REDUCED-MOTION — disable all v110 animations ── */
@media (prefers-reduced-motion: reduce) {
  .fx-card-3d, .pm-card-3d,
  .fx-card-3d:hover, .pm-card-3d:hover,
  .fx-metric-card, .pm-metric-card,
  .fx-metric-card:hover, .pm-metric-card:hover,
  .fx-signal-card, .pm-signal-card,
  .fx-signal-card:hover, .pm-signal-card:hover,
  .fx-metric-value, .pm-metric-value,
  .fx-metric-value.flash-up, .pm-metric-value.flash-up,
  .fx-metric-value.flash-down, .pm-metric-value.flash-down,
  .fx-enter, .pm-enter,
  .fx-enter.stagger-1, .pm-enter.stagger-1,
  .fx-enter.stagger-2, .pm-enter.stagger-2,
  .fx-enter.stagger-3, .pm-enter.stagger-3,
  .fx-enter.stagger-4, .pm-enter.stagger-4,
  .fx-enter.stagger-5, .pm-enter.stagger-5,
  .fx-enter.stagger-6, .pm-enter.stagger-6,
  .fx-enter.stagger-7, .pm-enter.stagger-7,
  .fx-enter.stagger-8, .pm-enter.stagger-8,
  .fx-enter.stagger-9, .pm-enter.stagger-9,
  .fx-enter.stagger-10, .pm-enter.stagger-10,
  .fx-enter.stagger-11, .pm-enter.stagger-11,
  .fx-enter.stagger-12, .pm-enter.stagger-12,
  .fx-skeleton-card::after, .pm-skeleton-card::after,
  .fx-skeleton-row::after, .pm-skeleton-row::after,
  .fx-badge.live::before, .pm-badge.live::before,
  .fx-tabs-premium .fx-tab::after, .fx-tabs-premium .pm-tab::after,
  .pm-tabs-premium .fx-tab::after, .pm-tabs-premium .pm-tab::after,
  .fx-tabs-premium .fx-tab.active::after, .fx-tabs-premium .pm-tab.active::after,
  .pm-tabs-premium .fx-tab.active::after, .pm-tabs-premium .pm-tab.active::after,
  .fx-modal-premium-bg, .pm-modal-premium-bg,
  .fx-modal-premium, .pm-modal-premium,
  .fx-modal-premium-bg.show .fx-modal-premium,
  .fx-modal-premium-bg.show .pm-modal-premium,
  .pm-modal-premium-bg.show .fx-modal-premium,
  .pm-modal-premium-bg.show .pm-modal-premium,
  .fx-toast-premium, .pm-toast-premium,
  .fx-toast-premium.auto .progress, .pm-toast-premium.auto .progress,
  .fx-toast-premium.leaving, .pm-toast-premium.leaving,
  .fx-sidebar, .pm-sidebar, .sidebar, .dz-sidebar {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  /* Force-show entrance content (no fade) */
  .fx-enter, .pm-enter {
    opacity: 1 !important;
    transform: none !important;
  }
  /* Force-show toast (visible immediately, no slide) */
  .fx-toast-premium, .pm-toast-premium {
    opacity: 1 !important;
    transform: none !important;
  }
  /* Hide auto-dismiss progress bar (no animation, no point) */
  .fx-toast-premium.auto .progress, .pm-toast-premium.auto .progress { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   END v110 PREMIUM COMPONENT SYSTEM
   ═══════════════════════════════════════════════════════════════════════ */

