/* ============================================
   VVM Design System - Dark Theme
   Brand: Cyan/Teal on Dark Background
   ============================================ */

/* ----------------------------------------
   Responsive Root Font Size
   12px base (~75% zoom) scales entire UI via rem
   ---------------------------------------- */
html {
  font-size: 12px;
}

@media (max-width: 1023px) {
  html {
    font-size: 16px;
  }
}

@media (min-width: 1600px) {
  html {
    font-size: 13px;
  }
}

@media (min-width: 1920px) {
  html {
    font-size: 14px;
  }
}

:root {
  /* ----------------------------------------
     VVM Brand Colors
     ---------------------------------------- */
  --vvm-cyan: #05F2F2;
  --vvm-teal: #03A6A6;
  --vvm-dark-teal: #014040;
  --vvm-bright: #05F2DB;
  --vvm-black: #0D0D0D;

  /* ----------------------------------------
     Typography - Inter font
     ---------------------------------------- */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Font Sizes */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.8125rem;    /* 13px */
  --text-base: 0.875rem;   /* 14px */
  --text-lg: 1rem;         /* 16px */
  --text-xl: 1.125rem;     /* 18px */
  --text-2xl: 1.25rem;     /* 20px */
  --text-3xl: 1.5rem;      /* 24px */

  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* Letter Spacing */
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;

  /* ----------------------------------------
     Colors - Dark Theme Semantic
     ---------------------------------------- */

  /* Backgrounds - Dark Hierarchy (ramp shifted toward black) */
  --color-bg-primary: #050505;
  --color-bg-secondary: #0B0B0B;
  --color-bg-tertiary: #121212;
  --color-bg-elevated: #1A1A1A;
  --color-bg-hover: #151515;
  --color-bg-active: rgba(5, 242, 242, 0.1);
  --color-bg-muted: #121212;

  /* Text - Dark Theme */
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #A0A0A0;
  --color-text-muted: #666666;
  --color-text-link: #05F2F2;
  --color-text-link-hover: #05F2DB;
  --color-text-inverse: #0D0D0D;

  /* Borders - Dark Theme */
  --color-border-default: #2A2A2A;
  --color-border-light: #1F1F1F;
  --color-border-strong: #3A3A3A;
  --color-border-focus: #05F2F2;

  /* Accents - Brand Colors */
  --color-accent-primary: #05F2F2;
  --color-accent-primary-hover: #05F2DB;
  --color-accent-secondary: #03A6A6;
  --color-accent-success: #22C55E;
  --color-accent-success-light: rgba(34, 197, 94, 0.15);
  --color-accent-warning: #F59E0B;
  --color-accent-warning-light: rgba(245, 158, 11, 0.15);
  --color-accent-danger: #EF4444;
  --color-accent-danger-light: rgba(239, 68, 68, 0.15);
  --color-accent-info: #3B82F6;
  --color-accent-info-light: rgba(59, 130, 246, 0.15);
  --dashboard-chart-revenue-fill: rgba(52, 211, 153, 0.18);
  --dashboard-chart-revenue-stroke: #34D399;
  --dashboard-chart-orders-fill: rgba(251, 191, 36, 0.12);
  --dashboard-chart-orders-stroke: #FBBF24;
  --dashboard-chart-activity-fill: rgba(251, 191, 36, 0.12);
  --dashboard-chart-activity-stroke: #FBBF24;
  --dashboard-chart-visits-fill: rgba(244, 114, 182, 0.11);
  --dashboard-chart-visits-stroke: #F472B6;
  --dashboard-chart-grid: rgba(229, 231, 235, 0.11);
  --dashboard-chart-tick: #9CA3AF;
  --dashboard-chart-panel-bg: rgba(255, 255, 255, 0.025);

  /* ----------------------------------------
     Spacing Scale (4px base)
     ---------------------------------------- */
  --space-0: 0;
  --space-px: 1px;
  --space-0-5: 0.125rem;  /* 2px */
  --space-1: 0.25rem;     /* 4px */
  --space-1-5: 0.375rem;  /* 6px */
  --space-2: 0.5rem;      /* 8px */
  --space-2-5: 0.625rem;  /* 10px */
  --space-3: 0.75rem;     /* 12px */
  --space-3-5: 0.875rem;  /* 14px */
  --space-4: 1rem;        /* 16px */
  --space-5: 1.25rem;     /* 20px */
  --space-6: 1.5rem;      /* 24px */
  --space-7: 1.75rem;     /* 28px */
  --space-8: 2rem;        /* 32px */
  --space-9: 2.25rem;     /* 36px */
  --space-10: 2.5rem;     /* 40px */
  --space-12: 3rem;       /* 48px */
  --space-14: 3.5rem;     /* 56px */
  --space-16: 4rem;       /* 64px */

  /* ----------------------------------------
     Border Radius
     ---------------------------------------- */
  --radius-none: 0;
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.375rem;  /* 6px */
  --radius-lg: 0.5rem;    /* 8px */
  --radius-xl: 0.75rem;   /* 12px */
  --radius-2xl: 1rem;     /* 16px */
  --radius-3xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;

  /* ----------------------------------------
     Shadows - Dark Theme (Higher Opacity)
     ---------------------------------------- */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.3);
  --shadow-none: 0 0 #0000;

  /* Glow Effects for Dark Theme */
  --glow-accent: 0 0 20px rgba(5, 242, 242, 0.3);
  --glow-accent-sm: 0 0 10px rgba(5, 242, 242, 0.2);
  --shadow-glow: 0 4px 14px 0 rgba(5, 242, 242, 0.15);

  /* ----------------------------------------
     Transitions
     ---------------------------------------- */
  --duration-fast: 100ms;
  --duration-normal: 150ms;
  --duration-slow: 200ms;
  --duration-slower: 300ms;
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* ----------------------------------------
     Z-Index Scale
     ---------------------------------------- */
  --z-0: 0;
  --z-10: 10;
  --z-20: 20;
  --z-30: 30;
  --z-40: 40;
  --z-50: 50;
  --z-auto: auto;

  /* ----------------------------------------
     Layout Variables (rem-based for responsive scaling)
     ---------------------------------------- */
  --icon-bar-width: 4.5rem;          /* 72px @16 → 54px @12 */
  --sidebar-width: 13.75rem;         /* 220px @16 → 165px @12 */
  --bottom-nav-height: 4rem;         /* 64px @16 → 48px @12 */
  --mobile-header-height: 3.5rem;    /* 56px @16 → 42px @12 */
  --dashboard-content-gutter-x: 0;
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --bottom-nav-safe: var(--safe-area-bottom);   /* folga abaixo da bottom-nav; reduzida no PWA */
}

@media (min-width: 1024px) {
  :root {
    --dashboard-content-gutter-x: var(--space-6);
  }
}


/* ============================================
   Light Theme - Variable Overrides
   ============================================ */
