/* ============================================================
   QUALIUM DESIGN SYSTEM — TOKENS & BASE STYLES
   v0.5 — Sistema completo
   ============================================================ */
:root {
  /* === BRAND === */
  --q-brand-ink:        #0A0A0F;
  --q-brand-paper:      #FFFFFF;

  /* === PRIMARY (Electric Indigo) === */
  --q-primary-50:  #EEF0FF; --q-primary-100: #DDE1FF; --q-primary-200: #B8BFFF;
  --q-primary-300: #8C95FF; --q-primary-400: #6B71F5; --q-primary-500: #4F46E5;
  --q-primary-600: #3D35C9; --q-primary-700: #2F28A5; --q-primary-800: #221C7F;
  --q-primary-900: #16115C; --q-primary-950: #0C0938;

  /* === ACCENT (Warm Coral) === */
  --q-accent-50:  #FFF1EE; --q-accent-100: #FFE0D9; --q-accent-200: #FFC2B5;
  --q-accent-300: #FF9A85; --q-accent-400: #FF7A63; --q-accent-500: #FF6B5B;
  --q-accent-600: #E85345; --q-accent-700: #C03B30; --q-accent-800: #8E2A22;
  --q-accent-900: #5C1B16;

  /* === NEUTRALS (Cool Slate) === */
  --q-neutral-0:   #FFFFFF; --q-neutral-50:  #F8F9FB; --q-neutral-100: #F1F3F7;
  --q-neutral-200: #E4E7EE; --q-neutral-300: #CDD2DC; --q-neutral-400: #9CA3B4;
  --q-neutral-500: #6B7385; --q-neutral-600: #4A5160; --q-neutral-700: #353B48;
  --q-neutral-800: #20242E; --q-neutral-900: #13161D; --q-neutral-950: #0A0C12;

  /* === SEMÁNTICOS === */
  --q-success-500: #10B981; --q-success-100: #D1FAE5; --q-success-700: #047857;
  --q-warning-500: #F59E0B; --q-warning-100: #FEF3C7; --q-warning-700: #92400E;
  --q-danger-500:  #EF4444; --q-danger-100:  #FEE2E2; --q-danger-700:  #B91C1C;
  --q-info-500:    #3B82F6; --q-info-100:    #DBEAFE; --q-info-700:    #1D4ED8;

  /* === TIPOGRAFÍA === */
  --q-font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --q-font-serif: 'Instrument Serif', Georgia, serif;
  --q-font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  --q-text-xs:   0.75rem;
  --q-text-sm:   0.875rem;
  --q-text-base: 1rem;
  --q-text-lg:   1.125rem;
  --q-text-xl:   1.25rem;
  --q-text-2xl:  1.5rem;
  --q-text-3xl:  1.875rem;
  --q-text-4xl:  2.25rem;
  --q-text-5xl:  3rem;
  --q-text-6xl:  3.75rem;
  --q-text-7xl:  4.5rem;

  /* === ESPACIADO === */
  --q-space-0: 0; --q-space-1: 0.25rem; --q-space-2: 0.5rem;
  --q-space-3: 0.75rem; --q-space-4: 1rem; --q-space-5: 1.25rem;
  --q-space-6: 1.5rem; --q-space-8: 2rem; --q-space-10: 2.5rem;
  --q-space-12: 3rem; --q-space-16: 4rem; --q-space-20: 5rem;
  --q-space-24: 6rem; --q-space-32: 8rem;

  /* === RADIOS === */
  --q-radius-none: 0;
  --q-radius-sm: 0.25rem;
  --q-radius-md: 0.5rem;
  --q-radius-lg: 0.75rem;
  --q-radius-xl: 1rem;
  --q-radius-2xl: 1.5rem;
  --q-radius-3xl: 2rem;
  --q-radius-full: 9999px;

  /* === SOMBRAS === */
  --q-shadow-xs: 0 1px 2px rgba(10,12,18,0.05);
  --q-shadow-sm: 0 2px 4px rgba(10,12,18,0.06), 0 1px 2px rgba(10,12,18,0.04);
  --q-shadow-md: 0 8px 24px -8px rgba(10,12,18,0.08), 0 2px 4px rgba(10,12,18,0.04);
  --q-shadow-lg: 0 16px 40px -12px rgba(10,12,18,0.12), 0 4px 8px rgba(10,12,18,0.06);
  --q-shadow-xl: 0 24px 56px -16px rgba(10,12,18,0.16);
  --q-shadow-2xl: 0 40px 80px -20px rgba(10,12,18,0.24);
  --q-shadow-focus: 0 0 0 4px rgba(79,70,229,0.18);

  /* === EASING === */
  --q-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --q-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --q-duration-fast: 120ms;
  --q-duration-base: 200ms;
  --q-duration-slow: 380ms;

  /* === SEMANTIC ROLES (Light) === */
  --bg-page:        var(--q-neutral-0);
  --bg-surface:     var(--q-neutral-0);
  --bg-surface-alt: var(--q-neutral-50);
  --bg-elevated:    var(--q-neutral-0);
  --bg-muted:       var(--q-neutral-100);
  --bg-inverse:     var(--q-brand-ink);

  --text-primary:   var(--q-neutral-900);
  --text-secondary: var(--q-neutral-600);
  --text-muted:     var(--q-neutral-500);
  --text-inverse:   var(--q-neutral-0);
  --text-brand:     var(--q-primary-600);

  --border-subtle:  var(--q-neutral-200);
  --border-default: var(--q-neutral-300);
  --border-strong:  var(--q-neutral-400);
  --border-brand:   var(--q-primary-500);

  --shadow-card:    var(--q-shadow-md);
}

