/* ============================================================
   VOIDX PRIVATE OS — BASE LAYER
   Design tokens + reset + application shell + shared components.
   Merged from the VOIDX release-candidate design system so every
   private page has a single source of truth for tokens/components.
   Load order: base.css → style.css (preferences) → page css.
   ============================================================ */

/* ── Design Tokens (Dark — Default) ── */
:root {
  --vx-bg-primary: #09090b;
  --vx-bg-secondary: #0c0c10;
  --vx-bg-tertiary: #131318;
  --vx-bg-elevated: #18181f;
  --vx-surface: #1e1e26;
  --vx-surface-hover: #272730;
  --vx-border-subtle: rgba(255,255,255,0.045);
  --vx-border-default: rgba(255,255,255,0.08);
  --vx-border-strong: rgba(255,255,255,0.13);
  --vx-border-focus: rgba(107,159,168,0.55);
  --vx-text-primary: #f4f4f8;
  --vx-text-secondary: #a1a1ad;
  --vx-text-tertiary: #6e6e7c;
  --vx-text-muted: #4a4a56;
  --vx-text-inverse: #09090b;
  --vx-accent: #6b9fa8;
  --vx-accent-hover: #85b5bd;
  --vx-accent-muted: rgba(107,159,168,0.10);
  --vx-accent-glow: rgba(107,159,168,0.12);
  --vx-shadow-accent: 0 0 28px var(--vx-accent-glow);
  --vx-danger: #c45b5b;
  --vx-danger-muted: rgba(196,91,91,0.10);
  --vx-warning: #c4a35b;
  --vx-warning-muted: rgba(196,163,91,0.10);
  --vx-success: #5bc48a;
  --vx-success-muted: rgba(91,196,138,0.10);
  --vx-info: #5b8cc4;
  --vx-info-muted: rgba(91,140,196,0.10);
  --vx-void: #9b8ac4;
  --vx-void-muted: rgba(139,122,184,0.10);
  --vx-admin: #c49a6b;
  --vx-admin-muted: rgba(184,138,91,0.10);
  --vx-member: #6b9fa8;
  --vx-member-muted: rgba(107,159,168,0.10);
  --vx-shadow-subtle: 0 1px 2px rgba(0,0,0,0.30);
  --vx-shadow-medium: 0 4px 16px rgba(0,0,0,0.45);
  --vx-shadow-large: 0 12px 40px rgba(0,0,0,0.55);
  --vx-shadow-inset: inset 0 1px 0 var(--vx-border-subtle);

  --vx-font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --vx-font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Fira Code', 'Roboto Mono', monospace;
  --vx-text-2xs: 0.6875rem;
  --vx-text-xs: 0.75rem;
  --vx-text-sm: 0.875rem;
  --vx-text-base: 1rem;
  --vx-text-lg: 1.125rem;
  --vx-text-xl: 1.25rem;
  --vx-text-2xl: 1.5rem;
  --vx-text-3xl: 1.875rem;
  --vx-text-4xl: 2.25rem;
  --vx-text-5xl: 3rem;
  --vx-weight-normal: 400;
  --vx-weight-medium: 500;
  --vx-weight-semibold: 600;
  --vx-weight-bold: 700;
  --vx-leading-none: 1;
  --vx-leading-tight: 1.15;
  --vx-leading-snug: 1.35;
  --vx-leading-normal: 1.55;
  --vx-leading-relaxed: 1.7;
  --vx-space-0: 0;
  --vx-space-1: 0.125rem;
  --vx-space-2: 0.25rem;
  --vx-space-3: 0.375rem;
  --vx-space-4: 0.5rem;
  --vx-space-5: 0.625rem;
  --vx-space-6: 0.75rem;
  --vx-space-8: 1rem;
  --vx-space-10: 1.25rem;
  --vx-space-12: 1.5rem;
  --vx-space-16: 2rem;
  --vx-space-20: 2.5rem;
  --vx-space-24: 3rem;
  --vx-space-32: 4rem;
  --vx-space-40: 5rem;
  --vx-space-48: 6rem;
  --vx-space-64: 8rem;
  --vx-radius-0: 0;
  --vx-radius-2: 2px;
  --vx-radius-4: 4px;
  --vx-radius-6: 6px;
  --vx-radius-8: 8px;
  --vx-radius-12: 12px;
  --vx-radius-16: 16px;
  --vx-radius-24: 24px;
  --vx-radius-full: 9999px;
  --vx-transition-fast: 0.12s cubic-bezier(0.4, 0, 0.2, 1);
  --vx-transition-default: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --vx-transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --vx-transition-slower: 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  --vx-z-base: 0;
  --vx-z-dropdown: 100;
  --vx-z-sticky: 200;
  --vx-nav-mobile: 300;
  --vx-z-modal: 400;
  --vx-z-toast: 500;
  --vx-z-tooltip: 600;
  --vx-sidebar-width: 260px;
  --vx-header-height: 56px;
  --vx-container-max: 1280px;
  --vx-container-narrow: 720px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; scroll-behavior: smooth; }
html.vx-reduced-motion { scroll-behavior: auto; }
body {
  font-family: var(--vx-font-sans);
  font-size: var(--vx-text-base);
  line-height: var(--vx-leading-normal);
  color: var(--vx-text-primary);
  background-color: var(--vx-bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}
::selection { background: var(--vx-accent-muted); color: var(--vx-text-primary); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--vx-border-strong); border-radius: var(--vx-radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--vx-text-muted); }
:focus-visible { outline: 2px solid var(--vx-accent); outline-offset: 2px; border-radius: var(--vx-radius-4); }
img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
[hidden] { display: none !important; }

