/* ═══════════════════════════════════════════════════════════════════════════
   xoomai-ui.css — XoomAI Design System v2
   Complete Replit-modern component library. Single source of truth.
   Covers: CSS custom props (light + dark), all .xa-* components.
   ═══════════════════════════════════════════════════════════════════════════ */

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

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

/* ═══════════════════════════════════════════════════════════════════════════
   CSS CUSTOM PROPERTIES — Light theme (default)
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  color-scheme: light;

  /* Backgrounds */
  --xa-bg:          #f7f8fa;
  --xa-surface:     #ffffff;
  --xa-surface-2:   #f0f1f5;

  /* Borders */
  --xa-border:      #e2e4ea;
  --xa-border-2:    #d0d3de;

  /* Text */
  --xa-text:        #0d0f14;
  --xa-text-dim:    #565970;
  --xa-text-muted:  #8a8fa8;

  /* Accent — indigo / violet (Replit-modern) */
  --xa-accent:       #6c5ce7;
  --xa-accent-hover: #5a4bd1;
  --xa-accent-2:     #a29bfe;
  --xa-accent-rgb:   108, 92, 231;
  --xa-accent-soft:  rgba(108, 92, 231, 0.10);
  --xa-accent-ring:  rgba(108, 92, 231, 0.30);

  /* Semantic */
  --xa-ok:       #16a34a;
  --xa-ok-bg:    rgba(22, 163, 74, 0.10);
  --xa-ok-soft:  rgba(22, 163, 74, 0.10);
  --xa-warn:     #d97706;
  --xa-warn-bg:  rgba(217, 119, 6, 0.10);
  --xa-warn-soft:rgba(217, 119, 6, 0.10);
  --xa-err:      #dc2626;
  --xa-err-bg:   rgba(220, 38, 38, 0.10);
  --xa-err-soft: rgba(220, 38, 38, 0.10);
  --xa-info:     #0ea5e9;
  --xa-info-soft:rgba(14, 165, 233, 0.10);

  /* Shape */
  --xa-radius:    12px;
  --xa-radius-sm: 8px;
  --xa-radius-lg: 18px;

  /* Elevation */
  --xa-shadow:    0 1px 3px rgba(16,24,40,0.06), 0 8px 24px -12px rgba(16,24,40,0.10);
  --xa-shadow-md: 0 4px 16px -4px rgba(16,24,40,0.12), 0 1px 3px rgba(16,24,40,0.06);
  --xa-shadow-lg: 0 12px 40px -8px rgba(16,24,40,0.18), 0 3px 8px rgba(16,24,40,0.06);
  --xa-shadow-xl: 0 24px 64px -12px rgba(16,24,40,0.22), 0 6px 16px rgba(16,24,40,0.08);

  /* Layout — shell dimensions */
  --xa-sidebar-w: 220px;
  --xa-topbar-h:  56px;

  /* Typography */
  --xa-font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --xa-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;

  /* Motion */
  --xa-t:      200ms cubic-bezier(0.4, 0, 0.2, 1);
  --xa-t-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
  --xa-t-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --xa-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --xa-ease:   cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CSS CUSTOM PROPERTIES — Dark theme
   ═══════════════════════════════════════════════════════════════════════════ */