[data-theme="dark"] {
  --bg-page:        #07080C;
  --bg-surface:     #0E1119;
  --bg-surface-alt: #131722;
  --bg-elevated:    #181D29;
  --bg-muted:       #1F2433;

  --text-primary:   #F1F3F7;
  --text-secondary: #B6BCC9;
  --text-muted:     #8089A0;
  --text-inverse:   var(--q-neutral-900);
  --text-brand:     #A6AAFF;

  --border-subtle:  #1F2433;
  --border-default: #2A3043;
  --border-strong:  #3A4259;
  --border-brand:   #6B71F5;

  --shadow-card:    0 8px 24px -8px rgba(0,0,0,0.6), 0 2px 4px rgba(0,0,0,0.3);
  --q-shadow-focus: 0 0 0 4px rgba(107,113,245,0.28);
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--q-font-sans);
  font-size: var(--q-text-base);
  line-height: 1.55;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--q-duration-base) var(--q-ease-out), color var(--q-duration-base) var(--q-ease-out);
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }
a { color: var(--text-brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { margin: 0; }
p { margin: 0; }

/* ============================================================
   APP LAYOUT
   ============================================================ */
.q-app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.q-sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--bg-surface-alt);
  border-right: 1px solid var(--border-subtle);
  padding: var(--q-space-8) var(--q-space-6);
}
.q-sidebar-brand { display: flex; align-items: center; gap: var(--q-space-3); margin-bottom: var(--q-space-8); }
.q-sidebar-brand img { height: 28px; width: auto; }
.q-sidebar-brand .q-logo-light { display: block; }
.q-sidebar-brand .q-logo-dark { display: none; }
[data-theme="dark"] .q-sidebar-brand .q-logo-light { display: none; }
[data-theme="dark"] .q-sidebar-brand .q-logo-dark { display: block; }

.q-sidebar-version {
  font-family: var(--q-font-mono); font-size: var(--q-text-xs);
  color: var(--text-muted); background: var(--bg-muted);
  padding: 2px 8px; border-radius: var(--q-radius-full);
}
.q-nav { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.q-nav-section {
  font-size: var(--q-text-xs); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted);
  padding: var(--q-space-4) var(--q-space-3) var(--q-space-2);
}
.q-nav a {
  display: block; padding: var(--q-space-2) var(--q-space-3);
  border-radius: var(--q-radius-md);
  color: var(--text-secondary);
  font-size: var(--q-text-sm); font-weight: 500;
  transition: all var(--q-duration-fast) var(--q-ease-out);
}
.q-nav a:hover { background: var(--bg-muted); color: var(--text-primary); text-decoration: none; }
.q-nav a.is-active { background: var(--q-primary-500); color: white; }
.q-nav a.is-page { font-weight: 600; }