h1, h2, h3, h4, h5, h6 { font-weight: var(--vx-weight-semibold); line-height: var(--vx-leading-tight); color: var(--vx-text-primary); letter-spacing: -0.02em; }
p { color: var(--vx-text-secondary); line-height: var(--vx-leading-relaxed); }
a { color: var(--vx-accent); text-decoration: none; transition: color var(--vx-transition-fast); }
a:hover { color: var(--vx-accent-hover); }
ul, ol { list-style: none; }
hr { border: none; height: 1px; background: var(--vx-border-default); margin: var(--vx-space-8) 0; }

/* ── Utilities ── */
.vx-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.vx-text-primary { color: var(--vx-text-primary); }
.vx-text-secondary { color: var(--vx-text-secondary); }
.vx-text-tertiary { color: var(--vx-text-tertiary); }
.vx-text-muted { color: var(--vx-text-muted); }
.vx-text-accent { color: var(--vx-accent); }
.vx-font-mono { font-family: var(--vx-font-mono); }
.vx-text-2xs { font-size: var(--vx-text-2xs); }
.vx-text-xs { font-size: var(--vx-text-xs); }
.vx-text-sm { font-size: var(--vx-text-sm); }
.vx-text-base { font-size: var(--vx-text-base); }
.vx-text-lg { font-size: var(--vx-text-lg); }
.vx-text-xl { font-size: var(--vx-text-xl); }
.vx-text-2xl { font-size: var(--vx-text-2xl); }
.vx-uppercase { text-transform: uppercase; letter-spacing: 0.08em; }
.vx-meta-sep { width: 3px; height: 3px; border-radius: var(--vx-radius-full); background: var(--vx-text-muted); flex-shrink: 0; }

/* ============================================================
   APPLICATION SHELL
   ============================================================ */
.vx-shell { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.vx-sidebar {
  width: var(--vx-sidebar-width);
  background: var(--vx-bg-secondary);
  border-right: 1px solid var(--vx-border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: calc(var(--vx-nav-mobile) + 1);
  transition: transform var(--vx-transition-slow);
}
.vx-sidebar__header {
  height: var(--vx-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vx-space-3);
  padding: 0 var(--vx-space-4) 0 var(--vx-space-5);
  border-bottom: 1px solid var(--vx-border-subtle);
  flex-shrink: 0;
}
.vx-sidebar__brand { display: flex; align-items: baseline; gap: var(--vx-space-3); min-width: 0; }
.vx-sidebar__logo {
  font-size: var(--vx-text-base);
  font-weight: var(--vx-weight-bold);
  letter-spacing: 0.14em;
  color: var(--vx-text-primary);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: var(--vx-space-3);
}
.vx-sidebar__logo img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
  display: block;
  flex: none;
}
.vx-sidebar__logo:hover { color: var(--vx-text-primary); }
.vx-sidebar__tag {
  font-family: var(--vx-font-mono);
  font-size: var(--vx-text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--vx-text-muted);
  white-space: nowrap;
}
.vx-sidebar__close {
  display: none;
  background: none;
  border: 1px solid var(--vx-border-default);
  color: var(--vx-text-secondary);
  width: 28px;
  height: 28px;
  border-radius: var(--vx-radius-6);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--vx-transition-fast);
}
.vx-sidebar__close:hover { background: var(--vx-surface-hover); color: var(--vx-text-primary); }
.vx-sidebar__nav { flex: 1; overflow-y: auto; padding: var(--vx-space-4) var(--vx-space-3); }
.vx-sidebar__footer { padding: var(--vx-space-3); border-top: 1px solid var(--vx-border-subtle); flex-shrink: 0; }
.vx-sidebar__user { display: flex; align-items: center; gap: var(--vx-space-3); padding: var(--vx-space-2) var(--vx-space-3); margin-bottom: var(--vx-space-2); }
.vx-sidebar__user-info { min-width: 0; }
.vx-sidebar__user-alias { font-size: var(--vx-text-sm); font-weight: var(--vx-weight-medium); color: var(--vx-text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-sidebar__user-role {
  font-family: var(--vx-font-mono);
  font-size: var(--vx-text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--vx-text-muted);
}
.vx-sidebar__core {
  display: flex;
  align-items: center;
  gap: var(--vx-space-2);
  padding: var(--vx-space-2) var(--vx-space-3);
  font-family: var(--vx-font-mono);
  font-size: var(--vx-text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vx-text-muted);
}

/* ── Backdrop (mobile sidebar) ── */
.vx-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: var(--vx-nav-mobile);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--vx-transition-slow), visibility var(--vx-transition-slow);
}
.vx-backdrop--show { opacity: 1; visibility: visible; }

/* ── Main column ── */
.vx-main { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow-x: hidden; }

/* ── Topbar ── */
.vx-topbar {
  height: var(--vx-header-height);
  background: var(--vx-bg-secondary);
  border-bottom: 1px solid var(--vx-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vx-space-4);
  padding: 0 var(--vx-space-4) 0 var(--vx-space-5);
  position: sticky;
  top: 0;
  z-index: var(--vx-z-sticky);
}
.vx-topbar__left { display: flex; align-items: center; gap: var(--vx-space-3); min-width: 0; }
.vx-topbar__right { display: flex; align-items: center; gap: var(--vx-space-2); }
.vx-topbar__hamburger {
  display: none;
  background: none;
  border: 1px solid var(--vx-border-default);
  color: var(--vx-text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--vx-radius-6);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--vx-transition-fast);
}
.vx-topbar__hamburger:hover { background: var(--vx-surface-hover); color: var(--vx-text-primary); }
.vx-topbar__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--vx-radius-6);
  color: var(--vx-text-tertiary);
  cursor: pointer;
  transition: all var(--vx-transition-fast);
}
.vx-topbar__btn:hover { background: var(--vx-surface-hover); color: var(--vx-text-primary); border-color: var(--vx-border-default); }
.vx-topbar__badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--vx-accent);
  color: var(--vx-text-inverse);
  font-family: var(--vx-font-mono);
  font-size: 11px;
  font-weight: var(--vx-weight-bold);
  border-radius: var(--vx-radius-full);
  line-height: 1;
}