[data-theme="light"] {
  /* Backgrounds - Light Hierarchy */
  --color-bg-primary: #FFFFFF;
  --color-bg-secondary: #F9FAFB;
  --color-bg-tertiary: #F3F4F6;
  --color-bg-elevated: #E5E7EB;
  --color-bg-hover: #F3F4F6;
  --color-bg-active: rgba(14, 116, 144, 0.1);
  --color-bg-muted: #F3F4F6;

  /* Text - Light Theme */
  --color-text-primary: #111827;
  --color-text-secondary: #4B5563;
  --color-text-muted: #6B7280;
  --color-text-link: #0E7490;
  --color-text-link-hover: #155E75;
  --color-text-inverse: #FFFFFF;

  /* Borders - Light Theme */
  --color-border-default: #E5E7EB;
  --color-border-light: #F3F4F6;
  --color-border-strong: #D1D5DB;
  --color-border-focus: #0E7490;

  /* Accents - Adjusted for light backgrounds */
  --color-accent-primary: #0E7490;
  --color-accent-primary-hover: #155E75;
  --color-accent-secondary: #155E75;
  --color-accent-success: #15803D;
  --color-accent-success-light: rgba(34, 197, 94, 0.1);
  --color-accent-warning: #B45309;
  --color-accent-warning-light: rgba(245, 158, 11, 0.1);
  --color-accent-danger: #B91C1C;
  --color-accent-danger-light: rgba(239, 68, 68, 0.08);
  --color-accent-info: #1D4ED8;
  --color-accent-info-light: rgba(59, 130, 246, 0.08);
  --dashboard-chart-revenue-fill: rgba(5, 150, 105, 0.16);
  --dashboard-chart-revenue-stroke: #047857;
  --dashboard-chart-orders-fill: rgba(251, 191, 36, 0.12);
  --dashboard-chart-orders-stroke: #FBBF24;
  --dashboard-chart-activity-fill: rgba(251, 191, 36, 0.12);
  --dashboard-chart-activity-stroke: #FBBF24;
  --dashboard-chart-visits-fill: rgba(219, 39, 119, 0.1);
  --dashboard-chart-visits-stroke: #BE185D;
  --dashboard-chart-grid: rgba(17, 24, 39, 0.08);
  --dashboard-chart-tick: #6B7280;
  --dashboard-chart-panel-bg: rgba(17, 24, 39, 0.025);

  /* Shadows - Lower opacity for light */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);

  /* Glow Effects - Muted for light */
  --glow-accent: 0 0 20px rgba(14, 116, 144, 0.15);
  --glow-accent-sm: 0 0 10px rgba(14, 116, 144, 0.1);
  --shadow-glow: 0 4px 14px 0 rgba(14, 116, 144, 0.1);
}

/* Active menu item bg in light - darker tinted */
[data-theme="light"] .menu-item-pattern.active {
  background-color: rgba(14, 116, 144, 0.1);
  color: #0E7490;
}

.dashboard-chart-swatch-revenue {
  background: var(--dashboard-chart-revenue-stroke);
}

.dashboard-chart-swatch-orders {
  background: var(--dashboard-chart-orders-stroke);
}

.dashboard-chart-swatch-activity {
  background: var(--dashboard-chart-activity-stroke);
}

.dashboard-chart-swatch-visits {
  background: var(--dashboard-chart-visits-stroke);
}

.dashboard-chart-panel {
  background: var(--dashboard-chart-panel-bg);
  border-top: 1px solid var(--color-border-light);
}

[data-theme="light"] .sidebar-menu-item.active {
  background-color: rgba(14, 116, 144, 0.1);
  color: #0E7490;
}

[data-theme="light"] .filter-chip.active {
  color: #0E7490;
  background-color: rgba(14, 116, 144, 0.08);
  border-color: #0E7490;
}

[data-theme="light"] .bottom-nav-item {
  /* A regra global de link em light ([data-theme="light"] a) tem mais especificidade
     que .bottom-nav-item; sem isto os itens inativos ficam teal, iguais ao ativo. */
  color: var(--color-text-muted);
}

[data-theme="light"] .bottom-nav-item.active {
  color: #0E7490;
}

[data-theme="light"] .icon-bar-item.active .icon-bar-icon {
  background-color: rgba(14, 116, 144, 0.1);
}

[data-theme="light"] #icon-bar .icon-bar-item[data-iconbar-key="overview"] .icon-bar-icon {
  background-color: rgba(14, 116, 144, 0.1);
}

[data-theme="light"] .mobile-visual-workspace[data-mobile-workspace-key="overview"] .marketplace-logo {
  width: 2.5rem;
  height: 2.5rem;
  background-color: rgba(14, 116, 144, 0.1) !important;
  border-color: transparent;
}

[data-theme="light"] [data-active-workspace="overview"] .marketplace-logo {
  background-color: rgba(14, 116, 144, 0.1) !important;
  border-color: transparent;
}

[data-theme="light"] .mobile-visual-workspace[data-mobile-workspace-key="overview"] .marketplace-logo-icon {
  color: #0E7490;
}

[data-theme="light"] [data-active-workspace="overview"] .marketplace-logo-icon {
  color: #0E7490;
}

[data-theme="light"] .mobile-visual-workspace[data-mobile-workspace-key="overview"] .marketplace-logo-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

[data-theme="light"] #icon-bar .icon-bar-item[data-iconbar-key="creation_studio"] .marketplace-logo,
[data-theme="light"] .mobile-visual-workspace[data-mobile-workspace-key="creation_studio"] .marketplace-logo,
[data-theme="light"] [data-active-workspace="creation_studio"] .marketplace-logo {
  background-color: rgba(14, 116, 144, 0.1) !important;
  border-color: transparent;
}

[data-theme="light"] #icon-bar .icon-bar-item[data-iconbar-key="creation_studio"] .marketplace-logo-img,
[data-theme="light"] .mobile-visual-workspace[data-mobile-workspace-key="creation_studio"] .marketplace-logo-img,
[data-theme="light"] [data-active-workspace="creation_studio"] .marketplace-logo-img {
  filter: invert(1) hue-rotate(180deg) saturate(0.9) brightness(0.96) contrast(1.02);
}

/* Badge accent in light */
[data-theme="light"] .badge-accent {
  background-color: rgba(14, 116, 144, 0.1);
  color: #0E7490;
}

/* Radio card checked in light */
[data-theme="light"] .radio-card input[type="radio"]:checked + .radio-card-content {
  border-color: #0E7490;
  background-color: rgba(14, 116, 144, 0.04);
}

/* Form focus glow in light */
[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-select:focus,
[data-theme="light"] .form-textarea:focus {
  border-color: #0E7490;
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.1);
}

/* Card gradient in light */
[data-theme="light"] .card {
  background: linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 100%);
}

[data-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #0E7490 0%, #155E75 100%);
  color: #FFFFFF;
}

