﻿/* ==========================================
   TEMA DARK UNIFORME - IDROFREE
   Valido per: elenco, modifica, inserisci,
   preventivatore e tutte le pagine PHP/ASP.
   ========================================== */

body {
    font-family: Arial, sans-serif;
    background: #1b1b1b;
    color: #e5e5e5;
    margin: 0;
    padding: 0;
}

/* ========== NAV MENU ========== */

ul {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #111;
    display: flex;
    border-bottom: 2px solid #333;
}

    ul li a {
        display: block;
        padding: 14px 22px;
        color: #ddd;
        text-decoration: none;
        font-weight: bold;
    }

        ul li a:hover {
            background: #333;
            color: #fff;
        }

/* ========== CONTAINER ========== */

.container, .page {
    width: 92%;
    max-width: 1200px;
    margin: 30px auto;
    background: #262626;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 0 18px rgba(0,0,0,0.5);
}

/* ========== TITOLI ========== */

h1, h2, h3 {
    margin-top: 0;
    color: #fff;
}

/* ========== FORM ========== */

label {
    font-weight: bold;
    display: block;
    margin-top: 18px;
    color: #ddd;
}

input[type="text"],
input[type="password"],
textarea,
select {
    width: 100%;
    max-width: 450px;
    padding: 8px;
    margin-top: 6px;
    background: #333;
    border: 1px solid #555;
    border-radius: 6px;
    color: #fff;
}

textarea {
    height: 120px;
}

/* ========== BOTTONI ========== */

button,
input[type="submit"] {
    background: #0080ff;
    border: none;
    padding: 10px 18px;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 12px;
    font-weight: bold;
    transition: 0.25s;
}

    button:hover,
    input[type="submit"]:hover {
        background: #0066cc;
    }

/* ========== TABELLE ========== */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
    background: #2d2d2d;
}

    table th {
        background: #333;
        color: #fff;
        padding: 10px;
    }

    table td {
        padding: 8px;
        border-bottom: 1px solid #444;
    }

    table tr:nth-child(even) {
        background: #242424;
    }

    table tr:hover {
        background: #3a3a3a;
    }

/* ========== SCROLLBAR ========== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 5px;
}

::-webkit-scrollbar-track {
    background: #1b1b1b;
}

/* ========== MESSAGGI ========== */

.success {
    color: #79ff88;
    font-weight: bold;
}

.error {
    color: #ff6b6b;
    font-weight: bold;
}


/* ===========================
   MENU SUPERIORE DARK UNIFORME
   =========================== */

.top-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 2px solid #333;
    gap: 5px;
    position: sticky;
    top: 0;
    z-index: 999;
}

    .top-menu li {
        margin: 0;
    }

        .top-menu li a {
            display: block;
            padding: 14px 22px;
            color: #e0e0e0;
            text-decoration: none;
            font-size: 15px;
            font-weight: bold;
            border-radius: 6px;
            transition: background 0.2s, color 0.2s;
        }

            .top-menu li a:hover {
                background: #333;
                color: #ffffff;
            }


/* ===========================
   AZIONI (Modifica / Cancella)
   =========================== */

.table-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .table-actions a {
        color: #89b4ff;
        font-weight: 600;
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 4px;
        transition: color 0.2s ease;
    }

        .table-actions a:hover {
            color: #fff;
        }

/* icona modifica */
.action-edit {
    color: #ffb454;
    font-size: 16px;
}

/* icona cestino */
.action-delete {
    color: #ff6b6b;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s ease;
}

    .action-delete:hover {
        color: #ff8787;
    }
/* ===========================
   PULSANTI AZIONI A PILL
   =========================== */

.action-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    cursor: pointer;
}

/* Pulsante Modifica */
.action-edit-pill {
    background: rgba(255, 180, 84, 0.15);
    color: #ffb454;
    border: 1px solid rgba(255, 180, 84, 0.4);
}

    .action-edit-pill:hover {
        background: rgba(255, 180, 84, 0.25);
        transform: translateY(-1px);
    }

/* Pulsante Cancella */
.action-delete-pill {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.4);
}

    .action-delete-pill:hover {
        background: rgba(255, 107, 107, 0.25);
        transform: translateY(-1px);
    }

.action-icon {
    font-size: 15px;
}


/* ===========================
   PULSANTI PRINCIPALI (Pill Blue)
   =========================== */