/* ── Breadcrumb ── */
.vx-breadcrumb { display: flex; align-items: center; gap: var(--vx-space-2); font-size: var(--vx-text-xs); color: var(--vx-text-tertiary); min-width: 0; overflow: hidden; white-space: nowrap; }
.vx-breadcrumb__path { color: var(--vx-text-tertiary); }
.vx-breadcrumb__sep { color: var(--vx-text-muted); }
.vx-breadcrumb__current { color: var(--vx-text-primary); font-weight: var(--vx-weight-medium); overflow: hidden; text-overflow: ellipsis; }
.vx-breadcrumbs { display: flex; align-items: center; gap: var(--vx-space-2); font-size: var(--vx-text-xs); color: var(--vx-text-tertiary); }
.vx-breadcrumbs a { color: var(--vx-text-tertiary); }
.vx-breadcrumbs a:hover { color: var(--vx-text-secondary); }
.vx-breadcrumbs__sep { color: var(--vx-text-muted); }

/* ── User menu ── */
.vx-user-wrap { position: relative; }
.vx-user-menu {
  position: absolute;
  top: calc(100% + var(--vx-space-2));
  right: 0;
  width: 220px;
  background: var(--vx-bg-elevated);
  border: 1px solid var(--vx-border-default);
  border-radius: var(--vx-radius-8);
  box-shadow: var(--vx-shadow-large);
  padding: var(--vx-space-2);
  z-index: var(--vx-z-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--vx-transition-fast), transform var(--vx-transition-fast), visibility var(--vx-transition-fast);
}
.vx-user-menu--open { opacity: 1; visibility: visible; transform: translateY(0); }
.vx-user-menu__head { padding: var(--vx-space-3); border-bottom: 1px solid var(--vx-border-subtle); margin-bottom: var(--vx-space-2); }
.vx-user-menu__name { font-size: var(--vx-text-sm); font-weight: var(--vx-weight-semibold); color: var(--vx-text-primary); }
.vx-user-menu__role {
  font-family: var(--vx-font-mono);
  font-size: var(--vx-text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--vx-text-muted);
}
.vx-user-menu__item {
  display: flex;
  align-items: center;
  width: 100%;
  gap: var(--vx-space-2);
  padding: var(--vx-space-3);
  font-size: var(--vx-text-sm);
  color: var(--vx-text-secondary);
  background: none;
  border: none;
  border-radius: var(--vx-radius-6);
  text-align: left;
  cursor: pointer;
  transition: all var(--vx-transition-fast);
}
.vx-user-menu__item:hover { background: var(--vx-surface-hover); color: var(--vx-text-primary); }
.vx-user-menu__item--danger { color: var(--vx-danger); }
.vx-user-menu__item--danger:hover { background: var(--vx-danger-muted); color: var(--vx-danger); }
.vx-user-menu__sep { height: 1px; background: var(--vx-border-subtle); margin: var(--vx-space-2) 0; }

/* ── Content ── */
.vx-content { flex: 1; padding: var(--vx-space-8); overflow-y: auto; animation: vx-fade-in 0.28s ease both; }
.vx-content > * + * { margin-top: var(--vx-space-8); }

/* ── Page head ── */
.vx-page-head { display: flex; flex-direction: column; gap: var(--vx-space-3); margin-bottom: var(--vx-space-2); }
.vx-page-head__eyebrow {
  font-family: var(--vx-font-mono);
  font-size: var(--vx-text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--vx-accent);
}
.vx-page-head__title { font-size: var(--vx-text-3xl); font-weight: var(--vx-weight-semibold); letter-spacing: -0.02em; }
.vx-page-head__sub { font-size: var(--vx-text-base); color: var(--vx-text-tertiary); line-height: var(--vx-leading-relaxed); max-width: 72ch; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.vx-nav-group { margin-bottom: var(--vx-space-5); }
.vx-nav-group:last-child { margin-bottom: 0; }
.vx-nav-group__label {
  font-family: var(--vx-font-mono);
  font-size: var(--vx-text-2xs);
  font-weight: var(--vx-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--vx-text-muted);
  padding: var(--vx-space-2) var(--vx-space-3);
  margin-bottom: var(--vx-space-1);
}
.vx-nav-item {
  display: flex;
  align-items: center;
  gap: var(--vx-space-4);
  width: 100%;
  padding: var(--vx-space-4) var(--vx-space-5);
  margin-bottom: 2px;
  font-size: var(--vx-text-base);
  font-weight: var(--vx-weight-medium);
  font-family: inherit;
  color: var(--vx-text-secondary);
  background: none;
  border: none;
  border-radius: var(--vx-radius-8);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  position: relative;
  transition: all var(--vx-transition-fast);
  min-height: 48px;
}
.vx-nav-item:hover { background: var(--vx-border-subtle); color: var(--vx-text-primary); }
.vx-nav-item--active { background: var(--vx-accent-muted); color: var(--vx-accent); }
.vx-nav-item--active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: var(--vx-accent);
  border-radius: 0 var(--vx-radius-full) var(--vx-radius-full) 0;
}
.vx-nav-item--active .vx-nav-item__icon { opacity: 1; }
.vx-nav-item__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.55;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity var(--vx-transition-fast);
}
.vx-nav-item:hover .vx-nav-item__icon { opacity: 0.85; }
.vx-nav-item__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-nav-item__badge {
  flex-shrink: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--vx-accent);
  color: var(--vx-text-inverse);
  border-radius: var(--vx-radius-full);
  font-family: var(--vx-font-mono);
  font-size: 10px;
  font-weight: var(--vx-weight-semibold);
  line-height: 1;
  letter-spacing: 0;
}
.vx-nav-item--soon { cursor: pointer; }
.vx-nav-item--soon .vx-nav-item__label { color: var(--vx-text-tertiary); }
.vx-nav-item__soon-tag {
  font-family: var(--vx-font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vx-text-muted);
  background: var(--vx-bg-tertiary);
  border: 1px solid var(--vx-border-subtle);
  border-radius: var(--vx-radius-4);
  padding: 1px 5px;
  flex-shrink: 0;
}