[data-theme="light"] .btn-primary:hover {
  background: linear-gradient(135deg, #155E75 0%, #0E7490 100%);
  box-shadow: var(--shadow-glow);
}

/* Form select chevron color in light */
[data-theme="light"] .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236B7280' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

/* ============================================
   Light Theme - Tailwind Utility Class Overrides
   ============================================ */

/* Background colors */
[data-theme="light"] .bg-dark-bg { background-color: #FFFFFF !important; }
[data-theme="light"] .bg-dark-bg\/70 { background-color: rgba(255, 255, 255, 0.86) !important; }
[data-theme="light"] .bg-dark-bg\/60 { background-color: rgba(255, 255, 255, 0.76) !important; }
[data-theme="light"] .bg-dark-secondary { background-color: #F9FAFB !important; }
[data-theme="light"] .bg-dark-secondary\/90 { background-color: rgba(249, 250, 251, 0.96) !important; }
[data-theme="light"] .bg-dark-secondary\/80 { background-color: rgba(249, 250, 251, 0.92) !important; }
[data-theme="light"] .bg-dark-tertiary { background-color: #F3F4F6 !important; }
[data-theme="light"] .bg-dark-tertiary\/80 { background-color: rgba(243, 244, 246, 0.88) !important; }
[data-theme="light"] .bg-dark-tertiary\/70 { background-color: rgba(243, 244, 246, 0.8) !important; }
[data-theme="light"] .bg-dark-tertiary\/60 { background-color: rgba(243, 244, 246, 0.72) !important; }
[data-theme="light"] .bg-dark-tertiary\/50 { background-color: rgba(243, 244, 246, 0.64) !important; }
[data-theme="light"] .bg-dark-tertiary\/40 { background-color: rgba(243, 244, 246, 0.56) !important; }
[data-theme="light"] .bg-dark-elevated { background-color: #E5E7EB !important; }
[data-theme="light"] .bg-dark-elevated\/80 { background-color: rgba(229, 231, 235, 0.88) !important; }
[data-theme="light"] .bg-dark-hover { background-color: #F3F4F6 !important; }
[data-theme="light"] .bg-dark-border-light { background-color: #E5E7EB !important; }

/* Text colors */
[data-theme="light"] .text-white { color: #111827 !important; }
[data-theme="light"] .text-gray-200 { color: #1F2937 !important; }
[data-theme="light"] .text-gray-300 { color: #374151 !important; }
[data-theme="light"] .text-gray-400 { color: #4B5563 !important; }
[data-theme="light"] .text-gray-500 { color: #6B7280 !important; }
[data-theme="light"] .text-gray-600 { color: #4B5563 !important; }
[data-theme="light"] .text-vvm-cyan { color: #0E7490 !important; }
[data-theme="light"] .text-vvm-bright { color: #0E7490 !important; }

/* Border colors */
[data-theme="light"] .border-dark-bg { border-color: #FFFFFF !important; }
[data-theme="light"] .border-dark-border { border-color: #E5E7EB !important; }
[data-theme="light"] .border-dark-border-light { border-color: #F3F4F6 !important; }
[data-theme="light"] .border-dark-border-strong { border-color: #D1D5DB !important; }
[data-theme="light"] .divide-dark-border-light > :not([hidden]) ~ :not([hidden]) { border-color: #E5E7EB !important; }

/* Hover states */
[data-theme="light"] .hover\:bg-dark-hover:hover { background-color: #E5E7EB !important; }
[data-theme="light"] .hover\:bg-dark-hover\/40:hover { background-color: rgba(229, 231, 235, 0.58) !important; }
[data-theme="light"] .hover\:bg-dark-bg:hover { background-color: #FFFFFF !important; }
[data-theme="light"] .hover\:bg-dark-secondary:hover { background-color: #F9FAFB !important; }
[data-theme="light"] .hover\:bg-dark-elevated:hover { background-color: #E5E7EB !important; }
[data-theme="light"] .hover\:bg-dark-tertiary:hover { background-color: #F3F4F6 !important; }
[data-theme="light"] .hover\:bg-vvm-bright:hover { background-color: #155E75 !important; }
[data-theme="light"] .hover\:text-white:hover { color: #111827 !important; }
[data-theme="light"] .hover\:text-gray-200:hover { color: #1F2937 !important; }
[data-theme="light"] .hover\:text-gray-300:hover { color: #374151 !important; }
[data-theme="light"] .hover\:text-vvm-cyan:hover { color: #155E75 !important; }
[data-theme="light"] .hover\:text-vvm-bright:hover { color: #155E75 !important; }
[data-theme="light"] .hover\:border-dark-border-strong:hover { border-color: #D1D5DB !important; }
[data-theme="light"] .hover\:border-vvm-cyan\/40:hover { border-color: rgba(14, 116, 144, 0.35) !important; }

/* Toast/alert backgrounds */
[data-theme="light"] .bg-green-500\/10 { background-color: rgba(34, 197, 94, 0.08) !important; }
[data-theme="light"] .bg-red-500\/10 { background-color: rgba(239, 68, 68, 0.08) !important; }
[data-theme="light"] .bg-amber-500\/10 { background-color: rgba(180, 83, 9, 0.08) !important; }
[data-theme="light"] .bg-sky-500\/10 { background-color: rgba(3, 105, 161, 0.08) !important; }
[data-theme="light"] .bg-yellow-500\/10 { background-color: rgba(245, 158, 11, 0.08) !important; }
[data-theme="light"] .bg-emerald-500\/10 { background-color: rgba(21, 128, 61, 0.08) !important; }
[data-theme="light"] .text-emerald-300 { color: #15803D !important; }
[data-theme="light"] .text-amber-300 { color: #B45309 !important; }
[data-theme="light"] .text-sky-300 { color: #0369A1 !important; }
[data-theme="light"] .text-red-100 { color: #991B1B !important; }
[data-theme="light"] .text-amber-50 { color: #92400E !important; }
[data-theme="light"] .text-sky-50 { color: #0C4A6E !important; }
[data-theme="light"] .text-green-400 { color: #15803D !important; }
[data-theme="light"] .text-red-400 { color: #B91C1C !important; }
[data-theme="light"] .text-yellow-400 { color: #B45309 !important; }
[data-theme="light"] .border-emerald-500\/40 { border-color: rgba(21, 128, 61, 0.25) !important; }
[data-theme="light"] .border-amber-500\/40 { border-color: rgba(180, 83, 9, 0.25) !important; }
[data-theme="light"] .border-sky-500\/40 { border-color: rgba(3, 105, 161, 0.25) !important; }
[data-theme="light"] .border-red-500\/40 { border-color: rgba(185, 28, 28, 0.25) !important; }
[data-theme="light"] .border-green-500\/20 { border-color: rgba(21, 128, 61, 0.2) !important; }
[data-theme="light"] .border-red-500\/20 { border-color: rgba(185, 28, 28, 0.2) !important; }
[data-theme="light"] .border-yellow-500\/20 { border-color: rgba(180, 83, 9, 0.2) !important; }
[data-theme="light"] .ring-dark-border-light { --tw-ring-color: #E5E7EB !important; }
[data-theme="light"] .ring-vvm-cyan\/30 { --tw-ring-color: rgba(14, 116, 144, 0.25) !important; }
[data-theme="light"] .ring-emerald-500\/30 { --tw-ring-color: rgba(21, 128, 61, 0.25) !important; }
[data-theme="light"] .ring-amber-500\/30 { --tw-ring-color: rgba(180, 83, 9, 0.25) !important; }

/* Mobile overlay */
[data-theme="light"] .bg-black\/70 { background-color: rgba(0, 0, 0, 0.4) !important; }

/* Brand color overrides */
[data-theme="light"] .bg-vvm-dark-teal { background-color: rgba(14, 116, 144, 0.08) !important; }
[data-theme="light"] .bg-vvm-dark-teal\/10 { background-color: rgba(14, 116, 144, 0.06) !important; }
[data-theme="light"] .bg-vvm-dark-teal\/20 { background-color: rgba(14, 116, 144, 0.08) !important; }
[data-theme="light"] .bg-vvm-dark-teal\/60 { background-color: rgba(14, 116, 144, 0.12) !important; }
[data-theme="light"] .bg-vvm-cyan { background-color: #0E7490 !important; }
[data-theme="light"] .bg-vvm-cyan.text-vvm-black,
[data-theme="light"] .bg-vvm-bright.text-vvm-black,
[data-theme="light"] .bg-shopee-orange.text-white,
[data-theme="light"] .bg-ml-blue.text-white { color: #FFFFFF !important; }
[data-theme="light"] .border-vvm-cyan { border-color: #0E7490 !important; }
[data-theme="light"] .border-vvm-cyan\/30 { border-color: rgba(14, 116, 144, 0.25) !important; }
[data-theme="light"] .border-vvm-dark-teal { border-color: rgba(14, 116, 144, 0.35) !important; }
[data-theme="light"] .bg-vvm-cyan\/5 { background-color: rgba(14, 116, 144, 0.05) !important; }
[data-theme="light"] .bg-vvm-cyan\/10 { background-color: rgba(14, 116, 144, 0.1) !important; }
[data-theme="light"] .hover\:bg-vvm-dark-teal\/20:hover { background-color: rgba(14, 116, 144, 0.08) !important; }
[data-theme="light"] .hover\:bg-vvm-dark-teal\/50:hover { background-color: rgba(14, 116, 144, 0.12) !important; }
[data-theme="light"] .hover\:border-vvm-cyan:hover { border-color: #0E7490 !important; }
[data-theme="light"] .hover\:border-vvm-dark-teal:hover { border-color: rgba(14, 116, 144, 0.35) !important; }
[data-theme="light"] .focus\:border-vvm-cyan:focus { border-color: #0E7490 !important; }
[data-theme="light"] .focus\:ring-vvm-cyan\/20:focus { --tw-ring-color: rgba(14, 116, 144, 0.16) !important; }
[data-theme="light"] .focus\:ring-vvm-cyan\/30:focus { --tw-ring-color: rgba(14, 116, 144, 0.18) !important; }
[data-theme="light"] .border-vvm-teal\/30 { border-color: rgba(14, 116, 144, 0.2) !important; }
[data-theme="light"] .peer:checked ~ .peer-checked\:border-vvm-dark-teal { border-color: rgba(14, 116, 144, 0.35) !important; }
[data-theme="light"] .peer:checked ~ .peer-checked\:bg-vvm-dark-teal\/10 { background-color: rgba(14, 116, 144, 0.08) !important; }
[data-theme="light"] .peer:checked ~ .peer-checked\:text-vvm-cyan { color: #0E7490 !important; }

/* Red/danger overrides */
[data-theme="light"] .text-red-300 { color: #B91C1C !important; }
[data-theme="light"] .border-red-500\/30 { border-color: rgba(185, 28, 28, 0.2) !important; }
[data-theme="light"] .bg-red-500\/15 { background-color: rgba(185, 28, 28, 0.06) !important; }
[data-theme="light"] .hover\:bg-red-500\/20:hover { background-color: rgba(185, 28, 28, 0.1) !important; }
[data-theme="light"] .hover\:bg-red-500\/25:hover { background-color: rgba(185, 28, 28, 0.1) !important; }
[data-theme="light"] .hover\:border-red-500\/50:hover { border-color: rgba(185, 28, 28, 0.3) !important; }

/* Misc overrides */
[data-theme="light"] .placeholder-gray-600::placeholder { color: #6B7280 !important; }
[data-theme="light"] .shadow-2xl { box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08) !important; }
[data-theme="light"] .group:hover .group-hover\:text-gray-300 { color: #374151 !important; }

/* Sidebar active indicator gradient overrides */
[data-theme="light"] .from-vvm-cyan { --tw-gradient-from: #0E7490 !important; }
[data-theme="light"] .from-vvm-teal\/30 {
  --tw-gradient-from: rgba(14, 116, 144, 0.18) var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgba(14, 116, 144, 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}
[data-theme="light"] .to-vvm-bright { --tw-gradient-to: #0891B2 !important; }
[data-theme="light"] .to-vvm-cyan\/20 { --tw-gradient-to: rgba(8, 145, 178, 0.14) var(--tw-gradient-to-position) !important; }

/* Focus outlines in light */
[data-theme="light"] .btn-primary:focus,
[data-theme="light"] .btn-secondary:focus,
[data-theme="light"] .dropdown-trigger:focus { outline-color: #0E7490; }

[data-theme="light"] .input-search:focus,
[data-theme="light"] .input:focus {
  border-color: #0E7490;
  box-shadow: 0 0 10px rgba(14, 116, 144, 0.1);
}

/* Text accent in light */
[data-theme="light"] .text-accent { color: #0E7490; }



/* ============================================
   Component Patterns - Dark Theme
   ============================================ */

/* ----------------------------------------
   List Item / Data Row
   ---------------------------------------- */
.list-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
  background-color: var(--color-bg-secondary);
  transition: background-color var(--duration-fast) var(--ease-default);
}

.list-item:hover {
  background-color: var(--color-bg-hover);
}

.list-item:last-child {
  border-bottom: none;
}

.list-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--space-10);
  height: var(--space-10);
  border-radius: var(--radius-lg);
  background-color: var(--color-bg-tertiary);
  flex-shrink: 0;
}

.list-item-content {
  flex: 1;
  min-width: 0;
}

.list-item-title {
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  color: var(--color-text-primary);
  line-height: var(--leading-snug);
}

.list-item-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}

.list-item-meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  flex-shrink: 0;
}


/* ----------------------------------------
   Badge / Tag - Dark Theme
   ---------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  line-height: var(--leading-none);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-default {
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
}

.badge-primary {
  background-color: var(--color-accent-info-light);
  color: var(--color-accent-info);
}

.badge-success {
  background-color: var(--color-accent-success-light);
  color: var(--color-accent-success);
}

.badge-warning {
  background-color: var(--color-accent-warning-light);
  color: var(--color-accent-warning);
}

.badge-danger {
  background-color: var(--color-accent-danger-light);
  color: var(--color-accent-danger);
}

.badge-accent {
  background-color: rgba(5, 242, 242, 0.15);
  color: var(--vvm-cyan);
}


/* ----------------------------------------
   Button - Primary (Cyan Gradient)
   ---------------------------------------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  line-height: var(--leading-normal);
  color: var(--color-text-inverse);
  background: linear-gradient(135deg, var(--vvm-cyan) 0%, var(--vvm-teal) 100%);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-default);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--vvm-bright) 0%, var(--vvm-cyan) 100%);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-primary:focus {
  outline: 2px solid var(--vvm-cyan);
  outline-offset: 2px;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}


/* ----------------------------------------
   Button - Secondary (Outline)
   ---------------------------------------- */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: transparent;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-default);
}

.btn-secondary:hover {
  background-color: var(--color-bg-hover);
  border-color: var(--color-border-strong);
}

.btn-secondary:focus {
  outline: 2px solid var(--vvm-cyan);
  outline-offset: 2px;
}


/* ----------------------------------------
   Button - Ghost (Text Only)
   ---------------------------------------- */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
  background-color: transparent;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-default);
}

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


/* ----------------------------------------
   Search Input - Dark Theme
   ---------------------------------------- */
.input-search {
  display: flex;
  align-items: center;
  width: 100%;
  height: 2.5rem;
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-10);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  transition: all var(--duration-fast) var(--ease-default);
}

.ui-input.input-search {
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-10);
}

.input-search::placeholder {
  color: var(--color-text-muted);
}

.input-search:hover {
  border-color: var(--color-border-strong);
}

.input-search:focus {
  outline: none;
  border-color: var(--vvm-cyan);
  box-shadow: var(--glow-accent-sm);
}

.input-search-wrapper {
  position: relative;
}

.input-search-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: block;
  width: 1.125rem;
  height: 1.125rem;
  color: var(--color-text-muted);
  pointer-events: none;
}


/* ----------------------------------------
   Form Input - Dark Theme
   ---------------------------------------- */
.input {
  display: flex;
  align-items: center;
  width: 100%;
  height: 2.5rem;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  transition: all var(--duration-fast) var(--ease-default);
}

.input::placeholder {
  color: var(--color-text-muted);
}

.input:hover {
  border-color: var(--color-border-strong);
}

.input:focus {
  outline: none;
  border-color: var(--vvm-cyan);
  box-shadow: var(--glow-accent-sm);
}


/* ----------------------------------------
   Dropdown Trigger - Dark Theme
   ---------------------------------------- */
.dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-default);
}

.dropdown-trigger:hover {
  background-color: var(--color-bg-hover);
  border-color: var(--color-border-strong);
}

.dropdown-trigger:focus {
  outline: 2px solid var(--vvm-cyan);
  outline-offset: 2px;
}

.dropdown-trigger-icon {
  width: 1rem;
  height: 1rem;
  color: var(--color-text-secondary);
}


/* ----------------------------------------
   Card - Dark Theme with Accent Bar
   ---------------------------------------- */
.card {
  background: linear-gradient(180deg, var(--color-bg-secondary) 0%, var(--color-bg-tertiary) 100%);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.card-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border-light);
}

.card-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--color-text-primary);
}

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

/* Card Hover Effect */
.card-hover {
  transition: all var(--duration-slow) var(--ease-default);
}

.card-hover:hover {
  transform: translateY(-0.125rem);
  box-shadow: var(--shadow-lg);
}


/* ----------------------------------------
   Menu Item (Sidebar) - Dark Theme
   ---------------------------------------- */
.menu-item-pattern {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-default);
  cursor: pointer;
  position: relative;
}

.menu-item-pattern:hover {
  color: var(--color-text-primary);
  background-color: var(--color-bg-hover);
  transform: translateX(0.125rem);
}

.menu-item-pattern.active {
  color: var(--vvm-cyan);
  background-color: var(--vvm-dark-teal);
}

.menu-item-pattern.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 1.25rem;
  background: linear-gradient(180deg, var(--vvm-cyan) 0%, var(--vvm-bright) 100%);
  border-radius: 0 2px 2px 0;
}

.menu-item-pattern-icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}


/* ----------------------------------------
   Page Header - Dark Theme
   ---------------------------------------- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-border-light);
  background-color: var(--color-bg-secondary);
}

.page-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--color-text-primary);
}

.page-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}


/* ----------------------------------------
   Empty State - Dark Theme (legacy title/description)
   ---------------------------------------- */
.empty-state-title {
  font-size: var(--text-lg);
  font-weight: var(--font-medium);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.empty-state-description {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  max-width: 24rem;
}


/* ============================================
   Icon Bar Patterns - Dark Theme
   ============================================ */

/* Icon Bar Container */
.icon-bar {
  width: var(--icon-bar-width);
  background-color: var(--color-bg-primary);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid var(--color-border-light);
}

/* Icon Bar Item - Base */
.icon-bar-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: var(--space-2);
  border-radius: var(--radius-xl);
  transition: all var(--duration-normal) var(--ease-default);
  cursor: pointer;
  position: relative;
}

/* Icon Bar Item - Inactive State */
.icon-bar-item:not(.active) {
  color: var(--color-text-secondary);
}

.icon-bar-item:not(.active):hover {
  background-color: var(--color-bg-hover);
  color: var(--color-text-primary);
}

/* Icon Bar Item - Active State */
.icon-bar-item.active {
  background-color: var(--color-bg-tertiary);
}

/* Icon Bar Icon Container */
.icon-bar-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

/* Icon Bar Icon - Inactive */
.icon-bar-item:not(.active) .icon-bar-icon {
  background-color: var(--color-bg-tertiary);
}

/* Icon Bar Icon - Active */
.icon-bar-item.active .icon-bar-icon {
  background-color: var(--color-bg-elevated);
}

/* Rótulo de texto sob o ícone (Análise / Estúdio no topo da rail) */
.icon-bar-label {
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  color: currentColor;
}

/* Icon Bar Divider */
.icon-bar-divider {
  border-top: 1px solid var(--color-border-light);
  margin: var(--space-2) 0;
}

/* Icon Bar Logo */
.icon-bar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--icon-bar-width);
  border-bottom: 1px solid var(--color-border-light);
}

/* Icon Bar Section */
.icon-bar-section {
  padding: var(--space-4) var(--space-2);
}

/* Icon Bar Bottom Actions */
.icon-bar-bottom {
  border-top: 1px solid var(--color-border-light);
  padding: var(--space-4) var(--space-2);
  margin-top: auto;
}


/* ============================================
   Sidebar Menu Patterns - Dark Theme
   ============================================ */

/* Sidebar Container */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--color-bg-secondary);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid var(--color-border-light);
}

/* Sidebar Header */
.sidebar-header {
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
}

/* Sidebar Section Label */
.sidebar-label {
  padding: 0 var(--space-3);
  margin-bottom: var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Sidebar Menu Item */
.sidebar-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-default);
  cursor: pointer;
}

.sidebar-menu-item:hover {
  background-color: var(--color-bg-hover);
  color: var(--color-text-primary);
  transform: translateX(0.125rem);
}

.sidebar-menu-item.active {
  background-color: var(--vvm-dark-teal);
  color: var(--vvm-cyan);
}

/* Sidebar Footer */
.sidebar-footer {
  border-top: 1px solid var(--color-border-light);
  margin-top: auto;
}


/* ============================================
   Filter Toolbar Patterns - Dark Theme (legacy sub-classes)
   ============================================ */

.filter-toolbar-group {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.filter-toolbar-spacer {
  flex: 1;
}

.filter-toolbar-count {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.filter-toolbar-count strong {
  font-weight: var(--font-semibold);
  color: var(--color-text-primary);
}


/* ============================================
   Mobile Navigation Patterns
   ============================================ */

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-height) + var(--bottom-nav-safe));
  padding-bottom: var(--bottom-nav-safe);
  background-color: var(--color-bg-primary);
  border-top: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: var(--z-40);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  padding: var(--space-2);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}

.bottom-nav-item:hover,
.bottom-nav-item:active {
  color: var(--color-text-secondary);
}

.bottom-nav-item.active {
  color: var(--vvm-cyan);
}

.bottom-nav-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.bottom-nav-label {
  font-size: 0.625rem;
  font-weight: var(--font-medium);
  margin-top: var(--space-1);
}

/* Mobile Header */
.mobile-header {
  position: sticky;
  top: 0;
  height: var(--mobile-header-height);
  background-color: var(--color-bg-primary);
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
  z-index: var(--z-30);
}

.mobile-nav-panel {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(22rem, calc(100vw - 2rem));
  display: flex;
  flex-direction: row;
  overflow: hidden;
  border-right: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-xl);
  padding-top: var(--safe-area-top);
  padding-bottom: var(--safe-area-bottom);
}

.mobile-visual-sidebar {
  width: 4.875rem;
  flex: 0 0 4.875rem;
  display: flex;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-2);
  background-color: var(--color-bg-primary);
  border-right: 1px solid var(--color-border-light);
}

.mobile-visual-sidebar-brand {
  width: 3.25rem;
  height: 3.25rem;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xl);
  color: var(--vvm-cyan);
  text-decoration: none;
}

.mobile-visual-sidebar-brand:active {
  background-color: var(--color-bg-hover);
}

.mobile-visual-sidebar-brand img {
  width: 2.25rem;
  height: 2.25rem;
}

.mobile-visual-workspaces {
  width: 100%;
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: var(--space-2);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-1) 0;
  -webkit-overflow-scrolling: touch;
}

.mobile-visual-workspace {
  position: relative;
  width: 100%;
  min-height: 3.5rem;
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 3px;
  padding: var(--space-1) 0;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition:
    background-color var(--duration-fast) var(--ease-default),
    color var(--duration-fast) var(--ease-default),
    transform var(--duration-fast) var(--ease-default);
}

.mobile-visual-workspace-label {
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  /* Espelha o icon-bar-label do desktop: cinza (inativo) / cyan (ativo), fixo por tema */
  color: #9ca3af;
}

.mobile-visual-workspace.active .mobile-visual-workspace-label {
  /* Brand theme-aware (teal escuro em light, cyan em dark) — evita o cyan garrido sobre o rail claro */
  color: var(--color-brand);
}

.mobile-visual-workspace:active {
  color: var(--color-text-primary);
  background-color: var(--color-bg-hover);
  transform: scale(0.97);
}

.mobile-visual-workspace.active {
  color: var(--vvm-cyan);
  background-color: var(--color-bg-tertiary);
}

.mobile-visual-workspace.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 1.75rem;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, var(--vvm-cyan), var(--vvm-bright));
  transform: translateY(-50%);
}

.mobile-visual-workspace-soon {
  opacity: 0.4;
  cursor: not-allowed;
}

.mobile-visual-workspace-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-visual-workspace-logo .marketplace-logo-icon svg {
  width: 1.375rem;
  height: 1.375rem;
}

.mobile-nav-main {
  min-width: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  background-color: var(--color-bg-secondary);
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 4rem;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
}

.mobile-nav-close {
  display: inline-flex;
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  border: 0;
  border-radius: var(--radius-lg);
  background: transparent;
}

.mobile-nav-close:active {
  color: var(--color-text-primary);
  background-color: var(--color-bg-hover);
}

.mobile-nav-scroll {
  min-height: 0;
  overflow-y: auto;
  padding-top: var(--space-4);
  -webkit-overflow-scrolling: touch;
}

/* Action Sheet */
.action-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 70vh;
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  padding: var(--space-4);
  padding-bottom: calc(var(--space-4) + var(--safe-area-bottom));
  z-index: var(--z-50);
  transform: translateY(100%);
  transition: transform var(--duration-slower) var(--ease-out);
}

.action-sheet.open {
  transform: translateY(0);
}

.mobile-action-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88vh;
  max-height: min(88vh, calc(100dvh - var(--mobile-header-height)));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-border-light);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  box-shadow: 0 -1rem 2.5rem rgba(0, 0, 0, 0.28);
  padding-top: var(--space-3);
}

.mobile-action-sheet-scroll {
  min-height: 0;
  overflow-y: auto;
  padding-bottom: var(--space-2);
  -webkit-overflow-scrolling: touch;
}

.action-sheet-handle {
  width: 2.25rem;
  height: 0.25rem;
  background-color: var(--color-border-strong);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-3);
}

.action-sheet-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  color: var(--color-text-primary);
  border-radius: var(--radius-lg);
  transition: background-color var(--duration-fast) var(--ease-default);
  min-height: 2.75rem;
  text-decoration: none;
}

.action-sheet-item.active {
  color: var(--vvm-cyan);
  background-color: var(--vvm-dark-teal);
}

[data-theme="light"] .action-sheet-item {
  color: var(--color-text-link);
}

[data-theme="light"] .action-sheet-item.active {
  color: var(--color-text-link);
  background-color: rgba(14, 116, 144, 0.08);
}

.action-sheet-item:active {
  background-color: var(--color-bg-hover);
}

.action-sheet-button {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.action-sheet-button.active {
  background-color: var(--vvm-dark-teal);
}

.action-sheet-section {
  padding: 0 var(--space-4) var(--space-4);
}

.action-sheet-section-title {
  margin: 0 0 var(--space-2);
  color: var(--color-text-muted);
  font-size: 0.6875rem;
  font-weight: var(--font-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.action-sheet-icon {
  display: flex;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 1.25rem;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.action-sheet-chevron {
  width: 1rem;
  height: 1rem;
  margin-left: auto;
  color: var(--color-text-muted);
  transition: transform var(--duration-fast) var(--ease-default);
}

.action-sheet-subitems {
  margin: var(--space-1) 0 var(--space-1) 1.25rem;
  padding-left: var(--space-3);
  border-left: 1px solid var(--color-border-light);
}

.action-sheet-subitem {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 2.5rem;
  padding: var(--space-3);
  color: var(--color-text-secondary);
  border-radius: var(--radius-lg);
  text-decoration: none;
}

.action-sheet-subitem.active {
  color: var(--vvm-cyan);
  background-color: var(--vvm-dark-teal);
}

[data-theme="light"] .action-sheet-subitem {
  color: var(--color-text-link);
}

[data-theme="light"] .action-sheet-subitem.active {
  color: var(--color-text-link);
  background-color: rgba(14, 116, 144, 0.08);
}

.action-sheet-badge {
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: auto;
  padding: 0 var(--space-1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background-color: var(--color-accent-danger);
  color: white;
  font-size: 0.6875rem;
  font-weight: var(--font-bold);
}

.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 1.25rem;
  margin-left: auto;
  padding: 0 var(--space-2);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  background-color: var(--color-bg-tertiary);
  font-size: 0.625rem;
  font-weight: var(--font-semibold);
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.new-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 1.25rem;
  margin-left: auto;
  padding: 0 var(--space-2);
  border: 1px solid var(--color-brand-subtle);
  border-radius: var(--radius-full);
  color: var(--color-brand);
  background-color: var(--color-bg-tertiary);
  font-size: 0.625rem;
  font-weight: var(--font-semibold);
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.bottom-nav-coming-soon {
  margin-top: 0.125rem;
  color: var(--color-text-muted);
  font-size: 0.5625rem;
  font-weight: var(--font-medium);
  line-height: 1;
}

.action-sheet-empty {
  margin: 0;
  padding: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.mobile-workspace-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: var(--space-2);
}

.mobile-workspace-item {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  color: var(--color-text-secondary);
  text-decoration: none;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  background-color: var(--color-bg-tertiary);
}

.mobile-workspace-item.active {
  color: var(--vvm-cyan);
  border-color: rgba(5, 242, 242, 0.35);
  background-color: var(--vvm-dark-teal);
}

.mobile-workspace-logo {
  display: inline-flex;
  flex: 0 0 auto;
}

.mobile-workspace-name {
  min-width: 0;
  overflow: hidden;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-account-section {
  border-top: 1px solid var(--color-border-light);
}

.account-selector-popover {
  position: static;
  margin-top: var(--space-2);
}

@media (min-width: 1024px) {
  .account-selector-popover {
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    margin-top: 0;
    margin-bottom: var(--space-2);
  }
}

.ai-usage-summary {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: var(--space-2-5);
  padding: var(--space-2-5) var(--space-3);
  color: var(--color-text-primary);
  text-decoration: none;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(5, 242, 242, 0.08), rgba(18, 18, 18, 0.94) 48%),
    var(--color-bg-tertiary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    background-color var(--duration-fast) var(--ease-default),
    border-color var(--duration-fast) var(--ease-default),
    transform var(--duration-fast) var(--ease-default);
}

.ai-usage-summary:hover {
  border-color: rgba(5, 242, 242, 0.32);
  background:
    linear-gradient(135deg, rgba(5, 242, 242, 0.12), rgba(21, 21, 21, 0.96) 52%),
    var(--color-bg-hover);
}

.ai-usage-summary:active {
  transform: scale(0.985);
}

.ai-usage-summary-icon {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  align-items: center;
  justify-content: center;
  color: var(--vvm-cyan);
  border: 1px solid rgba(5, 242, 242, 0.22);
  border-radius: var(--radius-md);
  background: rgba(5, 242, 242, 0.1);
}

.ai-usage-summary-icon svg {
  width: 1.125rem;
  height: 1.125rem;
}

.ai-usage-summary-content {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

.ai-usage-summary-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.ai-usage-summary-label {
  min-width: 0;
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-usage-summary-chevron {
  width: 0.875rem;
  height: 0.875rem;
  flex: 0 0 0.875rem;
  color: var(--color-text-muted);
}

.ai-usage-summary-metrics {
  margin-top: var(--space-0-5);
}

.ai-usage-summary-value {
  min-width: 0;
  overflow: hidden;
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-usage-summary-meta {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: 0.6875rem;
  font-weight: var(--font-medium);
  line-height: var(--leading-tight);
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-usage-summary .ai-usage-progress {
  margin-top: var(--space-2);
}

.ai-usage-summary-warning {
  border-color: rgba(245, 158, 11, 0.28);
}

.ai-usage-summary-warning .ai-usage-summary-icon {
  color: var(--color-accent-warning);
  border-color: rgba(245, 158, 11, 0.28);
  background: var(--color-accent-warning-light);
}

.ai-usage-summary-danger {
  border-color: rgba(239, 68, 68, 0.32);
}

.ai-usage-summary-danger .ai-usage-summary-icon {
  color: var(--color-accent-danger);
  border-color: rgba(239, 68, 68, 0.32);
  background: var(--color-accent-danger-light);
}

/* Créditos da IA — versão simples: um row "label + valor", sem ícone/chevron/barra. */
.ai-usage-simple {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: var(--text-sm);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  transition: border-color var(--duration-fast) var(--ease-default);
}
.ai-usage-simple:hover .ai-usage-simple-label {
  color: var(--color-text-primary);
}
.ai-usage-simple-label {
  color: var(--color-text-muted);
}
.ai-usage-simple-value {
  font-weight: var(--font-semibold);
}
.ai-usage-simple-warning .ai-usage-simple-value {
  color: var(--color-accent-warning);
}
.ai-usage-simple-danger .ai-usage-simple-value {
  color: var(--color-accent-danger);
}

[data-theme="light"] .ai-usage-summary {
  background:
    linear-gradient(135deg, rgba(14, 116, 144, 0.07), rgba(255, 255, 255, 0.96) 48%),
    #FFFFFF;
  box-shadow: none;
}

[data-theme="light"] .ai-usage-summary:hover {
  border-color: rgba(14, 116, 144, 0.3);
  background:
    linear-gradient(135deg, rgba(14, 116, 144, 0.1), rgba(249, 250, 251, 0.98) 52%),
    #F9FAFB;
}

[data-theme="light"] .ai-usage-summary-icon {
  color: #0E7490;
  border-color: rgba(14, 116, 144, 0.2);
  background: rgba(14, 116, 144, 0.08);
}

.ai-usage-progress {
  display: block;
  width: 100%;
  height: 0.375rem;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--color-bg-tertiary);
  appearance: none;
}

.ai-usage-progress::-webkit-progress-bar {
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-full);
}

.ai-usage-progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--vvm-cyan), var(--vvm-bright));
  border-radius: var(--radius-full);
  transition: width var(--duration-fast) var(--ease-default);
}

.ai-usage-progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--vvm-cyan), var(--vvm-bright));
  border-radius: var(--radius-full);
  transition: width var(--duration-fast) var(--ease-default);
}

.ai-usage-progress-warning::-webkit-progress-value {
  background: var(--color-accent-warning);
}

.ai-usage-progress-warning::-moz-progress-bar {
  background: var(--color-accent-warning);
}

.ai-usage-progress-danger::-webkit-progress-value {
  background: var(--color-accent-danger);
}

.ai-usage-progress-danger::-moz-progress-bar {
  background: var(--color-accent-danger);
}

/* Filter Chips (Mobile) */
.filter-chips {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text-secondary);
  background-color: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-full);
  white-space: nowrap;
  min-height: 2.75rem;
  transition: all var(--duration-fast) var(--ease-default);
}

.filter-chip:active {
  background-color: var(--color-bg-hover);
}

.filter-chip.active {
  color: var(--vvm-cyan);
  background-color: rgba(5, 242, 242, 0.1);
  border-color: var(--vvm-cyan);
}


/* ============================================
   Form Patterns - Dark Theme
   ============================================ */

/* ----------------------------------------
   Form Hint / Help Text
   ---------------------------------------- */
.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* ----------------------------------------
   Form Group (field wrapper)
   ---------------------------------------- */
.form-group {
  margin-bottom: var(--space-4);
}

.form-group-sm {
  margin-bottom: var(--space-3);
}

/* ----------------------------------------
   Form Section (grouped fields panel)
   ---------------------------------------- */
.form-section {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-default);
  background-color: var(--color-bg-tertiary);
}

.form-section-title {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

/* ----------------------------------------
   Form Input (extends .input)
   ---------------------------------------- */
.form-input {
  display: flex;
  align-items: center;
  width: 100%;
  height: 2.5rem;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  transition: all var(--duration-fast) var(--ease-default);
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

.form-input:hover {
  border-color: var(--color-border-strong);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent-primary);
  box-shadow: 0 0 0 3px rgba(5, 242, 242, 0.1);
}

.form-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Compact variant for inline/table use */
.form-input-sm {
  height: 2rem;
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border-default);
}

/* Dark color-scheme for native date/time pickers and form controls */
.form-input[type="date"],
.form-input[type="datetime-local"],
.form-input[type="time"],
.form-input[type="week"],
.form-input[type="month"] {
  color-scheme: dark;
}

[data-theme="light"] .form-input[type="date"],
[data-theme="light"] .form-input[type="datetime-local"],
[data-theme="light"] .form-input[type="time"],
[data-theme="light"] .form-input[type="week"],
[data-theme="light"] .form-input[type="month"] {
  color-scheme: light;
}

/* ----------------------------------------
   Form Select
   ---------------------------------------- */
.form-select {
  display: flex;
  align-items: center;
  width: 100%;
  height: 2.5rem;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-default);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23666666' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-8);
}

.form-select:hover {
  border-color: var(--color-border-strong);
}

.form-select:focus {
  outline: none;
  border-color: var(--color-accent-primary);
  box-shadow: 0 0 0 3px rgba(5, 242, 242, 0.1);
}

.form-select option {
  background-color: var(--color-bg-secondary);
  color: var(--color-text-primary);
}

/* ----------------------------------------
   Form Textarea
   ---------------------------------------- */
.form-textarea {
  display: block;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  resize: vertical;
  transition: all var(--duration-fast) var(--ease-default);
}

.form-textarea::placeholder {
  color: var(--color-text-muted);
}

.form-textarea:hover {
  border-color: var(--color-border-strong);
}

.form-textarea:focus {
  outline: none;
  border-color: var(--color-accent-primary);
  box-shadow: 0 0 0 3px rgba(5, 242, 242, 0.1);
}

.form-textarea.font-mono {
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
}

/* ----------------------------------------
   Form Radio / Checkbox
   ---------------------------------------- */
.form-radio,
.form-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.form-radio input[type="radio"],
.form-checkbox input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--color-accent-primary);
  cursor: pointer;
}

.form-radio-label,
.form-checkbox-label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* ----------------------------------------
   Radio Card (selectable card option)
   ---------------------------------------- */
.radio-card {
  position: relative;
  cursor: pointer;
}

.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-card-content {
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-default);
  background-color: var(--color-bg-secondary);
  transition: all var(--duration-fast) var(--ease-default);
}

.radio-card-content:hover {
  background-color: var(--color-bg-hover);
  border-color: var(--color-border-strong);
}

.radio-card input[type="radio"]:checked + .radio-card-content {
  border-color: var(--color-accent-primary);
  background-color: rgba(5, 242, 242, 0.05);
}

.radio-card-title {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text-primary);
}

.radio-card-description {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-0-5);
}

/* Radio Card - Disabled state */
.radio-card-disabled {
  cursor: not-allowed;
}

.radio-card-disabled .radio-card-content {
  opacity: 0.5;
  background-color: var(--color-bg-primary);
  border-color: var(--color-border-light);
}

.radio-card-disabled .radio-card-content:hover {
  background-color: var(--color-bg-primary);
  border-color: var(--color-border-light);
}

.radio-card-reason {
  font-size: var(--text-xs);
  color: var(--color-accent-warning);
  margin-top: var(--space-1);
  line-height: 1.3;
}

/* ----------------------------------------
   Form Validation States
   ---------------------------------------- */
.form-input-error {
  border-color: var(--color-accent-danger) !important;
}

.form-input-error:focus {
  border-color: var(--color-accent-danger) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--color-accent-danger);
  margin-top: var(--space-1);
}

/* ----------------------------------------
   Form Actions (button row)
   ---------------------------------------- */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-light);
}


/* ----------------------------------------
   Alert / Notification
   ---------------------------------------- */
.alert {
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.alert-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-1);
}

.alert-success {
  background-color: var(--color-accent-success-light);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: var(--color-accent-success);
}

.alert-error {
  background-color: var(--color-accent-danger-light);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--color-accent-danger);
}

.alert-warning {
  background-color: var(--color-accent-warning-light);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--color-accent-warning);
}

.alert-info {
  background-color: var(--color-accent-info-light);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--color-accent-info);
}

.alert-detail {
  font-size: var(--text-xs);
  opacity: 0.8;
}


/* ============================================
   Utility Classes - Dark Theme
   ============================================ */

/* Text Colors */
.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-link { color: var(--color-text-link); }
.text-accent { color: var(--vvm-cyan); }

/* Background Colors */
.bg-primary { background-color: var(--color-bg-primary); }
.bg-secondary { background-color: var(--color-bg-secondary); }
.bg-tertiary { background-color: var(--color-bg-tertiary); }
.bg-hover { background-color: var(--color-bg-hover); }
.bg-active { background-color: var(--color-bg-active); }

/* Font Sizes */
.text-size-xs { font-size: var(--text-xs); }
.text-size-sm { font-size: var(--text-sm); }
.text-size-base { font-size: var(--text-base); }
.text-size-lg { font-size: var(--text-lg); }
.text-size-xl { font-size: var(--text-xl); }

/* Font Weights */
.font-normal { font-weight: var(--font-normal); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }

/* Border Radius */
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadows */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-glow { box-shadow: var(--shadow-glow); }

/* Glow Effects */
.glow-accent { box-shadow: var(--glow-accent); }

.dashboard-content-shell {
  padding-inline: var(--dashboard-content-gutter-x);
}

/* Mobile Spacing — only below lg where bottom-nav is visible */
@media (max-width: 1023px) {
  .has-bottom-nav {
    padding-bottom: calc(var(--bottom-nav-height) + var(--bottom-nav-safe));
  }

  /* PWA: NÃO zerar a folga da safe-area aqui.
     O iOS standalone reporta o innerHeight ora "cheio" (= tela), ora "inset" (−safe-area),
     de forma inconsistente entre telas. Como a bottom-nav é fixed bottom:0, com folga 0px
     ela cola no fundo real (atrás do home indicator) justamente quando o viewport vem cheio.
     Mantendo --bottom-nav-safe = var(--safe-area-bottom), os itens ficam sempre acima do
     home indicator e o espaçamento fica consistente em todas as telas. */

  .pwa-standalone .mobile-header {
    height: calc(var(--mobile-header-height) + var(--safe-area-top));
    padding-top: var(--safe-area-top);
  }

  .pwa-standalone .bottom-nav-item {
    height: var(--bottom-nav-height);
  }
}

/* Mobile viewport fix — 100dvh accounts for dynamic browser chrome (URL bar) */
@supports (height: 100dvh) {
  @media (max-width: 1023px) {
    body {
      height: 100dvh !important;
    }

    /* PWA standalone: não há barra de URL, então o dvh dinâmico só causa instabilidade —
       o iOS resolve dvh ora como lvh (956) ora como svh (894) por tela, e o body (e a
       bottom-nav fixed, que acompanha a altura do body) flutua. Usar o lvh (tela cheia,
       estável) deixa o body sempre na altura real da tela em todas as telas. */
    .pwa-standalone body {
      height: 100lvh !important;
    }
  }
}

/* Divider */
.divider {
  height: 1px;
  background-color: var(--color-border-light);
  margin: var(--space-4) 0;
}

/* Scrollbar - Dark Theme */
.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-strong) transparent;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background-color: var(--color-border-strong);
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-text-muted);
}

/* ============================================
   Wizard Media Layout
   Side-by-side on desktop, stacked on mobile.
   Use for any wizard step with media + controls.
   ============================================ */
.wizard-media-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Mobile: limit vertical media height */
.wizard-media-layout .wizard-media video,
.wizard-media-layout .wizard-media img {
  max-height: 60vh;
  width: 100%;
  object-fit: contain;
  border-radius: var(--radius-lg);
}

@media (min-width: 1024px) {
  .wizard-media-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-6);
  }

  .wizard-media-layout .wizard-media {
    flex: 0 0 auto;
    width: 280px;
    max-height: calc(100vh - 16rem);
    position: sticky;
    top: var(--space-4);
  }

  .wizard-media-layout .wizard-media video,
  .wizard-media-layout .wizard-media img {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 16rem);
    object-fit: contain;
    border-radius: var(--radius-lg);
  }

  .wizard-media-layout .wizard-controls {
    flex: 1;
    min-width: 0;
  }
}

