/* ============================================================================
 * Sinhvu Admin V32 — UI Component Library
 * Namespace: sv-v32-*
 * No framework. Pure CSS variables + utility classes + component patterns.
 * Tham chiếu: Linear sidebar + Stripe Dashboard drill-down + Notion lazy reveal.
 * ============================================================================ */

/* ============================================================================
 * 1. TOKENS — Variables (Light + Dark theme support)
 * V32 Phase 0.10 — Dark mode complete
 * ============================================================================ */
:root, [data-theme="light"] {
  /* Brand & Semantic */
  --sv-primary:        #5A3FD0;
  --sv-primary-dark:   #3B2A8C;
  --sv-primary-light:  #EFEAFF;
  --sv-primary-bg:     #F5F2FF;

  --sv-secondary:      #F8951D;
  --sv-secondary-dark: #C76E0B;
  --sv-secondary-light:#FFF3E0;

  --sv-success:        #2F7A4F;
  --sv-success-dark:   #1F4D2F;
  --sv-success-light:  #F1FAF4;

  --sv-warning:        #F59E0B;
  --sv-warning-light:  #FFFBEB;

  --sv-danger:         #DC2626;
  --sv-danger-dark:    #991B1B;
  --sv-danger-light:   #FEF2F2;

  --sv-info:           #0EA5E9;
  --sv-info-light:     #ECFEFF;

  /* Surfaces (light) */
  --sv-bg-app:         #F7F6F3;
  --sv-bg-surface:     #FFFFFF;
  --sv-bg-subtle:      #FAFAF8;
  --sv-bg-muted:       #F5F4F2;
  --sv-bg-overlay:     rgba(15, 27, 48, 0.55);

  /* Borders (light) */
  --sv-border-strong:  #1A1918;
  --sv-border-default: #E5E2DA;
  --sv-border-subtle:  #F0EEE9;

  /* Text (light) */
  --sv-text-primary:   #1A1918;
  --sv-text-secondary: #525252;
  --sv-text-tertiary:  #65625B;
  --sv-text-muted:     #94908A;
  --sv-text-inverse:   #FFFFFF;
}

/* === DARK THEME === */
[data-theme="dark"] {
  /* Brand stays semantic, slightly desaturated for dark */
  --sv-primary:        #7C5FE5;
  --sv-primary-dark:   #5A3FD0;
  --sv-primary-light:  #2D2160;
  --sv-primary-bg:     #1F1740;

  --sv-secondary:      #FFB04A;
  --sv-secondary-dark: #F8951D;
  --sv-secondary-light:#3D2D14;

  --sv-success:        #4ADE80;
  --sv-success-dark:   #2F7A4F;
  --sv-success-light:  #133720;

  --sv-warning:        #FBBF24;
  --sv-warning-light:  #3F2A0A;

  --sv-danger:         #F87171;
  --sv-danger-dark:    #DC2626;
  --sv-danger-light:   #3F0F0F;

  --sv-info:           #38BDF8;
  --sv-info-light:     #0E2F40;

  /* Surfaces (dark) */
  --sv-bg-app:         #0E0F11;
  --sv-bg-surface:     #1A1B1E;
  --sv-bg-subtle:      #15171A;
  --sv-bg-muted:       #25272B;
  --sv-bg-overlay:     rgba(0, 0, 0, 0.65);

  /* Borders (dark) */
  --sv-border-strong:  #FAFAF8;
  --sv-border-default: #2A2D31;
  --sv-border-subtle:  #1F2125;

  /* Text (dark) */
  --sv-text-primary:   #F5F4F2;
  --sv-text-secondary: #C5C2BC;
  --sv-text-tertiary:  #94908A;
  --sv-text-muted:     #65625B;
  --sv-text-inverse:   #1A1918;
}

/* Auto detect system preference (only if data-theme not set) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
  }
}

  /* Spacing */
  --sv-space-1: 4px;
  --sv-space-2: 8px;
  --sv-space-3: 12px;
  --sv-space-4: 16px;
  --sv-space-5: 20px;
  --sv-space-6: 24px;
  --sv-space-7: 32px;
  --sv-space-8: 40px;
  --sv-space-9: 48px;
  --sv-space-10: 64px;

  /* Typography */
  --sv-font-sans: Inter, "Be Vietnam Pro", system-ui, -apple-system, sans-serif;
  --sv-font-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;

  --sv-text-xs: 11px;
  --sv-text-sm: 12px;
  --sv-text-base: 13px;
  --sv-text-md: 14px;
  --sv-text-lg: 16px;
  --sv-text-xl: 20px;
  --sv-text-2xl: 24px;
  --sv-text-3xl: 32px;

  --sv-leading-tight: 1.25;
  --sv-leading-snug: 1.4;
  --sv-leading-normal: 1.55;

  /* Radius */
  --sv-radius-sm: 4px;
  --sv-radius-md: 6px;
  --sv-radius-lg: 8px;
  --sv-radius-xl: 12px;
  --sv-radius-pill: 999px;

  /* Shadow */
  --sv-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --sv-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
  --sv-shadow-lg: 0 4px 14px rgba(0, 0, 0, 0.10);
  --sv-shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.18);
  --sv-shadow-2xl: 0 24px 48px rgba(0, 0, 0, 0.25);

  /* Animation */
  --sv-duration-fast: 120ms;
  --sv-duration-normal: 200ms;
  --sv-duration-slow: 300ms;
  --sv-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================================
 * 2. RESET / BASE — only for elements inside .sv-v32-app
 * ============================================================================ */
.sv-v32-app, .sv-v32-app * {
  box-sizing: border-box;
}

.sv-v32-app {
  font-family: var(--sv-font-sans);
  font-size: var(--sv-text-base);
  line-height: var(--sv-leading-normal);
  color: var(--sv-text-primary);
  background: var(--sv-bg-app);
  min-height: 100vh;
}

.sv-v32-app button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

.sv-v32-app input, .sv-v32-app select, .sv-v32-app textarea {
  font-family: inherit;
  font-size: var(--sv-text-base);
}

.sv-v32-app a {
  color: var(--sv-primary);
  text-decoration: none;
}
.sv-v32-app a:hover { text-decoration: underline; }

/* ============================================================================
 * 3. LAYOUT — Figma-style 3-panel
 * - Top bar (48px height, full width): logo + workflow tabs + breadcrumb + cmd+k + user
 * - Left panel (240px fixed): Category / Hierarchy / List (Figma Layers-like)
 * - Center (flex, min 600px): Workspace / Canvas
 * - Right panel (300px fixed): Action / Properties (Figma Inspector-like)
 * ============================================================================ */
.sv-v32-shell {
  display: grid;
  grid-template-rows: 48px 1fr;
  height: 100vh;
  overflow: hidden;
}

/* === TOP BAR === */
.sv-v32-topbar {
  display: flex;
  align-items: center;
  background: var(--sv-bg-surface);
  border-bottom: 1px solid var(--sv-border-default);
  padding: 0 var(--sv-space-4);
  gap: var(--sv-space-4);
  height: 48px;
  z-index: 10;
}

.sv-v32-topbar-logo {
  display: flex;
  align-items: center;
  gap: var(--sv-space-2);
  font-weight: 700;
  font-size: var(--sv-text-md);
  color: var(--sv-primary);
  letter-spacing: -0.02em;
  padding-right: var(--sv-space-4);
  border-right: 1px solid var(--sv-border-subtle);
  height: 48px;
  margin-right: var(--sv-space-2);
}

/* Workflow tabs — compact icon+label, 5-8 items */
.sv-v32-workflow-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.sv-v32-workflow-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--sv-space-2);
  padding: var(--sv-space-2) var(--sv-space-3);
  border-radius: var(--sv-radius-md);
  font-size: var(--sv-text-sm);
  font-weight: 500;
  color: var(--sv-text-secondary);
  cursor: pointer;
  transition: background var(--sv-duration-fast) var(--sv-ease);
  white-space: nowrap;
  position: relative;
}
.sv-v32-workflow-tab:hover {
  background: var(--sv-bg-muted);
  color: var(--sv-text-primary);
}
.sv-v32-workflow-tab[data-active="true"] {
  background: var(--sv-primary-bg);
  color: var(--sv-primary);
  font-weight: 600;
}
.sv-v32-workflow-tab-badge {
  background: var(--sv-secondary);
  color: var(--sv-text-inverse);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--sv-radius-pill);
  min-width: 16px;
  text-align: center;
  line-height: 1.4;
}

