  * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Outfit', sans-serif;
            overflow-x: hidden;
            background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f0fdf4 100%);
            min-height: 100vh;
        }

        .gradient-text {
            background: linear-gradient(135deg, #7FB844 0%, #5A8F2E 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .glass-effect {
            background: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.5);
        }

        .decorative-circle {
            position: absolute;
            border-radius: 50%;
            opacity: 0.15;
            pointer-events: none;
        }

        .logo-glow {
            filter: drop-shadow(0 0 20px rgba(127, 184, 68, 0.3));
        }

        /* Header Styles — posicionamiento gestionado por .app-header en mainheader.php */
        .app-header nav {
            height: 100%;
            width: 100%;
        }

        .btn-icon {
            padding: 0.5rem;
            border: none;
            background: transparent;
            border-radius: 0.5rem;
            cursor: pointer;
            transition: background 0.2s;
        }

        .btn-icon:hover {
            background: rgba(16, 185, 129, 0.1);
        }

        .logo-container {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .logo-circle {
            position: relative;
            width: 3rem;
            height: 3rem;
            border-radius: 50%;
            background: linear-gradient(135deg, #7FB844, #5A8F2E);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .logo-inner {
            width: 1rem;
            height: 1rem;
            background: #1e293b;
            border-radius: 50%;
        }

        .user-badge {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.5rem 1rem;
            background: linear-gradient(90deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.15));
            border-radius: 9999px;
        }

        .user-avatar {
            width: 2rem;
            height: 2rem;
            border-radius: 50%;
            background: linear-gradient(135deg, #10b981, #059669);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 0.875rem;
            font-weight: 700;
        }

        .notification-dot {
            position: absolute;
            top: 0.25rem;
            right: 0.25rem;
            width: 0.5rem;
            height: 0.5rem;
            background: #ef4444;
            border-radius: 50%;
        }

        /* Sidebar Styles */
        .sidebar-overlay {
            position: fixed;
            top: 70px;          /* no tapa el header */
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.4s ease;
            z-index: 99;
        }

        .sidebar-overlay.active {
            opacity: 1;
            pointer-events: all;
        }

        .sidebar {
            position: fixed;
            top: 70px;
            left: 0;
            height: calc(100vh - 70px);
            width: 260px;
            transform: translateX(-100%);
            transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 100;
            background: linear-gradient(180deg, #7FB844, #5A8F2E);
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            overflow-y: auto;
            overflow-x: hidden;
            padding-top: 0.5rem;
        }

        .sidebar.open {
            transform: translateX(0);
        }

        /* Anular el margin-left negativo que CoreUI aplica en ≤991px */
        @media (max-width: 991px) {
            .sidebar {
                margin-left: 0 !important;
                top: 70px !important;
                height: calc(100vh - 70px) !important;
                z-index: 100 !important;
            }
        }

        /* Mobile: sidebar ocupa casi todo el ancho de pantalla */
        @media (max-width: 768px) {
            .sidebar {
                width: 85%;
                max-width: 300px;
            }
        }

        .sidebar-header {
            padding: 1.5rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        }

        .sidebar-header-content {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1.5rem;
        }

        .sidebar-logo {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .sidebar-logo-circle {
            width: 3rem;
            height: 3rem;
            background: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .menu-content {
            padding: 0.75rem;
        }

        .menu-item {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.5rem 0.75rem;
            border: none;
            background: transparent;
            color: white;
            font-size: 0.875rem;
            font-weight: 500;
            border-radius: 0.75rem;
            cursor: pointer;
            transition: all 0.2s;
            margin-bottom: 0.25rem;
        }

        .menu-item:hover {
            background: rgba(255, 255, 255, 0.15);
            transform: translateX(4px);
        }

        .menu-item-left {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .submenu {
            margin-left: 1rem;
            margin-top: 0.5rem;
            overflow: hidden;
            max-height: 0;
            opacity: 0;
            transition: all 0.3s ease;
        }

        .submenu.active {
            max-height: 2000px;
            opacity: 1;
        }

        .submenu-item {
            display: block;
            padding: 0.4rem 0.875rem;
            color: rgba(255, 255, 255, 0.9);
            text-decoration: none;
            font-size: 0.8rem;
            border-radius: 0.5rem;
            transition: all 0.2s;
            margin-bottom: 0.15rem;
            background: transparent;
            border: none;
            text-align: left;
        }

        .submenu-item:hover {
            background: rgba(255, 255, 255, 0.2);
            color: white;
        }

        /* Estilos para submenús anidados (nivel 2) */
        .submenu .submenu {
            background: rgba(0, 0, 0, 0.15);
            border-radius: 0.5rem;
            padding: 0.5rem 0;
            margin-top: 0.25rem;
            margin-bottom: 0.5rem;
        }

        .submenu .submenu.active {
            max-height: 1500px;
        }

        /* Items de submenús anidados con mejor contraste */
        .submenu .submenu .submenu-item {
            color: rgba(255, 255, 255, 0.95);
            font-size: 0.75rem;
            padding-left: 1.25rem;
            background: transparent;
        }

        .submenu .submenu .submenu-item:hover {
            background: rgba(255, 255, 255, 0.25);
            color: white;
            font-weight: 500;
        }

        /* Main Content */
        main {
            max-width: 1280px;
            margin: 0 auto;
            padding-top: calc(70px + 1.5rem); /* compensa header fijo */
            padding-bottom: 3rem;
            padding-left: 1.5rem;
            padding-right: 1.5rem;
        }

        /* HD / large monitors */
        @media (min-width: 1440px) {
            main {
                max-width: 1400px;
            }
        }

        /* Full HD y más */
        @media (min-width: 1920px) {
            main {
                max-width: 1800px;
                padding-left: 2.5rem;
                padding-right: 2.5rem;
            }
        }

        /* Ultrawide (2560px+) */
        @media (min-width: 2560px) {
            main {
                max-width: 2400px;
                padding-left: 3rem;
                padding-right: 3rem;
            }
        }

        @media (max-width: 768px) {
            main {
                padding-top: calc(70px + 1rem);
                padding-left: 1rem;
                padding-right: 1rem;
            }
        }

        .slide-in {
            animation: slideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
            opacity: 0;
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .grid-2 {
            display: grid;
            grid-template-columns: 1fr;
            gap: 3rem;
            margin-bottom: 4rem;
        }

        @media (min-width: 1024px) {
            .grid-2 {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        .card {
            padding: 2rem;
            border-radius: 1.5rem;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
            position: relative;
            overflow: hidden;
        }

        .card h2 {
            font-size: 1.875rem;
            font-weight: 700;
            color: #1e293b;
            margin-bottom: 1rem;
        }

        .card h3 {
            font-size: 1.5rem;
            font-weight: 700;
            color: #1e293b;
            margin-bottom: 0.5rem;
        }

        .card p {
            color: #64748b;
            line-height: 1.75;
            font-weight: 300;
        }

        .divider {
            height: 0.25rem;
            width: 5rem;
            background: linear-gradient(90deg, #10b981, #6ee7b7);
            border-radius: 9999px;
            margin: 1.5rem 0;
        }

        /* Status Cards */
        .status-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 1.5rem;
            margin-bottom: 4rem;
        }

        @media (min-width: 768px) {
            .status-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        .status-card {
            padding: 2rem;
            border-radius: 1.5rem;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            cursor: pointer;
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            position: relative;
            overflow: hidden;
        }

        .status-card:hover {
            transform: translateY(-8px) scale(1.02);
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
        }

        .status-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 5rem;
            height: 5rem;
            border-radius: 1rem;
            font-size: 2.25rem;
            font-weight: 800;
            color: white;
            margin-bottom: 1.5rem;
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
        }

        /* Brands Grid */
        .brand-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1rem;
            animation: fadeInUp 1s ease-out 0.5s forwards;
            opacity: 0;
        }

        @media (min-width: 768px) {
            .brand-grid {
                grid-template-columns: repeat(5, 1fr);
            }
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .brand-item {
            aspect-ratio: 1;
            background: white;
            border-radius: 1rem;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1.5rem;
            transition: all 0.3s;
            cursor: pointer;
            border: 1px solid #f1f5f9;
        }

        .brand-item:hover {
            transform: scale(1.05);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        }

        .brand-item span {
            font-weight: 700;
            color: #475569;
            text-align: center;
            font-size: 0.875rem;
        }

        .tagline {
            margin-top: 4rem;
            text-align: center;
            animation: slideIn 0.8s ease-out 0.8s forwards;
            opacity: 0;
        }

        .tagline p {
            font-size: 1.5rem;
            font-weight: 300;
            color: #64748b;
            font-style: italic;
        }

        /* SVG Icons (solo nav y sidebar, no afectar Highcharts) */
        .btn-icon svg,
        .sidebar svg,
        .menu-item svg,
        .nav-content svg {
            width: 1.5rem;
            height: 1.5rem;
        }