.brazil-map {
  --brazil-map-empty: #2A2A2A;
  --brazil-map-stroke: #1A1A1A;
  --brazil-map-sales-1: #014040;
  --brazil-map-sales-2: #026873;
  --brazil-map-sales-3: #028C8C;
  --brazil-map-sales-4: #03A6A6;
  --brazil-map-sales-5: #04D9D9;
  --brazil-map-sales-6: #05F2F2;
}

[data-theme="light"] .brazil-map {
  --brazil-map-empty: #E5E7EB;
  --brazil-map-stroke: #CBD5E1;
  --brazil-map-sales-1: #CFFAFE;
  --brazil-map-sales-2: #A5F3FC;
  --brazil-map-sales-3: #67E8F9;
  --brazil-map-sales-4: #22D3EE;
  --brazil-map-sales-5: #0891B2;
  --brazil-map-sales-6: #155E75;
}

.brazil-map-state {
  transition: fill var(--duration-normal) var(--ease-default), stroke var(--duration-normal) var(--ease-default);
}

/* ---- Top header right cluster: theme toggle, notifications, profile ---- */
.app-header-controls {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  margin-left: auto;
  padding-right: 0.75rem;
}
.hdr-btn {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.hdr-btn:hover { color: var(--color-text); background: var(--color-bg-hover); }
.hdr-btn.is-active { color: var(--color-brand); background: var(--color-bg-hover); }
.hdr-btn:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.hdr-btn svg { width: 1.35rem; height: 1.35rem; }
.hdr-badge {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.275rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text-inverse);
  background: var(--color-brand);
  border-radius: 9999px;
  border: 2px solid var(--color-bg);
}