.q-main { min-width: 0; }
.q-topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--q-space-4) var(--q-space-10);
  background: color-mix(in srgb, var(--bg-page) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.q-topbar-title { font-size: var(--q-text-sm); color: var(--text-muted); font-weight: 500; }
.q-topbar-actions { display: flex; gap: var(--q-space-3); align-items: center; }

.q-theme-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--q-radius-full);
  border: 1px solid var(--border-default); background: var(--bg-surface);
  color: var(--text-secondary); font-size: var(--q-text-sm); font-weight: 500;
  transition: all var(--q-duration-fast) var(--q-ease-out);
}
.q-theme-toggle:hover { border-color: var(--border-strong); color: var(--text-primary); }
.q-theme-toggle svg { width: 16px; height: 16px; }

.q-content { padding: var(--q-space-12) var(--q-space-10) var(--q-space-32); max-width: 1200px; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.q-display-1 { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.035em; }
.q-display-2 { font-size: clamp(2rem, 4vw, 3.75rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; }
.q-h1 { font-size: var(--q-text-5xl); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 var(--q-space-4); }
.q-h2 { font-size: var(--q-text-4xl); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 var(--q-space-3); }
.q-h3 { font-size: var(--q-text-3xl); font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 var(--q-space-3); }
.q-h4 { font-size: var(--q-text-2xl); font-weight: 600; line-height: 1.25; margin: 0 0 var(--q-space-2); }
.q-h5 { font-size: var(--q-text-xl); font-weight: 600; line-height: 1.3; margin: 0 0 var(--q-space-2); }
.q-h6 { font-size: var(--q-text-lg); font-weight: 600; line-height: 1.4; margin: 0 0 var(--q-space-2); }
.q-body-lg { font-size: var(--q-text-lg); line-height: 1.6; }
.q-body { font-size: var(--q-text-base); line-height: 1.6; }
.q-body-sm { font-size: var(--q-text-sm); line-height: 1.55; }
.q-caption { font-size: var(--q-text-xs); line-height: 1.5; color: var(--text-muted); }
.q-eyebrow {
  font-size: var(--q-text-xs); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--text-brand);
}
.q-serif { font-family: var(--q-font-serif); font-style: italic; font-weight: 400; }

/* ============================================================
   BUTTONS
   ============================================================ */
.q-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--q-radius-md);
  font-size: var(--q-text-sm); font-weight: 600;
  border: 1px solid transparent;
  transition: all var(--q-duration-fast) var(--q-ease-out);
  text-decoration: none; line-height: 1.2;
  white-space: nowrap;
}
.q-btn:hover { text-decoration: none; }
.q-btn:focus-visible { outline: none; box-shadow: var(--q-shadow-focus); }
.q-btn:disabled, .q-btn.is-disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.q-btn svg { width: 16px; height: 16px; }

.q-btn-primary { background: var(--q-primary-500); color: white; }
.q-btn-primary:hover { background: var(--q-primary-600); }
.q-btn-primary:active { background: var(--q-primary-700); }

.q-btn-secondary { background: var(--bg-surface); color: var(--text-primary); border-color: var(--border-default); }
.q-btn-secondary:hover { border-color: var(--border-strong); background: var(--bg-muted); }

.q-btn-accent { background: var(--q-accent-700); color: white; }
.q-btn-accent:hover { background: var(--q-accent-800); }

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

.q-btn-danger { background: var(--q-danger-500); color: white; }
.q-btn-danger:hover { background: #DC2626; }

.q-btn-sm { padding: 6px 12px; font-size: var(--q-text-xs); }
.q-btn-lg { padding: 14px 28px; font-size: var(--q-text-base); }
.q-btn-icon { padding: 10px; aspect-ratio: 1; }

/* ============================================================
   FORMS
   ============================================================ */
.q-field { display: flex; flex-direction: column; gap: 6px; }
.q-label { font-size: var(--q-text-sm); font-weight: 500; color: var(--text-primary); }
.q-label .q-required { color: var(--q-danger-500); }
.q-help { font-size: var(--q-text-xs); color: var(--text-muted); }
.q-error { font-size: var(--q-text-xs); color: var(--q-danger-500); display: flex; align-items: center; gap: 4px; }

.q-input, .q-textarea, .q-select {
  display: block; width: 100%;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--q-radius-md);
  color: var(--text-primary);
  font-size: var(--q-text-sm);
  transition: all var(--q-duration-fast) var(--q-ease-out);
  font-family: inherit;
}
.q-input::placeholder, .q-textarea::placeholder { color: var(--text-muted); }
.q-input:focus, .q-textarea:focus, .q-select:focus {
  outline: none;
  border-color: var(--border-brand);
  box-shadow: var(--q-shadow-focus);
}
.q-input.is-error, .q-textarea.is-error, .q-select.is-error {
  border-color: var(--q-danger-500);
}
.q-textarea { resize: vertical; min-height: 96px; }
.q-select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7385' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  appearance: none; -webkit-appearance: none;
  padding-right: 40px;
}