[data-theme="dark"] {
  color-scheme: dark;

  --xa-bg:          #0f0f12;
  --xa-surface:     #1a1a22;
  --xa-surface-2:   #212130;

  --xa-border:      #2e2e3e;
  --xa-border-2:    #3c3c52;

  --xa-text:        #e8e8f0;
  --xa-text-dim:    #8888a0;
  --xa-text-muted:  #5a5a72;

  --xa-accent:       #7c6ff7;
  --xa-accent-hover: #8f84f8;
  --xa-accent-2:     #a89cff;
  --xa-accent-rgb:   124, 111, 247;
  --xa-accent-soft:  rgba(124, 111, 247, 0.14);
  --xa-accent-ring:  rgba(124, 111, 247, 0.35);

  --xa-ok:       #22c55e;
  --xa-ok-bg:    rgba(34, 197, 94, 0.12);
  --xa-ok-soft:  rgba(34, 197, 94, 0.12);
  --xa-warn:     #fbbf24;
  --xa-warn-bg:  rgba(251, 191, 36, 0.12);
  --xa-warn-soft:rgba(251, 191, 36, 0.12);
  --xa-err:      #f87171;
  --xa-err-bg:   rgba(248, 113, 113, 0.12);
  --xa-err-soft: rgba(248, 113, 113, 0.12);
  --xa-info:     #38bdf8;
  --xa-info-soft:rgba(56, 189, 248, 0.12);

  --xa-shadow:    0 1px 3px rgba(0,0,0,0.30), 0 8px 24px -12px rgba(0,0,0,0.40);
  --xa-shadow-md: 0 4px 16px -4px rgba(0,0,0,0.45), 0 1px 3px rgba(0,0,0,0.30);
  --xa-shadow-lg: 0 12px 40px -8px rgba(0,0,0,0.55), 0 3px 8px rgba(0,0,0,0.30);
  --xa-shadow-xl: 0 24px 64px -12px rgba(0,0,0,0.65), 0 6px 16px rgba(0,0,0,0.40);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════════════════════════════════════ */
html, body {
  font-family: var(--xa-font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--xa-text);
  background: var(--xa-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a {
  color: var(--xa-accent);
  text-decoration: none;
  transition: color var(--xa-t-fast);
}
a:hover { color: var(--xa-accent-hover); text-decoration: underline; }

button { font-family: var(--xa-font); cursor: pointer; }
input, select, textarea { font-family: var(--xa-font); }
img, svg, video { max-width: 100%; }
code, pre { font-family: var(--xa-mono); font-size: 0.875em; }

/* ═══════════════════════════════════════════════════════════════════════════
   APP SHELL — Sidebar
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-shell {
  display: flex;
  min-height: 100vh;
  background: var(--xa-bg);
  font-family: var(--xa-font);
  color: var(--xa-text);
  -webkit-font-smoothing: antialiased;
}

.xa-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--xa-sidebar-w);
  height: 100vh;
  background: var(--xa-surface);
  border-right: 1px solid var(--xa-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 200;
  transition: transform var(--xa-t), width var(--xa-t);
}

.xa-sidebar--collapsed { width: 60px; }

.xa-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--xa-topbar-h);
  padding: 0 16px;
  border-bottom: 1px solid var(--xa-border);
  text-decoration: none;
  color: var(--xa-text);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.022em;
  flex-shrink: 0;
}

.xa-sidebar-logo img,
.xa-sidebar-logo svg {
  width: 30px; height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
}

.xa-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--xa-border) transparent;
}
.xa-sidebar-nav::-webkit-scrollbar { width: 4px; }
.xa-sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.xa-sidebar-nav::-webkit-scrollbar-thumb { background: var(--xa-border); border-radius: 4px; }

.xa-nav-group { margin-bottom: 4px; }

.xa-nav-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--xa-text-muted);
  padding: 12px 16px 4px;
  white-space: nowrap;
  overflow: hidden;
}

.xa-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px 7px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--xa-text-dim);
  text-decoration: none;
  border-radius: var(--xa-radius-sm);
  margin: 1px 8px;
  transition: color var(--xa-t), background var(--xa-t);
  white-space: nowrap;
  overflow: hidden;
}
.xa-nav-link svg {
  width: 16px; height: 16px;
  flex-shrink: 0;
  opacity: 0.65;
  transition: opacity var(--xa-t);
}
.xa-nav-link:hover {
  color: var(--xa-text);
  background: var(--xa-accent-soft);
  text-decoration: none;
}
.xa-nav-link:hover svg { opacity: 1; }
.xa-nav-link.is-active {
  color: var(--xa-accent);
  background: var(--xa-accent-soft);
  font-weight: 600;
}
.xa-nav-link.is-active svg { opacity: 1; }
.xa-nav-label { overflow: hidden; text-overflow: ellipsis; }

/* ═══════════════════════════════════════════════════════════════════════════
   APP SHELL — Top bar
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-topbar {
  position: fixed;
  top: 0;
  left: var(--xa-sidebar-w);
  right: 0;
  height: var(--xa-topbar-h);
  background: color-mix(in srgb, var(--xa-bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--xa-border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  z-index: 150;
  transition: left var(--xa-t);
}

.xa-topbar-search { flex: 1; max-width: 360px; }

.xa-topbar-search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: var(--xa-radius-sm);
  background: var(--xa-surface-2);
  border: 1px solid var(--xa-border);
  color: var(--xa-text-dim);
  font-size: 13px;
  font-family: var(--xa-font);
  cursor: pointer;
  transition: border-color var(--xa-t), background var(--xa-t);
  width: 100%;
  text-align: left;
}
.xa-topbar-search-btn:hover {
  border-color: var(--xa-accent);
  background: var(--xa-surface);
}
.xa-topbar-search-btn kbd {
  margin-left: auto;
  font-family: var(--xa-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--xa-border);
  color: var(--xa-text-dim);
}

.xa-topbar-spacer { flex: 1; }

.xa-topbar-actions { display: flex; align-items: center; gap: 8px; }

.xa-theme-toggle,
.xa-topbar-icon-btn {
  width: 34px; height: 34px;
  border-radius: var(--xa-radius-sm);
  background: transparent;
  border: 1px solid var(--xa-border);
  color: var(--xa-text-dim);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--xa-t), color var(--xa-t), border-color var(--xa-t);
  font-family: var(--xa-font);
}
.xa-theme-toggle:hover,
.xa-topbar-icon-btn:hover {
  background: var(--xa-surface-2);
  color: var(--xa-text);
}

.xa-account-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 6px;
  border-radius: var(--xa-radius-sm);
  background: var(--xa-surface-2);
  border: 1px solid var(--xa-border);
  cursor: pointer;
  transition: background var(--xa-t), border-color var(--xa-t);
  font-size: 13px;
  color: var(--xa-text);
  font-family: var(--xa-font);
  position: relative;
}
.xa-account-chip:hover {
  background: var(--xa-surface);
  border-color: var(--xa-accent);
}

.xa-account-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--xa-accent), var(--xa-accent-2));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.xa-account-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--xa-surface);
  border: 1px solid var(--xa-border);
  border-radius: var(--xa-radius);
  box-shadow: var(--xa-shadow-md);
  padding: 6px;
  z-index: 300;
  animation: xa-slide-up 0.15s var(--xa-ease) both;
}
.xa-account-dropdown a,
.xa-account-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--xa-radius-sm);
  font-size: 13.5px;
  color: var(--xa-text);
  text-decoration: none;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: var(--xa-font);
  transition: background var(--xa-t);
}
.xa-account-dropdown a:hover,
.xa-account-dropdown button:hover { background: var(--xa-surface-2); }
.xa-account-dropdown .xa-signout {
  color: var(--xa-err);
  border-top: 1px solid var(--xa-border);
  margin-top: 4px;
  padding-top: 10px;
}

/* Mobile overlay + toggle */
.xa-mobile-toggle {
  display: none;
  width: 34px; height: 34px;
  border-radius: var(--xa-radius-sm);
  background: transparent;
  border: 1px solid var(--xa-border);
  color: var(--xa-text-dim);
  place-items: center;
  cursor: pointer;
  font-family: var(--xa-font);
}
.xa-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 190;
}

@media (max-width: 768px) {
  .xa-mobile-toggle { display: grid; }
  .xa-sidebar {
    transform: translateX(calc(-1 * var(--xa-sidebar-w)));
    box-shadow: var(--xa-shadow-md);
  }
  .xa-sidebar.is-open { transform: translateX(0); }
  .xa-sidebar-overlay.is-open { display: block; }
  .xa-topbar { left: 0; }
  .xa-content { margin-left: 0 !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTENT AREA
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-content {
  margin-left: var(--xa-sidebar-w);
  margin-top: var(--xa-topbar-h);
  min-height: calc(100vh - var(--xa-topbar-h));
  transition: margin-left var(--xa-t);
  flex: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-section { padding: 28px; }
.xa-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.xa-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--xa-text);
  letter-spacing: -0.01em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-h1 {
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 800;
  letter-spacing: -0.026em;
  line-height: 1.15;
  color: var(--xa-text);
}
.xa-h2 {
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--xa-text);
}
.xa-h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--xa-text);
}
.xa-muted {
  color: var(--xa-text-dim);
  font-size: 13.5px;
}
.xa-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--xa-text-muted);
  margin-bottom: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARD
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-card {
  background: var(--xa-surface);
  border: 1px solid var(--xa-border);
  border-radius: var(--xa-radius);
  box-shadow: var(--xa-shadow);
  overflow: hidden;
  transition: border-color var(--xa-t), box-shadow var(--xa-t);
}
.xa-card:hover {
  border-color: rgba(var(--xa-accent-rgb), 0.30);
  box-shadow: var(--xa-shadow-md);
}
.xa-card--flat { box-shadow: none; }
.xa-card--accent {
  border-color: var(--xa-accent);
  box-shadow: 0 0 0 1px var(--xa-accent), var(--xa-shadow);
}
.xa-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--xa-border);
  gap: 12px;
}
.xa-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--xa-text);
  letter-spacing: -0.01em;
}
.xa-card-body { padding: 20px; }
.xa-card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--xa-border);
  background: var(--xa-surface-2);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GRID
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.xa-grid--2 { grid-template-columns: repeat(2, 1fr); }
.xa-grid--3 { grid-template-columns: repeat(3, 1fr); }
.xa-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) {
  .xa-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .xa-grid--3, .xa-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .xa-grid--2, .xa-grid--3, .xa-grid--4 { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  height: 36px;
  border-radius: var(--xa-radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--xa-font);
  cursor: pointer;
  border: 1px solid var(--xa-border);
  background: var(--xa-surface);
  color: var(--xa-text);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  user-select: none;
  transition:
    background var(--xa-t),
    color var(--xa-t),
    border-color var(--xa-t),
    transform 140ms var(--xa-spring),
    box-shadow var(--xa-t);
  outline: none;
}
.xa-btn:hover {
  background: var(--xa-surface-2);
  border-color: rgba(var(--xa-accent-rgb), 0.35);
  text-decoration: none;
}
.xa-btn:focus-visible { outline: 2px solid var(--xa-accent); outline-offset: 2px; }
.xa-btn:active { transform: scale(0.97); }
.xa-btn:disabled,
.xa-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}
.xa-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.xa-btn--primary {
  background: var(--xa-accent);
  color: #fff;
  border-color: var(--xa-accent);
  box-shadow: 0 2px 8px rgba(var(--xa-accent-rgb), 0.35);
}
.xa-btn--primary:hover {
  background: var(--xa-accent-hover);
  border-color: var(--xa-accent-hover);
  color: #fff;
  box-shadow: 0 4px 16px rgba(var(--xa-accent-rgb), 0.45);
}

