:root {
            /* Paleta de Colores APEX */
            --bg-dark: #09090b;
            --bg-card: #141417;
            --bg-card-hover: #1c1c21;
            --border-color: rgba(255, 255, 255, 0.05);
            
            --text-main: #ffffff;
            --text-muted: #8a8a93;
            
            --apex-red: #ff2a2a;
            --apex-orange: #ff5e00;
            --apex-yellow: #ffcc00;
            --apex-lime: #ccff00; /* Indicadores positivos */
            --apex-blue: #0099ff;
            --apex-cyan: #00f0ff;
            --apex-purple: #b700ff;
            
            --gradient-hero: linear-gradient(135deg, rgba(20,20,25,0.95) 0%, rgba(255,42,42,0.1) 100%);
            --font-headers: 'Oswald', sans-serif;
            --font-body: 'Montserrat', sans-serif;
            
            --shadow-neon: 0 0 15px rgba(255, 42, 42, 0.3);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: var(--font-body);
            background-color: var(--bg-dark);
            color: var(--text-main);
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
        }

        /* Scrollbar */
        ::-webkit-scrollbar { width: 8px; }
        ::-webkit-scrollbar-track { background: var(--bg-dark); }
        ::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
        ::-webkit-scrollbar-thumb:hover { background: var(--apex-red); }

        /* Typography */
        h1, h2, h3, h4, .kpi-value { font-family: var(--font-headers); text-transform: uppercase; }
        
        .dashboard-container {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            padding: 20px;
            max-width: 1920px;
            margin: 0 auto;
            gap: 20px;
        }

        /* HEADER */
        .topbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: var(--bg-card);
            padding: 15px 30px;
            border-radius: 16px;
            border: 1px solid var(--border-color);
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        }

        .header-left, .header-right {
            display: flex;
            align-items: center;
            gap: 25px;
        }

        .datetime {
            display: flex;
            flex-direction: column;
        }
        .datetime .time { font-family: var(--font-headers); font-size: 1.5rem; letter-spacing: 1px; color: var(--apex-lime); }
        .datetime .date { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600;}

        .branch-selector {
            background: rgba(255,255,255,0.05);
            padding: 8px 15px;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: all 0.3s ease;
        }
        .branch-selector:hover { border-color: var(--apex-red); color: var(--apex-red); }

        .search-bar {
            background: rgba(0,0,0,0.5);
            border: 1px solid var(--border-color);
            padding: 10px 20px;
            border-radius: 30px;
            display: flex;
            align-items: center;
            gap: 10px;
            width: 250px;
        }
        .search-bar input {
            background: transparent; border: none; color: white; outline: none; width: 100%; font-family: var(--font-body);
        }

        .header-icons { display: flex; gap: 20px; font-size: 1.2rem; }
        .icon-btn { position: relative; cursor: pointer; transition: color 0.3s; }
        .icon-btn:hover { color: var(--apex-lime); }
        .notification-dot {
            position: absolute; top: -2px; right: -2px; width: 8px; height: 8px;
            background: var(--apex-red); border-radius: 50%; box-shadow: 0 0 8px var(--apex-red);
        }

        .profile { display: flex; align-items: center; gap: 12px; }
        .profile img { width: 45px; height: 45px; border-radius: 50%; border: 2px solid var(--apex-lime); object-fit: cover; }
        .profile-info h4 { font-size: 0.9rem; letter-spacing: 1px; margin: 0; }
        .profile-info span { font-size: 0.7rem; color: var(--apex-lime); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }

        /* MAIN GRID */
        .main-grid {
            display: grid;
            grid-template-columns: repeat(12, 1fr);
            gap: 20px;
            grid-auto-rows: min-content;
        }

        .card {
            background: var(--bg-card);
            border-radius: 16px;
            border: 1px solid var(--border-color);
            padding: 25px;
            position: relative;
            overflow: hidden;
            box-shadow: 0 10px 20px rgba(0,0,0,0.3);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .card:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(0,0,0,0.5); border-color: rgba(255,255,255,0.1); }
        .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
        .card-title { font-size: 1.2rem; letter-spacing: 1px; color: var(--text-muted); }

        /* HERO AREA */
        .hero {
            grid-column: span 12;
            background: var(--gradient-hero), url('https://images.unsplash.com/photo-1534438327276-14e5300c3a48?q=80&w=1470&auto=format&fit=crop') center/cover;
            border-radius: 20px;
            padding: 40px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border: 1px solid var(--border-color);
            position: relative;
        }
        .hero::before {
            content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #09090b 20%, transparent 100%); border-radius: 20px;
        }
        .hero-content {
            position: relative; z-index: 2; max-width: 60%;
        }
        .hero-brand {
            font-family: var(--font-headers); font-size: 4rem; line-height: 1; text-transform: uppercase;
            background: linear-gradient(to right, #fff, #a0a0a0); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
            margin-bottom: 5px;
        }
        .hero-subtitle { font-size: 1rem; color: var(--apex-red); font-weight: 800; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 25px; }
        
        .hero-ai-message {
            background: rgba(0,0,0,0.6); backdrop-filter: blur(10px);
            border-left: 4px solid var(--apex-lime); padding: 20px; border-radius: 0 12px 12px 0;
            font-size: 1.1rem; line-height: 1.6; margin-bottom: 30px; font-weight: 300;
        }
        .hero-ai-message strong { color: var(--apex-lime); font-weight: 600; }

        .btn-apex {
            background: var(--apex-red); color: white; border: none; padding: 15px 35px; font-family: var(--font-headers);
            font-size: 1.2rem; letter-spacing: 2px; text-transform: uppercase; border-radius: 50px; cursor: pointer;
            box-shadow: var(--shadow-neon); transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 10px;
        }
        .btn-apex:hover { background: #ff4d4d; box-shadow: 0 0 25px rgba(255, 42, 42, 0.6); transform: scale(1.02); }

        /* KPIs */
        .kpi-container { grid-column: span 12; display: grid; grid-template-columns: repeat(8, 1fr); gap: 15px; }
        .kpi-card {
            background: rgba(20,20,23,0.8); border: 1px solid var(--border-color); border-radius: 12px; padding: 20px;
            display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden;
        }
        .kpi-card::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; }
        .kpi-card.red::after { background: var(--apex-red); box-shadow: 0 -5px 15px var(--apex-red); }
        .kpi-card.orange::after { background: var(--apex-orange); box-shadow: 0 -5px 15px var(--apex-orange); }
        .kpi-card.yellow::after { background: var(--apex-yellow); box-shadow: 0 -5px 15px var(--apex-yellow); }
        .kpi-card.green::after { background: var(--apex-lime); box-shadow: 0 -5px 15px var(--apex-lime); }
        .kpi-card.blue::after { background: var(--apex-blue); box-shadow: 0 -5px 15px var(--apex-blue); }
        .kpi-card.cyan::after { background: var(--apex-cyan); box-shadow: 0 -5px 15px var(--apex-cyan); }
        .kpi-card.purple::after { background: var(--apex-purple); box-shadow: 0 -5px 15px var(--apex-purple); }
        
        .kpi-title { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; letter-spacing: 1px; }
        .kpi-value { font-size: 2.2rem; margin-top: 5px; text-shadow: 0 0 10px rgba(255,255,255,0.2); }
        
        /* Protagonist KPI */
        .kpi-card.protagonist {
            background: linear-gradient(135deg, rgba(204,255,0,0.1), rgba(0,0,0,0));
            border-color: rgba(204,255,0,0.3);
        }
        .kpi-card.protagonist .kpi-value { color: var(--apex-lime); text-shadow: 0 0 15px rgba(204,255,0,0.4); }

        /* SIMIAN SAGE MODULE */
        .simian-sage-widget { grid-column: span 4; border-color: var(--apex-lime); background: linear-gradient(180deg, #141417 0%, rgba(204,255,0,0.05) 100%); }
        .simian-sage-widget .card-title { color: var(--apex-lime); font-weight: 700; display: flex; align-items: center; gap: 10px; }
        .simian-sage-widget .card-title i { animation: pulse 2s infinite; }
        .ai-carousel { min-height: 120px; display: flex; align-items: center; font-size: 1.1rem; line-height: 1.5; font-weight: 300; }
        .ai-text-fade { animation: fadeInOut 5s infinite; }
        
        @keyframes fadeInOut { 0%, 100% { opacity: 0.2; transform: translateY(5px); } 10%, 90% { opacity: 1; transform: translateY(0); } }
        @keyframes pulse { 0% { text-shadow: 0 0 5px var(--apex-lime); } 50% { text-shadow: 0 0 20px var(--apex-lime); } 100% { text-shadow: 0 0 5px var(--apex-lime); } }

        /* GYM MAP */
        .gym-map { grid-column: span 8; grid-row: span 2; display: flex; flex-direction: column; }
        .map-container { 
            flex-grow: 1; background: #0c0c0e; border-radius: 12px; border: 1px solid #222;
            display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 1fr); gap: 8px; padding: 10px;
        }
        .map-zone {
            background: #1a1a1f; border-radius: 8px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
            font-family: var(--font-headers); font-size: 1.2rem; letter-spacing: 1px; color: rgba(255,255,255,0.4); border: 1px solid transparent;
            transition: all 0.5s ease;
        }
        .map-zone.high { border-color: var(--apex-red); background: rgba(255,42,42,0.1); color: var(--apex-red); box-shadow: inset 0 0 20px rgba(255,42,42,0.1); }
        .map-zone.med { border-color: var(--apex-orange); background: rgba(255,94,0,0.1); color: var(--apex-orange); }
        .map-zone.low { border-color: var(--apex-lime); background: rgba(204,255,0,0.05); color: var(--apex-lime); }
        
        .zone-cardio { grid-column: span 2; }
        .zone-pesas { grid-column: span 2; }
        .zone-piscina { grid-column: span 2; grid-row: span 2; }
        
        /* Live dots in map */
        .dot { position: absolute; width: 6px; height: 6px; background: white; border-radius: 50%; opacity: 0.7; box-shadow: 0 0 5px white; }

        /* LIVE CLASSES */
        .live-classes { grid-column: span 4; }
        .class-list { display: flex; flex-direction: column; gap: 15px; }
        .class-item { background: rgba(255,255,255,0.03); padding: 15px; border-radius: 10px; display: flex; align-items: center; gap: 15px; }
        .class-time { font-family: var(--font-headers); font-size: 1.2rem; color: var(--apex-yellow); width: 60px; text-align: center; }
        .class-info { flex-grow: 1; }
        .class-info h4 { margin: 0 0 5px 0; font-size: 1rem; }
        .class-info p { margin: 0; font-size: 0.8rem; color: var(--text-muted); }
        .class-capacity { width: 60px; height: 6px; background: #333; border-radius: 3px; overflow: hidden; }
        .capacity-bar { height: 100%; background: var(--apex-lime); }
        .capacity-bar.full { background: var(--apex-red); }

        /* TRAINERS */
        .trainers { grid-column: span 8; }
        .trainer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
        .trainer-card { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 10px; padding: 15px; text-align: center; }
        .trainer-img { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 10px auto; object-fit: cover; border: 2px solid transparent; }
        .trainer-card h4 { font-size: 0.9rem; margin-bottom: 2px; }
        .trainer-card p { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 10px; }
        .status-pill { font-size: 0.7rem; padding: 4px 10px; border-radius: 20px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
        .status-pill.disponible { background: rgba(204,255,0,0.1); color: var(--apex-lime); border: 1px solid var(--apex-lime); }
        .status-pill.clase { background: rgba(255,42,42,0.1); color: var(--apex-red); border: 1px solid var(--apex-red); }
        .status-pill.entrenando { background: rgba(255,204,0,0.1); color: var(--apex-yellow); border: 1px solid var(--apex-yellow); }
        .status-pill.descanso { background: rgba(255,255,255,0.1); color: var(--text-muted); border: 1px solid var(--text-muted); }

        /* DAILY ACTIVITY (CHART) */
        .activity-card { grid-column: span 4; display: flex; flex-direction: column; }
        .chart-container { position: relative; width: 180px; height: 180px; margin: 20px auto; }
        .pie-chart {
            width: 100%; height: 100%; border-radius: 50%;
            background: conic-gradient(
                var(--apex-red) 0% 35%, 
                var(--apex-orange) 35% 60%, 
                var(--apex-yellow) 60% 80%, 
                var(--apex-blue) 80% 95%, 
                var(--apex-purple) 95% 100%
            );
            box-shadow: 0 0 30px rgba(0,0,0,0.5);
            display: flex; align-items: center; justify-content: center;
        }
        .pie-chart::after { content: ''; width: 140px; height: 140px; background: var(--bg-card); border-radius: 50%; position: absolute; }
        .chart-center { position: absolute; z-index: 10; text-align: center; }
        .chart-center h3 { font-family: var(--font-headers); font-size: 2rem; color: white; line-height: 1; }
        .chart-center p { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
        .chart-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
        .legend-item { display: flex; align-items: center; gap: 5px; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
        .legend-dot { width: 8px; height: 8px; border-radius: 50%; }

        /* MEMBERSHIPS */
        .memberships { grid-column: span 8; }
        .mem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
        .mem-card { padding: 20px; border-radius: 12px; background: #1a1a1f; position: relative; overflow: hidden; }
        .mem-card h3 { font-family: var(--font-headers); font-size: 1.5rem; margin-bottom: 15px; }
        .mem-card .stat { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 0.85rem; }
        .mem-card .stat-val { font-weight: 600; color: white; }
        
        .mem-premium { border-top: 4px solid var(--text-main); }
        .mem-premium h3 { color: var(--text-main); }
        .mem-gold { border-top: 4px solid var(--apex-yellow); }
        .mem-gold h3 { color: var(--apex-yellow); }
        .mem-silver { border-top: 4px solid #a0a0a0; }
        .mem-silver h3 { color: #a0a0a0; }
        .mem-corp { border-top: 4px solid var(--apex-blue); }
        .mem-corp h3 { color: var(--apex-blue); }

        /* EQUIPMENT & CHALLENGES */
        .equipment { grid-column: span 6; }
        .eq-list { display: flex; flex-direction: column; gap: 12px; }
        .eq-item { display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,0.02); padding: 12px 15px; border-radius: 8px; }
        .eq-name { font-weight: 600; display: flex; align-items: center; gap: 10px; }
        .eq-status { display: flex; gap: 10px; }
        .status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
        .status-dot.green { background: var(--apex-lime); box-shadow: 0 0 8px var(--apex-lime); }
        .status-dot.yellow { background: var(--apex-yellow); box-shadow: 0 0 8px var(--apex-yellow); }
        .status-dot.red { background: var(--apex-red); box-shadow: 0 0 8px var(--apex-red); }
        .eq-nums { font-size: 0.8rem; color: var(--text-muted); width: 80px; text-align: right; }

        .challenges { grid-column: span 6; }
        .challenge-list { display: flex; flex-direction: column; gap: 15px; }
        .challenge-item { display: flex; align-items: center; gap: 15px; background: rgba(255,255,255,0.02); padding: 10px 15px; border-radius: 8px; }
        .chal-rank { font-family: var(--font-headers); font-size: 1.5rem; width: 30px; text-align: center; }
        .rank-1 { color: var(--apex-yellow); text-shadow: 0 0 10px rgba(255,204,0,0.5); }
        .rank-2 { color: #a0a0a0; }
        .rank-3 { color: #cd7f32; }
        .chal-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
        .chal-info { flex-grow: 1; }
        .chal-info h4 { margin: 0; font-size: 0.95rem; }
        .chal-info p { margin: 0; font-size: 0.75rem; color: var(--apex-red); font-weight: 600; text-transform: uppercase; }
        .chal-bar-container { width: 100px; height: 6px; background: #333; border-radius: 3px; }
        .chal-bar { height: 100%; background: linear-gradient(90deg, var(--apex-orange), var(--apex-red)); border-radius: 3px; }

        /* EVENTS CAROUSEL */
        .events { grid-column: span 12; }
        .events-container { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 10px; }
        .events-container::-webkit-scrollbar { height: 4px; }
        .event-card { 
            min-width: 280px; height: 160px; border-radius: 12px; position: relative; overflow: hidden;
            display: flex; align-items: flex-end; padding: 20px; text-decoration: none;
            background-size: cover; background-position: center; border: 1px solid var(--border-color);
        }
        .event-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, transparent 100%); }
        .event-content { position: relative; z-index: 2; width: 100%; }
        .event-content h3 { font-family: var(--font-headers); font-size: 1.5rem; margin-bottom: 5px; color: white; letter-spacing: 1px; }
        .event-date { font-size: 0.8rem; color: var(--apex-lime); font-weight: 600; text-transform: uppercase; display: flex; justify-content: space-between; }

        /* RESPONSIVE */
        @media (max-width: 1400px) {
            .kpi-container { grid-template-columns: repeat(4, 1fr); }
            .hero-content { max-width: 80%; }
        }
        @media (max-width: 1024px) {
            .gym-map, .trainers, .memberships { grid-column: span 12; }
            .simian-sage-widget, .live-classes, .activity-card, .equipment, .challenges { grid-column: span 6; }
        }
        @media (max-width: 768px) {
            .topbar { flex-direction: column; gap: 15px; }
            .header-left, .header-right { width: 100%; justify-content: space-between; }
            .search-bar { width: auto; flex-grow: 1; }
            .hero { flex-direction: column; text-align: center; padding: 30px 20px; }
            .hero::before { background: linear-gradient(0deg, #09090b 20%, rgba(0,0,0,0.5) 100%); }
            .hero-content { max-width: 100%; display: flex; flex-direction: column; align-items: center; }
            .hero-ai-message { border-left: none; border-top: 4px solid var(--apex-lime); border-radius: 0 0 12px 12px; text-align: left; }
            .kpi-container { grid-template-columns: repeat(2, 1fr); }
            .simian-sage-widget, .live-classes, .activity-card, .equipment, .challenges { grid-column: span 12; }
            .trainer-grid, .mem-grid { grid-template-columns: repeat(2, 1fr); }
            .map-container { grid-template-columns: repeat(2, 1fr); grid-template-rows: auto; }
            .zone-cardio, .zone-pesas, .zone-piscina { grid-column: span 1; }
        }
        @media (max-width: 480px) {
            .kpi-container { grid-template-columns: 1fr; }
            .trainer-grid, .mem-grid { grid-template-columns: 1fr; }
            .hero-brand { font-size: 2.5rem; }
        }