/* ============================================================
   COLLAPSIBLE NAV GROUPS + FILTER
   ============================================================ */
.vx-nav-filter {
  padding: var(--vx-space-3) var(--vx-space-4);
  border-bottom: 1px solid var(--vx-border-subtle);
  background: var(--vx-bg-tertiary);
}
#vxNavFilter {
  width: 100%;
  padding: var(--vx-space-2) var(--vx-space-4);
  font-family: var(--vx-font-mono);
  font-size: var(--vx-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--vx-text-primary);
  background: var(--vx-bg-secondary);
  border: 1px solid var(--vx-border-default);
  border-radius: var(--vx-radius-6);
}
#vxNavFilter::placeholder { color: var(--vx-text-muted); }

.vx-nav-group__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--vx-space-3);
  padding: var(--vx-space-3);
  margin-bottom: 2px;
  font-family: var(--vx-font-mono);
  font-size: var(--vx-text-2xs);
  font-weight: var(--vx-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--vx-text-muted);
  background: none;
  border: none;
  border-radius: var(--vx-radius-6);
  text-align: left;
  cursor: pointer;
  transition: all var(--vx-transition-fast);
}
.vx-nav-group__toggle:hover {
  background: var(--vx-border-subtle);
  color: var(--vx-text-primary);
}
.vx-nav-group__toggle[aria-expanded="true"] { color: var(--vx-accent); }
.vx-nav-group__chevron {
  font-size: 10px;
  margin-left: auto;
  transition: transform var(--vx-transition-fast);
}
.vx-nav-group--collapsed .vx-nav-group__chevron { transform: rotate(-90deg); }
.vx-nav-group--collapsed .vx-nav-group__items { display: none; }

.vx-section--collapsed .vx-section-chevron { transform: rotate(-90deg); }

/* ============================================================
   BUTTONS
   ============================================================ */
