/* --- RESET E BASI --- */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: #02040a;
    font-family: 'Segoe UI', sans-serif;
}

/* Sfondo dinamico per entrambe le pagine */
.main-container {
    position: relative;
    width: 100%;
    height: 100vh;
    background: url('bg1.png') center/100% 100% no-repeat;
}


/* Sfondo dinamico per entrambe le pagine */
.main-container2 {
    position: relative;
    width: 100%;
    height: 100vh;
    background: url('bg.jpg') center/100% 100% no-repeat;
}

/* --- STILE PULSANTE INDUSTRIAL (Universale) --- */
.btn-industrial {
    width: 13vmin;
    height: 10vmin;
    position: absolute;
    border-radius: 1px;
    overflow: hidden;
    cursor: pointer;
    border: none;
    padding: 0;
    background: radial-gradient(circle at 100% 50%, #fc8e07, #eec147 100%);
    box-shadow: 0 0 10px #00cfff, 0 0 30px rgba(212, 161, 50, 0.4), inset 0 0 15px rgb(221, 96, 39);
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translate(-50%, -50%);
}

.btn-industrial::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 3px;
    background: linear-gradient(120deg, transparent, #d3a614, rgb(39, 148, 221), transparent);
    background-size: 200% 100%;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderFlow 4s linear infinite;
}


@keyframes borderFlow {
    0% { background-position: 0% }
    100% { background-position: 200% }
}

.btn-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(0,207,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0,207,255,0.05) 1px, transparent 1px); background-size: 20px 20px; }
.btn-glass { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(255,255,255,0.08), rgba(255,255,255,0.02), transparent); }

.btn-industrial:hover { transform: translate(-50%, -50%) scale(2); box-shadow: 0 0 20px #00e1ff; }



/* --- STILE PULSANTE 2 INDUSTRIAL (Universale) --- */

.btn2-industrial {
    width: 29vmin;
    height: 6vmin;
    position: relative;
    border-radius: 1px;
    overflow: hidden;
    cursor: pointer;
    border: none;
    padding: -1;
    background: radial-gradient(circle at 100% 60%, #fc8e07, #eec147 100%);
    box-shadow: 0 0 10px #00cfff, 0 0 30px rgba(212, 161, 50, 0.4), inset 0 0 15px rgb(221, 96, 39);
    transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translate(0%, 0%);
}

.btn2-industrial::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 3px;
    background: linear-gradient(120deg, transparent, #d3a614, rgb(39, 148, 221), transparent);
    background-size: 200% 100%;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderFlow 4s linear infinite;
}


.btn2-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(0,207,255,0.05) 1px, transparent 2px), linear-gradient(90deg, rgba(0,207,255,0.05) 1px, transparent 1px); background-size: 20px 20px; }
.btn2-glass { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(255,255,255,0.08), rgba(255,255,255,0.02), transparent); }

.btn2-industrial:hover { transform: translate(0%, 0%) scale(2); box-shadow: 0 0 20px #00e1ff; }

/* --- STILE PULSANTE 3 INDUSTRIAL (Universale) --- */

.btn3-industrial {
    width: 8vmin;
    height: 8vmin;
    position: absolute;
    border-radius: 1px;
    overflow: hidden;
    cursor: pointer;
    border: none;
    padding: 0;
    background: radial-gradient(circle at 100% 50%, #fc8e07, #eec147 100%);
    box-shadow: 0 0 10px #00cfff, 0 0 30px rgba(212, 161, 50, 0.4), inset 0 0 15px rgb(221, 96, 39);
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translate(-50%, -50%);
}

.btn3-industrial::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 3px;
    background: linear-gradient(120deg, transparent, #d3a614, rgb(39, 148, 221), transparent);
    background-size: 200% 100%;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderFlow 4s linear infinite;
}


.btn3-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(0,207,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0,207,255,0.05) 1px, transparent 1px); background-size: 20px 20px; }
.btn3-glass { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(255,255,255,0.08), rgba(255,255,255,0.02), transparent); }