.xa-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--xa-text-dim);
}
.xa-btn--ghost:hover {
  background: var(--xa-accent-soft);
  border-color: transparent;
  color: var(--xa-text);
  box-shadow: none;
}

.xa-btn--danger {
  background: var(--xa-err-bg);
  color: var(--xa-err);
  border-color: rgba(var(--xa-accent-rgb), 0);
}
.xa-btn--danger { border-color: color-mix(in srgb, var(--xa-err) 25%, transparent); }
.xa-btn--danger:hover {
  background: var(--xa-err);
  color: #fff;
  border-color: var(--xa-err);
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.35);
}

/* Sizes */
.xa-btn--sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  gap: 5px;
}
.xa-btn--sm svg { width: 13px; height: 13px; }

.xa-btn--lg {
  height: 44px;
  padding: 0 22px;
  font-size: 15px;
  border-radius: var(--xa-radius);
}
.xa-btn--lg svg { width: 17px; height: 17px; }

.xa-btn--icon {
  width: 36px;
  height: 36px;
  padding: 0;
  flex-shrink: 0;
}
.xa-btn--icon.xa-btn--sm { width: 28px; height: 28px; }
.xa-btn--icon.xa-btn--lg { width: 44px; height: 44px; }

/* ═══════════════════════════════════════════════════════════════════════════
   FORM CONTROLS
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-input,
.xa-select,
.xa-textarea {
  display: block;
  width: 100%;
  padding: 0 12px;
  height: 36px;
  border-radius: var(--xa-radius-sm);
  border: 1px solid var(--xa-border);
  background: var(--xa-surface);
  color: var(--xa-text);
  font-size: 14px;
  font-family: var(--xa-font);
  line-height: 1;
  transition: border-color var(--xa-t), box-shadow var(--xa-t), background var(--xa-t);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.xa-input::placeholder,
.xa-textarea::placeholder { color: var(--xa-text-muted); opacity: 0.85; }
.xa-input:hover,
.xa-select:hover,
.xa-textarea:hover { border-color: var(--xa-border-2); }
.xa-input:focus,
.xa-select:focus,
.xa-textarea:focus {
  border-color: var(--xa-accent);
  box-shadow: 0 0 0 3px var(--xa-accent-ring);
}
.xa-input:disabled,
.xa-select:disabled,
.xa-textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--xa-surface-2);
}

.xa-textarea {
  height: auto;
  min-height: 80px;
  padding: 9px 12px;
  line-height: 1.55;
  resize: vertical;
}

.xa-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238888a0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  cursor: pointer;
}

/* Field wrapper */
.xa-field { display: flex; flex-direction: column; gap: 6px; }
.xa-field-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--xa-text-dim);
}
.xa-field-hint { font-size: 12px; color: var(--xa-text-muted); }
.xa-field--error .xa-input,
.xa-field--error .xa-select,
.xa-field--error .xa-textarea {
  border-color: var(--xa-err);
  box-shadow: 0 0 0 3px var(--xa-err-soft);
}
.xa-field-error-msg { font-size: 12px; color: var(--xa-err); }

