:root {
    /* 🌿 Global Tokens - Studio Vida */
    --brand-primary: #10b981; /* Emerald 500 */
    --brand-primary-dark: #059669; /* Emerald 600 */
    --brand-primary-light: #34d399; /* Emerald 400 */
    --brand-accent: #34d399; /* Emerald 400 */
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --transition-slow: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.3s ease;

    /* Premium Effects */
    --text-glow-brand: 0 0 20px rgba(16, 185, 129, 0.5);
    --text-glow-white: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* ☀️ Modos de Tema: Signature Luxe Edition */
html[data-theme="light"], [data-theme="light"] {
    --bg-main: #fdfffe;
    --bg-subtle: #f5fcf9;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.90);
    
    --text-main: #01261d;
    --text-subtle: #52716a;
    --text-muted: #8ca39e;
    --text-on-accent: #01261d; /* Escuro no Light para contrastar com fundos claros */
    
    --border-main: rgba(16, 185, 129, 0.12);
    --border-subtle: rgba(16, 185, 129, 0.06);
    
    --input-bg: rgba(16, 185, 129, 0.03);
    --input-border: rgba(16, 185, 129, 0.1);
    --overlay-bg: rgba(1, 45, 34, 0.85);
    
    --shadow-soft: 0 8px 30px rgba(5, 150, 105, 0.05);
    --shadow-hover: 0 20px 60px rgba(16, 185, 129, 0.12);
    
    --header-bg: rgba(253, 255, 254, 0.98);
    --header-scrolled: rgba(253, 255, 254, 0.92);
    --card-icon-bg: rgba(16, 185, 129, 0.08);
    --bg-accent-section: #f0fdf4; /* Verde bem suave */
    --skeleton-bg: rgba(16, 185, 129, 0.05);

    /* Dashboard Specific */
    --sidebar-bg: #ffffff;
    --sidebar-border: rgba(1, 38, 29, 0.08);
    --sidebar-text: #01261d;
    --sidebar-active-bg: rgba(16, 185, 129, 0.1);
    
    --kpi-bg: #f8fdfb;
    --kpi-border: rgba(16, 185, 129, 0.15);
    
    --header-bg: rgba(253, 255, 254, 0.95);
    --bg-overlay: rgba(1, 38, 29, 0.4);
    
    --bg-main-05: rgba(1, 38, 29, 0.05);
    --bg-main-10: rgba(1, 38, 29, 0.10);
}

html[data-theme="dark"], [data-theme="dark"] {
    --bg-main: #022c22;
    --bg-subtle: #011d17;
    --bg-card: rgba(5, 38, 32, 0.5); 
    --bg-glass: rgba(2, 44, 34, 0.8);
    
    --text-main: #f8fafc;
    --text-subtle: #cbd5e1;
    --text-muted: #64748b;
    --text-on-accent: #ffffff;
    
    --border-main: rgba(16, 185, 129, 0.15);
    --border-subtle: rgba(16, 185, 129, 0.05);
    
    --input-bg: rgba(255, 255, 255, 0.03);
    --input-border: rgba(255, 255, 255, 0.08);
    --overlay-bg: rgba(0, 0, 0, 0.8);
    
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 30px 70px rgba(16, 185, 129, 0.2);
    
    --header-bg: #012d22;
    --header-scrolled: rgba(1, 45, 34, 0.85);
    --card-icon-bg: rgba(52, 211, 153, 0.1);
    --accent-gold: rgba(212, 175, 55, 0.15);
    --bg-accent-section: #011d17;
    --skeleton-bg: rgba(255, 255, 255, 0.03);

    /* Dashboard Specific */
    --sidebar-bg: #011d17;
    --sidebar-border: rgba(16, 185, 129, 0.1);
    --sidebar-text: #f8fafc;
    --sidebar-active-bg: rgba(16, 185, 129, 0.15);
    
    --kpi-bg: rgba(6, 78, 59, 0.3);
    --kpi-border: rgba(16, 185, 129, 0.1);
    
    --header-bg: rgba(1, 29, 23, 0.95);
    --bg-overlay: rgba(0, 0, 0, 0.7);

    --bg-main-05: rgba(255, 255, 255, 0.05);
    --bg-main-10: rgba(255, 255, 255, 0.10);
}

/* 🎨 Classes de Utilidade Vinculadas ao Tema */
body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    transition: background-color 0.4s ease, color 0.4s ease;
    -webkit-font-smoothing: antialiased;
}

.font-heading { font-family: var(--font-heading); }
.text-brand { color: var(--brand-primary); }
.text-main { color: var(--text-main); }
.text-subtle { color: var(--text-subtle); }
.text-muted { color: var(--text-muted); }

.bg-main { background-color: var(--bg-main); }
.bg-subtle { background-color: var(--bg-subtle); }
.bg-header { background-color: var(--header-bg); }
.bg-header.scrolled { 
    background-color: var(--header-scrolled); 
    -webkit-backdrop-filter: blur(12px); 
    backdrop-filter: blur(12px); 
    border-bottom-color: var(--border-main);
}

