/* ========================================================
   STILI DI BASE PER IL SITO
======================================================== */

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background: url('fotohed.jpg') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    position: relative;
}

/* Overlay bianco semi-trasparente sull’immagine di sfondo */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.65);
    z-index: -1;
}

/* ========================================================
   HEADER FISSO IN ALTO CON BARRA GRADIENTE
======================================================== */

header {
    background: linear-gradient(to right, #1E3C72, #2A5298);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px 20px;
    color: white;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
}

/* Contenitore dell’header per info cliente a destra */
.header-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    padding: 10px;
    margin: 0 30px;
    color: white;
    position: relative;
    top: -10px;
}

/* Testo a destra in alto (cliente e numero licenza) */
.header-right {
    font-size: 10px;
    margin-right: 50px;
    color: white;
    text-align: right;
    font-weight: normal;
    line-height: 1.2;
}

/* ========================================================
   MENU DI NAVIGAZIONE INFERIORE DELL’HEADER
======================================================== */

nav ul {
    list-style: none;
    display: flex;
    gap: 8px;
    padding: 0;
    margin: 0;
    position: absolute;
    bottom: 10px;
    left: 50px;
    font-size: 13px;
    color: black;
}

nav ul li {
    position: relative;
}

/* Link principali */
nav ul li a {
    color: black;
    text-decoration: none;
    padding: 5px 10px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 4px;
    display: inline-block;
    transition: background 0.3s ease;
    text-align: left;
    white-space: nowrap;
    width: 130px;
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Dropdown su desktop */
nav ul li.dropdown {
    position: relative;
    cursor: pointer;
}

nav ul li.dropdown > a::after {
    content: " ▾";
    font-size: 12px;
    margin-left: 5px;
}

nav ul li.dropdown:hover > .dropdown-content {
    display: block;
}

/* Contenuto dropdown */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 140px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    overflow: hidden;
    z-index: 1001;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    font-size: 12px;
    padding: 8px 12px;
    background-color: white;
    color: black;
    border-bottom: 1px solid #eee;
    display: block;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: rgba(135, 206, 250, 0.6);
    color: black;
}

/* ========================================================
   SEZIONE PRINCIPALE / MAIN
======================================================== */

main {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

/* Contenitore centrale della pagina */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 1000px;
    width: 100%;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    height: 500px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Blocco interno alla container (benvenuto ecc.) */
.content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 90%;
}

/* ========================================================
   INFORMAZIONI UTENTE
======================================================== */

.user-info {
    color: white !important;
    font-weight: bold;
}

.user-info p {
    color: white !important;
    text-align: left;
}

/* ========================================================
   TESTI
======================================================== */

h2 {
    margin: 0;
    font-size: 2.5em;
    color: blue;
}

p {
    font-size: 1.2em;
    color: blue;
}

/* ========================================================
   AMMINISTRAZIONE
======================================================== */

body.amm_body {
    background-color: transparent;
    margin: 0;
    padding: 10px 15px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    color: black;
    height: auto;
    overflow: visible;
}

.content-wrapper {
    background-color: white;
    padding: 10px;
    border: 1px solid green;
    border-radius: 5px;
    height: auto;
    overflow: visible;
}

.amm_title {
    margin-top: 0;
    margin-bottom: 15px;
    color: green;
    font-weight: bold;
    font-size: 14px;
}

.amm_table {
    width: 100%;
    border-collapse: collapse;
    /* Rimosso display:block, max-height e overflow per far crescere la tabella in altezza */
}

.amm_th, .amm_td {
    border: 1px solid green;
    padding: 5px 8px;
    font-size: 12px;
}

.amm_th {
    background-color: #cce7ff;
    color: green;
    font-weight: bold;
}

.amm_td_left {
    text-align: left;
}

.amm_td_right {
    text-align: right;
}




/* ========================================================
   STILI PERSONALIZZATI PER .amse_ (all_sel)
======================================================== */

.amse_ {
    background-color: rgba(30, 60, 114, 0.8); /* blu intenso semi-trasparente */
    color: white;
    border: 2px solid #2A5298; /* blu barra header */
    border-radius: 6px;
    padding: 8px 15px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    text-decoration: none; /* per link */
    outline: none; /* toglie outline predefinito */
}

/* Stati hover e focus */
.amse_:hover,
.amse_:focus {
    background-color: #2A5298; /* blu barra header pieno */
    border-color: #1E3C72; /* blu più scuro */
    color: #B0D4FF; /* azzurro chiaro */
    outline: none; /* evita il bordo blu predefinito */
}

/* Stato active (selezionato) */
.amse_.active {
    background-color: #1E3C72; /* blu scuro */
    border-color: #154070; /* blu ancora più scuro */
    color: #e0e7ff; /* bianco/azzurro molto chiaro */
}

/* Stato disabilitato */
.amse_.disabled,
.amse_[disabled] {
    background-color: rgba(100, 100, 100, 0.4);
    border-color: rgba(150, 150, 150, 0.3);
    color: #ccc;
    cursor: not-allowed;
    pointer-events: none; /* disabilita click */
}

/* Se .amse_ è applicato direttamente a link, bottoni, input */
.amse_ /* classe base applicata */,

.amse_:is(a, button, input[type="button"], input[type="submit"]) {
    border: none;
    background: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
}


/* Mobile responsiveness per amse_ */
@media (max-width: 768px) {
    .amse_ {
        font-size: 16px;
        padding: 10px 20px;
        width: 100%;
        box-sizing: border-box;
    }
}




/* ========================================================
   MENU HAMBURGER PER DISPOSITIVI MOBILI
======================================================== */

.menu-toggle {
    display: none;
    background-color: transparent;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 1002;
}

/* ========================================================
   RESPONSIVE DESIGN - MOBILE
======================================================== */

@media (max-width: 768px) {
    .user-info {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #f1f1f1;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1001;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    nav ul.show {
        display: flex;
    }

    nav ul li {
        width: 100%;
        text-align: center;
    }

    nav ul li a {
        color: black;
        padding: 10px 15px;
        font-size: 14px;
        background-color: #fff;
        border-bottom: 1px solid #ddd;
        width: 100%;
        box-sizing: border-box;
    }

    nav ul li a:hover {
        background-color: #e0e0e0;
    }

    nav ul li.dropdown .dropdown-content {
        position: static;
        background-color: #fafafa;
        box-shadow: none;
        display: none;
        padding-left: 15px;
        border: none;
        width: 100%;
    }

    nav ul li.dropdown.open > .dropdown-content {
        display: block;
    }

    .dropdown-content a {
        font-size: 14px;
        padding: 10px 15px;
        background-color: #fff;
        border-bottom: 1px solid #ddd;
        color: black;
        width: 100%;
        box-sizing: border-box;
    }

    .dropdown-content a:hover {
        background-color: #ddd;
    }
}