/* ═══════════════════════════════════════════════════════════════════════════
   BADGE
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--xa-surface-2);
  color: var(--xa-text-dim);
  border: 1px solid var(--xa-border);
  white-space: nowrap;
}
.xa-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
  flex-shrink: 0;
}
.xa-badge--no-dot::before { display: none; }

.xa-badge--ok   { background: var(--xa-ok-bg);   color: var(--xa-ok);   border-color: color-mix(in srgb, var(--xa-ok) 25%, transparent); }
.xa-badge--warn { background: var(--xa-warn-bg);  color: var(--xa-warn); border-color: color-mix(in srgb, var(--xa-warn) 25%, transparent); }
.xa-badge--err  { background: var(--xa-err-bg);   color: var(--xa-err);  border-color: color-mix(in srgb, var(--xa-err) 25%, transparent); }
.xa-badge--info { background: var(--xa-info-soft);color: var(--xa-info); border-color: color-mix(in srgb, var(--xa-info) 25%, transparent); }
.xa-badge--accent { background: var(--xa-accent-soft); color: var(--xa-accent); border-color: color-mix(in srgb, var(--xa-accent) 25%, transparent); }

/* ═══════════════════════════════════════════════════════════════════════════
   CHIP
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  background: var(--xa-accent-soft);
  color: var(--xa-accent);
  border: 1px solid color-mix(in srgb, var(--xa-accent) 25%, transparent);
  cursor: default;
  white-space: nowrap;
  transition: background var(--xa-t), border-color var(--xa-t);
}
.xa-chip-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px; height: 14px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--xa-t), background var(--xa-t);
  margin-left: 2px;
}
.xa-chip-close:hover { opacity: 1; background: rgba(0,0,0,0.10); }
[data-theme="dark"] .xa-chip-close:hover { background: rgba(255,255,255,0.12); }

/* ═══════════════════════════════════════════════════════════════════════════
   TABLE
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--xa-border);
  border-radius: var(--xa-radius);
  background: var(--xa-surface);
}

.xa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.xa-table thead { background: var(--xa-surface-2); }
.xa-table th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--xa-text-dim);
  padding: 10px 14px;
  border-bottom: 1px solid var(--xa-border);
  white-space: nowrap;
}
.xa-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--xa-border);
  color: var(--xa-text);
  vertical-align: middle;
}
.xa-table tbody tr:last-child td { border-bottom: 0; }
.xa-table tbody tr:hover td { background: var(--xa-accent-soft); }

/* ═══════════════════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.48);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 24px;
  animation: xa-fade-in 0.15s var(--xa-ease) both;
}
[data-theme="dark"] .xa-modal-backdrop { background: rgba(0,0,0,0.65); }

.xa-modal {
  background: var(--xa-surface);
  border: 1px solid var(--xa-border);
  border-radius: var(--xa-radius-lg, 18px);
  box-shadow: var(--xa-shadow-xl);
  width: 100%;
  max-width: 540px;
  max-height: calc(100vh - 64px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: xa-slide-up 0.18s var(--xa-ease) both;
}
.xa-modal--sm { max-width: 360px; }
.xa-modal--lg { max-width: 680px; }
.xa-modal--xl { max-width: 900px; }

.xa-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--xa-border);
  flex-shrink: 0;
  gap: 12px;
}
.xa-modal-head h2,
.xa-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--xa-text);
  letter-spacing: -0.014em;
}
.xa-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: var(--xa-radius-sm);
  background: transparent;
  border: none;
  color: var(--xa-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--xa-t), color var(--xa-t);
}
.xa-modal-close:hover { background: var(--xa-surface-2); color: var(--xa-text); }

.xa-modal-body {
  padding: 22px;
  flex: 1;
  overflow-y: auto;
  color: var(--xa-text-dim);
  font-size: 14px;
  line-height: 1.6;
}
.xa-modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--xa-border);
  background: var(--xa-surface-2);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 52px 24px;
  text-align: center;
  color: var(--xa-text-dim);
}
.xa-empty-icon {
  width: 48px; height: 48px;
  border-radius: var(--xa-radius);
  background: var(--xa-surface-2);
  border: 1px solid var(--xa-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--xa-text-muted);
  margin-bottom: 4px;
}
.xa-empty-icon svg,
.xa-empty svg { width: 22px; height: 22px; }
.xa-empty-title,
.xa-empty h3 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--xa-text);
  margin: 0;
  letter-spacing: -0.01em;
}
.xa-empty-desc,
.xa-empty p {
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 340px;
  margin: 0;
  color: var(--xa-text-dim);
}
.xa-empty .xa-btn { margin-top: 8px; }

/* ═══════════════════════════════════════════════════════════════════════════
   SPINNER
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2.5px solid var(--xa-border);
  border-top-color: var(--xa-accent);
  border-radius: 50%;
  animation: xa-spin 0.7s linear infinite;
  flex-shrink: 0;
}
.xa-spinner--sm { width: 14px; height: 14px; border-width: 2px; }
.xa-spinner--lg { width: 32px; height: 32px; border-width: 3px; }
.xa-spinner--xl { width: 48px; height: 48px; border-width: 3.5px; }

.xa-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  gap: 12px;
  color: var(--xa-text-muted);
  font-size: 13.5px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-toast-area {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  max-width: 360px;
  width: calc(100vw - 40px);
  pointer-events: none;
}

.xa-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--xa-radius);
  background: var(--xa-surface);
  border: 1px solid var(--xa-border);
  box-shadow: var(--xa-shadow-lg);
  font-size: 13.5px;
  color: var(--xa-text);
  pointer-events: all;
  animation: xa-toast-in 0.2s var(--xa-spring) both;
  position: relative;
  overflow: hidden;
}
.xa-toast--out { animation: xa-toast-out 0.15s var(--xa-ease) both; }

.xa-toast-icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.xa-toast-body { flex: 1; line-height: 1.5; }
.xa-toast-title { font-weight: 600; }
.xa-toast-msg { color: var(--xa-text-dim); font-size: 12.5px; margin-top: 1px; }
.xa-toast-close {
  position: absolute;
  top: 8px; right: 8px;
  width: 20px; height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  color: var(--xa-text-muted);
  transition: background var(--xa-t), color var(--xa-t);
}
.xa-toast-close:hover { background: var(--xa-surface-2); color: var(--xa-text); }

.xa-toast--ok   { border-left: 3px solid var(--xa-ok); }
.xa-toast--warn { border-left: 3px solid var(--xa-warn); }
.xa-toast--err  { border-left: 3px solid var(--xa-err); }
.xa-toast--info { border-left: 3px solid var(--xa-accent); }
.xa-toast--ok   .xa-toast-icon { color: var(--xa-ok); }
.xa-toast--warn .xa-toast-icon { color: var(--xa-warn); }
.xa-toast--err  .xa-toast-icon { color: var(--xa-err); }
.xa-toast--info .xa-toast-icon { color: var(--xa-accent); }

/* ═══════════════════════════════════════════════════════════════════════════
   TABS
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-tabs {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--xa-border);
  overflow-x: auto;
  scrollbar-width: none;
}
.xa-tabs::-webkit-scrollbar { display: none; }

.xa-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 40px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--xa-text-dim);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--xa-t), border-color var(--xa-t);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  outline: none;
  text-decoration: none;
  margin-bottom: -1px;
  font-family: var(--xa-font);
}
.xa-tab:hover { color: var(--xa-text); }
.xa-tab.active,
.xa-tab[aria-selected="true"],
.xa-tab--active {
  color: var(--xa-accent);
  border-bottom-color: var(--xa-accent);
  font-weight: 600;
}
.xa-tab svg { width: 14px; height: 14px; flex-shrink: 0; }
.xa-tab-panel { display: none; padding-top: 20px; }
.xa-tab-panel.active, .xa-tab-panel--active { display: block; }

/* ═══════════════════════════════════════════════════════════════════════════
   DIVIDER
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-divider {
  border: 0;
  height: 1px;
  background: var(--xa-border);
  margin: 16px 0;
  width: 100%;
}
.xa-divider--v {
  width: 1px;
  height: 100%;
  background: var(--xa-border);
  margin: 0 12px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ALERT / CALLOUT
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--xa-radius-sm);
  font-size: 13.5px;
  line-height: 1.55;
  background: var(--xa-surface-2);
  border: 1px solid var(--xa-border);
  color: var(--xa-text-dim);
}
.xa-alert svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; }
.xa-alert--ok   { background: var(--xa-ok-bg);    border-color: color-mix(in srgb, var(--xa-ok) 30%, transparent);   color: var(--xa-ok); }
.xa-alert--warn { background: var(--xa-warn-bg);  border-color: color-mix(in srgb, var(--xa-warn) 30%, transparent); color: var(--xa-warn); }
.xa-alert--err  { background: var(--xa-err-bg);   border-color: color-mix(in srgb, var(--xa-err) 30%, transparent);  color: var(--xa-err); }
.xa-alert--info { background: var(--xa-info-soft);border-color: color-mix(in srgb, var(--xa-info) 30%, transparent); color: var(--xa-info); }
.xa-alert--accent { background: var(--xa-accent-soft); border-color: color-mix(in srgb, var(--xa-accent) 30%, transparent); color: var(--xa-accent); }

/* ═══════════════════════════════════════════════════════════════════════════
   STAT / KPI
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-stat { display: flex; flex-direction: column; gap: 4px; }
.xa-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--xa-text);
}
.xa-stat-label {
  font-size: 12.5px;
  color: var(--xa-text-muted);
  font-weight: 500;
}
.xa-stat-delta {
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.xa-stat-delta--up   { color: var(--xa-ok); }
.xa-stat-delta--down { color: var(--xa-err); }

/* ═══════════════════════════════════════════════════════════════════════════
   PROGRESS
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-progress {
  width: 100%;
  height: 6px;
  background: var(--xa-surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.xa-progress-bar {
  height: 100%;
  background: var(--xa-accent);
  border-radius: 999px;
  transition: width var(--xa-t-slow, 350ms) var(--xa-ease);
}
.xa-progress-bar--ok   { background: var(--xa-ok); }
.xa-progress-bar--warn { background: var(--xa-warn); }
.xa-progress-bar--err  { background: var(--xa-err); }

/* ═══════════════════════════════════════════════════════════════════════════
   SKELETON LOADER
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-skeleton {
  background: linear-gradient(90deg,
    var(--xa-surface-2) 25%,
    var(--xa-border) 50%,
    var(--xa-surface-2) 75%
  );
  background-size: 200% 100%;
  border-radius: var(--xa-radius-sm);
  animation: xa-shimmer 1.5s infinite;
}
.xa-skeleton-text  { height: 14px; margin-bottom: 8px; }
.xa-skeleton-text:last-child { width: 60%; }
.xa-skeleton-title { height: 22px; margin-bottom: 12px; }
.xa-skeleton-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SWITCH / TOGGLE
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--xa-text-dim);
  user-select: none;
}
.xa-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.xa-switch-track {
  position: relative;
  width: 36px; height: 20px;
  border-radius: 999px;
  background: var(--xa-border-2);
  flex-shrink: 0;
  transition: background var(--xa-t);
}
.xa-switch-track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.20);
  transition: left var(--xa-t);
}
.xa-switch input:checked ~ .xa-switch-track { background: var(--xa-accent); }
.xa-switch input:checked ~ .xa-switch-track::after { left: calc(100% - 18px); }
.xa-switch input:focus-visible ~ .xa-switch-track { box-shadow: 0 0 0 3px var(--xa-accent-ring); }

/* ═══════════════════════════════════════════════════════════════════════════
   CODE BLOCK
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-code {
  background: var(--xa-surface-2);
  border: 1px solid var(--xa-border);
  border-radius: var(--xa-radius-sm);
  padding: 14px 16px;
  font-family: var(--xa-mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--xa-text);
  overflow-x: auto;
  white-space: pre;
}
.xa-code-inline {
  background: var(--xa-surface-2);
  border: 1px solid var(--xa-border);
  border-radius: 5px;
  padding: 1px 6px;
  font-family: var(--xa-mono);
  font-size: 0.85em;
  color: var(--xa-accent);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MENU / DROPDOWN
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-menu {
  position: absolute;
  min-width: 180px;
  background: var(--xa-surface);
  border: 1px solid var(--xa-border);
  border-radius: var(--xa-radius);
  box-shadow: var(--xa-shadow-lg);
  z-index: 500;
  padding: 4px;
  animation: xa-slide-up 0.14s var(--xa-ease) both;
}
.xa-menu--right { right: 0; }

.xa-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 13.5px;
  color: var(--xa-text);
  border-radius: var(--xa-radius-sm);
  cursor: pointer;
  transition: background var(--xa-t);
  white-space: nowrap;
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--xa-font);
}
.xa-menu-item:hover { background: var(--xa-surface-2); text-decoration: none; color: var(--xa-text); }
.xa-menu-item svg { width: 14px; height: 14px; color: var(--xa-text-muted); flex-shrink: 0; }
.xa-menu-item--danger { color: var(--xa-err); }
.xa-menu-item--danger:hover { background: var(--xa-err-bg); }
.xa-menu-sep { height: 1px; background: var(--xa-border); margin: 4px 0; }
.xa-menu-label {
  padding: 4px 10px 2px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--xa-text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PANEL
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-panel {
  background: var(--xa-surface);
  border: 1px solid var(--xa-border);
  border-radius: var(--xa-radius);
  overflow: hidden;
}
.xa-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--xa-border);
  background: var(--xa-surface-2);
  gap: 8px;
}
.xa-panel-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--xa-text-dim);
}
.xa-panel-body { padding: 16px; }

/* ═══════════════════════════════════════════════════════════════════════════
   AVATAR
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--xa-accent-soft);
  color: var(--xa-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  flex-shrink: 0;
  overflow: hidden;
}
.xa-avatar img { width: 100%; height: 100%; object-fit: cover; }
.xa-avatar--sm { width: 24px; height: 24px; font-size: 9px; }
.xa-avatar--lg { width: 40px; height: 40px; font-size: 14px; }
.xa-avatar--xl { width: 56px; height: 56px; font-size: 18px; }

/* ═══════════════════════════════════════════════════════════════════════════
   DOT  (status indicator)
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--xa-text-muted);
  flex-shrink: 0;
}
.xa-dot--ok     { background: var(--xa-ok);     animation: xa-pulse-dot 2s infinite; }
.xa-dot--warn   { background: var(--xa-warn); }
.xa-dot--err    { background: var(--xa-err);    animation: xa-pulse-dot 1.2s infinite; }
.xa-dot--accent { background: var(--xa-accent); animation: xa-pulse-dot 2s infinite; }

/* ═══════════════════════════════════════════════════════════════════════════
   TOOLTIP  (CSS-only)
   ═══════════════════════════════════════════════════════════════════════════ */