.fill-main { fill: var(--bg-main); }
.fill-subtle { fill: var(--bg-subtle); }
.fill-brand { fill: var(--brand-primary); }

/* Elevation Fixes */
.z-nav { z-index: 99999 !important; }
.z-over { z-index: 100000 !important; }

.border-main { border-color: var(--border-main); }
.border-subtle { border-color: var(--border-subtle); }
.bg-card { background-color: var(--bg-card); }
.bg-glass { background-color: var(--bg-glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.bg-overlay { background-color: var(--bg-overlay); }

/* --- Dashboard Semantic Utilities --- */
.sidebar-bg { background-color: var(--sidebar-bg); }
.sidebar-border { border-color: var(--sidebar-border); }
.sidebar-text { color: var(--sidebar-text); }
.kpi-bg { background-color: var(--kpi-bg); }
.kpi-border { border-color: var(--kpi-border); }

.animate-pulse-slow { animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

/* Theme Persistence & Animation Controls */
.no-transitions *, .no-transitions {
    transition: none !important;
}

[data-theme="light"] .theme-icon-sun { opacity: 0; transform: scale(0.5); pointer-events: none; }
[data-theme="light"] .theme-icon-moon { opacity: 1; transform: scale(1); }
[data-theme="dark"] .theme-icon-sun { opacity: 1; transform: scale(1); }
[data-theme="dark"] .theme-icon-moon { opacity: 0; transform: scale(0.5); pointer-events: none; }

.theme-icon-sun, .theme-icon-moon {
    transition: var(--transition-fast);
}

/* --- Componentes Premium Administrativos --- */
.premium-input {
    color: var(--text-main);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    outline: none;
    width: 100%;
    padding: 0.9rem 1.2rem;
    font-size: 0.875rem;
    transition: all 0.4s ease;
}

.premium-input:focus {
    border-color: var(--brand-primary);
    background: var(--color-brand-primary-10);
    box-shadow: 0 0 20px var(--color-brand-primary-10);
}

.premium-input option {
    background-color: var(--bg-main);
    color: var(--text-main);
}

.premium-label {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    margin-left: 0.5rem;
    font-size: 10px;
    font-weight: 900;
    display: block;
    opacity: 0.8;
}

.glass-elite {
    background: var(--bg-glass);
    -webkit-backdrop-filter: blur(40px);
    backdrop-filter: blur(40px);
    border: 1px solid var(--border-main);
}

.rounded-4xl {
    border-radius: 2.5rem;
}

.glass {
    background: var(--bg-main-05);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
}

/* --- Componentes no Estilo Dojo --- */

/* Nav Links Dojo Style */
.nav-link-studio {
    color: var(--text-main);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    transition: var(--transition-fast);
    position: relative;
    padding: 8px 0;
}

.nav-link-studio::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--brand-primary);
    transition: var(--transition-fast);
}

.nav-link-studio:hover {
    color: var(--brand-primary);
}

.nav-link-studio:hover::after {
    width: 100%;
}

/* Hero Image Custom Radius */
.hero-img-dojo {
    border-radius: 40px 10px 40px 10px;
    transform: rotate(1.5deg);
    box-shadow: var(--shadow-hover);
    transition: var(--transition-slow);
}

.hero-img-dojo:hover {
    transform: rotate(0deg) scale(1.02);
}

/* Dojo-Style Cards - Glassmorphism Upgrade */
.card-studio {
    background: var(--bg-card);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-main);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.card-studio:hover {
    transform: translateY(-10px) scale(1.01);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: var(--shadow-hover);
}

.card-icon {
    width: 64px;
    height: 64px;
    background: var(--card-icon-bg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    margin-bottom: 2rem;
    transition: var(--transition-fast);
}

.card-studio:hover .card-icon {
    background: var(--brand-primary);
    color: white;
    transform: rotate(8deg) scale(1.1);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.card-studio:hover::before {
    width: 100%;
}

.card-studio:hover .card-icon {
    background: var(--brand-primary);
    color: white;
    transform: rotateY(180deg);
}

/* Accent Sections (CTA/Focus) */
.bg-accent-section { background-color: var(--bg-accent-section); }
.text-on-accent { color: var(--text-on-accent); }

/* Split Hero Content */
.hero-badge {
    background: var(--card-icon-bg);
    color: var(--brand-primary);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

/* Premium Text Effects */
.text-glow { text-shadow: var(--text-glow-brand); }
.text-glow-white { text-shadow: var(--text-glow-white); }

/* Grain Overlay (Dojo Aesthetic) */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.05;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Cursor Glow */
#cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
    filter: blur(40px);
    mix-blend-mode: screen;
}

/* Floating Badges */
.studio-badge {
    position: absolute;
    background: var(--bg-glass);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Custom Buttons Dojo-Style */
.btn-studio-primary {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
    color: white !important;
    padding: 16px 36px;
    border-radius: var(--radius-full);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 11px;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.25);
    border: none;
    transition: var(--transition-slow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-studio-primary:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 45px rgba(16, 185, 129, 0.4);
    filter: brightness(1.1);
}

.btn-studio-ghost {
    background: transparent;
    color: var(--text-main) !important;
    border: 2px solid var(--border-main);
    padding: 14px 34px;
    border-radius: var(--radius-full);
    font-weight: 700;
    transition: var(--transition-fast);
}

.btn-studio-ghost:hover {
    background: var(--border-main);
    border-color: var(--brand-primary);
}

/* --- Luxe Product Catalog System --- */

.card-product-luxe {
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: 2.5rem;
    padding: 1rem;
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
    position: relative;
}

.card-product-luxe:hover {
    transform: translateY(-12px);
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-hover);
}

.product-img-wrapper {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 2rem;
    background: var(--bg-subtle);
}

.product-img-wrapper img {
    transition: var(--transition-slow);
}

.card-product-luxe:hover .product-img-wrapper img {
    transform: scale(1.1);
}

/* Ver Detalhes - Glassmorphism Overlay */
.btn-details-glass {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0;
    transition: var(--transition-fast);
    z-index: 10;
    white-space: nowrap;
}

.card-product-luxe:hover .btn-details-glass {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.btn-details-glass:hover {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: white;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

/* Buy Button Luxe - Optimized for Consistency */
.btn-buy-luxe {
    width: 100%;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
    color: white !important;
    padding: 16px 24px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition-slow);
    border: none;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.2);
}

.btn-buy-luxe:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.35);
    filter: brightness(1.15);
}

.card-product-luxe .price-tag {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand-primary);
    font-style: italic;
}

