:root {
            --rep-accent: #1e40af;
            --rep-accent-soft: rgba(30, 64, 175, 0.08);
            --rep-border: #e2e8f0;
            --rep-surface: #ffffff;
            --rep-bg: #f1f5f9;
        }

        *, *::before, *::after { box-sizing: border-box; }
        body, h1,h2,h3,h4,h5,h6,input,select,textarea,button,label { font-family: 'Outfit', 'Inter', sans-serif !important; }

        .rep-main { display: flex; justify-content: center; padding: 28px 2% 50px; margin-left: 100px; }
        .rep-card { 
            width: 100%; 
            max-width: 1400px; 
            background: rgba(255, 255, 255, 0.9); 
            backdrop-filter: blur(20px); 
            border: 1px solid rgba(255, 255, 255, 0.6); 
            padding: 30px; 
            border-radius: 24px; 
            box-shadow: 0 20px 60px rgba(0,0,0,0.08); 
        }

        /* --- Estilo de Sección --- */
        .section-box { 
            background: #ffffff; 
            border-radius: 16px; 
            padding: 20px; 
            box-shadow: 0 4px 15px rgba(0,0,0,0.03); 
            border: 1px solid rgba(0,0,0,0.05);
            margin-bottom: 20px;
        }
        .section-title { 
            font-size: 0.95rem; 
            color: #0f172a; 
            margin: 0 0 16px 0; 
            display: flex; 
            align-items: center; 
            gap: 10px; 
            font-weight: 800; 
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .section-title i { color: var(--rep-accent); opacity: 0.9; }

        /* --- UI Elements --- */
        .fi { 
            background: #f8fafc; 
            color: #0f172a; 
            border: 1px solid #e2e8f0; 
            width: 100%; 
            padding: 10px 14px; 
            border-radius: 10px; 
            font-weight: 600; 
            font-size: 0.88rem; 
            transition: all 0.2s;
        }
        .fi:focus { outline: none; border-color: var(--rep-accent); box-shadow: 0 0 0 3px var(--rep-accent-soft); }
        .label-sm { font-size: 0.7rem; font-weight: 800; color: #64748b; margin-bottom: 6px; display: block; text-transform: uppercase; }

        /* --- KPIs --- */
        .kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 24px; }
        .kpi-card { 
            background: #ffffff; 
            border-radius: 16px; 
            padding: 18px; 
            display: flex; 
            align-items: center; 
            gap: 15px; 
            border: 1px solid rgba(0,0,0,0.05);
            transition: transform 0.2s;
        }
        .kpi-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.05); }
        .kpi-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: white; flex-shrink: 0; }
        .kpi-content { flex: 1; }
        .kpi-value { font-size: 1.45rem; font-weight: 900; color: #0f172a; letter-spacing: -0.5px; }
        .kpi-label { font-size: 0.68rem; font-weight: 800; color: #94a3b8; text-transform: uppercase; margin-top: 2px; }

        /* --- Tabs --- */
        .tab-bar { 
            display: flex; 
            gap: 10px; 
            margin-bottom: 20px; 
            padding-bottom: 10px;
            border-bottom: 1px solid #f1f5f9;
            overflow-x: auto; 
        }
        .tab-btn { 
            padding: 10px 18px; 
            border-radius: 12px; 
            font-size: 0.85rem; 
            font-weight: 700; 
            cursor: pointer; 
            border: 1px solid transparent; 
            background: rgba(148, 163, 184, 0.1); 
            color: #64748b; 
            white-space: nowrap;
            transition: all 0.2s;
        }
        .tab-btn:hover { background: rgba(148, 163, 184, 0.2); }
        .tab-btn.active { background: var(--rep-accent); color: white; border-color: var(--rep-accent); }

        .tab-panel { display: none; animation: fadeIn 0.3s ease; }
        .tab-panel.active { display: block; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

        /* --- Tabla Premium --- */
        .table-wrap { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; margin-top: 15px; }
        .inv-table { width: 100%; border-collapse: collapse; }
        .inv-table thead { background: #f1f5f9; }
        .inv-table th { padding: 12px 14px; text-align: left; font-size: 0.72rem; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid #e2e8f0; }
        .inv-table td { padding: 12px 14px; font-size: 0.84rem; font-weight: 500; color: #1e293b; border-bottom: 1px solid #f1f5f9; }
        .inv-table tr:hover td { background: #ffffff; }

        /* --- Botones --- */
        .btn-action { padding: 8px 20px; border-radius: 10px; font-weight: 800; font-size: 0.8rem; border: none; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 8px; }
        .btn-primary { background: var(--rep-accent); color: white; box-shadow: 0 4px 15px rgba(30, 64, 175, 0.2); }
        .btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
        .btn-outline { background: white; border: 1.5px solid #e2e8f0; color: #475569; }
        .btn-outline:hover { background: #f8fafc; border-color: #cbd5e1; }

        .btn-export-xl { background: #10b981; color: white; }
        .btn-export-pdf { background: #ef4444; color: white; }

        /* --- Gráficos --- */
        .chart-container { position: relative; height: 320px; width: 100%; }

        /* --- Badges --- */
        .badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; }
        .b-success { background: #dcfce7; color: #15803d; }
        .b-warning { background: #fef9c3; color: #a16207; }
        .b-danger { background: #fee2e2; color: #991b1b; }
        .b-info { background: #dbeafe; color: #1e40af; }


        /* --- Autocomplete Premium Dropdown --- */
        .autocomplete-wrapper { position: relative; width: 100%; }
        .autocomplete-dropdown {
            display: none;
            position: absolute;
            top: calc(100% + 4px);
            left: 0; right: 0;
            background: #ffffff;
            border: 1.5px solid #dbeafe;
            border-radius: 12px;
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
            z-index: 9999;
            max-height: 250px;
            overflow-y: auto;
        }
        .autocomplete-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 14px;
            cursor: pointer;
            border-bottom: 1px solid #f1f5f9;
            transition: all 0.2s ease;
        }
        .autocomplete-item:hover { background: #f0f7ff; }
        .autocomplete-item:last-child { border-bottom: none; }
        .autocomplete-info { flex: 1; min-width: 0; }
        .autocomplete-name {
            font-weight: 800;
            font-size: 0.82rem;
            color: #1e293b;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .autocomplete-subinfo {
            font-size: 0.65rem;
            color: #94a3b8;
            font-weight: 700;
        }