.vx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--vx-space-2);
  padding: var(--vx-space-3) var(--vx-space-6);
  font-family: inherit;
  font-size: var(--vx-text-sm);
  font-weight: var(--vx-weight-medium);
  line-height: var(--vx-leading-none);
  color: var(--vx-text-primary);
  background: var(--vx-surface);
  border: 1px solid var(--vx-border-default);
  border-radius: var(--vx-radius-6);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: all var(--vx-transition-default);
  position: relative;
}
.vx-btn:hover { background: var(--vx-surface-hover); border-color: var(--vx-border-strong); color: var(--vx-text-primary); transform: translateY(-1px); }
.vx-btn:active { transform: translateY(0); }
.vx-btn:disabled, .vx-btn[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.vx-btn--primary { background: var(--vx-accent); color: var(--vx-text-inverse); border-color: var(--vx-accent); }
.vx-btn--primary:hover { background: var(--vx-accent-hover); border-color: var(--vx-accent-hover); color: var(--vx-text-inverse); box-shadow: var(--vx-shadow-accent); }
.vx-btn--secondary { background: var(--vx-accent-muted); color: var(--vx-accent); border-color: transparent; }
.vx-btn--secondary:hover { background: rgba(107,159,168,0.18); color: var(--vx-accent); }
.vx-btn--ghost { background: transparent; border-color: transparent; color: var(--vx-text-secondary); }
.vx-btn--ghost:hover { background: var(--vx-border-subtle); color: var(--vx-text-primary); }
.vx-btn--danger { background: var(--vx-danger); color: #fff; border-color: var(--vx-danger); }
.vx-btn--danger:hover { background: #d46e6e; border-color: #d46e6e; color: #fff; }
.vx-btn--void { background: var(--vx-void); color: #fff; border-color: var(--vx-void); }
.vx-btn--sm { padding: var(--vx-space-2) var(--vx-space-4); font-size: var(--vx-text-xs); border-radius: var(--vx-radius-4); }
.vx-btn--lg { padding: var(--vx-space-4) var(--vx-space-8); font-size: var(--vx-text-base); border-radius: var(--vx-radius-8); }
.vx-btn--icon { padding: var(--vx-space-3); aspect-ratio: 1; }
.vx-btn--block { width: 100%; }

/* ============================================================
   CARDS
   ============================================================ */
.vx-card {
  background: var(--vx-bg-elevated);
  border: 1px solid var(--vx-border-default);
  border-radius: var(--vx-radius-8);
  overflow: hidden;
  transition: border-color var(--vx-transition-fast), box-shadow var(--vx-transition-fast);
}
.vx-card:hover { border-color: var(--vx-border-strong); }
.vx-card__header {
  padding: var(--vx-space-5) var(--vx-space-6);
  border-bottom: 1px solid var(--vx-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vx-space-4);
}
.vx-card__title { font-size: var(--vx-text-sm); font-weight: var(--vx-weight-semibold); color: var(--vx-text-primary); letter-spacing: -0.01em; }
.vx-card__body { padding: var(--vx-space-8); }
.vx-card__footer { padding: var(--vx-space-4) var(--vx-space-8); border-top: 1px solid var(--vx-border-subtle); background: rgba(0,0,0,0.14); }

/* ============================================================
   BADGES · DOTS · AVATARS
   ============================================================ */
.vx-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--vx-space-2);
  padding: var(--vx-space-1) var(--vx-space-3);
  font-size: var(--vx-text-2xs);
  font-weight: var(--vx-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--vx-radius-full);
  line-height: 1.5;
  white-space: nowrap;
}
.vx-badge--void { background: var(--vx-void-muted); color: var(--vx-void); }
.vx-badge--admin { background: var(--vx-admin-muted); color: var(--vx-admin); }
.vx-badge--member { background: var(--vx-member-muted); color: var(--vx-member); }
.vx-badge--success { background: var(--vx-success-muted); color: var(--vx-success); }
.vx-badge--warning { background: var(--vx-warning-muted); color: var(--vx-warning); }
.vx-badge--danger { background: var(--vx-danger-muted); color: var(--vx-danger); }
.vx-badge--info { background: var(--vx-info-muted); color: var(--vx-info); }
.vx-badge--outline { background: transparent; border: 1px solid var(--vx-border-strong); color: var(--vx-text-tertiary); }

.vx-pri-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px var(--vx-space-3);
  font-size: var(--vx-text-2xs);
  font-weight: var(--vx-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--vx-radius-4);
  line-height: 1.6;
  white-space: nowrap;
}
.vx-pri-badge--critical { background: var(--vx-danger-muted); color: var(--vx-danger); }
.vx-pri-badge--important { background: var(--vx-warning-muted); color: var(--vx-warning); }
.vx-pri-badge--normal { background: var(--vx-bg-tertiary); color: var(--vx-text-tertiary); }

.vx-pri {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 1px var(--vx-space-3);
  font-size: var(--vx-text-2xs);
  font-weight: var(--vx-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--vx-radius-4);
  line-height: 1.6;
}
.vx-pri--critical, .vx-pri--high { background: var(--vx-danger-muted); color: var(--vx-danger); }
.vx-pri--medium { background: var(--vx-warning-muted); color: var(--vx-warning); }
.vx-pri--low { background: var(--vx-bg-tertiary); color: var(--vx-text-tertiary); }

.vx-stat-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px var(--vx-space-3);
  font-size: var(--vx-text-2xs);
  font-weight: var(--vx-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--vx-radius-4);
  line-height: 1.6;
  white-space: nowrap;
  background: var(--vx-bg-tertiary);
  color: var(--vx-text-tertiary);
}
.vx-stat-badge--pending { background: var(--vx-info-muted); color: var(--vx-info); }
.vx-stat-badge--review { background: var(--vx-warning-muted); color: var(--vx-warning); }
.vx-stat-badge--approved { background: var(--vx-success-muted); color: var(--vx-success); }
.vx-stat-badge--completed { background: var(--vx-success-muted); color: var(--vx-success); }
.vx-stat-badge--published { background: var(--vx-success-muted); color: var(--vx-success); }
.vx-stat-badge--rejected { background: var(--vx-danger-muted); color: var(--vx-danger); }
.vx-stat-badge--needs-info { background: var(--vx-warning-muted); color: var(--vx-warning); }
.vx-stat-badge--draft { background: var(--vx-bg-tertiary); color: var(--vx-text-tertiary); }
.vx-stat-badge--archived { background: var(--vx-bg-tertiary); color: var(--vx-text-muted); }

.vx-file-vis {
  display: inline-flex;
  align-items: center;
  font-family: var(--vx-font-mono);
  font-size: var(--vx-text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid;
  line-height: 1.5;
  white-space: nowrap;
}
.vx-file-vis--org { color: var(--vx-text-secondary); border-color: var(--vx-border-default); background: transparent; }
.vx-file-vis--project { color: var(--vx-accent); border-color: rgba(107,159,168,0.35); background: var(--vx-accent-muted); }
.vx-file-vis--restricted { color: var(--vx-warning); border-color: rgba(196,163,91,0.35); background: var(--vx-warning-muted); }
.vx-file-vis--void { color: var(--vx-void); border-color: rgba(155,138,196,0.35); background: var(--vx-void-muted); }
.vx-file-vis--admin { color: var(--vx-admin); border-color: rgba(196,154,107,0.35); background: var(--vx-admin-muted); }

.vx-file-privacy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--vx-font-mono);
  font-size: var(--vx-text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 2px 6px;
  border-radius: 3px;
  line-height: 1.5;
  white-space: nowrap;
}
.vx-file-privacy--checked { color: var(--vx-success); background: var(--vx-success-muted); }
.vx-file-privacy--needs { color: var(--vx-warning); background: var(--vx-warning-muted); }
.vx-file-privacy--present { color: var(--vx-info); background: var(--vx-info-muted); }
.vx-file-privacy--removed { color: var(--vx-accent); background: var(--vx-accent-muted); }
.vx-file-privacy--restrict { color: var(--vx-danger); background: var(--vx-danger-muted); }

.vx-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: var(--vx-radius-full);
  background: var(--vx-text-muted);
  flex-shrink: 0;
}
.vx-dot--live { background: var(--vx-success); animation: vx-pulse 2s ease-in-out infinite; }
.vx-dot--warning { background: var(--vx-warning); }
.vx-dot--inactive { background: var(--vx-text-muted); }
.vx-dot--danger { background: var(--vx-danger); }
.vx-unread-dot { width: 6px; height: 6px; border-radius: var(--vx-radius-full); background: var(--vx-accent); flex-shrink: 0; }

