﻿/* ===== Intestazione già definita (estratto essenziale) ===== */
/* styles-header.css */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #dddddd;
    padding: 20px 0;
}

.header-inner {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-space: space-between;
}

.logo img {
    max-height: 60px;
    width: auto;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav li {
    margin-left: 30px;
}

.main-nav a {
    text-decoration: none;
    color: #333333;
    font-weight: 500;
}

    .main-nav a:hover {
        color: #007acc;
    }

@media (max-width: 768px) {
    .main-nav ul {
        display: none; /* oppure trasformalo in menu a tendina */
    }
}

/* styles-footer.css */
.site-footer {
    background-color: #f8f8f8;
    padding: 40px 0 20px;
    color: #666666;
    border-top: 1px solid #dddddd;
}

.footer-inner {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    align-items: center;
    justify-space: space-between;
    margin-bottom: 20px;
}

.footer-logo img {
    max-height: 40px;
    width: auto;
}

.footer-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.footer-nav li {
    margin-left: 20px;
}

.footer-nav a {
    text-decoration: none;
    color: #666666;
}

    .footer-nav a:hover {
        color: #333333;
    }

.footer-bottom {
    text-align: center;
    font-size: 14px;
}


    .header.gold {
        background: linear-gradient(90deg,#FFD700,#DAA520,#FFD700);
    }

    .header.green {
        background: linear-gradient(90deg,#006400,#228B22,#32CD32);
    }

    .header.blue {
        background: linear-gradient(90deg,#001f4d,#004080,#3399ff);
    }

    .header h1 {
        margin: 0;
        padding: 10px 0;
        font-size: 2.6rem;
    }

.login-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.login-icon {
    width: 36px;
    height: 36px;
    fill: #fff;
    transition: transform .2s, fill .2s;
}

.login-link:hover .login-icon {
    fill: #f0f0f0;
    transform: scale(1.1);
}

@media (max-width:992px) {
    .header h1 {
        font-size: 2.2rem;
    }

    .login-icon {
        width: 32px;
        height: 32px;
    }
}

@media (max-width:576px) {
    .header h1 {
        font-size: 1.4rem;
    }

    .login-icon {
        width: 28px;
        height: 28px;
    }
}

/* ===== MENU ===== */
.menu {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* allineato a sinistra */
    gap: 20px;
    padding: 6px 12px;
    font-family: "Segoe UI",Arial,sans-serif;
    color: #fff;
}
    /* varianti più scure dell’intestazione */
    .menu.gold {
        background: linear-gradient(90deg,#B8860B,#8B7500,#B8860B);
    }

    .menu.green {
        background: linear-gradient(90deg,#014a01,#0c5c0c,#106e10);
    }

    .menu.blue {
        background: linear-gradient(90deg,#001238,#00215c,#00388f);
    }

    .menu a {
        color: #fff;
        text-decoration: none;
        font-weight: 500;
        font-size: 1.1rem;
        padding: 4px 10px;
        border-radius: 4px;
        transition: background .25s, transform .2s;
    }

        .menu a:hover {
            background: rgba(255,255,255,.15);
            transform: translateY(-2px);
        }

/* toggle hamburger (mobile) */
.menu-toggle {
    display: none;
}
/* checkbox nascosto */
.menu-btn {
    display: none;
    cursor: pointer;
    margin-right: 4px;
    padding: 4px;
    border-radius: 6px;
    transition: background .25s, transform .2s;
}

    .menu-btn:hover {
        background: rgba(255,255,255,.12);
        transform: scale(1.05);
    }

.hamburger {
    width: 28px;
    height: 28px;
    fill: #fff;
}

/* contenitore link */
.menu-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ---- comportamento responsive ---- */
@media (max-width:768px) {
    /* su tablet piccolo/smartphone: mostra il bottone, nascondi i link finché chiuso */
    .menu-btn {
        display: flex;
        align-items: center;
    }

    .menu {
        gap: 12px;
    }

    .menu-links {
        display: none;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    /* quando il checkbox è attivo, mostra il menu a tendina */
    .menu-toggle:checked + .menu-btn + .menu-links {
        display: flex;
    }

    .menu a {
        padding: 8px 12px;
        font-size: 1rem;
        background: rgba(255,255,255,.08);
        border-radius: 6px;
    }
}

/* smartphone molto piccoli */
@media (max-width:480px) {
    .hamburger {
        width: 26px;
        height: 26px;
    }

    .menu {
        padding: 6px 10px;
    }
}
/* Barra lingue */
.langbar {
    display: flex;
    justify-content: flex-end; /* icone a destra */
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
}

    .langbar.gold {
        background: linear-gradient(90deg,#8B7500,#705900,#8B7500);
    }

    .langbar.green {
        background: linear-gradient(90deg,#003300,#004400,#003300);
    }

    .langbar.blue {
        background: linear-gradient(90deg,#00091a,#001f3d,#00091a);
    }

/* Link lingua (icone bandiera) */
.lang-links a img {
    width: 28px;
    height: 20px;
    border: 1px solid #fff;
    border-radius: 3px;
    transition: transform 0.2s, box-shadow 0.2s;
}

    .lang-links a img:hover {
        transform: scale(1.1);
        box-shadow: 0 0 4px rgba(255,255,255,0.6);
    }

/* toggle lingua (smartphone) */
.lang-toggle {
    display: none;
}

.lang-btn {
    display: none; /* mostrato solo su mobile */
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
}

.globe {
    width: 28px;
    height: 28px;
    stroke: white;
    transition: transform 0.2s;
}

.lang-btn:hover .globe {
    transform: scale(1.1);
}

/* comportamento responsive */
@media (max-width: 768px) {
    /* su smartphone: mostra pulsante globicino, nascondi le icone finché chiuso */
    .lang-btn {
        display: flex;
        align-items: center;
    }

    .lang-links {
        display: none;
        flex-direction: column;
        gap: 6px;
        align-items: flex-end;
    }

    .lang-toggle:checked + .lang-btn + .lang-links {
        display: flex;
    }

    .lang-links a img {
        width: 36px;
        height: 24px;
    }
    /* un po’ più grandi su mobile */
}
/* contenitore login */
.login-wrap {
    max-width: 360px;
    margin: 60px auto;
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

    /* titolo */
    .login-wrap h2 {
        margin: 0 0 16px 0;
        font-weight: 700;
        color: #223;
    }

    /* etichette */
    .login-wrap label {
        display: block;
        margin: 10px 0 6px;
        color: #334;
        font-size: 0.95rem;
    }

/* textbox */
.input-box {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccd;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
}

/* azioni: remember + bottone */
.actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
}

/* bottone */
.btn {
    background: #004080;
    color: #fff;
    border: 0;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.25s, transform 0.2s;
}

    .btn:hover {
        background: #0055aa;
        transform: translateY(-2px);
    }

/* messaggio errore */
.msg {
    color: #b00020;
    margin-top: 10px;
    min-height: 18px;
}

/* responsive */
@media (max-width: 480px) {
    .login-wrap {
        margin: 30px 12px;
        padding: 18px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
/* Contenitore principale */
.admin-wrap {
    max-width: 900px;
    margin: 40px auto;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    font-family: "Segoe UI", Arial, sans-serif;
}

    /* Titoli */
    .admin-wrap h2 {
        margin-top: 0;
        color: #223;
        font-size: 1.6rem;
        font-weight: 700;
        border-bottom: 2px solid #eee;
        padding-bottom: 8px;
        margin-bottom: 20px;
    }

/* GridView */
.grid {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

    .grid th, .grid td {
        padding: 10px 12px;
        border: 1px solid #ddd;
        text-align: left;
    }

    .grid th {
        background: #004080;
        color: #fff;
        font-weight: 600;
        font-size: 0.95rem;
    }

    .grid tr:nth-child(even) {
        background: #f9f9f9;
    }

    .grid tr:hover {
        background: #f1f7ff;
    }

    /* Bottoni default GridView */
    .grid a, .grid input[type=submit], .grid input[type=button] {
        background: #004080;
        color: #fff;
        text-decoration: none;
        padding: 6px 12px;
        border-radius: 6px;
        display: inline-block;
        font-size: 0.9rem;
        transition: background 0.2s, transform 0.2s;
        border: none;
        cursor: pointer;
    }

        .grid a:hover, .grid input[type=submit]:hover {
            background: #0055aa;
            transform: translateY(-2px);
        }

/* Form input */
label {
    display: block;
    margin: 10px 0 6px;
    font-size: 0.95rem;
    color: #334;
}

.input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccd;
    border-radius: 8px;
    font-size: 0.95rem;
    box-sizing: border-box;
    margin-bottom: 10px;
}

/* Pulsante generale */
.btn {
    background: #004080;
    color: #fff;
    border: 0;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.25s, transform 0.2s;
}

    .btn:hover {
        background: #0055aa;
        transform: translateY(-2px);
    }

/* Messaggi */
.success {
    color: #2e7d32;
    font-weight: 600;
    margin-top: 10px;
}

.error {
    color: #b00020;
    font-weight: 600;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-wrap {
        padding: 16px;
        margin: 20px;
    }

    .grid th, .grid td {
        font-size: 0.85rem;
        padding: 8px;
    }

    .btn {
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, #2e7d32, #43a047);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.25s, transform 0.2s;
}

    .btn-icon:hover {
        background: linear-gradient(90deg, #388e3c, #4caf50);
        transform: translateY(-2px);
    }

    .btn-icon svg {
        width: 20px;
        height: 20px;
        fill: #fff;
    }
/* Sezione */
.dash-section {
    margin: 24px auto;
    max-width: 1200px;
    padding: 0 16px;
    font-family: "Segoe UI", Arial, sans-serif;
}

.dash-title {
    margin: 0 0 12px 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #223;
}

/* Contenitore card – orizzontale su desktop, con scroll se >3 */
.dash-cards {
    display: flex;
    gap: 16px;
    overflow-x: auto; /* abilita lo scroll orizzontale */
    padding-bottom: 8px; /* spazio per non tagliare l’ombra */
    scroll-snap-type: x proximity; /* scorrimento fluido */
}

/* Card link */
.dash-card {
    position: relative;
    flex: 0 0 calc((100% - 32px) / 3); /* 3 card in vista su desktop */
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    scroll-snap-align: start;
    box-shadow: 0 10px 24px rgba(0,0,0,.12);
    transition: transform .18s ease, box-shadow .18s ease;
}

    .dash-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 16px 32px rgba(0,0,0,.16);
    }

    /* Immagine */
    .dash-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        filter: saturate(1.05) contrast(1.02);
    }

/* Titolo bianco con rilievo */
.dash-card__title {
    position: absolute;
    left: 14px;
    bottom: 12px;
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: .2px;
    /* rilievo/emboss: ombra scura + lieve luce superiore */
    text-shadow: 0 3px 6px rgba(0,0,0,.45), 0 1px 0 rgba(255,255,255,.28);
    /* leggero sfondo per leggibilità, senza coprire troppo */
    background: linear-gradient(180deg, rgba(0,0,0,.22), rgba(0,0,0,.45));
    padding: 6px 10px;
    border-radius: 10px;
    backdrop-filter: blur(1px);
}

/* Tablet: card un po’ più larghe */
@media (max-width: 992px) {
    .dash-card {
        flex: 0 0 calc((100% - 16px) / 2);
    }
    /* ~2 per riga visibili */
    .dash-card__title {
        font-size: 1.05rem;
    }
}

/* Smartphone: impila in verticale (niente scroll orizzontale) */
@media (max-width: 576px) {
    .dash-cards {
        flex-direction: column; /* verticale */
        overflow-x: visible; /* disattiva scroll orizzontale */
    }

    .dash-card {
        flex: 1 1 auto;
        width: 100%;
    }

    .dash-card__title {
        font-size: 1rem;
    }
}
/*table.adempimenti {
    border-collapse: collapse;
    width: 100%;
}

    table.adempimenti th, table.adempimenti td {
        border: 1px solid #ccc;
        text-align: center;
        padding: 5px;
    }

    table.adempimenti th {
        background-color: #f0f0f0;
    }*/

/* Tabella adempimenti: look di base */
table.adempimenti {
    border-collapse: collapse;
    width: 100%;
}

table.adempimenti th,
table.adempimenti td {
    border: 1px solid #ddd;
    padding: 6px;
    text-align: center;
    vertical-align: middle;
    background: #fff;
}

    /* Intestazioni verticali */
    table.adempimenti th.th-vert {
        width: 36px; /* colonna stretta */
        height: 220px; /* spazio verticale sufficiente */
        padding: 0;
        white-space: nowrap;
        position: relative;
    }

/* Contenitore ruotato: scrittura verticale dal basso verso l’alto */
.vh {
    writing-mode: vertical-rl; /* testo verticale (top-to-bottom right-to-left) */
    transform: rotate(180deg); /* inverti per ottenere bottom-to-top */
    display: inline-block;
    line-height: 1.1;
    user-select: none;
}

    .vh span {
        display: inline-block;
    }

    .vh .t {
        font-weight: 600;
    }

    .vh .m {
        opacity: .8;
    }

/* ===== TABELLONE DITTE ===== */
table.ditte {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

    table.ditte th,
    table.ditte td {
        border: 1px solid #ddd;
        padding: 10px 12px;
        text-align: left;
        vertical-align: top;
    }

    table.ditte th {
        background: #004080;
        color: #fff;
        font-weight: 600;
        font-size: 1rem;
    }

    table.ditte td a {
        display: inline-block;
        margin: 2px 0;
        color: #004080;
        text-decoration: none;
        font-weight: 500;
    }

        table.ditte td a:hover {
            text-decoration: underline;
        }

    /* Bottoni mese */
    table.ditte td button {
        display: block;
        width: 100%;
        margin: 2px 0;
        padding: 6px 10px;
        font-size: 0.9rem;
        border: none;
        border-radius: 6px;
        background: #1976d2;
        color: #fff;
        cursor: pointer;
        transition: background .2s, transform .2s;
    }

        table.ditte td button:hover {
            background: #1565c0;
            transform: translateY(-1px);
        }

    /* Checkbox annuali */
    table.ditte td input[type=checkbox] {
        transform: scale(1.2);
        margin: 6px 0;
    }

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    table.ditte th, table.ditte td {
        font-size: 0.9rem;
        padding: 8px;
    }
}

@media (max-width: 768px) {
    /* Trasforma la tabella in card */
    table.ditte, table.ditte thead, table.ditte tbody, table.ditte th, table.ditte td, table.ditte tr {
        display: block;
        width: 100%;
    }

        table.ditte thead {
            display: none; /* nascondi intestazioni classiche */
        }

        table.ditte tr {
            margin-bottom: 16px;
            border: 1px solid #ddd;
            border-radius: 8px;
            box-shadow: 0 2px 6px rgba(0,0,0,0.08);
            padding: 10px;
        }

        table.ditte td {
            border: none;
            padding: 6px 0;
        }

            table.ditte td:before {
                content: attr(data-label);
                font-weight: 600;
                display: block;
                margin-bottom: 4px;
                color: #004080;
            }
}
.chk-inline {
    display: inline-block;
    margin-left: 12px;
}
.collapsible {
    background-color: #f1f1f1;
    cursor: pointer;
    padding: 6px;
    border: none;
    text-align: left;
    outline: none;
    width: 100%;
}

    .collapsible:after {
        content: '▼';
        float: right;
    }

.active:after {
    content: '▲';
}

.content-collapsible {
    display: none;
    padding: 5px 10px;
    border: 1px solid #ddd;
    background: #fff;
}
.accordion {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.accordion-header {
    background: #f7f7f7;
    cursor: pointer;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .accordion-header:hover {
        background: #eaeaea;
    }

    .accordion-header .icon {
        transition: transform 0.3s ease;
    }

    .accordion-header.active .icon {
        transform: rotate(180deg);
    }

.accordion-content {
    display: none;
    padding: 12px 16px;
    background: #fff;
}

    .accordion-content a {
        display: block;
        margin: 4px 0;
        text-decoration: none;
        color: #007bff;
        font-size: 14px;
    }

        .accordion-content a:hover {
            text-decoration: underline;
        }

    .accordion-content i {
        margin-right: 6px;
        color: #666;
    }
body {
    font-family: "Manrope", sans-serif;
    margin: 0;
    color: #111;
}

/* HEADER */
.sr-header {
    position: sticky;
    top: 0;
    background: #fff;
    border-bottom: 1px solid #eee;
    z-index: 1000;
}

.sr-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sr-logo img {
    width: 110px;
    height: auto;
}

.sr-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.sr-nav a {
    text-decoration: none;
    color: #111;
    padding: 10px 15px;
    font-weight: 500;
}

    .sr-nav a:hover {
        text-decoration: underline;
    }

.sr-menu > li {
    position: relative;
}

.sr-menu .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    min-width: 220px;
    z-index: 1000;
}

    .sr-menu .submenu li a {
        display: block;
        padding: 10px 15px;
        white-space: nowrap;
    }

.sr-menu li:hover > .submenu {
    display: block;
}

/* MOBILE MENU */
.sr-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
}

@media (max-width: 800px) {
    .sr-nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #fff;
        border-top: 1px solid #ddd;
    }

        .sr-nav ul.open {
            display: flex;
        }

    .sr-nav-toggle {
        display: block;
    }
}

/* FOOTER */
.sr-footer {
    background: #fafafa;
    border-top: 1px solid #ddd;
    padding: 50px 30px 20px;
    color: #555;
}

.sr-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.sr-footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.sr-footer-logo img {
    width: 100px;
    height: auto;
}

.sr-footer-info h2 {
    font-weight: 700;
    margin: 0;
}

.sr-footer-info p {
    margin: 5px 0 0;
}

.sr-footer-bottom {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    font-size: 0.9em;
}

    .sr-footer-bottom a {
        color: #111;
    }