.q-checkbox, .q-radio {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--q-text-sm); color: var(--text-primary);
  cursor: pointer;
}
.q-checkbox input, .q-radio input { width: 18px; height: 18px; accent-color: var(--q-primary-500); }

.q-switch {
  position: relative; display: inline-block; width: 38px; height: 22px;
}
.q-switch input { opacity: 0; width: 0; height: 0; }
.q-switch-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--q-neutral-300);
  border-radius: var(--q-radius-full);
  transition: background var(--q-duration-fast);
}
.q-switch-slider::before {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; background: white; border-radius: 50%;
  transition: transform var(--q-duration-fast);
}
.q-switch input:checked + .q-switch-slider { background: var(--q-primary-500); }
.q-switch input:checked + .q-switch-slider::before { transform: translateX(16px); }

/* ============================================================
   CARDS
   ============================================================ */
.q-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--q-radius-xl);
  overflow: hidden;
  transition: all var(--q-duration-base) var(--q-ease-out);
}
.q-card.is-interactive:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); border-color: var(--border-default); }
.q-card-media { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--q-primary-500), var(--q-accent-500)); }
.q-card-body { padding: var(--q-space-6); }
.q-card-title { font-size: var(--q-text-lg); font-weight: 600; margin: 0 0 6px; color: var(--text-primary); }
.q-card-text { font-size: var(--q-text-sm); color: var(--text-secondary); line-height: 1.6; margin: 0; }
.q-card-footer { padding: var(--q-space-4) var(--q-space-6); border-top: 1px solid var(--border-subtle); display: flex; justify-content: space-between; align-items: center; }

/* ============================================================
   BADGES, TAGS, AVATARS
   ============================================================ */
.q-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--q-radius-full);
  font-size: var(--q-text-xs); font-weight: 600;
}
.q-badge-primary { background: var(--q-primary-100); color: var(--q-primary-700); }
.q-badge-success { background: var(--q-success-100); color: var(--q-success-700); }
.q-badge-warning { background: var(--q-warning-100); color: var(--q-warning-700); }
.q-badge-danger { background: var(--q-danger-100); color: var(--q-danger-700); }
.q-badge-neutral { background: var(--bg-muted); color: var(--text-secondary); }
[data-theme="dark"] .q-badge-primary { background: rgba(79,70,229,0.18); color: #B8BFFF; }
[data-theme="dark"] .q-badge-success { background: rgba(16,185,129,0.18); color: #6EE7B7; }
[data-theme="dark"] .q-badge-warning { background: rgba(245,158,11,0.18); color: #FCD34D; }
[data-theme="dark"] .q-badge-danger { background: rgba(239,68,68,0.18); color: #FCA5A5; }

.q-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--q-radius-sm);
  font-size: var(--q-text-xs); font-weight: 500;
  background: var(--bg-muted); color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.q-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--q-primary-500); color: white;
  font-size: var(--q-text-sm); font-weight: 600;
  overflow: hidden;
}
.q-avatar img { width: 100%; height: 100%; object-fit: cover; }
.q-avatar-sm { width: 28px; height: 28px; font-size: var(--q-text-xs); }
.q-avatar-lg { width: 56px; height: 56px; font-size: var(--q-text-base); }
.q-avatar-stack { display: inline-flex; }
.q-avatar-stack .q-avatar { border: 2px solid var(--bg-page); margin-left: -10px; }
.q-avatar-stack .q-avatar:first-child { margin-left: 0; }

/* ============================================================
   ALERTS
   ============================================================ */
.q-alert {
  display: flex; align-items: flex-start; gap: var(--q-space-3);
  padding: var(--q-space-4) var(--q-space-5);
  border-radius: var(--q-radius-lg);
  border-left: 3px solid;
  background: var(--bg-surface-alt);
}
.q-alert-icon { flex-shrink: 0; width: 20px; height: 20px; }
.q-alert-body { flex: 1; }
.q-alert-title { font-size: var(--q-text-sm); font-weight: 600; margin: 0 0 2px; }
.q-alert-text { font-size: var(--q-text-sm); color: var(--text-secondary); margin: 0; }
.q-alert-info    { border-color: var(--q-info-500); }
.q-alert-info    .q-alert-icon { color: var(--q-info-500); }
.q-alert-success { border-color: var(--q-success-500); }
.q-alert-success .q-alert-icon { color: var(--q-success-500); }
.q-alert-warning { border-color: var(--q-warning-500); }
.q-alert-warning .q-alert-icon { color: var(--q-warning-500); }
.q-alert-danger  { border-color: var(--q-danger-500); }
.q-alert-danger  .q-alert-icon { color: var(--q-danger-500); }

/* ============================================================
   TABLE
   ============================================================ */
.q-table-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--q-radius-xl);
  overflow: hidden;
}
.q-table {
  width: 100%; border-collapse: collapse;
}
.q-table th, .q-table td {
  padding: var(--q-space-3) var(--q-space-4);
  text-align: left;
  font-size: var(--q-text-sm);
  border-bottom: 1px solid var(--border-subtle);
}
.q-table th {
  background: var(--bg-surface-alt);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: var(--q-text-xs);
  letter-spacing: 0.05em;
}
.q-table tr:last-child td { border-bottom: 0; }
.q-table tbody tr:hover { background: var(--bg-surface-alt); }

