/* ===== Reset di base ===== */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f5f7fa;
    text-align: center;
    box-sizing: border-box;
}

/* Header */
header {
    position: fixed;         /* lo fissa nella pagina */
    top: 0;                  /* attaccato in alto */
    left: 0;                 /* allineato a sinistra */
    width: 100%;             /* occupa tutta la larghezza */
    background-color: #1a2a40;
    color: white;
    padding: 1.5rem 1rem;
    z-index: 1000;           /* resta sopra gli altri elementi */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* piccolo effetto ombra */
}

header h1 {
    margin: 0;
    font-size: 2rem;
}

/* ===== Contenitore principale ===== */
main {
    margin-top: 3rem;
}

/* Spazio sotto l'header per evitare che i contenuti si sovrappongano */
body {
    margin: 0;
    padding-top: 70px; /* deve essere circa l’altezza dell’header */
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f5f7fa;
    text-align: center;
}

/* ===== Pulsanti ===== */
.btn-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

button,
input[type="submit"],
input[type="button"],
.btn {
    background-color: #1a73e8;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    display: inline-block;
    border: 0px solid #fff;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0px 3px 6px rgba(0,0,0,0.15);
}

/* Hover pulsanti */
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.btn:hover {
    background-color: #155ab3;
    transform: translateY(-3px);
}

/* Bottoni disabilitati */
button:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled,
.btn:disabled {
    background-color: #ccc;
    color: #666;
    border-color: #999;
    cursor: not-allowed;
}

/* ===== Campi di input e textarea ===== */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
textarea,
select {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 16px;
    border: 2px solid #111;
    border-radius: 5px;
    background-color: #fff;
    color: #111;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #555;
    outline: none;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

/* ===== Etichette e gruppi di form ===== */
label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group {
    margin-bottom: 20px;
}

/* ===== Bottoni “pericolosi” / rossi ===== */
.btn.btn-danger {
    background-color: #e53935;   /* rosso scuro */
    border-color: #b71c1c;       /* bordo più scuro */
    color: #fff;
}

.btn.btn-danger:hover {
    background-color: #b71c1c;   /* rosso più intenso al passaggio */
    border-color: #8b0000;
    color: #fff;
    transform: translateY(-2px);
}

/* ===== Form upload moderno ===== */
.upload-form {
    background: linear-gradient(145deg, #ffffff, #e6f0ff);
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    margin: 2rem auto;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    text-align: left;
    transition: all 0.3s ease;
}

/* Gruppi di input */
.upload-form .form-group {
    margin-bottom: 1.8rem;
}

/* Label stilizzata */
.upload-form label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: #1a2a40;
}

/* Input file moderno */
.upload-form input[type="file"] {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    border: 2px dashed #1a73e8;
    border-radius: 8px;
    background-color: #f9faff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-form input[type="file"]:hover {
    border-color: #155ab3;
    background-color: #e6f0ff;
}

.upload-form input[type="file"]:focus {
    border-color: #155ab3;
    outline: none;
    box-shadow: 0 0 8px rgba(26,115,232,0.4);
}

/* Bottone principale */
.upload-form button.btn {
    width: 100%;
    padding: 0.9rem;
    font-size: 1.1rem;
    border-radius: 8px;
    background-color: #1a73e8;
    border: none;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.upload-form button.btn:hover {
    background-color: #155ab3;
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* ===== Custom File Upload ===== */
.custom-file-upload {
    position: relative;
    border: 2px dashed #1a73e8;
    border-radius: 8px;
    background-color: #f9faff;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #1a2a40;
}

.custom-file-upload:hover {
    background-color: #e6f0ff;
    border-color: #155ab3;
    box-shadow: 0 0 10px rgba(26,115,232,0.3);
}

/* Nasconde l'input file originale */
.custom-file-upload input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Testo visibile sopra il box */
.upload-text {
    pointer-events: none; /* per permettere il click sull’input nascosto */
    font-size: 1rem;
}

/* Aggiunta di un effetto icona (facoltativo) */
.upload-text::before {
    content: "\1F4E5"; /* emoji di scatola con freccia, 📥 */
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* ==Listini!== */

.listini-list {
    list-style: none;
    padding: 0;
    max-width: 600px;
    margin: 1rem auto;
}

.listino-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f9faff;
    border: 1px solid #ccc;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.8rem;
}

.listino-item .file-name {
    font-weight: bold;
    color: #1a2a40;
}

/* Tabella migliorata */
.table-container {
    overflow-x: auto;
    max-width: 700px;
    margin: 1rem auto;
}

.listino-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.listino-table th, .listino-table td {
    padding: 0.8rem;
    border: 1px solid #ccc;
}

.listino-table th {
    background-color: #1a73e8;
    color: #fff;
}