.vx-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--vx-radius-full);
  background: var(--vx-surface);
  border: 1px solid var(--vx-border-default);
  color: var(--vx-text-secondary);
  font-family: var(--vx-font-mono);
  font-size: var(--vx-text-xs);
  font-weight: var(--vx-weight-semibold);
  text-transform: uppercase;
  flex-shrink: 0;
  user-select: none;
}
.vx-avatar--sm { width: 26px; height: 26px; font-size: var(--vx-text-2xs); }
.vx-avatar--md { width: 40px; height: 40px; font-size: var(--vx-text-sm); }
.vx-avatar--lg { width: 56px; height: 56px; font-size: var(--vx-text-lg); }
.vx-avatar--void { background: var(--vx-void-muted); color: var(--vx-void); border-color: transparent; }
.vx-avatar--admin { background: var(--vx-admin-muted); color: var(--vx-admin); border-color: transparent; }
.vx-avatar--member { background: var(--vx-member-muted); color: var(--vx-member); border-color: transparent; }

/* ============================================================
   FORMS
   ============================================================ */
.vx-field { display: flex; flex-direction: column; gap: var(--vx-space-2); }
.vx-field__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--vx-space-4); }
.vx-field__label {
  font-family: var(--vx-font-mono);
  font-size: var(--vx-text-2xs);
  font-weight: var(--vx-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--vx-text-tertiary);
}
.vx-label {
  display: block;
  font-family: var(--vx-font-mono);
  font-size: var(--vx-text-2xs);
  font-weight: var(--vx-weight-medium);
  color: var(--vx-text-tertiary);
  margin-bottom: var(--vx-space-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.vx-input, .vx-textarea, .vx-select {
  width: 100%;
  padding: var(--vx-space-3) var(--vx-space-4);
  font-family: inherit;
  font-size: var(--vx-text-sm);
  color: var(--vx-text-primary);
  background: var(--vx-bg-tertiary);
  border: 1px solid var(--vx-border-default);
  border-radius: var(--vx-radius-6);
  transition: border-color var(--vx-transition-fast), box-shadow var(--vx-transition-fast);
  outline: none;
  caret-color: var(--vx-accent);
}
.vx-input::placeholder, .vx-textarea::placeholder { color: var(--vx-text-muted); }
.vx-input:hover, .vx-textarea:hover, .vx-select:hover { border-color: var(--vx-border-strong); }
.vx-input:focus, .vx-textarea:focus, .vx-select:focus { border-color: var(--vx-accent); box-shadow: 0 0 0 3px var(--vx-accent-muted); }
.vx-input:disabled, .vx-textarea:disabled, .vx-select:disabled { opacity: 0.5; cursor: not-allowed; }
.vx-input--readonly {
  cursor: default;
  background: var(--vx-bg-secondary);
  color: var(--vx-text-secondary);
  font-weight: var(--vx-weight-medium);
}
.vx-input--readonly:hover { border-color: var(--vx-border-default); }
.vx-textarea { min-height: 90px; resize: vertical; line-height: var(--vx-leading-normal); }
.vx-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 5L6 8L9 5' stroke='%236e6e7c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--vx-space-4) center;
  padding-right: var(--vx-space-10);
}
.vx-form-group { margin-bottom: var(--vx-space-5); }
.vx-form-hint { font-size: var(--vx-text-xs); color: var(--vx-text-tertiary); margin-top: var(--vx-space-2); }
.vx-form-error { font-size: var(--vx-text-xs); color: var(--vx-danger); margin-top: var(--vx-space-2); }

.vx-checkbox { display: flex; align-items: center; gap: var(--vx-space-3); cursor: pointer; font-size: var(--vx-text-sm); color: var(--vx-text-secondary); }
.vx-checkbox input {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--vx-border-strong);
  border-radius: var(--vx-radius-4);
  background: var(--vx-bg-tertiary);
  cursor: pointer;
  transition: all var(--vx-transition-fast);
  flex-shrink: 0;
  position: relative;
}
.vx-checkbox input:checked { background: var(--vx-accent); border-color: var(--vx-accent); }
.vx-checkbox input:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid var(--vx-text-inverse);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.vx-toggle { display: flex; align-items: center; gap: var(--vx-space-3); cursor: pointer; font-size: var(--vx-text-sm); color: var(--vx-text-secondary); }
.vx-toggle__switch {
  position: relative;
  width: 36px;
  height: 20px;
  background: var(--vx-border-strong);
  border-radius: var(--vx-radius-full);
  transition: background var(--vx-transition-fast);
  flex-shrink: 0;
}
.vx-toggle__switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--vx-text-primary);
  border-radius: var(--vx-radius-full);
  transition: transform var(--vx-transition-fast);
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.vx-toggle input { appearance: none; position: absolute; opacity: 0; pointer-events: none; }
.vx-toggle input:checked + .vx-toggle__switch { background: var(--vx-accent); }
.vx-toggle input:checked + .vx-toggle__switch::after { transform: translateX(16px); }

/* ============================================================
   TOASTS
   ============================================================ */