[data-tip] { position: relative; cursor: default; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--xa-text);
  color: var(--xa-bg);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--xa-t-fast);
  z-index: 600;
  font-family: var(--xa-font);
}
[data-tip]:hover::after { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   BREADCRUMB
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--xa-text-muted);
  flex-wrap: wrap;
}
.xa-breadcrumb a { color: var(--xa-text-dim); text-decoration: none; }
.xa-breadcrumb a:hover { color: var(--xa-accent); }
.xa-breadcrumb-sep { opacity: 0.5; }
.xa-breadcrumb-current { color: var(--xa-text); font-weight: 500; }

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════════════ */
.xa-flex        { display: flex; }
.xa-flex-col    { display: flex; flex-direction: column; }
.xa-items-center { align-items: center; }
.xa-items-start  { align-items: flex-start; }
.xa-items-end    { align-items: flex-end; }
.xa-justify-between { justify-content: space-between; }
.xa-justify-end     { justify-content: flex-end; }
.xa-justify-center  { justify-content: center; }
.xa-flex-wrap { flex-wrap: wrap; }
.xa-gap-2 { gap: 8px; }
.xa-gap-3 { gap: 12px; }
.xa-gap-4 { gap: 16px; }
.xa-mt-2 { margin-top: 8px; }
.xa-mt-3 { margin-top: 12px; }
.xa-mt-4 { margin-top: 16px; }
.xa-mt-6 { margin-top: 24px; }
.xa-mb-2 { margin-bottom: 8px; }
.xa-mb-3 { margin-bottom: 12px; }
.xa-mb-4 { margin-bottom: 16px; }
.xa-mb-6 { margin-bottom: 24px; }
.xa-text-right  { text-align: right; }
.xa-text-center { text-align: center; }
.xa-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xa-font-mono { font-family: var(--xa-mono); font-size: 0.875em; }
.xa-hidden  { display: none !important; }
.xa-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;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--xa-border-2); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--xa-text-muted); }