.sv-v32-topbar-tools {
  display: flex;
  align-items: center;
  gap: var(--sv-space-2);
  margin-left: auto;
}

.sv-v32-cmdk {
  display: inline-flex;
  align-items: center;
  gap: var(--sv-space-2);
  padding: 6px 12px;
  border: 1px solid var(--sv-border-default);
  border-radius: var(--sv-radius-md);
  font-size: var(--sv-text-sm);
  color: var(--sv-text-tertiary);
  background: var(--sv-bg-subtle);
  min-width: 220px;
}
.sv-v32-cmdk-key {
  font-family: var(--sv-font-mono);
  font-size: 10px;
  background: var(--sv-bg-surface);
  border: 1px solid var(--sv-border-default);
  border-radius: var(--sv-radius-sm);
  padding: 1px 5px;
  color: var(--sv-text-tertiary);
  margin-left: auto;
}

/* === CONTENT 3-PANEL === */
.sv-v32-content {
  display: grid;
  grid-template-columns: 240px 1fr 300px;
  height: 100%;
  min-height: 0;
}
.sv-v32-content[data-left-collapsed="true"] {
  grid-template-columns: 0 1fr 300px;
}
.sv-v32-content[data-right-collapsed="true"] {
  grid-template-columns: 240px 1fr 0;
}
.sv-v32-content[data-left-collapsed="true"][data-right-collapsed="true"] {
  grid-template-columns: 0 1fr 0;
}

/* === LEFT PANEL — Category/Hierarchy (Figma Layers-like) === */
.sv-v32-panel-left {
  background: var(--sv-bg-surface);
  border-right: 1px solid var(--sv-border-default);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width var(--sv-duration-normal) var(--sv-ease);
}

.sv-v32-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sv-space-3) var(--sv-space-4);
  border-bottom: 1px solid var(--sv-border-default);
  height: 44px;
  flex-shrink: 0;
}
.sv-v32-panel-title {
  font-size: var(--sv-text-sm);
  font-weight: 600;
  color: var(--sv-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sv-v32-panel-actions {
  display: flex;
  gap: 2px;
}

.sv-v32-panel-toolbar {
  padding: var(--sv-space-3) var(--sv-space-3);
  border-bottom: 1px solid var(--sv-border-subtle);
  flex-shrink: 0;
}

.sv-v32-search {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--sv-border-default);
  border-radius: var(--sv-radius-md);
  background: var(--sv-bg-subtle);
  font-size: var(--sv-text-sm);
  font-family: inherit;
  color: var(--sv-text-primary);
}
.sv-v32-search:focus {
  outline: none;
  border-color: var(--sv-primary);
  background: var(--sv-bg-surface);
}

.sv-v32-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: var(--sv-space-2);
}
.sv-v32-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--sv-radius-pill);
  background: var(--sv-bg-muted);
  color: var(--sv-text-secondary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--sv-duration-fast);
}
.sv-v32-filter-chip:hover { background: var(--sv-primary-bg); color: var(--sv-primary); }
.sv-v32-filter-chip[data-active="true"] {
  background: var(--sv-primary);
  color: var(--sv-text-inverse);
}
.sv-v32-filter-chip-count {
  background: rgba(255,255,255,0.25);
  color: inherit;
  padding: 0 5px;
  border-radius: var(--sv-radius-pill);
  font-size: 10px;
  font-weight: 700;
}
.sv-v32-filter-chip:not([data-active="true"]) .sv-v32-filter-chip-count {
  background: rgba(0,0,0,0.06);
  color: var(--sv-text-tertiary);
}

.sv-v32-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sv-space-2);
}

/* List item (Figma Layers row style) */
.sv-v32-list-item {
  display: flex;
  align-items: center;
  gap: var(--sv-space-2);
  padding: var(--sv-space-2) var(--sv-space-3);
  border-radius: var(--sv-radius-md);
  cursor: pointer;
  transition: background var(--sv-duration-fast);
  border: 1px solid transparent;
  position: relative;
}
.sv-v32-list-item:hover { background: var(--sv-bg-muted); }
.sv-v32-list-item[data-active="true"] {
  background: var(--sv-primary-bg);
  border-color: var(--sv-primary);
}
.sv-v32-list-item-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.sv-v32-list-item-body {
  flex: 1;
  min-width: 0;
}
.sv-v32-list-item-title {
  font-size: var(--sv-text-sm);
  font-weight: 500;
  color: var(--sv-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sv-v32-list-item-sub {
  font-size: 11px;
  color: var(--sv-text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.sv-v32-list-item-meta {
  font-family: var(--sv-font-mono);
  font-size: 10px;
  color: var(--sv-text-muted);
}
.sv-v32-list-item-status {
  width: 6px;
  height: 6px;
  border-radius: var(--sv-radius-pill);
  background: var(--sv-text-muted);
  flex-shrink: 0;
}
.sv-v32-list-item-status[data-status="active"] { background: var(--sv-primary); }
.sv-v32-list-item-status[data-status="done"] { background: var(--sv-success); }
.sv-v32-list-item-status[data-status="warning"] { background: var(--sv-warning); }
.sv-v32-list-item-status[data-status="danger"] { background: var(--sv-danger); }

/* Group header in list */
.sv-v32-list-group {
  margin-top: var(--sv-space-3);
}
.sv-v32-list-group:first-child { margin-top: 0; }
.sv-v32-list-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sv-space-1) var(--sv-space-3);
  font-size: 10px;
  font-weight: 700;
  color: var(--sv-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* === CENTER — Workspace (Figma canvas-like) === */
.sv-v32-panel-center {
  background: var(--sv-bg-app);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sv-v32-workspace {
  flex: 1;
  overflow-y: auto;
  padding: var(--sv-space-6);
}

.sv-v32-workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--sv-space-5);
  padding-bottom: var(--sv-space-4);
  border-bottom: 1px solid var(--sv-border-default);
}
.sv-v32-workspace-title {
  font-size: var(--sv-text-xl);
  font-weight: 600;
  color: var(--sv-text-primary);
  margin: 0;
  letter-spacing: -0.01em;
}
.sv-v32-workspace-sub {
  font-size: var(--sv-text-sm);
  color: var(--sv-text-tertiary);
  margin: 4px 0 0;
}

.sv-v32-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sv-space-2);
  font-size: var(--sv-text-sm);
  color: var(--sv-text-tertiary);
}
.sv-v32-breadcrumb-item:hover { color: var(--sv-text-primary); cursor: pointer; }
.sv-v32-breadcrumb-item[data-current="true"] { color: var(--sv-text-primary); font-weight: 600; }
.sv-v32-breadcrumb-sep { color: var(--sv-text-muted); }

/* === RIGHT PANEL — Action / Properties (Figma Inspector-like) === */
.sv-v32-panel-right {
  background: var(--sv-bg-surface);
  border-left: 1px solid var(--sv-border-default);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width var(--sv-duration-normal) var(--sv-ease);
}

.sv-v32-action-section {
  padding: var(--sv-space-3) var(--sv-space-4);
  border-bottom: 1px solid var(--sv-border-subtle);
}
.sv-v32-action-section:last-child { border-bottom: none; }

.sv-v32-action-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sv-space-2);
}
.sv-v32-action-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--sv-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sv-v32-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: var(--sv-text-sm);
  gap: var(--sv-space-2);
}
.sv-v32-action-row-label {
  color: var(--sv-text-tertiary);
  flex-shrink: 0;
  min-width: 80px;
}
.sv-v32-action-row-value {
  color: var(--sv-text-primary);
  font-weight: 500;
  flex: 1;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sv-v32-action-row-value-mono {
  font-family: var(--sv-font-mono);
  font-size: 11px;
}

.sv-v32-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sv-v32-action-button {
  display: flex;
  align-items: center;
  gap: var(--sv-space-2);
  padding: 7px 10px;
  border-radius: var(--sv-radius-md);
  background: var(--sv-bg-subtle);
  color: var(--sv-text-primary);
  font-size: var(--sv-text-sm);
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--sv-duration-fast);
  text-align: left;
  width: 100%;
}
.sv-v32-action-button:hover {
  background: var(--sv-primary-bg);
  border-color: var(--sv-primary);
  color: var(--sv-primary);
}
.sv-v32-action-button[data-variant="primary"] {
  background: var(--sv-primary);
  color: var(--sv-text-inverse);
}
.sv-v32-action-button[data-variant="primary"]:hover {
  background: var(--sv-primary-dark);
}
.sv-v32-action-button[data-variant="danger"] {
  color: var(--sv-danger-dark);
}
.sv-v32-action-button[data-variant="danger"]:hover {
  background: var(--sv-danger-light);
  border-color: var(--sv-danger);
  color: var(--sv-danger-dark);
}
.sv-v32-action-button-icon {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.sv-v32-action-button-shortcut {
  margin-left: auto;
  font-family: var(--sv-font-mono);
  font-size: 10px;
  color: var(--sv-text-muted);
}

/* Inline form in right panel */
.sv-v32-form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: var(--sv-space-3);
}
.sv-v32-form-label {
  font-size: 11px;
  color: var(--sv-text-tertiary);
  font-weight: 500;
}
.sv-v32-form-input,
.sv-v32-form-select,
.sv-v32-form-textarea {
  width: 100%;
  padding: 6px 9px;
  border: 1px solid var(--sv-border-default);
  border-radius: var(--sv-radius-md);
  background: var(--sv-bg-surface);
  font-size: var(--sv-text-sm);
  font-family: inherit;
  color: var(--sv-text-primary);
}
.sv-v32-form-input:focus,
.sv-v32-form-select:focus,
.sv-v32-form-textarea:focus {
  outline: none;
  border-color: var(--sv-primary);
  box-shadow: 0 0 0 2px rgba(90,63,208,0.12);
}
.sv-v32-form-textarea { min-height: 60px; resize: vertical; }

