    /* =========================================
       STILE DARK MODERN - UNIFICATO (Admin)
       ========================================= */
    :root {
        --primary-dark: #1e1e2f;
        --secondary-dark: #27293d;
        --accent-color: #00e676; /* Verde Neon */
        --text-color: #e0e0e0;
        --border-color: #444;
        --hover-bg: #32324a;
        --gold-color: #ffc107; /* Colore Oro per Admin */
    }

    * { box-sizing: border-box; padding: 0; margin: 0; font-family: "Heebo", sans-serif; }

    body {
        font-family: 'Heebo', sans-serif;
        background-color: var(--primary-dark);
        color: var(--text-color);
        line-height: 1.6;
        padding-bottom: 80px; /* Spazio per footer se necessario */
    }

    /* TITOLI */
    h1, h2 { color: #fff; text-align: center; font-weight: 700; letter-spacing: 1px; }
    .h1_inventario { margin-top: 60px; margin-bottom: 20px; color: var(--accent-color); }
    .h2_carrello_dettaglio { text-align:center; margin-top: 80px; margin-bottom: 15px; color: var(--gold-color); }

    /* LINKS */
    a { color: #42a5f5; text-decoration: none; transition: 0.3s; }
    a:hover { color: #90caf9; }

    /* CONTENITORE PRINCIPALE */
    .container-main {
        width: 100%;
        max-width: 1400px;
        margin: 0 auto;
        background-color: var(--secondary-dark);
        padding: 30px;
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        border: 1px solid #3e3e4f;
        margin-top: 20px;
    }

    /* FORM ELEMENTS (Generici) */
    input, select, button {
        width: 100%;
        padding: 12px;
        border-radius: 6px;
        font-size: 15px;
        border: 1px solid var(--border-color);
        background-color: var(--primary-dark);
        color: #fff;
        margin-bottom: 10px;
        transition: all 0.3s;
    }
    
    input:focus, select:focus {
        border-color: var(--accent-color);
        outline: none;
        box-shadow: 0 0 8px rgba(0, 230, 118, 0.2);
    }

    button {
        cursor: pointer;
        font-weight: bold;
        text-transform: uppercase;
        border: none;
    }

    /* --- NUOVO STILE FILTRI (Come da catalogo pubblico) --- */
    .filters-container {
        display: flex;
        justify-content: center;
        gap: 20px;
        margin: 30px auto;
        flex-wrap: wrap;
        background: #2e2e44;
        padding: 25px 35px;
        border-radius: 16px;
        max-width: 1100px;
        border: 1px solid #46466a;
        box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    }

    /* Gruppi di filtri (Cerca, Tipo, Categoria) */
    .filter-group {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    /* Etichette dei filtri */
    .filter-group label {
        font-weight: 600;
        color: var(--gold-color); /* Giallo oro per admin */
        font-size: 0.9em;
        letter-spacing: 1px;
        text-transform: uppercase;
        margin-bottom: 0; /* Resetta margine */
    }

    /* Input e Select dei filtri - STILE ELEGANTE */
    .filtro_select {
        background-color: #222236;
        color: #e0e0e0;
        border: 2px solid #505074;
        padding: 10px 15px;
        border-radius: 30px;
        font-size: 0.95em;
        outline: none;
        transition: all 0.3s ease;
        min-width: 180px;
        appearance: none;
        background-image: url('data:image/svg+xml;utf8,<svg fill="%23e0e0e0" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
        background-repeat: no-repeat;
        background-position-x: calc(100% - 10px);
        background-position-y: 50%;
        padding-right: 40px;
        margin-bottom: 0; /* Resetta margine */
    }
    
    /* STILE UNIFORME PER I PLACEHOLDER */
    .filtro_select::placeholder {
        color: #a0a0c0;
        opacity: 1;
        font-style: italic;
    }

    /* Eccezione per l'input text che non deve avere la freccia */
    input.filtro_select[type="text"] {
        background-image: none;
        padding-right: 15px;
        min-width: 220px;
    }

    /* Effetti Hover e Focus sugli input */
    .filtro_select:hover {
        border-color: #66668e;
        background-color: #2a2a40;
    }
    .filtro_select:focus {
        border-color: var(--accent-color);
        box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.2);
        background-color: #2a2a40;
    }

    /* Stile per i bottoni di filtro (Cerca e Filtra nascosto) */
    .filter-group button {
        padding: 10px 15px;
        border: none;
        border-radius: 50%; /* Tondi per la lente */
        cursor: pointer;
        background: linear-gradient(135deg, #0070ba, #005ea6);
        color: white;
        font-weight: bold;
        transition: all 0.3s ease;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        width: auto; /* Resetta width */
        margin-bottom: 0; /* Resetta margine */
    }
    /* Stile specifico per il bottone "Filtra" nascosto (che appare su mobile) */
    .filter-group button[style*="display: none;"] {
       border-radius: 30px; /* Torna a pillola se non è la lente */
       padding: 10px 20px;
       font-size: 0.9em;
       letter-spacing: 0.5px;
       text-transform: uppercase;
    }

    .filter-group button:hover {
        background: linear-gradient(135deg, #0084e0, #0070ba);
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(0,0,0,0.4);
    }
    /* Fine modifiche filtri */


    /* BOTTONI STILE GRADIENTE (Amministrazione) */
    .btn_aggiungi { background: linear-gradient(135deg, #00c853, #009624); color: white; width:auto; display:inline-block; padding: 8px 12px;}
    .btn_rimuovi  { background: linear-gradient(135deg, #ff6f00, #ef6c00); color: white; width:auto; display:inline-block; padding: 8px 12px;}
    .btn_elimina  { background: linear-gradient(135deg, #d32f2f, #b71c1c); color: white; width:auto; display:inline-block; padding: 8px 12px;}
    .btn_vendi    { background: linear-gradient(135deg, #007bff, #0056b3); color: white; width:auto; display:inline-block; padding: 8px 12px;}
    .btn_costo    { background: linear-gradient(135deg, #17a2b8, #117a8b); color: white; width:auto; display:inline-block; padding: 8px 12px;}
    
    .copia_prodotto { 
        background: #424242; 
        padding: 5px 10px; 
        border-radius: 4px; 
        display: inline-block; 
        font-size: 0.8em;
        border: 1px solid #666;
    }
    .copia_prodotto a { color: #fff; }

    .btn_procedi_acquisto { background: linear-gradient(90deg, #00e676, #00c853); color: #000; padding: 15px 30px; border-radius: 50px; font-size: 1.1em; margin: 30px auto; display: block; width: fit-content; box-shadow: 0 5px 15px rgba(0, 230, 118, 0.3); }
    .btn_svuota_carrello { background: linear-gradient(90deg, #ff5252, #d32f2f); padding: 10px 20px; border-radius: 50px; margin: 20px auto; display: block; width: fit-content; }

    .btn_aggiungi:hover, .btn_rimuovi:hover, .btn_elimina:hover, .btn_vendi:hover, .btn_costo:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    }

    /* TABELLA DESKTOP */
    table {
        width: 100%;
        margin: auto;
        border-collapse: collapse;
        margin-bottom: 20px;
        background-color: var(--primary-dark);
        border-radius: 8px;
        overflow: hidden;
        border: 1px solid var(--border-color);
        margin-top: 30px; /* Spazio dai filtri */
    }

    th, td {
        padding: 15px;
        text-align: center;
        border-bottom: 1px solid #333;
        color: #ddd;
        vertical-align: middle;
    }

    th {
        background-color: #2c2c3e;
        color: var(--accent-color);
        text-transform: uppercase;
        font-size: 0.9em;
        border-bottom: 2px solid #444;
    }

    tr:hover { background-color: #252535; }

    /* STILI PARTICOLARI */
    .col-categoria { display: none; } 
    .pdf_path { color: #42a5f5; font-weight: bold; }

    /* Immagini */
    .barcode_img_index { 
    width: 160px; 
    height: auto; 
    padding: 10px;           /* Spazio bianco intorno (aumentato da 8 a 10) */
    background-color: #ffffff; /* Sfondo bianco "reale" */
    border-radius: 4px;      /* Opzionale: rende gli angoli del quadratino bianco leggermente tondi */
    
    /* filter: invert(1);    <-- RIMUOVI O COMMENTA QUESTA RIGA */
    }
    .prodotto_img_index { width: 110px; height: 110px; object-fit: cover; border-radius: 6px; border: 1px solid #555; transition: 0.3s; }
    .prodotto_img_index:hover { transform: scale(1.3); border-color: var(--accent-color); z-index: 10; position: relative; }

    /* BOTTONI FISSI FLOTTANTI */
    .cart-btn, .cart-btn_vendi {
        position: fixed;
        right: 100px;
        color: #000;
        padding: 12px 20px;
        border-radius: 50px;
        display: flex;
        align-items: center;
        gap: 10px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.5);
        z-index: 1000;
        text-decoration: none;
        font-weight: bold;
        transition: transform 0.3s;
    }
    .cart-btn { top: 90px; background: linear-gradient(135deg, #ffca28, #ffc107); }
    .cart-btn_vendi { top: 150px; background: linear-gradient(135deg, #00e676, #00c853); }
    .cart-btn:hover, .cart-btn_vendi:hover { transform: scale(1.05); }
    
    .cart-count { 
        background: #d32f2f; color: white; border-radius: 50%; 
        width: 24px; height: 24px; display: flex; 
        align-items: center; justify-content: center; font-size: 0.8em; 
    }

    /* --- BOTTONE RICERCA RAPIDA FISSO (Nuovo Stile) --- */
    .form_cerca_fisso {
        position: fixed;
        top: 100px;
        left: 100px;
        z-index: 999;
        background-color: rgba(39, 41, 61, 0.95); /* Sfondo semitrasparente */
        backdrop-filter: blur(5px); /* Effetto sfocato */
        padding: 5px;
        border-radius: 30px;
        border: 1px solid #555;
        box-shadow: 0 4px 10px rgba(0,0,0,0.5);
        display: flex;
        align-items: center;
    }
    .input_cerca_fisso {
        background: transparent;
        border: none;
        color: #fff;
        padding: 5px 10px;
        width: 120px;
        outline: none;
        margin-bottom: 0; /* Resetta margine */
    }
    .btn_cerca_fisso {
        width: 30px; height: 30px;
        border-radius: 50%;
        border: none;
        /* Icona lente */
        background: #0070ba url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>') no-repeat center center;
        background-size: 18px;
        cursor: pointer;
    }
    /* Messaggi Ricerca */
    .p_ricerca_positiva { color: var(--accent-color); text-align: center; margin: 15px; }
    .p_ricerca_negativa { color: #ff5252; text-align: center; margin: 15px; }

    /* ==========================================================================
       MEDIA QUERIES PER TABLET E MOBILE (< 992px)
       CARD VIEW DARK
       ========================================================================== */
    @media screen and (max-width: 992px) {
        .h1_inventario { font-size: 15px; }
        /* Nascondi intestazioni tabella */
        table thead { display: none; }

        /* Rendi tutto block */
        table, tbody, tr, td { display: block; width: 100%; }

        /* Stile "Scheda" Dark */
        table tbody tr {
            margin-bottom: 20px;
            border: 1px solid #3e3e4f;
            border-radius: 12px;
            background-color: #27293d; /* Card scura */
            box-shadow: 0 4px 10px rgba(0,0,0,0.3);
            padding: 10px;
        }
        
        /* Celle interne */
        table tbody tr td {
            text-align: right;
            padding-left: 45%;
            position: relative;
            border-bottom: 1px solid #333;
            color: #eee;
        }
        
        table tbody tr td:last-child { border-bottom: none; }

        /* Etichette */
        table tbody tr td::before {
            content: attr(data-label);
            position: absolute;
            left: 10px;
            top: 15px;
            width: 40%;
            text-align: left;
            font-weight: bold;
            color: var(--accent-color); /* Verde neon */
            text-transform: uppercase;
            font-size: 0.85em;
        }

        /* Riga Azioni */
        .tr_while {
            margin-top: -20px !important;
            border-top: none !important;
            background-color: #222233 !important; /* Leggermente più scuro */
            border-radius: 0 0 12px 12px;
        }

        .tr_while td {
            padding: 15px !important;
            text-align: center !important;
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 15px;
        }
        
        .tr_while td::before { content: none !important; }

        /* Mobile adjustments */
        .barcode_img_index { width: 80%; max-width: 160px; margin: 10px auto; display: block; }
        .prodotto_img_index { width: 80px; height: 80px; margin-top:5px;}
        
        /* Form inline per bottoni */
        .tr_while form {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            margin: 0;
            width: auto;
        }
        input[type="number"] { 
            display: inline-block; width: 60px !important; margin: 0; 
            text-align: center; background: #1e1e2f; border: 1px solid #555;
        }
        
        .cart-btn, .cart-btn_vendi {
            padding: 8px 12px; font-size: 0.9em;
        }
        .cart-btn { top: auto; bottom: 80px; right: 20px; }
        .cart-btn_vendi { top: auto; bottom: 20px; right: 20px; }

        /* --- NUOVO RESPONSIVE FILTRI E RICERCA RAPIDA (Come da catalogo) --- */

        /* 1. Mostra e posiziona la ricerca rapida fissa in alto a destra */
        .form_cerca_fisso { 
            display: flex; /* Mostra */
            top: 55px; /* Fissa in alto (aggiustato per admin header) */
            right: 20px; /* Fissa a destra */
            left: auto; /* Resetta left */
        }
        /* Riduciamo leggermente l'input e il bottone per mobile */
        .input_cerca_fisso { width: 90px; font-size: 0.85em; }
        .btn_cerca_fisso { width: 26px; height: 26px; background-size: 15px; }

        /* 2. Nascondi la barra di ricerca principale nel container filtri */
        .form-cerca-principale {
            display: none !important;
        }

        /* 3. Centra i filtri rimanenti */
        .filters-container {
             flex-direction: column;
             align-items: center; 
             padding: 20px; 
             gap: 15px; 
        }
        
        .filter-group {
             flex-direction: column;
             align-items: center;
             gap: 8px;
             width: 100%;
        }

        /* Imposta larghezza automatica ma con un minimo per centrarle bene */
        .filtro_select {
             width: auto; 
             min-width: 250px;
             max-width: 100%;
        }

        /* Adatta i bottoni "Filtra" nascosti */
        .filter-group button[style*="display: none;"] {
             width: auto;
             min-width: 150px;
             border-radius: 30px;
             padding: 10px 20px;
             margin-top: 5px;
             align-self: center;
        }
    }