.btn3-industrial:hover { transform: translate(-50%, -50%) scale(1.1); box-shadow: 0 0 20px #00e1ff; }

  /* --- STILE PULSANTE 4 INDUSTRIAL --- */
  .btn4-industrial {
    width: 29vmin;
    height: 6vmin;
    position: absolute; /* Cambiato da absolute per posizionamento libero */
    border-radius: 1px;
    overflow: hidden;
    cursor: pointer;
    border: none;
    padding: 0;
    background: radial-gradient(circle at 100% 50%, #fc8e07, #eec147 100%);
    box-shadow: 0 0 10px #00cfff, 0 0 30px rgba(212, 161, 50, 0.4), inset 0 0 15px rgb(221, 96, 39);
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 1.5vmin;
  }

  .btn4-industrial::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 3px;
    background: linear-gradient(120deg, transparent, #d3a614, rgb(39, 148, 221), transparent);
    background-size: 200% 100%;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderFlow 4s linear infinite;
  }


  /* Effetto Hover */
  .btn4-industrial:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px #00cfff, 0 0 40px rgba(212, 161, 50, 0.6);
  }


/* --- STILI SPECIFICI card --- */
.page-card {
    position: absolute;
    top: 50%; left: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    width: 400px;
    padding: 10px;
    background: rgba(2, 4, 10, 0.9);
    border: 1px solid #fc8e07;
    text-align: center;
    z-index: 10;
    gap: 50px;  
}

/* --- STILI SPECIFICI card --- */
.pagelarge-card {
    position: absolute;
    top: 50%; left: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    width: 500px;
    padding: 10px;
    background: rgba(2, 4, 10, 0.9);
    border: 1px solid #fc8e07;
    text-align: center;
    z-index: 10;
    gap: 50px;  
}

.input-text-industrial {
    width: 55vmin;
    height: 10vmin;
    position: relative;
    border: 1px solid #fc8e07;
    border-radius: 2px;
    color: #00cfff; 
    cursor: pointer;
    padding: -1px;
    font-family: 'Courier New', Courier, monospace; 
    background: #02040a; 
    box-shadow: 0 0 10px rgba(0, 207, 255, 0.2), inset 0 0 10px rgba(252, 142, 7, 0.2);
    resize: none; 
    outline: none;
    transition: 0.3s;
}

/*{
    width: 40vmin; 
    height: 20vmin;
    background: #02040a; 
    border: 1px solid #fc8e07;
    border-radius: 2px;
    color: #00cfff; 
    padding: 10px;
    font-family: 'Courier New', Courier, monospace; 
    box-shadow: 0 0 10px rgba(0, 207, 255, 0.2), inset 0 0 10px rgba(252, 142, 7, 0.2);
    resize: none; 
    outline: none;
    transition: 0.3s;
}*/


.input-text-industrial:focus {
    box-shadow: 0 0 15px #00cfff, inset 0 0 5px #fc8e07;
    border-color: #00cfff;
}

/* Icona PDF interna */
.btn-icon-container img {
    width: 85%;
    height: 85%;
    object-fit: contain;
    filter: drop-shadow(0 0 5px #00cfff);
    position: relative;
    z-index: 2;
}

/* --- STILI SPECIFICI LOGIN --- */
.login-card {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    padding: 40px;
    background: rgba(2, 4, 10, 0.9);
    border: 1px solid #fc8e07;
    text-align: center;
    z-index: 10;
}

.input-group { position: relative; margin-bottom: 50px; }
.input-group input {
    width: 100%; padding: 10px 0; background: transparent; border: none;
    border-bottom: 1px solid #eec147; color: white; outline: none;
}
.input-group label {
    position: absolute; top: 10px; left: 0; color: rgba(238, 193, 71, 0.5);
    transition: 0.3s; pointer-events: none; text-transform: uppercase; font-size: 12px;
}
.input-group input:focus ~ label, .input-group input:valid ~ label {
    top: -15px; color: #00cfff; font-size: 10px;
}
/* --- CALENDARIO INDUSTRIAL --- */

.calendar-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    height: 85%;
    background: rgba(2, 4, 10, 0.95);
    border: 1px solid #fc8e07;
    box-shadow: 0 0 15px rgba(0, 208, 255, 0.87);
    padding: 10px;
    overflow: auto; /* 🔥 questo è il punto chiave */
}

.calendar-table {
    border-collapse: collapse;
    font-size: 10px;
    color: #00cfff;
    width: max-content;   /* 🔥 importante */
    background-image: 
        linear-gradient(rgba(0, 208, 255, 0.925) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 208, 255, 0.932) 1px, transparent 1px);
}