/* ============================================================================
 * V32 Phase 0.7 — VISUAL HIERARCHY REFINEMENT
 * Triết lý: 1 hero zone trong CENTER, LEFT/RIGHT mute hơn, color hierarchy chặt
 * ============================================================================ */

/* === Panel weight differentiation === */
.sv-v32-panel-left {
  background: var(--sv-bg-subtle);  /* mute hơn so với CENTER */
}
.sv-v32-panel-right {
  background: var(--sv-bg-subtle);  /* mute hơn so với CENTER */
}
.sv-v32-panel-center {
  background: var(--sv-bg-surface);  /* CENTER là focus zone — sáng nhất */
  box-shadow: inset 1px 0 0 var(--sv-border-subtle), inset -1px 0 0 var(--sv-border-subtle);
}

/* === HERO ZONE trong CENTER (top of workspace) === */
.sv-v32-hero {
  background: var(--sv-bg-surface);
  border-radius: var(--sv-radius-xl);
  padding: var(--sv-space-7) var(--sv-space-7) var(--sv-space-6);
  margin-bottom: var(--sv-space-6);
  border: 1px solid var(--sv-border-default);
  position: relative;
  overflow: hidden;
}
.sv-v32-hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--sv-primary), var(--sv-primary-dark));
}

.sv-v32-hero-meta-row {
  display: flex;
  align-items: center;
  gap: var(--sv-space-3);
  font-size: var(--sv-text-sm);
  color: var(--sv-text-tertiary);
  margin-bottom: var(--sv-space-3);
}

.sv-v32-hero-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--sv-text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 var(--sv-space-2);
}

.sv-v32-hero-subtitle {
  font-size: var(--sv-text-md);
  color: var(--sv-text-tertiary);
  margin: 0;
}

.sv-v32-hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sv-space-6);
  margin-top: var(--sv-space-5);
  padding-top: var(--sv-space-5);
  border-top: 1px solid var(--sv-border-subtle);
}

.sv-v32-hero-value-block {
  display: flex;
  flex-direction: column;
  gap: var(--sv-space-1);
}
.sv-v32-hero-value-label {
  font-size: 11px;
  color: var(--sv-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.sv-v32-hero-value {
  font-family: var(--sv-font-mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--sv-text-primary);
  line-height: 1;
}
.sv-v32-hero-value.--success { color: var(--sv-success-dark); }

.sv-v32-hero-cta {
  height: 48px;
  padding: 0 var(--sv-space-6);
  background: var(--sv-primary);
  color: var(--sv-text-inverse);
  border-radius: var(--sv-radius-md);
  font-size: var(--sv-text-md);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--sv-space-2);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(90, 63, 208, 0.25);
  transition: all var(--sv-duration-fast) var(--sv-ease);
}
.sv-v32-hero-cta:hover {
  background: var(--sv-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(90, 63, 208, 0.32);
}
.sv-v32-hero-cta:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(90, 63, 208, 0.25);
}
.sv-v32-hero-cta-shortcut {
  font-family: var(--sv-font-mono);
  font-size: 10px;
  background: rgba(255,255,255,0.2);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: var(--sv-space-2);
}

/* === STATUS PILL (replace badge in hero) === */
.sv-v32-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  background: var(--sv-bg-muted);
  color: var(--sv-text-secondary);
  border-radius: var(--sv-radius-pill);
  font-size: var(--sv-text-sm);
  font-weight: 500;
}
.sv-v32-status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: var(--sv-radius-pill);
  background: currentColor;
}
.sv-v32-status-pill[data-status="active"] { background: var(--sv-primary-bg); color: var(--sv-primary-dark); }
.sv-v32-status-pill[data-status="warning"] { background: var(--sv-warning-light); color: #92400E; }
.sv-v32-status-pill[data-status="success"] { background: var(--sv-success-light); color: var(--sv-success-dark); }
.sv-v32-status-pill[data-status="danger"] { background: var(--sv-danger-light); color: var(--sv-danger-dark); }

/* === SECTION HEADER tier (16px medium weight) === */
.sv-v32-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: var(--sv-space-7) 0 var(--sv-space-3);
  padding-bottom: var(--sv-space-2);
}
.sv-v32-section-head:first-child { margin-top: 0; }

.sv-v32-section-title {
  font-size: var(--sv-text-lg);
  font-weight: 600;
  color: var(--sv-text-primary);
  margin: 0;
  letter-spacing: -0.005em;
}
.sv-v32-section-subtitle {
  font-size: var(--sv-text-sm);
  color: var(--sv-text-tertiary);
  margin: 2px 0 0;
}

/* === COLOR HIERARCHY DISCIPLINE === */
/* Quy tắc: Primary purple chỉ dùng cho 1 element/screen (the CTA chính) */
/* Các action khác dùng neutral, accent orange chỉ cho aging/sales badge */

/* Card variants — refined (less competing color) */
.sv-v32-card[data-variant="default"] {
  background: var(--sv-bg-surface);
  border: 1px solid var(--sv-border-default);
}
.sv-v32-card[data-variant="elevated"] {
  background: var(--sv-bg-surface);
  border: 1px solid var(--sv-border-default);
  box-shadow: var(--sv-shadow-sm);
}
.sv-v32-card[data-variant="muted"] {
  background: var(--sv-bg-subtle);
  border: 1px solid var(--sv-border-subtle);
}

/* Increased whitespace in cards */
.sv-v32-card-head { padding: var(--sv-space-5) var(--sv-space-6); }
.sv-v32-card-body { padding: var(--sv-space-5) var(--sv-space-6); }
.sv-v32-card-foot { padding: var(--sv-space-3) var(--sv-space-6); }

/* Workspace padding tăng */
.sv-v32-workspace { padding: var(--sv-space-7); max-width: 1200px; }

