﻿p, body, td, input, select, button {
    font-family: -apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
    font-size: 14px;
}

body {
    padding: 0px;
    margin: 0px;
    background-color: #ffffff;
}

a {
    color: #1155a3;
}

.space {
    margin: 10px 0px 10px 0px;
}

.btn {
    background-color: #336600 !important;
    border-color: #336600 !important;
}

.btn-danger {
    background-color: #ae3535 !important;
    border-color: #ae3535 !important;
}

.btn:visited {
    background-color: #474d40 !important;
    border-color: #474d40 !important;
}


.btn:hover {
    background-color: #208d3b !important;
    border-color: #208d3b !important;
}

.btn:active {
    background-color: #208d3b !important;
    border-color: #208d3b !important;
}

.titolo {
    color: white;
    background-color: #336600;
    padding: 10px;
    border-radius: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: x-large;
    font-weight: bold;
    margin-bottom: 20px;
}

.header {
    background: #05651c;
    background: linear-gradient(to right, #054615 0%,#208d3b 44%,#054615 100%);
    padding: 10px 10px;
    color: white;
    box-shadow: 0px 0px 5px 5px rgba(0,0,0,0.75);
}

    .header a {
        color: white;
    }

    .header h1 a {
        text-decoration: none;
    }

    .header h1 {
        padding: 0px;
        margin: 0px;
    }

.navbar-dark .nav-item .nav-link {
    color: #fff;
}

    .navbar-dark .nav-item .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
        border-radius: 0.25rem;
        color: #fff;
    }

.fa-li {
    position: relative;
    left: 0;
}

.main {
    padding: 10px;
    margin-top: 20px;
}


/* QUESTO E' PER I TASTI DELLA CALCOLATRICE .. CHE CAZZO LEGGI SUL CODICE TE ? */

/* Assicura che la modale occupi tutta la larghezza disponibile */
.modal-xl .modal-content {
    width: 100%;
    max-width: 1100px;
}

/* Contenitore per i tastierini */
.tastierino-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 1000px;
    margin: auto;
}

/* Contenitore singolo per ciascun tastierino */
.tastierino-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 25%;
}

    .tastierino-box .form-label {
        font-size: 0.9em;
        margin: 0px;
        text-transform: uppercase;
    }

/* Griglia per i tastierini (3 colonne, 4 righe) */
.tastierino {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonne */
    grid-template-rows: repeat(4, auto); /* 4 righe */
    gap: 1px;
    width: 200px;
    margin-top: 5px;
}

/* Pulsanti più grandi */
.btn-key {
    width: 60px;
    height: 40px;
    font-size: 1.3rem;
    border-radius: 6px;
    text-align: center;
    padding: 0px;
}

    /* Tasto "C" rosso */
    .btn-key.red {
        background-color: #dc3545;
        color: white;
    }

/* Centra il pulsante "Calcola Totale" */
.calcola-container {
    text-align: center;
    width: 100%;
}

/* Pulsante grande */
.btn-calcola {
    width: 300px;
    font-size: 1.2rem;
    padding: 2px;
}


.lotto {
    text-align:center;
    font-size: 1.2em;
}

.giacenza{
    font-size: 1.5em;
    text-align:right;
}

.azioni {
    background-color:aqua;
    text-align:center;
}


.azione-btn {
    width: 46px;
    height: 46px;
    font-size: 1rem;
    border-radius: 6px;
}


.azione-btn i {
    color: white !important;
}

/* Adattamenti per dispositivi mobili */
@media screen and (min-width: 768px) and (max-width: 900px) {
    .modal-xl .modal-content {
        max-width: 98%;
    }




    .btn-key {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Header modale compatto a due barre */
/* Header modale compatto */
.opbar {
    display: grid;
    grid-template-columns: 20% 1fr auto;
    align-items: stretch;
    min-height: 40px; /* altezza uniforme */
    margin: 5px 15px 0px 15px;
}

/* tutte le tre celle si estendono full-height */
.opbar-left,
.opbar-right,
.opbar-close {
    height: 100%;
    display: flex; /* per centrare il contenuto internamente */
    align-items: center;
    padding: 0 14px;
}


.opbar-left {
    background: #336600;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    gap: .2rem;
}

.opbar-right {
    background: #054615;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.7em;
    text-transform: uppercase;
}

    .opbar-right strong {
        font-weight: 700;
    }

    .opbar-right .codicearticolo {
        font-weight: 700;
        font-size: 0.6em;
        margin: 0px 10px 0px 0px;
    }

    .opbar-right .badge {
        background: #fff;
        color: #000;
        font-weight: 600;
        margin-left: .25rem;
    }

.opbar-close {
    background: #054615;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
}

/* bottone X stile “tasto” */
.btn-close-custom {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,.5);
    background-color: transparent;
    color: #fff;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

    .btn-close-custom:hover {
        background-color: rgba(255,255,255,.2);
    }

#moveExtras {
    background-color: aqua;
    margin: 10px;
}

/* ============================================================
   MOBILE (IPHONE)
   Trasforma la tabella in cards verticali
   ============================================================ */
@media (max-width: 575px) {

    .titolo {
        font-size: 1.5em;
    }

    .codice-articolo{
        text-align:center;
    }
    .descrizione {
        text-align: center;
    }
    .lotto {
        text-align: center;
    }
    .giacenza {
        text-align: center;
        font-size:1.8em;
    }

    /* Nascondi intestazioni */
    .giacenza-table thead {
        display: none;
    }

    /* Righe diventano blocchi */
    .giac-row {
        display: block;
        padding: 12px;
        border-bottom: 2px solid #e6e6e6;
        margin-bottom: 8px;
        background: #fff;
        border-radius: 8px;
    }

        /* Celle diventano blocchi */
        .giac-row td {
            display: block;
            padding: 4px 0 !important;
            border: none !important;
        }

    /* Codice articolo stile “badge” grande */
    .codice-btn {
        font-size: 1rem;
        padding: 6px 10px;
        border-radius: 6px;
        width: auto;
    }

    /* Descrizione più piccola */
    .descrizione {
        font-size: 0.9rem;
        margin-top: 4px;
        color: #333;
    }


    /* Bottoni azioni una riga sola */
    .azioni, .azione-btn, .check-col {
        display: none;
    }


}

/* ============================================================
   TABLET (IPAD)
   Leggero ingrandimento
   ============================================================ */
@media (min-width: 576px) and (max-width: 991px) {

    .giac-row td {
        padding: 10px !important;
        font-size: 0.95rem;
    }

    .azione-btn {
        padding: 6px 8px;
    }

    .codice-btn {
        font-size: 0.9rem;
        padding: 5px 8px;
    }
}

/* ============================================================
   DESKTOP (PC)
   Mantieni il layout com’è ma più uniforme
   ============================================================ */
@media (min-width: 992px) {
    .giac-row td {
        padding: 12px !important;
    }
}