/* colonne sinistra larghezza reale */
.calendar-table th:nth-child(1),
.calendar-table td:nth-child(1) { width: 70px; }

.calendar-table th:nth-child(2),
.calendar-table td:nth-child(2) { width: 140px; }

.calendar-table th:nth-child(3),
.calendar-table td:nth-child(3) { width: 140px; }

.calendar-table th:nth-child(4),
.calendar-table td:nth-child(4) { width: 180px; }

/* colonne sinistra fisse */

.calendar-table th:nth-child(1),
.calendar-table td:nth-child(1) {
    position: sticky;
    left: 0;
    background: #02040a;
    z-index: 3;
}

.calendar-table th:nth-child(2),
.calendar-table td:nth-child(2) {
    position: sticky;
    left: 70px;
    background: #02040a;
    z-index: 3;
}

.calendar-table th:nth-child(3),
.calendar-table td:nth-child(3) {
    position: sticky;
    left: 210px; /* 70 + 140 */
    background: #02040a;
    z-index: 3;
}

.calendar-table th:nth-child(4),
.calendar-table td:nth-child(4) {
    position: sticky;
    left: 350px; /* 70 + 140 + 140 */
    background: #02040a;
    z-index: 3;
    border-right: 3px solid #07d7fc;
    box-shadow: 6px 0 10px rgb(6, 175, 241);
}

.calendar-wrapper table {
    overflow: auto;
}


.calendar-table {
    border-collapse: collapse;
    font-size: 10px;
    color: #00cfff;
}

.calendar-table th {
    position: sticky;
    top: 0;
    background: #02040a;
    z-index: 5;
}

.calendar-table td {
    border: 1px solid rgba(0, 207, 255, 0.2);
    width: 14px;
    height: 14px;
    background: rgba(0, 0, 0, 0.6); /* 🔥 regolabile */
}

.calendar-table .cell-active {
    background: #fc8e07;
    box-shadow: inset 0 0 5px #cdcad3;
}

.calendar-table .cell-empty {
    background: transparent;
}

.calendar-title {
    position: sticky;
    top: 0;
    z-index: 10;

    background: #02040a;
    padding: 8px;

    color: #00cfff;
    text-align: center;
    text-transform: uppercase;

    border-bottom: 2px solid #fc8e07;
}

/* ===== HEADER INDUSTRIAL ===== */

.calendar-table th {
    color: #fc8e07;
    font-weight: bold;
    text-shadow: 0 0 5px rgb(252, 142, 7);
    border-right: 3px solid #fc7507;
    box-shadow: 6px 0 10px rgb(241, 92, 6);
}

/* mese (riga sopra) */
.calendar-table thead tr:first-child th {
    background: rgba(252, 142, 7, 0.938);
    border-bottom: 2px solid #fc8e07;
    font-size: 11px;

}

/* giorni */
.calendar-table thead tr:nth-child(2) th {
    background: rgba(0, 208, 255, 0.986);
}

/* ===== COLONNE SINISTRA ===== */