.card-product-luxe .product-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* --- Biological Experience System (Elite Produto Detail) --- */

.luxe-experience-title {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5em;
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    font-style: italic;
}

.luxe-experience-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--brand-primary-light), transparent);
    opacity: 0.3;
}

.card-glass-dna {
    background: rgba(2, 44, 34, 0.4);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(16, 185, 129, 0.1);
    border-radius: 3rem;
    padding: 2.5rem;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.5);
}

.dna-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.dna-table tr:last-child {
    border-bottom: none;
}

.dna-label {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--brand-primary-light);
    width: 35%;
    padding: 1.5rem 0;
}

.dna-value {
    color: var(--text-main);
    font-style: italic;
    font-size: 0.95rem;
    padding: 1.5rem 0;
}

.composition-box {
    background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 2.5rem;
    padding: 2.5rem;
    font-family: var(--font-mono);
    line-height: 1.8;
    color: var(--text-subtle);
}

.glow-brand {
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
}

.btn-buy-shine {
    position: relative;
    overflow: hidden;
}

.btn-buy-shine::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: 0.8s;
}

.btn-buy-shine:hover::after {
    left: 100%;
}

/* --- Section: CTA Modernization (Glass & Glow) --- */

.cta-glass-card {
    background: var(--bg-glass);
    -webkit-backdrop-filter: blur(40px);
    backdrop-filter: blur(40px);
    border: 1px solid var(--border-main);
    border-radius: 4rem;
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.2);
}

.btn-luxe-glow {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
    color: white !important;
    padding: 1.5rem 3.5rem;
    border-radius: var(--radius-full);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition-slow);
    position: relative;
    z-index: 10;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0);
}

.btn-luxe-glow:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.4), 0 0 20px rgba(16, 185, 129, 0.2);
    letter-spacing: 3px;
}

.floating-icon {
    position: absolute;
    color: var(--brand-primary);
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
}

/* --- Dashboard Efeitos Especiais (UX Premium) --- */

/* Skeleton Loading (Shimmer) */
.valor-carregando {
    position: relative;
    overflow: hidden;
    color: transparent !important;
}

.valor-carregando::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(
        90deg,
        rgba(16, 185, 129, 0) 0%,
        rgba(16, 185, 129, 0.2) 20%,
        rgba(16, 185, 129, 0.5) 60%,
        rgba(16, 185, 129, 0) 100%
    );
    transform: translateX(-100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Modo Privacidade (Blur Executivo) */
body.privacy-mode .kpi-faturamento,
body.privacy-mode .kpi-var-faturamento,
body.privacy-mode .currency-value,
body.privacy-mode canvas {
    filter: blur(8px) grayscale(50%);
    opacity: 0.5;
    transition: all 0.5s ease;
    user-select: none;
    pointer-events: none;
}

/* Charts Wrapper Mobile Scroll */
.chart-scroll-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.chart-scroll-wrapper::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

/* Glow Neumórfico para Gráficos */
.chart-glow {
    box-shadow: inset 0 0 50px rgba(16, 185, 129, 0.05), 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