.hdr-profile {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.5rem;
  max-width: 17rem;
  padding: 0 0.5rem 0 0.375rem;
  margin-left: 0.25rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.hdr-profile:hover, .hdr-profile.is-active { background: var(--color-bg-hover); }
.hdr-profile:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.hdr-avatar {
  width: 1.95rem;
  height: 1.95rem;
  flex-shrink: 0;
  border-radius: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-brand);
  background: var(--color-bg-tertiary);
}
.hdr-profile-email {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hdr-profile:hover .hdr-profile-email { color: var(--color-text); }
.hdr-chevron { width: 0.85rem; height: 0.85rem; flex-shrink: 0; color: var(--color-text-muted); }

/* Popover panel (right-aligned, fast ease-out reveal) */
.hdr-pop {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 60;
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-elevated);
  transform-origin: top right;
  overflow: hidden;
}
.hdr-pop-notif { width: 22rem; max-width: calc(100vw - 6rem); }
.hdr-pop-profile { width: 15rem; }
.hdr-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid var(--color-border-light);
}
.hdr-pop-title { font-size: 0.8125rem; font-weight: 600; color: var(--color-text); }
.hdr-pop-action {
  font-size: 0.75rem; font-weight: 500;
  color: var(--color-brand);
  background: none; border: 0; cursor: pointer; padding: 0;
}
.hdr-pop-action:hover { text-decoration: underline; }
.hdr-pop-list { max-height: 21rem; overflow-y: auto; }
.hdr-notif {
  display: flex;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--color-border-light);
  text-decoration: none;
  transition: background-color 0.12s ease;
}
.hdr-notif:last-child { border-bottom: 0; }
.hdr-notif:hover { background: var(--color-bg-secondary); }
.hdr-notif-dot {
  width: 0.5rem; height: 0.5rem; margin-top: 0.3rem;
  flex-shrink: 0; border-radius: 9999px; background: var(--color-brand);
}
.hdr-notif-dot.read { background: transparent; border: 1px solid var(--color-border-light); }
.hdr-notif-body { min-width: 0; }
.hdr-notif-title {
  font-size: 0.8125rem; font-weight: 500; color: var(--color-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hdr-notif-desc {
  font-size: 0.75rem; color: var(--color-text-secondary); margin-top: 0.1rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hdr-notif-time { font-size: 0.6875rem; color: var(--color-text-muted); margin-top: 0.2rem; }
.hdr-pop-empty {
  padding: 1.75rem 0.875rem; text-align: center;
  font-size: 0.8125rem; color: var(--color-text-muted);
}
.hdr-pop-foot { padding: 0.375rem; border-top: 1px solid var(--color-border-light); }
.hdr-pop-foot a {
  display: block; text-align: center; padding: 0.4rem;
  font-size: 0.8125rem; font-weight: 500; color: var(--color-brand);
  border-radius: 0.4rem; text-decoration: none;
}
.hdr-pop-foot a:hover { background: var(--color-bg-secondary); }

.hdr-menu-head { padding: 0.75rem 0.875rem; border-bottom: 1px solid var(--color-border-light); }
.hdr-menu-email { font-size: 0.8125rem; font-weight: 600; color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hdr-menu-plan { font-size: 0.6875rem; color: var(--color-text-muted); margin-top: 0.1rem; }
.hdr-menu-list { padding: 0.25rem 0; }
.hdr-menu-item {
  display: flex; align-items: center; gap: 0.625rem; width: 100%;
  padding: 0.5rem 0.875rem; font-size: 0.8125rem; color: var(--color-text);
  background: none; border: 0; cursor: pointer; text-align: left; text-decoration: none;
  transition: background-color 0.12s ease;
}
.hdr-menu-item:hover { background: var(--color-bg-secondary); }
.hdr-menu-item svg { width: 1rem; height: 1rem; flex-shrink: 0; color: var(--color-text-muted); }
.hdr-menu-item.danger { color: var(--ui-danger); }
.hdr-menu-item.danger svg { color: currentColor; }
.hdr-menu-item.danger:hover { background: rgba(239, 68, 68, 0.1); }

/* Reveal motion (ease-out-expo); falls back to instant under reduced motion */
.hdr-pop-enter { transition: opacity 0.15s ease, transform 0.15s cubic-bezier(0.16, 1, 0.3, 1); }
.hdr-pop-leave { transition: opacity 0.1s ease, transform 0.1s ease; }
.hdr-pop-from { opacity: 0; transform: translateY(-0.25rem) scale(0.98); }
.hdr-pop-to { opacity: 1; transform: translateY(0) scale(1); }
@media (prefers-reduced-motion: reduce) {
  .hdr-pop-enter, .hdr-pop-leave { transition: none; }
  .hdr-pop-from { transform: none; }
}

.unified-disclosure summary::-webkit-details-marker {
  display: none;
}

.unified-disclosure-chevron {
  transition: transform 150ms ease;
}

.unified-disclosure[open] > summary .unified-disclosure-chevron {
  transform: rotate(180deg);
}
