/* ═══════════════════════════════════════════════════════════════════════
   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; }
  .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; }