/* ============================================================
   TABS
   ============================================================ */
.q-tabs {
  display: flex; gap: var(--q-space-1);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--q-space-6);
}
.q-tab {
  padding: var(--q-space-3) var(--q-space-4);
  background: transparent; border: 0;
  font-size: var(--q-text-sm); font-weight: 500;
  color: var(--text-secondary); cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--q-duration-fast) var(--q-ease-out);
}
.q-tab:hover { color: var(--text-primary); }
.q-tab.is-active { color: var(--text-brand); border-bottom-color: var(--border-brand); }
.q-tab-panel { display: none; }
.q-tab-panel.is-active { display: block; }

/* ============================================================
   MODAL
   ============================================================ */
.q-modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,12,18,0.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: var(--q-space-4);
  opacity: 0; pointer-events: none;
  transition: opacity var(--q-duration-base);
}
.q-modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.q-modal {
  background: var(--bg-surface);
  border-radius: var(--q-radius-2xl);
  max-width: 480px; width: 100%;
  box-shadow: var(--q-shadow-2xl);
  transform: translateY(20px) scale(0.96);
  transition: transform var(--q-duration-base) var(--q-ease-out);
}
.q-modal-overlay.is-open .q-modal { transform: translateY(0) scale(1); }
.q-modal-header {
  padding: var(--q-space-6) var(--q-space-6) var(--q-space-4);
  display: flex; justify-content: space-between; align-items: flex-start;
}
.q-modal-title { font-size: var(--q-text-xl); font-weight: 600; margin: 0; }
.q-modal-body { padding: 0 var(--q-space-6) var(--q-space-6); color: var(--text-secondary); font-size: var(--q-text-sm); line-height: 1.6; }
.q-modal-footer {
  padding: var(--q-space-5) var(--q-space-6);
  border-top: 1px solid var(--border-subtle);
  display: flex; justify-content: flex-end; gap: var(--q-space-2);
}

/* ============================================================
   ACCORDION
   ============================================================ */
.q-accordion { border: 1px solid var(--border-subtle); border-radius: var(--q-radius-xl); background: var(--bg-surface); overflow: hidden; }
.q-accordion-item { border-bottom: 1px solid var(--border-subtle); }
.q-accordion-item:last-child { border-bottom: 0; }
.q-accordion-trigger {
  width: 100%; background: transparent; border: 0;
  padding: var(--q-space-5) var(--q-space-6);
  display: flex; justify-content: space-between; align-items: center;
  font-size: var(--q-text-base); font-weight: 500;
  color: var(--text-primary); text-align: left;
}
.q-accordion-trigger:hover { background: var(--bg-surface-alt); }
.q-accordion-trigger svg { transition: transform var(--q-duration-fast); }
.q-accordion-item.is-open .q-accordion-trigger svg { transform: rotate(180deg); }
.q-accordion-content {
  max-height: 0; overflow: hidden;
  transition: max-height var(--q-duration-base) var(--q-ease-out);
}
.q-accordion-item.is-open .q-accordion-content { max-height: 400px; }
.q-accordion-content-inner {
  padding: 0 var(--q-space-6) var(--q-space-5);
  color: var(--text-secondary); font-size: var(--q-text-sm); line-height: 1.6;
}