.btn-main {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1e88ff;
    color: #fff;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

    .btn-main:hover {
        background: #4da3ff;
        transform: translateY(-1px);
    }

    .btn-main .icon {
        font-size: 16px;
    }

/* Versione "ghost" usata per Aggiungi nuovo prodotto */
.btn-ghost {
    background: rgba(150,150,255,0.1);
    color: #9ba4ff;
    border: 1px solid rgba(155,165,255,0.3);
}

    .btn-ghost:hover {
        background: rgba(150,150,255,0.2);
        color: #ffffff;
    }

/* Campo filtro */
.filter-input {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #555;
    background: #222;
    color: #ddd;
    width: 260px;
}

    .filter-input::placeholder {
        color: #777;
    }


/* Pulsante "Torna all’elenco" */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(90,150,255,0.2);
    color: #82aaff;
    border: 1px solid rgba(130,170,255,0.4);
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, color .2s, transform .2s;
}

    .btn-back:hover {
        background: rgba(90,150,255,0.35);
        color: #fff;
        transform: translateX(-2px);
    }

    .btn-back .icon {
        font-size: 15px;
    }
/* =====================================================
   FORMAZIONE INPUT TABELLA MATERIALI (Modifica/In aggiunta)
   ===================================================== */
/* ==========================
   Fix larghezze tabella materiali
   ========================== */

.tab-mat input[type="text"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

/* Colonna 1: Descrizione (55%) */
.tab-mat th:nth-child(1),
.tab-mat td:nth-child(1) {
    width: 55%;
}

/* Colonna 2: Quantità (15%) */
.tab-mat th:nth-child(2),
.tab-mat td:nth-child(2) {
    width: 15%;
}

/* Colonna 3: Costo unitario (20%) */
.tab-mat th:nth-child(3),
.tab-mat td:nth-child(3) {
    width: 20%;
}

/* Colonna 4: Totale (10%) → solo testo */
.tab-mat th:nth-child(4),
.tab-mat td:nth-child(4) {
    width: 10%;
    text-align: right;
}



/* NAVIGAZIONE PRECEDENTE / SUCCESSIVO (pagina modifica prodotto) */
.fixed-nav {
    position: fixed;
    top: 80px;
    right: 20px;
    display: flex;
    flex-direction: column; /* 👈 uno sotto l'altro */
    gap: 12px;
    z-index: 1000;
}

.btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(90,150,255,0.2);
    color: #82aaff;
    border: 1px solid rgba(130,170,255,0.35);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: 0.2s;
}

    .btn-nav:hover {
        background: rgba(90,150,255,0.35);
        color: #fff;
        transform: translateY(-2px);
    }



/* =============================
   FORM A 2 COLONNE LABEL / INPUT
   ============================= */

.form-allineato {
    display: grid;
    grid-template-columns: 200px 2fr;
    column-gap: 25px;
    row-gap: 18px;
    margin-top: 25px;
}

    .form-allineato label {
        font-weight: bold;
        text-align: right; /* Etichetta allineata a destra */
        padding-right: 10px;
        margin-top: 0 !important;
    }

    .form-allineato input {
        width: 100% !important;
      
    }


    .form-allineato textarea {
        width: 100% !important;
        max-width: 700px !important;
        height: 200px;
    }

    /* Pulsanti che devono occupare tutta la larghezza */
    .form-allineato button,
    .form-allineato input[type="submit"] {
        grid-column: 1 / -1;
        justify-self: start;
    }



/* =============================
  ALLARGAMENTO DEI INPUT IN BASE ALLE CLASSI
   ============================= */

.larghezza50 {
    max-width: 50px !important;
}


.larghezza80 {
    max-width: 80px !important;
}

.larghezza100 {
    max-width: 100px !important;
}

.larghezza150 {
    max-width: 150px !important;
}

.larghezza200 {
    max-width: 200px !important;
}

.larghezza250 {
    max-width: 250px !important;
}

.larghezza300 {
    max-width: 300px !important;
}

.larghezza350 {
    max-width: 350px !important;
}


.larghezza400 {
    max-width: 400px !important;
}

.larghezza450 {
    max-width: 450px !important;
}

.larghezza500 {
    max-width: 500px !important;
}

.larghezza550 {
    max-width: 550px !important;
}

.larghezza600 {
    max-width: 600px !important;
}

.larghezza1000 {
    max-width: 1000px !important;
}




/* =============================
  ALLINEAMENTO DEL PULSANTE COPIA COSTO NELLA PAGINA INSERISCI PRODOTTO O MODIFICA PRODOTTO
   ============================= */



.costo-riga {
    display: flex;
    align-items: center;
    gap: 12px; /* distanza tra input e pulsante */
}

    .costo-riga input {
        flex: 1; /* input si allarga */
    }

    .costo-riga button {
        white-space: nowrap; /* il pulsante non va a capo */
    }


/* =============================
  AUMENTO CARATTERE E STILE DEL TOTALE NELLA TABELLA MATERIALI 
   ============================= */



.riga-totale td {
    font-size: 20px;
    font-weight: bold;
    color: #fff; /* opzionale, per farlo risaltare */
    background: #333; /* opzionale */
}