/* ═══════════════════════════════════════════════════════════════════════════
   FOCUS RING
   ═══════════════════════════════════════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--xa-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   KEYFRAMES
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes xa-spin { to { transform: rotate(360deg); } }

@keyframes xa-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes xa-slide-up {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes xa-toast-in {
  from { opacity: 0; transform: translateX(20px) scale(0.96); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes xa-toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}

@keyframes xa-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

@keyframes xa-pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════════════════════════ */
@media print {
  .xa-toast-area,
  .xa-modal-backdrop,
  .xa-sidebar,
  .xa-topbar { display: none !important; }
  .xa-content { margin: 0 !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CSS POLISH — additive block (do not remove above rules)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── (1) Global smooth transition on interactive elements ── */
button,
.xa-btn,
.xa-card,
a {
  transition:
    background    0.15s var(--xa-ease),
    border-color  0.15s var(--xa-ease),
    transform     0.10s var(--xa-ease),
    box-shadow    0.15s var(--xa-ease),
    color         0.15s var(--xa-ease);
}

/* Subtle hover lift on .xa-card (additive on top of existing hover) */
.xa-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--xa-shadow-md);
}

/* ── (2) .xa-skeleton shimmer — augment existing base ── */
/* (base .xa-skeleton already defined above; extend only shape variants here) */
.xa-skeleton-card {
  height: 140px;
  border-radius: var(--xa-radius);
}
.xa-skeleton-btn {
  height: 36px;
  width: 96px;
  border-radius: var(--xa-radius-sm);
}

/* ── (3) .xa-toast-host — top-right stacking host (complement to .xa-toast-area) ── */
.xa-toast-host {
  position: fixed;
  top: calc(var(--xa-topbar-h, 56px) + 12px);
  right: 16px;
  z-index: 9100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  max-width: 360px;
  width: calc(100vw - 32px);
  pointer-events: none;
}
/* toasts inside .xa-toast-host inherit .xa-toast styles; pointer-events re-enabled */
.xa-toast-host .xa-toast { pointer-events: all; }

/* ── (4) .xa-cmdk — command palette ── */
.xa-cmdk-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 8000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  animation: xa-fade-in 0.12s var(--xa-ease) both;
}
[data-theme="dark"] .xa-cmdk-backdrop { background: rgba(0, 0, 0, 0.65); }

.xa-cmdk {
  width: 560px;
  max-width: calc(100vw - 32px);
  background: var(--xa-surface);
  border: 1px solid var(--xa-border);
  border-radius: var(--xa-radius-lg);
  box-shadow: var(--xa-shadow-xl);
  overflow: hidden;
  animation: xa-slide-up 0.18s var(--xa-spring) both;
  display: flex;
  flex-direction: column;
}

.xa-cmdk-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--xa-border);
}
.xa-cmdk-icon {
  color: var(--xa-text-muted);
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}
.xa-cmdk-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  font-family: var(--xa-font);
  color: var(--xa-text);
  caret-color: var(--xa-accent);
}
.xa-cmdk-input::placeholder { color: var(--xa-text-muted); }

.xa-cmdk-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
}

.xa-cmdk-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--xa-text-muted);
  padding: 8px 10px 4px;
}

.xa-cmdk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--xa-radius-sm);
  cursor: pointer;
  font-size: 13.5px;
  color: var(--xa-text-dim);
  transition: background 0.10s var(--xa-ease), color 0.10s var(--xa-ease);
}
.xa-cmdk-row:hover,
.xa-cmdk-row[aria-selected="true"],
.xa-cmdk-row--active {
  background: var(--xa-accent-soft);
  color: var(--xa-text);
}
.xa-cmdk-row--active .xa-cmdk-row-icon { color: var(--xa-accent); }

.xa-cmdk-row-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--xa-text-muted);
}
.xa-cmdk-row-label { flex: 1; }
.xa-cmdk-row-kbd {
  font-size: 11px;
  font-family: var(--xa-mono);
  background: var(--xa-surface-2);
  border: 1px solid var(--xa-border);
  color: var(--xa-text-muted);
  padding: 1px 6px;
  border-radius: 4px;
}

.xa-cmdk-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-top: 1px solid var(--xa-border);
  background: var(--xa-surface-2);
  font-size: 11.5px;
  color: var(--xa-text-muted);
}
.xa-cmdk-footer kbd {
  font-family: var(--xa-mono);
  background: var(--xa-surface);
  border: 1px solid var(--xa-border);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
}

/* ── (5) .xa-split-handle — draggable divider ── */
.xa-split-handle {
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: background 0.15s var(--xa-ease);
  z-index: 10;
}
.xa-split-handle::after {
  content: '';
  display: block;
  border-radius: 999px;
  background: var(--xa-border);
  transition: background 0.15s var(--xa-ease), transform 0.15s var(--xa-ease);
}

/* column variant (vertical bar) */
.xa-split-handle--col {
  width: 6px;
  cursor: col-resize;
  flex-direction: row;
}
.xa-split-handle--col::after {
  width: 2px;
  height: 32px;
}
.xa-split-handle--col:hover::after,
.xa-split-handle--col[data-dragging]::after {
  background: var(--xa-accent);
  transform: scaleX(1.5);
}

/* row variant (horizontal bar) */
.xa-split-handle--row {
  height: 6px;
  cursor: row-resize;
  flex-direction: column;
}
.xa-split-handle--row::after {
  height: 2px;
  width: 32px;
}
.xa-split-handle--row:hover::after,
.xa-split-handle--row[data-dragging]::after {
  background: var(--xa-accent);
  transform: scaleY(1.5);
}

/* ── (6) .xa-ide-chat — right-panel AI chat ── */
.xa-ide-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--xa-surface);
  border-left: 1px solid var(--xa-border);
  font-family: var(--xa-font);
  font-size: 13.5px;
  color: var(--xa-text);
  overflow: hidden;
}

.xa-ide-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--xa-border);
  flex-shrink: 0;
  font-weight: 600;
  font-size: 13px;
  color: var(--xa-text);
}