/* === ADAPTIVE LAYOUT MODES (V32 principle A) === */
/* 3-panel default · 2-panel detail · 1-panel focus */
.sv-v32-content[data-mode="3-panel"] { grid-template-columns: 240px 1fr 300px; }
.sv-v32-content[data-mode="2-panel-left"] { grid-template-columns: 240px 1fr 0; }
.sv-v32-content[data-mode="2-panel-right"] { grid-template-columns: 0 1fr 300px; }
.sv-v32-content[data-mode="1-panel"] { grid-template-columns: 0 1fr 0; }
.sv-v32-content[data-mode="2-panel-left"] .sv-v32-panel-right,
.sv-v32-content[data-mode="2-panel-right"] .sv-v32-panel-left,
.sv-v32-content[data-mode="1-panel"] .sv-v32-panel-left,
.sv-v32-content[data-mode="1-panel"] .sv-v32-panel-right {
  visibility: hidden;
  border: none;
  width: 0;
}

/* === Layout dropdown — discoverable (Phase 0.8 fix) === */
.sv-v32-layout-dropdown {
  position: relative;
  display: inline-block;
}
.sv-v32-layout-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 12px;
  border: 1px solid var(--sv-border-default);
  border-radius: var(--sv-radius-md);
  background: var(--sv-bg-subtle);
  color: var(--sv-text-secondary);
  font-size: var(--sv-text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--sv-duration-fast);
}
.sv-v32-layout-dropdown-trigger:hover {
  background: var(--sv-bg-muted);
  color: var(--sv-text-primary);
}
.sv-v32-layout-dropdown-icon {
  font-size: 12px;
  color: var(--sv-text-muted);
  font-family: var(--sv-font-mono);
}
.sv-v32-layout-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--sv-bg-surface);
  border: 1px solid var(--sv-border-default);
  border-radius: var(--sv-radius-lg);
  box-shadow: var(--sv-shadow-lg);
  min-width: 240px;
  padding: 4px;
  z-index: 50;
  display: none;
  animation: sv-v32-fade-in var(--sv-duration-fast) var(--sv-ease);
}
.sv-v32-layout-dropdown[data-open="true"] .sv-v32-layout-dropdown-menu {
  display: block;
}
.sv-v32-layout-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--sv-radius-md);
  cursor: pointer;
  font-size: var(--sv-text-sm);
  color: var(--sv-text-primary);
  transition: background var(--sv-duration-fast);
}
.sv-v32-layout-option:hover { background: var(--sv-bg-subtle); }
.sv-v32-layout-option[data-active="true"] {
  background: var(--sv-primary-bg);
  color: var(--sv-primary-dark);
}
.sv-v32-layout-option-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sv-v32-layout-option-label {
  font-weight: 500;
}
.sv-v32-layout-option-desc {
  font-size: 11px;
  color: var(--sv-text-tertiary);
}
.sv-v32-layout-option-shortcut {
  font-family: var(--sv-font-mono);
  font-size: 10px;
  background: var(--sv-bg-muted);
  border: 1px solid var(--sv-border-default);
  border-radius: var(--sv-radius-sm);
  padding: 1px 5px;
  color: var(--sv-text-tertiary);
}

/* === LEGACY toggle (kept for backward compat) === */
.sv-v32-layout-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--sv-border-default);
  border-radius: var(--sv-radius-md);
  overflow: hidden;
  background: var(--sv-bg-subtle);
}
.sv-v32-layout-toggle button {
  padding: 5px 9px;
  font-size: 11px;
  color: var(--sv-text-tertiary);
  border-right: 1px solid var(--sv-border-default);
  cursor: pointer;
  transition: all var(--sv-duration-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sv-v32-layout-toggle button:last-child { border-right: none; }
.sv-v32-layout-toggle button:hover { background: var(--sv-bg-muted); color: var(--sv-text-primary); }
.sv-v32-layout-toggle button[data-active="true"] {
  background: var(--sv-primary);
  color: var(--sv-text-inverse);
}

/* ============================================================================
 * V32 Phase 0.11 — POLISH + MICRO-INTERACTIONS
 * ============================================================================ */

/* Hover lift cho card workflow */
.sv-v32-card[data-variant="workflow"]:hover,
.sv-v32-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sv-shadow-md);
}

/* Active press */
.sv-v32-btn-primary:active,
.sv-v32-btn-secondary:active,
.sv-v32-btn-ghost:active,
.sv-v32-btn-danger:active,
.sv-v32-action-button:active,
.sv-v32-hero-cta:active {
  transform: scale(0.98);
}

/* Tooltip pattern */
.sv-v32-tooltip {
  position: relative;
}
.sv-v32-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--sv-text-primary);
  color: var(--sv-text-inverse);
  padding: 4px 10px;
  border-radius: var(--sv-radius-sm);
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--sv-duration-fast), transform var(--sv-duration-fast);
  z-index: 100;
}
.sv-v32-tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Skeleton card variant */
.sv-v32-skeleton-line {
  height: 12px;
  background: var(--sv-bg-muted);
  border-radius: var(--sv-radius-sm);
  margin-bottom: 8px;
  background: linear-gradient(90deg, var(--sv-bg-muted) 0%, var(--sv-bg-subtle) 50%, var(--sv-bg-muted) 100%);
  background-size: 200% 100%;
  animation: sv-v32-shimmer 1.5s ease-in-out infinite;
}
.sv-v32-skeleton-line.--short { width: 60%; }
.sv-v32-skeleton-line.--medium { width: 80%; }

/* Custom empty state illustration container */
.sv-v32-empty-illustration {
  width: 96px;
  height: 96px;
  margin: 0 auto var(--sv-space-4);
  color: var(--sv-text-muted);
  opacity: 0.6;
}
.sv-v32-empty-illustration svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Status indicator pulse (live dot) */
.sv-v32-pulse {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: var(--sv-radius-pill);
  background: var(--sv-success);
}
.sv-v32-pulse::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: sv-v32-pulse-ring 2s ease-out infinite;
}
@keyframes sv-v32-pulse-ring {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Slide-in panel transition */
.sv-v32-slide-in-right {
  animation: sv-v32-slide-right var(--sv-duration-normal) var(--sv-ease);
}
@keyframes sv-v32-slide-right {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* === STICKY STEPPER (V32 principle F) === */
.sv-v32-stepper-sticky {
  position: sticky;
  top: 0;
  z-index: 8;
  background: var(--sv-bg-app);
  margin-left: calc(-1 * var(--sv-space-6));
  margin-right: calc(-1 * var(--sv-space-6));
  padding: var(--sv-space-4) var(--sv-space-6);
  border-bottom: 1px solid var(--sv-border-default);
  margin-bottom: var(--sv-space-5);
  box-shadow: 0 4px 12px -8px rgba(0,0,0,0.08);
}

/* === RIGHT PANEL 80/20 (V32 principle B) === */
.sv-v32-right-primary {
  padding: var(--sv-space-4);
  background: linear-gradient(135deg, var(--sv-primary-bg), #fff);
  border-bottom: 1px solid var(--sv-border-default);
}
.sv-v32-right-primary-label {
  font-size: 11px;
  color: var(--sv-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sv-space-2);
}
.sv-v32-right-primary-button {
  width: 100%;
  padding: var(--sv-space-3) var(--sv-space-4);
  background: var(--sv-primary);
  color: var(--sv-text-inverse);
  border-radius: var(--sv-radius-md);
  font-size: var(--sv-text-md);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border: none;
  transition: background var(--sv-duration-fast);
}
.sv-v32-right-primary-button:hover { background: var(--sv-primary-dark); }
.sv-v32-right-primary-meta {
  margin-top: var(--sv-space-2);
  font-size: 11px;
  color: var(--sv-text-tertiary);
  text-align: center;
}

/* Collapsible "More actions" section */
.sv-v32-collapsible {
  border-bottom: 1px solid var(--sv-border-subtle);
}
.sv-v32-collapsible-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sv-space-3) var(--sv-space-4);
  cursor: pointer;
  user-select: none;
  transition: background var(--sv-duration-fast);
}
.sv-v32-collapsible-head:hover { background: var(--sv-bg-subtle); }
.sv-v32-collapsible-head-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--sv-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sv-v32-collapsible-head-chevron {
  font-size: 10px;
  color: var(--sv-text-muted);
  transition: transform var(--sv-duration-normal) var(--sv-ease);
}
.sv-v32-collapsible[data-open="true"] .sv-v32-collapsible-head-chevron {
  transform: rotate(180deg);
}
.sv-v32-collapsible-body {
  display: none;
  padding: 0 var(--sv-space-4) var(--sv-space-4);
}
.sv-v32-collapsible[data-open="true"] .sv-v32-collapsible-body {
  display: block;
}

/* === SMOOTH STATE TRANSITION (V32 principle D — partial re-render) === */
.sv-v32-list-item {
  transition: background var(--sv-duration-fast), border-color var(--sv-duration-fast);
}
.sv-v32-fade-in {
  animation: sv-v32-fade-in var(--sv-duration-normal) var(--sv-ease);
}
@keyframes sv-v32-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Skeleton loading */
.sv-v32-skeleton {
  background: linear-gradient(90deg, var(--sv-bg-muted) 0%, var(--sv-bg-subtle) 50%, var(--sv-bg-muted) 100%);
  background-size: 200% 100%;
  animation: sv-v32-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--sv-radius-md);
}
@keyframes sv-v32-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================================
 * V32 Phase 0.9 — CMD+K PALETTE (Linear-grade)
 * ============================================================================ */
