
        :root {
            --primary-green: #2ecc71; /* Verde similar al de la imagen */
            --bg-color: #f4f6f9;
            --text-dark: #2c3e50;
            --text-gray: #7f8c8d;
            --white: #ffffff;
            --shadow: 0 4px 20px rgba(0,0,0,0.05);
            --radius: 20px;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Inter', sans-serif;
        }

        body {
            background-color: var(--bg-color);
            height: 100vh;
            display: flex;
            overflow: hidden;
        }

        /* --- IZQUIERDA: ÁREA PRINCIPAL --- */
        .main-area {
            flex: 1;
            padding: 40px;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
        }

        .header {
            margin-bottom: 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .brand {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary-green);
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        
        .brand span { color: var(--text-dark); }

        .tab-btn {
            background: transparent;
            border: 1px solid #e0e0e0;
            padding: 10px 20px;
            border-radius: 50px;
            cursor: pointer;
            color: var(--text-gray);
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .tab-btn.active {
            background-color: var(--primary-green);
            color: white;
            border-color: var(--primary-green);
            box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3);
        }

        /* Tarjeta Central (Estilo idéntico a "Escanea tu producto") */
        .report-card {
            background: var(--white);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            flex: 1;
            padding: 10px;
            display: flex;
            flex-direction: column;
            position: relative;
            min-height: 400px;
        }

        .search-bar {
            position: absolute;
            top: -60px;
            left: 50%;
            transform: translateX(-50%);
            background: white;
            padding: 12px 25px;
            border-radius: 12px;
            border: 1px solid #e0e0e0;
            width: 300px;
            text-align: center;
            color: var(--text-gray);
            box-shadow: 0 2px 10px rgba(0,0,0,0.03);
            outline: none;
        }

        /* Tablas y Listas */
        .data-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }

        .data-table th {
            text-align: left;
            padding: 15px;
            color: var(--text-gray);
            font-size: 0.9rem;
            border-bottom: 2px solid #f0f0f0;
        }

        .data-table td {
            padding: 15px;
            color: var(--text-dark);
            border-bottom: 1px solid #f0f0f0;
        }

        .ranking-item {
            display: flex;
            align-items: center;
            padding: 15px 0;
            border-bottom: 1px solid #f0f0f0;
        }
        
        .rank-number {
            font-size: 1.5rem;
            font-weight: bold;
            color: var(--primary-green);
            margin-right: 20px;
            width: 30px;
        }

        /* Barras de gráfico simples con CSS */
        .bar-container {
            margin-bottom: 15px;
        }
        .bar-label { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 0.9rem;}
        .bar-bg { background: #eee; height: 10px; border-radius: 5px; overflow: hidden; }
        .bar-fill { background: var(--primary-green); height: 100%; border-radius: 5px; }

        /* --- DERECHA: BARRA LATERAL (Resumen) --- */
        .sidebar {
            width: 350px;
            background: var(--white);
            padding: 30px;
            display: flex;
            flex-direction: column;
            border-left: 1px solid #f0f0f0;
        }

        .sidebar-title {
            font-size: 1.2rem;
            margin-bottom: 30px;
            color: var(--text-dark);
        }

        .kpi-card {
            margin-bottom: 25px;
        }

        .kpi-label {
            font-size: 0.9rem;
            color: var(--text-gray);
            margin-bottom: 5px;
        }

        .kpi-value {
            font-size: 2rem;
            font-weight: 700;
            color: var(--text-dark);
        }

        .spacer { flex: 1; }

        .total-section {
            border-top: 1px solid #eee;
            padding-top: 20px;
        }

        .total-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
            font-size: 0.9rem;
            color: var(--text-gray);
        }

        .total-final {
            font-size: 1.5rem;
            font-weight: bold;
            color: var(--text-dark);
            margin-top: 10px;
            display: flex;
            justify-content: space-between;
        }

        .action-btn {
            background-color: var(--primary-green);
            color: white;
            border: none;
            width: 100%;
            padding: 15px;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: bold;
            margin-top: 20px;
            cursor: pointer;
            transition: background 0.2s;
        }

        .action-btn:hover {
            background-color: #27ae60;
        }

        /* Helpers */
        .hidden { display: none; }
        .text-right { text-align: right; }

/* --- NUEVOS ESTILOS DEL BUSCADOR --- */