.vx-toast-wrap {
  position: fixed;
  top: var(--vx-space-6);
  right: var(--vx-space-6);
  z-index: var(--vx-z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--vx-space-3);
  max-width: 360px;
  pointer-events: none;
}
.vx-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: var(--vx-space-3);
  padding: var(--vx-space-4) var(--vx-space-5);
  background: var(--vx-bg-elevated);
  border: 1px solid var(--vx-border-default);
  border-left: 3px solid var(--vx-accent);
  border-radius: var(--vx-radius-8);
  box-shadow: var(--vx-shadow-large);
  font-size: var(--vx-text-sm);
  color: var(--vx-text-primary);
  animation: vx-toast-in var(--vx-transition-slow) both;
}
.vx-toast__title { font-weight: var(--vx-weight-semibold); margin-bottom: 2px; }
.vx-toast__msg { font-size: var(--vx-text-xs); color: var(--vx-text-secondary); line-height: var(--vx-leading-snug); }
.vx-toast__icon { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vx-toast--success { border-left-color: var(--vx-success); }
.vx-toast--success .vx-toast__icon { color: var(--vx-success); }
.vx-toast--warning { border-left-color: var(--vx-warning); }
.vx-toast--warning .vx-toast__icon { color: var(--vx-warning); }
.vx-toast--danger { border-left-color: var(--vx-danger); }
.vx-toast--danger .vx-toast__icon { color: var(--vx-danger); }
.vx-toast--info { border-left-color: var(--vx-info); }
.vx-toast--info .vx-toast__icon { color: var(--vx-info); }
.vx-toast--out { animation: vx-toast-out 0.26s ease forwards; }

/* ============================================================
   MODALS
   ============================================================ */
.vx-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px) saturate(1.1);
  -webkit-backdrop-filter: blur(6px) saturate(1.1);
  z-index: var(--vx-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--vx-space-6);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--vx-transition-slow), visibility var(--vx-transition-slow);
}
.vx-modal-backdrop--open { opacity: 1; visibility: visible; }
.vx-modal {
  background: var(--vx-bg-elevated);
  border: 1px solid var(--vx-border-default);
  border-radius: var(--vx-radius-12);
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - var(--vx-space-12));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--vx-shadow-large);
  transform: translateY(16px) scale(0.97);
  transition: transform var(--vx-transition-slow);
}
.vx-modal-backdrop--open .vx-modal { transform: translateY(0) scale(1); }
.vx-modal--wide { max-width: 720px; }
.vx-modal--sm { max-width: 380px; }
.vx-modal__header {
  padding: var(--vx-space-5) var(--vx-space-6);
  border-bottom: 1px solid var(--vx-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vx-space-4);
}
.vx-modal__title { font-size: var(--vx-text-lg); font-weight: var(--vx-weight-semibold); color: var(--vx-text-primary); min-width: 0; }
.vx-modal__subtitle {
  font-family: var(--vx-font-mono);
  font-size: var(--vx-text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--vx-text-muted);
  margin-top: 2px;
}
.vx-modal__close {
  background: none;
  border: none;
  color: var(--vx-text-tertiary);
  cursor: pointer;
  padding: var(--vx-space-2);
  border-radius: var(--vx-radius-4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--vx-transition-fast);
}
.vx-modal__close:hover { background: var(--vx-border-subtle); color: var(--vx-text-primary); }
.vx-modal__body { padding: var(--vx-space-6); overflow-y: auto; flex: 1; }
.vx-modal__footer {
  padding: var(--vx-space-4) var(--vx-space-6);
  border-top: 1px solid var(--vx-border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: var(--vx-space-3);
  flex-wrap: wrap;
}

/* ============================================================
   TABLES — shared data table (research / members / matrix)
   ============================================================ */
.vx-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--vx-border-default);
  border-radius: var(--vx-radius-8);
  background: var(--vx-bg-secondary);
}
.vx-table { width: 100%; border-collapse: collapse; font-size: var(--vx-text-sm); }
.vx-table th {
  padding: var(--vx-space-3) var(--vx-space-4);
  text-align: left;
  font-family: var(--vx-font-mono);
  font-size: var(--vx-text-2xs);
  font-weight: var(--vx-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--vx-text-muted);
  border-bottom: 1px solid var(--vx-border-default);
  white-space: nowrap;
}
.vx-table td {
  padding: var(--vx-space-3) var(--vx-space-4);
  border-bottom: 1px solid var(--vx-border-subtle);
  color: var(--vx-text-secondary);
  vertical-align: middle;
}
.vx-table tbody tr:last-child td { border-bottom: 0; }
.vx-table tbody tr:hover td { background: var(--vx-bg-tertiary); }
.vx-table .vx-table__actions { text-align: right; white-space: nowrap; }
.vx-table .vx-table__actions .vx-btn + .vx-btn { margin-left: 6px; }
.vx-table .vx-table__title { font-weight: var(--vx-weight-medium); color: var(--vx-text-primary); }

/* ============================================================
   STATES — empty / restricted / 404 / gate
   ============================================================ */
.vx-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--vx-space-2);
  padding: var(--vx-space-16) var(--vx-space-6);
  text-align: center;
  border: 1px dashed var(--vx-border-default);
  border-radius: var(--vx-radius-8);
  background: var(--vx-bg-secondary);
}
.vx-empty__title { font-size: var(--vx-text-sm); font-weight: var(--vx-weight-medium); color: var(--vx-text-secondary); }
.vx-empty__sub { font-size: var(--vx-text-xs); color: var(--vx-text-muted); }

.vx-access-restricted {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--vx-space-4);
  padding: var(--vx-space-24) var(--vx-space-6);
  max-width: 560px;
  margin: 0 auto;
}
.vx-access-restricted__code {
  font-family: var(--vx-font-mono);
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: var(--vx-weight-bold);
  line-height: 1;
  color: var(--vx-text-muted);
  letter-spacing: 0.05em;
}
.vx-access-restricted__title { font-size: var(--vx-text-xl); font-weight: var(--vx-weight-semibold); color: var(--vx-text-primary); }
.vx-access-restricted__sub { font-size: var(--vx-text-sm); color: var(--vx-text-tertiary); line-height: var(--vx-leading-relaxed); }