.sv-v32-cmdk-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 27, 48, 0.4);
  backdrop-filter: blur(8px);
  z-index: 1100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  animation: sv-v32-fade-in var(--sv-duration-normal) var(--sv-ease);
}

.sv-v32-cmdk-modal {
  background: var(--sv-bg-surface);
  border: 1px solid var(--sv-border-default);
  border-radius: var(--sv-radius-xl);
  box-shadow: var(--sv-shadow-2xl);
  width: 720px;
  max-width: 92vw;
  height: 520px;
  max-height: 70vh;
  display: grid;
  grid-template-columns: 1fr 320px;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  animation: sv-v32-cmdk-slide var(--sv-duration-normal) var(--sv-ease);
}
@keyframes sv-v32-cmdk-slide {
  from { transform: translateY(-12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.sv-v32-cmdk-input-wrap {
  grid-column: 1 / 3;
  display: flex;
  align-items: center;
  gap: var(--sv-space-3);
  padding: var(--sv-space-4) var(--sv-space-5);
  border-bottom: 1px solid var(--sv-border-default);
}
.sv-v32-cmdk-input-icon {
  color: var(--sv-text-muted);
  font-size: 18px;
}
.sv-v32-cmdk-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: var(--sv-text-lg);
  font-family: inherit;
  color: var(--sv-text-primary);
  background: transparent;
}
.sv-v32-cmdk-input::placeholder { color: var(--sv-text-muted); }

.sv-v32-cmdk-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--sv-bg-muted);
  color: var(--sv-text-tertiary);
  border-radius: var(--sv-radius-md);
  font-size: 11px;
  font-weight: 500;
}

.sv-v32-cmdk-results {
  overflow-y: auto;
  padding: var(--sv-space-2) 0;
  border-right: 1px solid var(--sv-border-subtle);
}
.sv-v32-cmdk-results::-webkit-scrollbar { width: 8px; }
.sv-v32-cmdk-results::-webkit-scrollbar-thumb { background: var(--sv-border-default); border-radius: 4px; }

.sv-v32-cmdk-group {
  margin: var(--sv-space-2) 0;
}
.sv-v32-cmdk-group-label {
  padding: var(--sv-space-2) var(--sv-space-4) var(--sv-space-1);
  font-size: 10px;
  font-weight: 700;
  color: var(--sv-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sv-v32-cmdk-item {
  display: flex;
  align-items: center;
  gap: var(--sv-space-3);
  padding: 8px var(--sv-space-4);
  cursor: pointer;
  transition: background var(--sv-duration-fast);
  position: relative;
}
.sv-v32-cmdk-item:hover { background: var(--sv-bg-subtle); }
.sv-v32-cmdk-item[data-active="true"] {
  background: var(--sv-primary-bg);
}
.sv-v32-cmdk-item[data-active="true"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--sv-primary);
  border-radius: 0 2px 2px 0;
}

.sv-v32-cmdk-item-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  background: var(--sv-bg-muted);
  border-radius: var(--sv-radius-sm);
}
.sv-v32-cmdk-item[data-active="true"] .sv-v32-cmdk-item-icon {
  background: var(--sv-primary);
  color: var(--sv-text-inverse);
}

.sv-v32-cmdk-item-body {
  flex: 1;
  min-width: 0;
}
.sv-v32-cmdk-item-title {
  font-size: var(--sv-text-base);
  font-weight: 500;
  color: var(--sv-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sv-v32-cmdk-item-sub {
  font-size: 11px;
  color: var(--sv-text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sv-v32-cmdk-item-shortcut {
  font-family: var(--sv-font-mono);
  font-size: 10px;
  color: var(--sv-text-muted);
  background: var(--sv-bg-muted);
  border: 1px solid var(--sv-border-default);
  border-radius: var(--sv-radius-sm);
  padding: 2px 6px;
  flex-shrink: 0;
}
.sv-v32-cmdk-item[data-active="true"] .sv-v32-cmdk-item-shortcut {
  background: var(--sv-bg-surface);
  color: var(--sv-text-secondary);
}

.sv-v32-cmdk-preview {
  background: var(--sv-bg-subtle);
  padding: var(--sv-space-4);
  overflow-y: auto;
}
.sv-v32-cmdk-preview-empty {
  text-align: center;
  color: var(--sv-text-muted);
  font-size: var(--sv-text-sm);
  padding: var(--sv-space-7) 0;
}
.sv-v32-cmdk-preview-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--sv-primary);
  color: var(--sv-text-inverse);
  border-radius: var(--sv-radius-lg);
  margin-bottom: var(--sv-space-3);
}
.sv-v32-cmdk-preview-title {
  font-size: var(--sv-text-md);
  font-weight: 600;
  color: var(--sv-text-primary);
  margin: 0 0 var(--sv-space-2);
}
.sv-v32-cmdk-preview-desc {
  font-size: var(--sv-text-sm);
  color: var(--sv-text-tertiary);
  line-height: var(--sv-leading-normal);
  margin: 0 0 var(--sv-space-4);
}
.sv-v32-cmdk-preview-meta {
  background: var(--sv-bg-surface);
  border: 1px solid var(--sv-border-default);
  border-radius: var(--sv-radius-md);
  padding: var(--sv-space-3);
  font-size: var(--sv-text-sm);
}
.sv-v32-cmdk-preview-meta-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: var(--sv-text-sm);
}
.sv-v32-cmdk-preview-meta-row span:first-child { color: var(--sv-text-tertiary); }
.sv-v32-cmdk-preview-meta-row span:last-child { color: var(--sv-text-primary); font-weight: 500; }

.sv-v32-cmdk-foot {
  grid-column: 1 / 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sv-space-3) var(--sv-space-5);
  background: var(--sv-bg-subtle);
  border-top: 1px solid var(--sv-border-default);
  font-size: 11px;
  color: var(--sv-text-tertiary);
}
.sv-v32-cmdk-foot-keys {
  display: flex;
  align-items: center;
  gap: var(--sv-space-3);
}
.sv-v32-cmdk-foot-key {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sv-v32-cmdk-foot-key kbd {
  font-family: var(--sv-font-mono);
  font-size: 10px;
  background: var(--sv-bg-surface);
  border: 1px solid var(--sv-border-default);
  border-radius: var(--sv-radius-sm);
  padding: 1px 5px;
  color: var(--sv-text-tertiary);
}

.sv-v32-cmdk-empty {
  text-align: center;
  padding: var(--sv-space-7) var(--sv-space-4);
  color: var(--sv-text-muted);
  font-size: var(--sv-text-sm);
}

/* === COMPOSER MODAL (1-panel focus mode) === */
.sv-v32-composer-overlay {
  position: fixed;
  inset: 0;
  background: var(--sv-bg-overlay);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sv-v32-composer {
  background: var(--sv-bg-surface);
  border-radius: var(--sv-radius-xl);
  box-shadow: var(--sv-shadow-2xl);
  width: 95vw;
  max-width: 1200px;
  height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sv-v32-composer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sv-space-4) var(--sv-space-6);
  border-bottom: 1px solid var(--sv-border-default);
}
.sv-v32-composer-title {
  font-size: var(--sv-text-lg);
  font-weight: 600;
  margin: 0;
}
.sv-v32-composer-stepper {
  display: flex;
  align-items: center;
  gap: var(--sv-space-2);
}
.sv-v32-composer-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--sv-radius-pill);
  background: var(--sv-bg-muted);
  color: var(--sv-text-tertiary);
  font-size: var(--sv-text-sm);
  font-weight: 500;
}
.sv-v32-composer-step[data-active="true"] {
  background: var(--sv-primary);
  color: var(--sv-text-inverse);
  font-weight: 600;
}
.sv-v32-composer-step[data-done="true"] {
  background: var(--sv-success-light);
  color: var(--sv-success-dark);
}
.sv-v32-composer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sv-space-6) var(--sv-space-8);
}
.sv-v32-composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sv-space-4) var(--sv-space-6);
  background: var(--sv-bg-subtle);
  border-top: 1px solid var(--sv-border-default);
}
.sv-v32-composer-foot-meta {
  font-size: 12px;
  color: var(--sv-text-tertiary);
}