.calendar-table td:nth-child(-n+4) {
    color: #00cfff;
    text-align: left;
    padding-left: 5px;
    font-size: 10px;

}

/* effetto righe */
.calendar-table tbody tr:nth-child(even) td {
    background: rgb(47, 0, 255);
}

/* ===== CELLE CALENDARIO ===== */

.calendar-table td {
    transition: 0.15s;
}

/* stato originale */
.calendar-table td[style*="#fc8e07"] {
    box-shadow: inset 0 0 4px rgba(255, 150, 0, 0.8);
}

/* hover */
.calendar-table td:hover {
    outline: 1px solid #00cfff;
    box-shadow: 0 0 5px #00cfff;
}

/* selezione manuale */
.calendar-table td[style*="#00cfff"] {
    box-shadow: inset 0 0 6px #00cfff;
}

/* ===== BORDI PIÙ PULITI ===== */

.calendar-table td,
.calendar-table th {
    border: 1px solid rgba(0, 207, 255, 0.15);
}

/* separazione forte tra header e dati */
.calendar-table thead {
    border-bottom: 2px solid #fc8e07;
}

/* ===== HEADER INDUSTRIAL ===== */

.calendar-table th {
    color: #fc8e07;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(252, 142, 7, 0.6);
}

/* mese (riga sopra) */
.calendar-table thead tr:first-child th {
    background: rgba(252, 142, 7, 0.08);
    border-bottom: 2px solid #fc8e07;
    font-size: 11px;
}

/* giorni */
.calendar-table thead tr:nth-child(2) th {
    background: rgba(0, 207, 255, 0.05);
}

/* ===== COLONNE SINISTRA ===== */

.calendar-table td:nth-child(-n+4) {
    color: #00cfff;
    text-align: left;
    padding-left: 5px;
    font-size: 10px;
}

/* effetto righe */
.calendar-table tbody tr:nth-child(even) td {
    background: rgb(0, 7, 8);
}

/* ===== CELLE CALENDARIO ===== */

.calendar-table td {
    transition: 0.15s;
}

/* stato originale */
.calendar-table td[style*="#fc8e07"] {
    box-shadow: inset 0 0 4px rgba(255, 150, 0, 0.8);
}

/* hover */
.calendar-table td:hover {
    outline: 1px solid #00cfff;
    box-shadow: 0 0 5px #00cfff;
}

/* selezione manuale */
.calendar-table td[style*="#00cfff"] {
    box-shadow: inset 0 0 6px #00cfff;
}

/* ===== BORDI PIÙ PULITI ===== */

.calendar-table td,
.calendar-table th {
    border: 1px solid rgba(0, 207, 255, 0.15);
}

/* separazione forte tra header e dati */
.calendar-table thead {
    border-bottom: 2px solid #fc8e07;
}
.calendar-table thead th:nth-child(-n+4) {
    background: #02040a !important;
    color: #fc8e07;
    z-index: 6;
}
.month-separator {
    border-left: 2px solid #fc8e07 !important;
}
/* linea mese che scende */
.mese {
    border-left: 2px solid #fc8e07;
    position: relative;
}

/* estende la linea verso il basso */
.mese::after {
    content: "";
    position: absolute;
    left: 0;
    top: 100%;
    width: 2px;
    height: auto; /* 🔥 lungo abbastanza */
    background: #078efc;
    z-index: 2;
}
.calendar-table input {
    font-size: 10px;
    padding: 2px;
}

        body { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; background: #1a1a1a; color: #eee; font-family: sans-serif; margin: 0; }
        canvas { background: #2a2a2a; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); touch-action: none; }
        .info { margin-bottom: 15px; text-align: center; }
        button { margin-top: 20px; padding: 12px 25px; border-radius: 8px; border: none; background: #28a745; color: white; font-weight: bold; cursor: pointer; transition: 0.3s; }
        button:hover { background: #218838; }
