﻿/* ========================================================= */
/* ===================   TEMA OLIVE & GOLD   =============== */
/* ========================================================= */

/* ====== SFONDO GENERALE ====== */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #6B8E23, #556B2F);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ====== SFONDO SPECIFICO PER HOME (serve per la topbar) ====== */
body.home {
    display: block;
    height: auto;
}

/* ========================================================= */
/* ===================   CONTENITORI BASE   ================= */
/* ========================================================= */

.box-container {
    background: #FAFAF5;
    padding: 40px;
    border-radius: 12px;
    width: 350px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    animation: fadeIn 0.6s ease;
}

.box-large {
    width: 380px;
}

/* ====== LOGO ====== */
.box-container img {
    width: 90px;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInLogo 1s forwards;
}

/* ========================================================= */
/* ======================== ANIMAZIONI ====================== */
/* ========================================================= */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLogo {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}

/* ========================================================= */
/* ======================== TIPOGRAFIA ====================== */
/* ========================================================= */

.box-container h2 {
    margin-bottom: 20px;
    color: #556B2F;
}

/* ========================================================= */
/* ========================== INPUT ========================= */
/* ========================================================= */

.box-container input[type="text"],
.box-container input[type="password"],
.box-container input[type="email"],
.box-container input[type="tel"] {
    width: 90%;
    padding: 10px;
    margin: 8px 0;
    border-radius: 6px;
    border: 1px solid #B5C48C;
    transition: 0.2s;
    background: #FFFFFF;
}

.box-container input:focus {
    border-color: #D4A017;
    box-shadow: 0 0 6px rgba(212,160,23,0.5);
}

.input-error {
    border: 2px solid #B22222 !important;
    background: #FFF5F5;
}

/* ========================================================= */
/* ========================== BOTTONI ======================= */
/* ========================================================= */

.btn {
    width: 100%;
    padding: 12px;
    background: #D4A017;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 15px;
    font-size: 16px;
    transition: 0.2s;
}

.btn:hover {
    background: #B88912;
}

/* ========================================================= */
/* =========================== LINK ========================= */
/* ========================================================= */

.box-container a {
    display: block;
    margin-top: 15px;
    color: #556B2F;
    text-decoration: none;
}

.box-container a:hover {
    text-decoration: underline;
}

/* ========================================================= */
/* ===================== MESSAGGI ERRORE ==================== */
/* ========================================================= */

.error {
    color: #B22222;
    margin-top: 20px;
    font-size: 14px;
    display: block;
}

/* ========================================================= */
/* ===================== FRASE MANUTENZIONE ================= */
/* ========================================================= */

.maintenance {
    margin-top: 25px;
    font-size: 13px;
    color: #666;
    opacity: 0;
    animation: fadeIn 1.2s ease forwards;
}

/* ========================================================= */
/* ========================= HOME PAGE ====================== */
/* ========================================================= */

/* ====== TOP BAR ====== */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #556B2F;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    z-index: 1000;
}
/* ====== Check Button ====== */
 .checkboxGrande {
        font-size: 22px;
        margin: 15px;
    }

    .checkboxGrande input[type=checkbox] {
        width: 25px;
        height: 25px;
        vertical-align: middle;
        margin-right: 10px;
    }


/* ====== ADMIN BUTTON ====== */
.admin-top-btn {
    background: #D4A017;
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    text-decoration: none;
    transition: 0.2s;
}

.admin-top-btn:hover {
    background: #B88912;
}

/* ====== INFO UTENTE (sinistra) ====== */
.topbar-left {
    font-size: 18px;
    font-weight: bold;
}

/* ====== ULTIMO ACCESSO (sotto nome utente) ====== */
.lastlogin {
    display: block;
    margin-top: 3px;
    font-size: 13px;
    color: #DDDDDD;
    opacity: 0.9;
}

/* ====== LOGOUT (destra) ====== */
.logout-link {
    color: #D4A017;
    font-weight: bold;
    text-decoration: none;
    transition: 0.2s;
    width : 30px;
    padding:  8px 15px;
    border-radius: 6px;
    margin-right: 40px;
}

.logout-link:hover {
    background: rgba(255,255,255,0.15);
    color: #F1C84A;
}

/* ====== CONTENUTO CENTRALE HOME ====== */
.home-container {
    margin: 120px auto 40px auto; /* auto ai lati = centrato */
    background: #FAFAF5;
    padding: 40px;
    border-radius: 12px;
    width: 450px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    animation: fadeIn 0.6s ease;
}

/* ====== LABEL INFO ====== */
.info-label {
    display: block;
    margin-bottom: 10px;
    color: #556B2F;
    font-size: 16px;
}

/* ====== INFO RAM ====== */
.ram-info {
    display: block;
    margin: 20px 0;
    color: #6B8E23;
    font-weight: bold;
}

/* ====== BOTTONI HOME ====== */
.home-links .home-btn {
    display: inline-block;
    padding: 12px 20px;
    background: #D4A017;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 16px;
    transition: 0.2s;
}

.home-links .home-btn:hover {
    background: #B88912;
}



/* ====== POPUP MODALE ====== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.popup-box {
    background: #FAFAF5;
    padding: 30px;
    border-radius: 12px;
    width: 350px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    animation: fadeIn 0.4s ease;
}

.popup-text {
    font-size: 16px;
    color: #333;
}


/* ====== POPUP ICON ====== */
.popup-icon {
    font-size: 48px;
    margin-bottom: 10px;
    font-weight: bold;
}

/* Successo */
.popup-success {
    color: #2E8B57; /* verde */
}

/* Errore */
.popup-error {
    color: #B22222; /* rosso */
}



.grid {
    width:100%;
    border-collapse:collapse;
    margin-top:20px;
}


.grid th {
    padding:12px 15px;
    text-align:center;
    font-size:15px;
}


.grid td {
    padding:12px 15px;
    text-align:center;
    vertical-align:middle;
}


.grid tr {
    height:45px;
}


.barra-ricerca {
    display:flex;
    align-items:center;
    gap:12px;
    width:100%;
    margin-bottom:25px;
}


.input-ricerca {
    flex:1;
    height:42px;
    padding:0 15px;
    font-size:16px;
    border:1px solid #aaa;
    border-radius:6px;
    box-sizing:border-box;
}


.btn-ricerca {
    height:42px;
    width:120px;
    font-size:16px;
    border-radius:6px;
    cursor:pointer;
}


.titolo-sito {

    margin-top:15px;
    margin-bottom:25px;

    font-family: Georgia, "Times New Roman", serif;

    font-size:30px;

    color:#2f5e2f;

    font-weight:bold;

    text-align:center;

    letter-spacing:2px;

    text-shadow:1px 1px 2px #cccccc;

}