/* Panel toggle buttons (collapse left/right) */
.sv-v32-panel-toggle {
  position: absolute;
  top: 8px;
  width: 18px;
  height: 28px;
  background: var(--sv-bg-surface);
  border: 1px solid var(--sv-border-default);
  border-radius: var(--sv-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 10px;
  color: var(--sv-text-tertiary);
  z-index: 5;
}
.sv-v32-panel-toggle:hover { color: var(--sv-primary); border-color: var(--sv-primary); }

/* ============================================================================
 * 4. SIDEBAR
 * ============================================================================ */
.sv-v32-sidebar {
  width: 240px;
  background: var(--sv-bg-surface);
  border-right: 1px solid var(--sv-border-default);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width var(--sv-duration-slow) var(--sv-ease);
}
.sv-v32-sidebar[data-collapsed="true"] {
  width: 64px;
}

.sv-v32-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sv-space-4);
  border-bottom: 1px solid var(--sv-border-default);
  height: 56px;
}
.sv-v32-sidebar[data-collapsed="true"] .sv-v32-sidebar-head {
  justify-content: center;
}

.sv-v32-logo {
  font-weight: 700;
  font-size: var(--sv-text-md);
  color: var(--sv-primary);
  letter-spacing: -0.02em;
}
.sv-v32-sidebar[data-collapsed="true"] .sv-v32-logo-text {
  display: none;
}

.sv-v32-sidebar-toggle {
  width: 28px;
  height: 28px;
  border-radius: var(--sv-radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sv-text-tertiary);
  font-size: 14px;
  transition: background var(--sv-duration-fast) var(--sv-ease);
}
.sv-v32-sidebar-toggle:hover {
  background: var(--sv-bg-muted);
  color: var(--sv-text-primary);
}

.sv-v32-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--sv-space-2) 0;
}

.sv-v32-sidebar-tier {
  padding: var(--sv-space-3) var(--sv-space-2);
}
.sv-v32-sidebar-tier + .sv-v32-sidebar-tier {
  border-top: 1px solid var(--sv-border-subtle);
}

.sv-v32-sidebar-tier-label {
  font-size: var(--sv-text-xs);
  font-weight: 600;
  color: var(--sv-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 var(--sv-space-3) var(--sv-space-2);
}
.sv-v32-sidebar[data-collapsed="true"] .sv-v32-sidebar-tier-label {
  display: none;
}

.sv-v32-sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--sv-space-3);
  padding: var(--sv-space-2) var(--sv-space-3);
  border-radius: var(--sv-radius-md);
  color: var(--sv-text-secondary);
  font-size: var(--sv-text-base);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--sv-duration-fast) var(--sv-ease), color var(--sv-duration-fast) var(--sv-ease);
  text-decoration: none;
  position: relative;
}
.sv-v32-sidebar-item:hover {
  background: var(--sv-bg-muted);
  color: var(--sv-text-primary);
  text-decoration: none;
}
.sv-v32-sidebar-item[data-active="true"] {
  background: var(--sv-primary-bg);
  color: var(--sv-primary);
  font-weight: 600;
}
.sv-v32-sidebar-item[data-active="true"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--sv-primary);
  border-radius: 0 2px 2px 0;
}

.sv-v32-sidebar-icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.sv-v32-sidebar-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sv-v32-sidebar[data-collapsed="true"] .sv-v32-sidebar-label,
.sv-v32-sidebar[data-collapsed="true"] .sv-v32-sidebar-badge {
  display: none;
}

.sv-v32-sidebar-badge {
  background: var(--sv-secondary);
  color: var(--sv-text-inverse);
  font-size: var(--sv-text-xs);
  font-weight: 700;
  padding: 1px 8px;
  border-radius: var(--sv-radius-pill);
  min-width: 20px;
  text-align: center;
}
.sv-v32-sidebar-badge[data-variant="muted"] {
  background: var(--sv-bg-muted);
  color: var(--sv-text-tertiary);
}

.sv-v32-sidebar-foot {
  padding: var(--sv-space-3);
  border-top: 1px solid var(--sv-border-default);
}

.sv-v32-sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--sv-space-3);
  padding: var(--sv-space-2);
  border-radius: var(--sv-radius-md);
  width: 100%;
  font-size: var(--sv-text-base);
  color: var(--sv-text-primary);
  transition: background var(--sv-duration-fast) var(--sv-ease);
}
.sv-v32-sidebar-user:hover {
  background: var(--sv-bg-muted);
}

.sv-v32-sidebar-avatar {
  width: 28px;
  height: 28px;
  background: var(--sv-primary);
  color: var(--sv-text-inverse);
  border-radius: var(--sv-radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--sv-text-xs);
  font-weight: 700;
  flex-shrink: 0;
}

/* ============================================================================
 * 5. STEPPER
 * ============================================================================ */
.sv-v32-stepper {
  background: var(--sv-bg-surface);
  border: 1px solid var(--sv-border-default);
  border-radius: var(--sv-radius-lg);
  padding: var(--sv-space-5) var(--sv-space-6);
  margin-bottom: var(--sv-space-6);
}

.sv-v32-stepper-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--sv-space-4);
}

.sv-v32-stepper-title {
  font-size: var(--sv-text-lg);
  font-weight: 600;
  color: var(--sv-text-primary);
}

.sv-v32-stepper-summary {
  font-size: var(--sv-text-sm);
  color: var(--sv-text-tertiary);
}
.sv-v32-stepper-summary strong {
  color: var(--sv-primary);
  font-weight: 600;
}

.sv-v32-stepper-progress {
  height: 4px;
  background: var(--sv-bg-muted);
  border-radius: var(--sv-radius-pill);
  margin-bottom: var(--sv-space-5);
  overflow: hidden;
}

.sv-v32-stepper-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--sv-primary), var(--sv-primary-dark));
  border-radius: var(--sv-radius-pill);
  transition: width var(--sv-duration-slow) var(--sv-ease);
}

.sv-v32-stepper-steps {
  display: flex;
  gap: var(--sv-space-2);
}

.sv-v32-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sv-space-2);
  padding: var(--sv-space-3);
  border-radius: var(--sv-radius-md);
  cursor: pointer;
  transition: background var(--sv-duration-fast) var(--sv-ease);
  border: 1px solid transparent;
}
.sv-v32-step:hover {
  background: var(--sv-bg-subtle);
}

.sv-v32-step[data-status="active"] {
  background: var(--sv-primary-bg);
  border-color: var(--sv-primary);
}
.sv-v32-step[data-status="done"] {
  background: var(--sv-success-light);
}
.sv-v32-step[data-status="pending"] {
  cursor: not-allowed;
  opacity: 0.7;
}
.sv-v32-step[data-status="blocked"] {
  background: var(--sv-danger-light);
}