.xa-ide-chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.xa-ide-chat-bubble {
  max-width: 88%;
  padding: 8px 12px;
  border-radius: var(--xa-radius-sm);
  line-height: 1.55;
  font-size: 13px;
  word-break: break-word;
}
.xa-ide-chat-bubble--user {
  align-self: flex-end;
  background: var(--xa-accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.xa-ide-chat-bubble--ai {
  align-self: flex-start;
  background: var(--xa-surface-2);
  color: var(--xa-text);
  border: 1px solid var(--xa-border);
  border-bottom-left-radius: 4px;
}
.xa-ide-chat-bubble--ai code {
  background: var(--xa-surface);
  border: 1px solid var(--xa-border);
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 0.85em;
}

.xa-ide-chat-ts {
  font-size: 10.5px;
  color: var(--xa-text-muted);
  margin-top: 2px;
  text-align: right;
}
.xa-ide-chat-bubble--ai + .xa-ide-chat-ts { text-align: left; }

.xa-ide-chat-foot {
  flex-shrink: 0;
  border-top: 1px solid var(--xa-border);
  padding: 10px 12px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--xa-surface);
}
.xa-ide-chat-input {
  flex: 1;
  border: 1px solid var(--xa-border);
  border-radius: var(--xa-radius-sm);
  background: var(--xa-bg);
  color: var(--xa-text);
  font-family: var(--xa-font);
  font-size: 13px;
  padding: 7px 10px;
  resize: none;
  max-height: 120px;
  outline: none;
  transition: border-color 0.15s var(--xa-ease), box-shadow 0.15s var(--xa-ease);
  line-height: 1.5;
}
.xa-ide-chat-input:focus {
  border-color: var(--xa-accent);
  box-shadow: 0 0 0 3px var(--xa-accent-ring);
}
.xa-ide-chat-input::placeholder { color: var(--xa-text-muted); }
.xa-ide-chat-send {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--xa-radius-sm);
  background: var(--xa-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s var(--xa-ease), transform 0.10s var(--xa-ease);
}
.xa-ide-chat-send:hover { background: var(--xa-accent-hover); transform: scale(1.05); }
.xa-ide-chat-send:active { transform: scale(0.96); }

/* thinking indicator (3-dot bounce) */
.xa-ide-chat-thinking {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  align-self: flex-start;
}
.xa-ide-chat-thinking span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--xa-text-muted);
  animation: xa-thinking-bounce 1.2s infinite ease-in-out both;
}
.xa-ide-chat-thinking span:nth-child(2) { animation-delay: 0.16s; }
.xa-ide-chat-thinking span:nth-child(3) { animation-delay: 0.32s; }

@keyframes xa-thinking-bounce {
  0%, 80%, 100% { transform: scale(0.65); opacity: 0.5; }
  40%           { transform: scale(1.0);  opacity: 1;   }
}

/* ── (7) .xa-remote-cursor — collab caret + name label ── */
.xa-remote-cursor {
  position: absolute;
  pointer-events: none;
  z-index: 500;
  /* top/left set by JS */
}
.xa-remote-cursor-caret {
  width: 2px;
  height: 1.2em;
  border-radius: 1px;
  /* background set per-user via inline style */
  background: var(--xa-accent);
  position: relative;
}
.xa-remote-cursor-label {
  position: absolute;
  top: -20px;
  left: 2px;
  white-space: nowrap;
  font-size: 10.5px;
  font-family: var(--xa-font);
  font-weight: 600;
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px 4px 4px 0;
  /* background set per-user via inline style */
  background: var(--xa-accent);
  pointer-events: none;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

/* ── (8) .xa-presence-stack — collab avatar pile ── */
.xa-presence-stack {
  display: flex;
  align-items: center;
  flex-direction: row-reverse; /* last avatar is leftmost */
}
.xa-presence-stack .xa-avatar {
  margin-left: -8px;
  border: 2px solid var(--xa-surface);
  transition: transform 0.15s var(--xa-ease), z-index 0s;
  position: relative;
  z-index: 1;
}
.xa-presence-stack .xa-avatar:first-child { margin-left: 0; }
.xa-presence-stack .xa-avatar:hover {
  transform: translateY(-3px);
  z-index: 10;
}

/* overflow "+N" bubble */
.xa-presence-overflow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--xa-surface);
  background: var(--xa-surface-2);
  color: var(--xa-text-dim);
  font-size: 10.5px;
  font-weight: 600;
  margin-left: -8px;
  position: relative;
  z-index: 0;
}

/* ── Dark-mode refinements for new components ── */
[data-theme="dark"] .xa-ide-chat-bubble--ai {
  background: var(--xa-surface-2);
  border-color: var(--xa-border);
}
[data-theme="dark"] .xa-cmdk {
  background: var(--xa-surface);
  border-color: var(--xa-border);
}
[data-theme="dark"] .xa-split-handle--col:hover::after,
[data-theme="dark"] .xa-split-handle--row:hover::after {
  background: var(--xa-accent);
}

/* ═══════════════════════════════════════════════════════════════════════════
   deeper motion polish
   Additive block — never alters rules above. All animations respect
   @media (prefers-reduced-motion: reduce) via the global blanket at line ~1532.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── (dm-1) Keyframes ── */

/* card / section entrance: fade + rise */
@keyframes xa-entrance {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* modal / cmdk / drawer entrance: scale-up from 96% */
@keyframes xa-scale-in {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* modal / cmdk exit: scale back down */
@keyframes xa-scale-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(6px) scale(0.96); }
}

/* toast exit — slide right */
@keyframes xa-toast-out-right {
  from { opacity: 1; transform: translateX(0) scale(1); max-height: 120px; margin-bottom: 0; }
  to   { opacity: 0; transform: translateX(24px) scale(0.95); max-height: 0;   margin-bottom: -8px; }
}

/* ripple spread */
@keyframes xa-ripple {
  from { transform: scale(0); opacity: 0.28; }
  to   { transform: scale(2.8); opacity: 0; }
}

/* sidebar nav active indicator slide-in */
@keyframes xa-indicator-slide {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}

/* refined shimmer: tighter, slightly faster */
@keyframes xa-shimmer-deep {
  0%   { background-position: -300% 0; }
  100% { background-position:  300% 0; }
}

/* tab underline grow from center */
@keyframes xa-underline-grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* panel fade-slide (tab panel switch) */
@keyframes xa-panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ── (dm-2) Card / Section entrance ── */
/* Opt-in: add .xa-animate-entrance to any .xa-card or section wrapper */
.xa-animate-entrance {
  animation: xa-entrance 0.32s var(--xa-ease) both;
}