/* Tu estilo de Input (adaptado) */
.custom-input {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: white; /* Importante para que no sea transparente */
    transition: all 0.3s ease;
    /* margin-bottom quitado para que la lista pegue justo abajo */
}

/* Estado Focus (Tu código) */
.custom-input:focus {
    border-color: #6366f1;
    outline: none;
    border: 2px solid #22c55e; /* Verde listo */
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.2);
}

/* Tu estilo de Dropdown */
.sugerencias-dropdown {
    position: absolute;
    top: 100%; /* Justo debajo del input */
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none; /* Para que parezca unido al input */
    border-radius: 0 0 8px 8px;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none; /* Oculto por defecto */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.sugerencia-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #555;
}

.sugerencia-item:hover {
    background-color: #f8f9fa;
    color: #2ecc71;
}

/* Pequeño texto gris para detalles en la sugerencia */
.item-meta {
    font-size: 0.8rem;
    color: #aaa;
}

/* Contenedor de las pestañas y el buscador */
.nav-tabs {
    display: flex;
    align-items: center; /* Centrado verticalmente */
    margin-bottom: 20px;
    gap: 15px;
    position: relative;
}

/* El envoltorio del buscador AHORA es relativo al nav-tabs, no flotante */
.search-wrapper {
    position: relative; /* IMPORTANTE: Para que el dropdown se pegue a este div */
    width: 300px; /* Ajusta el ancho que desees */
    /* Hemos eliminado top, left y transform que usábamos antes */
}

/* El input */
.custom-input {
    width: 100%;
    padding: 10px 15px; /* Un poco más pequeño para caber en el header */
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: white;
    transition: all 0.3s ease;
}

.custom-input:focus {
    border-color: #22c55e;
    outline: none;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.2);
}

/* La lista desplegable se mantiene igual, pero ahora se ancla al wrapper de arriba */
.sugerencias-dropdown {
    position: absolute;
    top: 100%; 
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    z-index: 2000; /* Z-index alto para tapar la tabla si es necesario */
    max-height: 300px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.table-wrapper {
    /* overflow-y: hidden; */   /* Evita el scroll */
    overflow-x: hidden;   /* Evita el scroll horizontal */
    border-radius: 8px;   /* Para que combine con tu diseño */
}

/* Opcional: Para que el encabezado se quede fijo mientras haces scroll */
.data-table thead {
    position: sticky;
    top: 0;
    background-color: #fff; /* O el color de fondo de tu card */
    z-index: 1;
    box-shadow: 0 2px 2px -1px rgba(0,0,0,0.1); /* Sombra sutil al bajar */
}

.brand > a {
    color: var(--primary);
    text-decoration: none;
}

/* Movimientos de caja */

.caja-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 20px auto;
}

#formCaja input, #formCaja select {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Colores para distinguir en la tabla */
.texto-ingreso { color: #27ae60; font-weight: bold; }
.texto-egreso { color: #e74c3c; font-weight: bold; }

/* Contenedor principal para alinear formulario y tabla */
.movimientos-grid {
    display: grid;
    grid-template-columns: 1fr 2fr; /* El formulario ocupa 1 parte, la tabla 2 */
    gap: 20px;
    margin-top: 20px;
}

/* Estilo unificado para los contenedores (Blanco, redondeado, con sombra suave) */
.caja-card {
    background: #ffffff;
    border-radius: 15px; /* Bordes redondeados como tu tabla de arriba */
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.caja-card h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Estilo para los inputs para que se vean modernos */
.caja-card input, .caja-card select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-sizing: border-box; /* Evita que el input se salga del borde */
}

/* Estilos de texto para la tabla de movimientos */
.texto-ingreso { color: #2ecc71; font-weight: 600; }
.texto-egreso { color: #e74c3c; font-weight: 600; }

/* Heredar la fuente del dashboard */
.caja-card, .caja-card input, .caja-card select, .caja-card button {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
}

/* Estilo para las celdas de la tabla */
.caja-card table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f2f2f2;
    color: #444;
}

/* Colores específicos para las columnas de monto */
.col-ingreso { color: #27ae60; font-weight: 600; text-align: right; }
.col-egreso { color: #e74c3c; font-weight: 600; text-align: right; }
.col-motivo { color: #555; font-weight: 500; }

.card_movimientos_tabla {
    max-height: 200px;
}