.sv-v32-step-head {
  display: flex;
  align-items: center;
  gap: var(--sv-space-2);
}

.sv-v32-step-num {
  width: 22px;
  height: 22px;
  border-radius: var(--sv-radius-pill);
  background: var(--sv-bg-muted);
  color: var(--sv-text-tertiary);
  font-size: var(--sv-text-xs);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sv-v32-step[data-status="done"] .sv-v32-step-num {
  background: var(--sv-success);
  color: var(--sv-text-inverse);
}
.sv-v32-step[data-status="active"] .sv-v32-step-num {
  background: var(--sv-primary);
  color: var(--sv-text-inverse);
  animation: sv-v32-pulse 2s infinite;
}

@keyframes sv-v32-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(90, 63, 208, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(90, 63, 208, 0); }
}

.sv-v32-step-label {
  font-size: var(--sv-text-base);
  font-weight: 500;
  color: var(--sv-text-primary);
}
.sv-v32-step[data-status="active"] .sv-v32-step-label {
  font-weight: 600;
  color: var(--sv-primary);
}

.sv-v32-step-output {
  font-size: var(--sv-text-xs);
  color: var(--sv-text-tertiary);
  font-family: var(--sv-font-mono);
}

/* ============================================================================
 * 6. CARD
 * ============================================================================ */
.sv-v32-card {
  background: var(--sv-bg-surface);
  border: 1px solid var(--sv-border-default);
  border-radius: var(--sv-radius-lg);
  overflow: hidden;
}
.sv-v32-card[data-variant="kpi"] {
  border-left-width: 4px;
  border-left-color: var(--sv-primary);
}
.sv-v32-card[data-variant="workflow"] {
  cursor: pointer;
  transition: border-color var(--sv-duration-fast) var(--sv-ease), box-shadow var(--sv-duration-fast) var(--sv-ease);
  border-left: 4px solid var(--sv-primary);
}
.sv-v32-card[data-variant="workflow"]:hover {
  border-color: var(--sv-primary);
  box-shadow: var(--sv-shadow-md);
}

.sv-v32-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sv-space-4) var(--sv-space-5);
  border-bottom: 1px solid var(--sv-border-subtle);
}

.sv-v32-card-title {
  font-size: var(--sv-text-md);
  font-weight: 600;
  color: var(--sv-text-primary);
  margin: 0;
}

.sv-v32-card-sub {
  font-size: var(--sv-text-sm);
  color: var(--sv-text-tertiary);
  margin: 2px 0 0;
}

.sv-v32-card-actions {
  display: flex;
  gap: var(--sv-space-2);
}

.sv-v32-card-body {
  padding: var(--sv-space-4) var(--sv-space-5);
}

.sv-v32-card-foot {
  padding: var(--sv-space-3) var(--sv-space-5);
  background: var(--sv-bg-subtle);
  border-top: 1px solid var(--sv-border-subtle);
  font-size: var(--sv-text-sm);
  color: var(--sv-text-tertiary);
}

/* KPI card variant */
.sv-v32-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sv-space-3);
  margin-bottom: var(--sv-space-6);
}

.sv-v32-kpi-card {
  background: var(--sv-bg-surface);
  border: 1px solid var(--sv-border-default);
  border-left: 4px solid var(--sv-primary);
  border-radius: var(--sv-radius-lg);
  padding: var(--sv-space-4) var(--sv-space-5);
  cursor: pointer;
  transition: box-shadow var(--sv-duration-fast) var(--sv-ease);
}
.sv-v32-kpi-card:hover {
  box-shadow: var(--sv-shadow-md);
}
.sv-v32-kpi-card[data-color="success"] { border-left-color: var(--sv-success); }
.sv-v32-kpi-card[data-color="warning"] { border-left-color: var(--sv-warning); }
.sv-v32-kpi-card[data-color="danger"] { border-left-color: var(--sv-danger); }
.sv-v32-kpi-card[data-color="info"] { border-left-color: var(--sv-info); }
.sv-v32-kpi-card[data-color="secondary"] { border-left-color: var(--sv-secondary); }

.sv-v32-kpi-label {
  font-size: var(--sv-text-xs);
  color: var(--sv-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-bottom: var(--sv-space-1);
}
.sv-v32-kpi-value {
  font-family: var(--sv-font-mono);
  font-size: var(--sv-text-2xl);
  font-weight: 700;
  color: var(--sv-text-primary);
  line-height: 1.1;
}
.sv-v32-kpi-sub {
  font-size: var(--sv-text-xs);
  color: var(--sv-text-muted);
  margin-top: var(--sv-space-1);
}
.sv-v32-kpi-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--sv-space-2);
  font-size: var(--sv-text-xs);
  color: var(--sv-primary);
  font-weight: 600;
}
.sv-v32-kpi-link::after {
  content: "→";
}

/* ============================================================================
 * 7. BUTTONS
 * ============================================================================ */
.sv-v32-btn-primary,
.sv-v32-btn-secondary,
.sv-v32-btn-ghost,
.sv-v32-btn-danger,
.sv-v32-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sv-space-2);
  padding: var(--sv-space-2) var(--sv-space-4);
  font-size: var(--sv-text-base);
  font-weight: 600;
  border-radius: var(--sv-radius-md);
  transition: all var(--sv-duration-fast) var(--sv-ease);
  white-space: nowrap;
  user-select: none;
  border: 1px solid transparent;
}

.sv-v32-btn-primary {
  background: var(--sv-primary);
  color: var(--sv-text-inverse);
}
.sv-v32-btn-primary:hover { background: var(--sv-primary-dark); }
.sv-v32-btn-primary:active { transform: scale(0.98); }

.sv-v32-btn-secondary {
  background: var(--sv-bg-surface);
  color: var(--sv-primary);
  border-color: var(--sv-primary);
}
.sv-v32-btn-secondary:hover { background: var(--sv-primary-bg); }

.sv-v32-btn-ghost {
  background: transparent;
  color: var(--sv-text-secondary);
}
.sv-v32-btn-ghost:hover {
  background: var(--sv-bg-muted);
  color: var(--sv-text-primary);
}

.sv-v32-btn-danger {
  background: var(--sv-danger);
  color: var(--sv-text-inverse);
}
.sv-v32-btn-danger:hover { background: var(--sv-danger-dark); }

.sv-v32-btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--sv-radius-md);
  color: var(--sv-text-tertiary);
}
.sv-v32-btn-icon:hover {
  background: var(--sv-bg-muted);
  color: var(--sv-text-primary);
}

/* Sizes */
.sv-v32-btn-primary.--sm,
.sv-v32-btn-secondary.--sm,
.sv-v32-btn-ghost.--sm,
.sv-v32-btn-danger.--sm {
  padding: 6px 12px;
  font-size: var(--sv-text-sm);
}
.sv-v32-btn-primary.--lg,
.sv-v32-btn-secondary.--lg,
.sv-v32-btn-ghost.--lg,
.sv-v32-btn-danger.--lg {
  padding: 12px 24px;
  font-size: var(--sv-text-md);
}

/* Disabled */
.sv-v32-btn-primary[disabled],
.sv-v32-btn-secondary[disabled],
.sv-v32-btn-ghost[disabled],
.sv-v32-btn-danger[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* === FOCUS STATE — accessibility (Phase 0.10) === */
.sv-v32-app *:focus-visible {
  outline: 2px solid var(--sv-primary);
  outline-offset: 2px;
  border-radius: var(--sv-radius-sm);
}
/* Skip link for keyboard users */
.sv-v32-skip-link {
  position: absolute;
  top: -40px;
  left: var(--sv-space-3);
  background: var(--sv-primary);
  color: var(--sv-text-inverse);
  padding: 6px 12px;
  border-radius: var(--sv-radius-md);
  font-size: var(--sv-text-sm);
  z-index: 10000;
  transition: top var(--sv-duration-normal);
}
.sv-v32-skip-link:focus {
  top: var(--sv-space-2);
}

/* Visually hidden but accessible to screen readers */
.sv-v32-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;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  .sv-v32-app *,
  .sv-v32-app *::before,
  .sv-v32-app *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Theme toggle button */
.sv-v32-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--sv-radius-md);
  color: var(--sv-text-tertiary);
  background: var(--sv-bg-subtle);
  border: 1px solid var(--sv-border-default);
  cursor: pointer;
  font-size: 14px;
  transition: all var(--sv-duration-fast);
}
.sv-v32-theme-toggle:hover {
  background: var(--sv-bg-muted);
  color: var(--sv-text-primary);
}