/* ============================================================
   TOOLTIP
   ============================================================ */
.q-tooltip-wrap { position: relative; display: inline-block; }
.q-tooltip {
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  background: var(--q-neutral-900);
  color: white;
  padding: 6px 10px;
  border-radius: var(--q-radius-sm);
  font-size: var(--q-text-xs);
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity var(--q-duration-fast);
  z-index: 50;
}
[data-theme="dark"] .q-tooltip { background: var(--q-neutral-200); color: var(--q-neutral-900); }
.q-tooltip-wrap:hover .q-tooltip { opacity: 1; }

/* ============================================================
   BREADCRUMB & PAGINATION
   ============================================================ */
.q-breadcrumb {
  display: flex; align-items: center; gap: var(--q-space-2);
  font-size: var(--q-text-sm); color: var(--text-muted);
}
.q-breadcrumb a { color: var(--text-secondary); }
.q-breadcrumb .q-breadcrumb-sep { color: var(--text-muted); }
.q-breadcrumb .is-current { color: var(--text-primary); font-weight: 500; }

.q-pagination { display: inline-flex; gap: 2px; align-items: center; }
.q-page-btn {
  min-width: 32px; height: 32px; padding: 0 8px;
  border-radius: var(--q-radius-md);
  background: transparent; border: 1px solid transparent;
  font-size: var(--q-text-sm); color: var(--text-secondary);
  display: inline-flex; align-items: center; justify-content: center;
}
.q-page-btn:hover { background: var(--bg-muted); color: var(--text-primary); }
.q-page-btn.is-active { background: var(--q-primary-500); color: white; border-color: var(--q-primary-500); }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.q-section { padding: var(--q-space-12) 0; border-bottom: 1px solid var(--border-subtle); }
.q-section:last-child { border-bottom: 0; }
.q-section-header { margin-bottom: var(--q-space-10); max-width: 720px; }
.q-section-header .q-eyebrow { margin-bottom: var(--q-space-3); display: inline-block; }
.q-section-header p { font-size: var(--q-text-lg); color: var(--text-secondary); margin: var(--q-space-3) 0 0; line-height: 1.6; }

/* ============================================================
   PREVIEW CARD (para mostrar componentes)
   ============================================================ */
.q-preview {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--q-radius-xl);
  padding: var(--q-space-8);
  display: flex; flex-wrap: wrap;
  gap: var(--q-space-4);
  align-items: center;
  margin: var(--q-space-3) 0 var(--q-space-8);
}
.q-preview.is-column { flex-direction: column; align-items: stretch; }
.q-preview-label {
  font-family: var(--q-font-mono);
  font-size: var(--q-text-xs);
  color: var(--text-muted);
  margin-bottom: var(--q-space-2);
}

/* ============================================================
   CODE BLOCK
   ============================================================ */
.q-code {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--q-radius-md);
  padding: var(--q-space-4) var(--q-space-5);
  font-family: var(--q-font-mono);
  font-size: var(--q-text-sm);
  color: var(--text-primary);
  overflow-x: auto;
  white-space: pre;
}

/* ============================================================
   GRID UTILITIES
   ============================================================ */
.q-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--q-space-4); }
.q-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--q-space-4); }
.q-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--q-space-4); }
.q-flex { display: flex; }
.q-flex-col { flex-direction: column; }
.q-gap-2 { gap: var(--q-space-2); }
.q-gap-3 { gap: var(--q-space-3); }
.q-gap-4 { gap: var(--q-space-4); }
.q-gap-6 { gap: var(--q-space-6); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .q-app { grid-template-columns: 1fr; }
  .q-sidebar { display: none; }
  .q-content { padding: var(--q-space-8) var(--q-space-6) var(--q-space-24); }
  .q-topbar { padding: var(--q-space-4) var(--q-space-6); }
  .q-grid-2, .q-grid-3, .q-grid-4 { grid-template-columns: 1fr; }
}