/* Boot / gate screen (private/index.html) */
.vx-boot { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.vx-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--vx-space-4);
  text-align: center;
  padding: var(--vx-space-8);
  animation: vx-fade-in 0.5s ease both;
}
.vx-gate__mark {
  font-size: var(--vx-text-3xl);
  font-weight: var(--vx-weight-bold);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--vx-text-primary);
  text-transform: uppercase;
}
.vx-gate__label {
  font-family: var(--vx-font-mono);
  font-size: var(--vx-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--vx-text-tertiary);
}
.vx-gate__status {
  display: flex;
  align-items: center;
  gap: var(--vx-space-3);
  margin-top: var(--vx-space-4);
  font-size: var(--vx-text-xs);
  color: var(--vx-text-muted);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes vx-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes vx-fade-in-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes vx-scale-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes vx-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes vx-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes vx-toast-in { from { opacity: 0; transform: translateX(120%); } to { opacity: 1; transform: translateX(0); } }
@keyframes vx-toast-out { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(120%); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
@media (prefers-contrast: high) {
  :root { --vx-border-default: rgba(255,255,255,0.28); --vx-text-secondary: #c4c4d0; --vx-text-tertiary: #9898a6; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .vx-sidebar { width: 232px; }
  .vx-content { padding: var(--vx-space-5); }
}
@media (max-width: 768px) {
  .vx-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100dvh;
    transform: translateX(-100%);
    z-index: calc(var(--vx-nav-mobile) + 1);
  }
  .vx-sidebar--open { transform: translateX(0); }
  .vx-sidebar__close { display: flex; }
  .vx-topbar__hamburger { display: flex; }
  .vx-content { padding: var(--vx-space-4); }
  .vx-topbar { padding: 0 var(--vx-space-3); }
  .vx-breadcrumb__path, .vx-breadcrumb__sep { display: none; }
  .vx-modal { max-width: 100%; }
  .vx-modal-backdrop { padding: var(--vx-space-4); }
  .vx-toast-wrap { left: var(--vx-space-4); right: var(--vx-space-4); max-width: none; }
  .vx-field__row { grid-template-columns: 1fr; }

  /* --- Touch ergonomics: 44px minimum targets --- */
  .vx-topbar__btn,
  .vx-icon-btn { width: 44px; height: 44px; }
  .vx-btn { min-height: 44px; padding-left: var(--vx-space-5); padding-right: var(--vx-space-5); }
  .vx-nav-item { min-height: 44px; }
  .vx-sidebar__close { width: 44px; height: 44px; }
  .vx-avatar { min-width: 32px; min-height: 32px; }
  /* Prevent iOS zoom-on-focus by keeping form text >= 16px */
  .vx-input, .vx-select, .vx-textarea { font-size: 16px; }
  /* Comfortable spacing between stacked controls */
  .vx-table__actions .vx-btn { min-width: 44px; }
  .vx-pager__btn { min-width: 44px; min-height: 44px; }
  .vx-tab { min-height: 44px; padding-left: var(--vx-space-4); padding-right: var(--vx-space-4); }
  .vx-chip { min-height: 32px; padding-left: var(--vx-space-4); padding-right: var(--vx-space-4); }
  /* Menu + sidebar touch targets */
  .vx-user-menu__item { min-height: 44px; }
  .vx-sidebar__logo { min-height: 44px; display: flex; align-items: center; }
  .vx-filter-btn { min-height: 36px; padding-left: var(--vx-space-3); padding-right: var(--vx-space-3); }
  /* Filter/category pills and tab strips */
  .vx-jrn-cat, .vx-void-tab, .vx-ann-filter { min-height: 36px; }
  .vx-jrn-cat { padding-top: var(--vx-space-2); padding-bottom: var(--vx-space-2); }
  /* Inline text links still need a usable hit area */
  .vx-text-xs, .vx-link { padding: var(--vx-space-2) 0; }
  /* Wide data tables scroll instead of pushing the layout */
  .vx-table { min-width: 560px; }
  .vx-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .vx-void-tabs, .vx-tabs { overflow-x: auto; scrollbar-width: none; }
  .vx-void-tabs::-webkit-scrollbar, .vx-tabs::-webkit-scrollbar { display: none; }

  /* Private OS mobile: airier, bigger touch targets */
  .vx-content { padding: var(--vx-space-5); }
  .vx-content > * + * { margin-top: var(--vx-space-6); }
  .vx-page-head__title { font-size: var(--vx-text-xl); }
  .vx-card__body { padding: var(--vx-space-5); }
  .vx-nav-item__label { font-size: var(--vx-text-sm); }
  .vx-nav-group__label { font-size: var(--vx-text-2xs); padding: var(--vx-space-2) var(--vx-space-3); }
}
@media (max-width: 480px) {
  .vx-content { padding: var(--vx-space-3); }
  .vx-page-head__title { font-size: var(--vx-text-xl); }
  /* Metrics/tables collapse gracefully */
  .vx-metrics { grid-template-columns: 1fr !important; gap: var(--vx-space-5); }
  .vx-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .vx-modal-backdrop { padding: var(--vx-space-3); align-items: flex-end; }
  .vx-modal { border-radius: var(--vx-radius-12) var(--vx-radius-12) 0 0; }

  /* Private OS small mobile: single column grids, bigger spacing */
  .vx-grid-2 { grid-template-columns: 1fr !important; gap: var(--vx-space-5); }
  .vx-content > * + * { margin-top: var(--vx-space-5); }
  .vx-card__body { padding: var(--vx-space-4); }
  .vx-btn { min-height: 48px; padding-left: var(--vx-space-6); padding-right: var(--vx-space-6); font-size: var(--vx-text-base); }
}

/* Coarse pointers get larger hit areas everywhere, not just small screens */
@media (pointer: coarse) {
  .vx-topbar__btn, .vx-icon-btn { min-width: 44px; min-height: 44px; }
}