/* ============================================================================
 * 8. MODAL
 * ============================================================================ */
.sv-v32-modal {
  border: none;
  padding: 0;
  border-radius: var(--sv-radius-lg);
  box-shadow: var(--sv-shadow-xl);
  background: var(--sv-bg-surface);
  width: 90vw;
  max-width: 640px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.sv-v32-modal[data-size="sm"] { max-width: 480px; }
.sv-v32-modal[data-size="lg"] { max-width: 880px; }
.sv-v32-modal[data-size="xl"] { max-width: 1140px; }
.sv-v32-modal[data-size="full"] { max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }

.sv-v32-modal::backdrop {
  background: var(--sv-bg-overlay);
  backdrop-filter: blur(4px);
}

.sv-v32-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sv-space-5) var(--sv-space-6);
  border-bottom: 1px solid var(--sv-border-default);
}
.sv-v32-modal-head h2 {
  margin: 0;
  font-size: var(--sv-text-lg);
  font-weight: 600;
}

.sv-v32-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sv-space-5) var(--sv-space-6);
}

.sv-v32-modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sv-space-3);
  padding: var(--sv-space-4) var(--sv-space-6);
  background: var(--sv-bg-subtle);
  border-top: 1px solid var(--sv-border-default);
}

/* ============================================================================
 * 9. EMPTY STATE
 * ============================================================================ */
.sv-v32-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sv-space-10) var(--sv-space-6);
  color: var(--sv-text-tertiary);
  background: var(--sv-bg-surface);
  border: 2px dashed var(--sv-border-default);
  border-radius: var(--sv-radius-lg);
}

.sv-v32-empty-icon {
  font-size: 48px;
  opacity: 0.6;
  margin-bottom: var(--sv-space-4);
}

.sv-v32-empty-title {
  font-size: var(--sv-text-lg);
  font-weight: 600;
  color: var(--sv-text-secondary);
  margin: 0 0 var(--sv-space-2);
}

.sv-v32-empty-desc {
  max-width: 400px;
  margin: 0 0 var(--sv-space-5);
  color: var(--sv-text-tertiary);
}

/* ============================================================================
 * 10. INSPECTOR (right panel)
 * ============================================================================ */
.sv-v32-inspector {
  width: 320px;
  background: var(--sv-bg-surface);
  border-left: 1px solid var(--sv-border-default);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sv-v32-inspector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sv-space-4) var(--sv-space-5);
  border-bottom: 1px solid var(--sv-border-default);
  height: 56px;
}
.sv-v32-inspector-head h4 {
  margin: 0;
  font-size: var(--sv-text-md);
  font-weight: 600;
}

.sv-v32-inspector-body {
  flex: 1;
  padding: var(--sv-space-4);
}

.sv-v32-inspector-section {
  padding: var(--sv-space-3) 0;
  border-bottom: 1px solid var(--sv-border-subtle);
}
.sv-v32-inspector-section:last-child {
  border-bottom: none;
}

.sv-v32-inspector-label {
  font-size: var(--sv-text-xs);
  color: var(--sv-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-bottom: var(--sv-space-1);
}
.sv-v32-inspector-value {
  font-size: var(--sv-text-base);
  color: var(--sv-text-primary);
  font-weight: 500;
}

.sv-v32-inspector-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sv-space-2);
  margin-top: var(--sv-space-4);
}

/* ============================================================================
 * 11. STATUS BADGE / DOT
 * ============================================================================ */
.sv-v32-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: var(--sv-text-xs);
  font-weight: 600;
  border-radius: var(--sv-radius-pill);
  background: var(--sv-bg-muted);
  color: var(--sv-text-secondary);
}
.sv-v32-badge[data-status="done"] { background: var(--sv-success-light); color: var(--sv-success-dark); }
.sv-v32-badge[data-status="active"] { background: var(--sv-primary-bg); color: var(--sv-primary-dark); }
.sv-v32-badge[data-status="pending"] { background: var(--sv-bg-muted); color: var(--sv-text-tertiary); }
.sv-v32-badge[data-status="warning"] { background: var(--sv-warning-light); color: var(--sv-warning); }
.sv-v32-badge[data-status="danger"] { background: var(--sv-danger-light); color: var(--sv-danger-dark); }
.sv-v32-badge[data-status="secondary"] { background: var(--sv-secondary-light); color: var(--sv-secondary-dark); }

.sv-v32-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: var(--sv-radius-pill);
  background: currentColor;
}

/* ============================================================================
 * 12. TABLE
 * ============================================================================ */
.sv-v32-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--sv-text-base);
}
.sv-v32-table th {
  text-align: left;
  padding: var(--sv-space-3) var(--sv-space-4);
  background: var(--sv-bg-subtle);
  font-size: var(--sv-text-xs);
  font-weight: 600;
  color: var(--sv-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--sv-border-default);
}
.sv-v32-table td {
  padding: var(--sv-space-3) var(--sv-space-4);
  border-bottom: 1px solid var(--sv-border-subtle);
}
.sv-v32-table tbody tr:hover {
  background: var(--sv-bg-subtle);
}

/* ============================================================================
 * 13. UTILITY
 * ============================================================================ */
.sv-v32-stack { display: flex; flex-direction: column; }
.sv-v32-stack-2 { gap: var(--sv-space-2); }
.sv-v32-stack-3 { gap: var(--sv-space-3); }
.sv-v32-stack-4 { gap: var(--sv-space-4); }
.sv-v32-stack-6 { gap: var(--sv-space-6); }

.sv-v32-row { display: flex; align-items: center; }
.sv-v32-row-2 { gap: var(--sv-space-2); }
.sv-v32-row-3 { gap: var(--sv-space-3); }
.sv-v32-row-4 { gap: var(--sv-space-4); }
.sv-v32-row-between { justify-content: space-between; }
.sv-v32-row-end { justify-content: flex-end; }

.sv-v32-mono { font-family: var(--sv-font-mono); }
.sv-v32-muted { color: var(--sv-text-muted); }
.sv-v32-secondary { color: var(--sv-text-secondary); }

.sv-v32-mt-1 { margin-top: var(--sv-space-1); }
.sv-v32-mt-2 { margin-top: var(--sv-space-2); }
.sv-v32-mt-3 { margin-top: var(--sv-space-3); }
.sv-v32-mt-4 { margin-top: var(--sv-space-4); }
.sv-v32-mt-6 { margin-top: var(--sv-space-6); }

.sv-v32-mb-1 { margin-bottom: var(--sv-space-1); }
.sv-v32-mb-2 { margin-bottom: var(--sv-space-2); }
.sv-v32-mb-3 { margin-bottom: var(--sv-space-3); }
.sv-v32-mb-4 { margin-bottom: var(--sv-space-4); }
.sv-v32-mb-6 { margin-bottom: var(--sv-space-6); }

/* Responsive — sidebar collapse on tablet */
@media (max-width: 1199px) {
  .sv-v32-sidebar { width: 64px; }
  .sv-v32-sidebar .sv-v32-sidebar-label,
  .sv-v32-sidebar .sv-v32-sidebar-tier-label,
  .sv-v32-sidebar .sv-v32-sidebar-badge,
  .sv-v32-sidebar .sv-v32-logo-text { display: none; }
  .sv-v32-sidebar .sv-v32-sidebar-head { justify-content: center; }
  .sv-v32-shell[data-inspector-open="true"] {
    grid-template-columns: 64px 1fr 320px;
  }
}
