body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: #f4f6f9;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: #2c3e50;
    color: white;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.sidebar h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.sidebar nav a {
    color: white;
    text-decoration: none;
    margin: 0.8rem 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: background 0.3s;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.sidebar nav a:hover {
    background: #34495e;
}

/* Main content */
.main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

header h1 {
    margin-bottom: 2rem;
    font-size: 2.2rem;
    color: #333;
    font-weight: 600;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.card {
    background: white;
    padding: 1.8rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.2rem;
}

.card p {
    font-size: 1.6rem;
    color: #27ae60;
    font-weight: bold;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        justify-content: space-around;
        padding: 1rem;
    }

    .sidebar h2 {
        display: none;
    }

    .sidebar nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .sidebar nav a {
        font-size: 0.9rem;
        padding: 0.5rem;
        justify-content: center;
    }

    .main {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.6rem;
    }

    .card p {
        font-size: 1.3rem;
    }
}

/* === Autocompletado de productos === */
.autocomplete-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.sugerencia {
    padding: 8px 12px;
    cursor: pointer;
}

.sugerencia:hover {
    background-color: #f0f0f0;
}