/* Staggered children — add .xa-stagger to a flex/grid container */
.xa-stagger > * {
  animation: xa-entrance 0.30s var(--xa-ease) both;
}
.xa-stagger > *:nth-child(1)  { animation-delay: 0ms;  }
.xa-stagger > *:nth-child(2)  { animation-delay: 40ms; }
.xa-stagger > *:nth-child(3)  { animation-delay: 80ms; }
.xa-stagger > *:nth-child(4)  { animation-delay: 120ms; }
.xa-stagger > *:nth-child(5)  { animation-delay: 160ms; }
.xa-stagger > *:nth-child(6)  { animation-delay: 200ms; }
.xa-stagger > *:nth-child(7)  { animation-delay: 240ms; }
.xa-stagger > *:nth-child(8)  { animation-delay: 280ms; }
.xa-stagger > *:nth-child(n+9){ animation-delay: 320ms; }


/* ── (dm-3) Modal enter + exit transitions ── */
/* Use .xa-modal--entering / .xa-modal--exiting toggled by JS */
.xa-modal--entering {
  animation: xa-scale-in 0.22s var(--xa-spring) both;
}
.xa-modal--exiting {
  animation: xa-scale-out 0.16s var(--xa-ease) both;
}
/* Backdrop exit */
.xa-modal-backdrop--exiting {
  animation: xa-fade-in 0.14s var(--xa-ease) both reverse;
}

/* CmdK enter/exit (augments existing xa-slide-up; override via more-specific selector) */
.xa-cmdk-backdrop--entering .xa-cmdk,
.xa-cmdk--entering {
  animation: xa-scale-in 0.20s var(--xa-spring) both;
}
.xa-cmdk-backdrop--exiting {
  animation: xa-fade-in 0.12s var(--xa-ease) both reverse;
}
.xa-cmdk-backdrop--exiting .xa-cmdk,
.xa-cmdk--exiting {
  animation: xa-scale-out 0.14s var(--xa-ease) both;
}


/* ── (dm-4) Toast enter + exit ── */
/* Augments existing xa-toast-in; exit class toggled by JS */
.xa-toast--exiting {
  animation: xa-toast-out-right 0.20s var(--xa-ease) both;
  pointer-events: none;
  overflow: hidden;
}


/* ── (dm-5) Button press micro-feedback + ripple ── */
/* .xa-btn:active already has scale(0.97) above; add ripple container */
.xa-btn {
  overflow: hidden;   /* contain the ripple pseudo-element */
}
/* Ripple: JS adds .xa-btn--rippling + inlines --xa-ripple-x/y */
.xa-btn--rippling::after {
  content: '';
  position: absolute;
  left: var(--xa-ripple-x, 50%);
  top:  var(--xa-ripple-y, 50%);
  width: 60px;
  height: 60px;
  margin-left: -30px;
  margin-top: -30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.30);
  pointer-events: none;
  animation: xa-ripple 0.45s var(--xa-ease) forwards;
}
/* Dark surfaces get a darker ripple */
.xa-btn--primary.xa-btn--rippling::after {
  background: rgba(255, 255, 255, 0.22);
}
.xa-btn--ghost.xa-btn--rippling::after {
  background: rgba(var(--xa-accent-rgb), 0.14);
}


/* ── (dm-6) Sidebar nav item hover slide + active indicator ── */
/* Hover slide: content nudges right 2 px */
.xa-nav-link {
  position: relative;   /* already set above, ensure it stays */
}
.xa-nav-link:hover {
  /* nudge text/icon right for "slide" feel without layout shift */
  padding-left: calc(12px + 2px);   /* original padding-left is 12px */
}

/* Active indicator: left accent bar, animated in */
.xa-nav-link.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(1);
  transform-origin: center;
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--xa-accent);
  animation: xa-indicator-slide 0.20s var(--xa-spring) both;
}


/* ── (dm-7) Skeleton shimmer refinement ── */
/* Overrides the shimmer gradient in the existing .xa-skeleton block with a
   tighter, deeper wave.  Must win specificity via the same class. */
.xa-skeleton.xa-skeleton--deep,
.xa-skeleton-deep {
  background: linear-gradient(
    90deg,
    var(--xa-surface-2)         25%,
    color-mix(in srgb, var(--xa-border) 60%, var(--xa-surface)) 50%,
    var(--xa-surface-2)         75%
  );
  background-size: 300% 100%;
  animation: xa-shimmer-deep 1.2s ease-in-out infinite;
  border-radius: var(--xa-radius-sm);
}
/* Dark theme gets a slightly brighter mid-stop */
[data-theme="dark"] .xa-skeleton.xa-skeleton--deep,
[data-theme="dark"] .xa-skeleton-deep {
  background: linear-gradient(
    90deg,
    var(--xa-surface-2)          25%,
    color-mix(in srgb, var(--xa-border-2) 70%, var(--xa-surface)) 50%,
    var(--xa-surface-2)          75%
  );
  background-size: 300% 100%;
}


/* ── (dm-8) Tab + panel transitions ── */
/* Tab underline glides in from center on activation */
.xa-tab.active::after,
.xa-tab[aria-selected="true"]::after,
.xa-tab--active::after {
  content: '';
  position: absolute;
  bottom: -1px;        /* sit on the border-bottom */
  left: 0;
  right: 0;
  height: 2px;
  background: var(--xa-accent);
  border-radius: 2px 2px 0 0;
  transform-origin: center;
  animation: xa-underline-grow 0.18s var(--xa-spring) both;
}
/* Make tabs position:relative so ::after is anchored */
.xa-tab {
  position: relative;
  /* existing border-bottom: 2px solid transparent is kept; ::after overlays it */
}

/* Tab panel: fade+slide in when becoming active */
.xa-tab-panel.active,
.xa-tab-panel--active {
  animation: xa-panel-in 0.20s var(--xa-ease) both;
}


/* ── (dm-9) prefers-reduced-motion safety net (deep-polish additions) ── */
/* The global blanket at line ~1532 already covers *, but we reinforce here
   for any property not caught by the animation-duration/transition-duration hack */
@media (prefers-reduced-motion: reduce) {
  .xa-animate-entrance,
  .xa-stagger > *,
  .xa-modal--entering,
  .xa-modal--exiting,
  .xa-modal-backdrop--exiting,
  .xa-cmdk--entering,
  .xa-cmdk--exiting,
  .xa-cmdk-backdrop--entering .xa-cmdk,
  .xa-cmdk-backdrop--exiting,
  .xa-cmdk-backdrop--exiting .xa-cmdk,
  .xa-toast--exiting,
  .xa-btn--rippling::after,
  .xa-nav-link.is-active::before,
  .xa-skeleton.xa-skeleton--deep,
  .xa-skeleton-deep,
  .xa-tab.active::after,
  .xa-tab[aria-selected="true"]::after,
  .xa-tab--active::after,
  .xa-tab-panel.active,
  .xa-tab-panel--active {
    animation: none !important;
    transition: none !important;
  }
  /* No padding nudge on hover when motion is reduced */
  .xa-nav-link:hover {
    padding-left: 12px;
  }
}
/* ── end deeper motion polish ── */
