﻿/* ===========================
ROOT & BASE
=========================== */

:root {
    --primary-color: #1f4ed8;
    --primary-hover: #173bb3;
    --background-light: #f4f6fb;
    --text-main: #222;
    --border-light: #e5e7eb;
}

body {
    margin: 0;
    background-color: var(--background-light);
    color: var(--text-main);
    font-family: "Segoe UI", Tahoma, sans-serif;
}

/* ===========================
HEADER SUPERIORE (bianco)
=========================== */

.top-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 75px;
}

.logo-area {
    display: flex;
    align-items: center;
}

.logo {
    height: 45px;
    width: auto;
}

.site-title {
    margin-left: 20px;
    font-size: 22px;
    font-weight: 600;
    color: #333;
}

/* Logo grande opzionale */
.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

    .logo-container img {
        width: 50%;
        max-width: 400px;
        min-width: 150px;
        height: auto;
    }

@media (max-width: 768px) {
    .logo-container img {
        width: 70%;
        max-width: 300px;
    }
}

/* ===========================
NAVBAR NERA + MENU
=========================== */

.navbar {
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* allinea a sinistra */
    gap: 18px; /* spazio tra toggle/logo/menu */
    padding: 10px 20px;
}

    .navbar .logo {
        height: 50px;
    }

.menu-toggle {
    display: none;
    font-size: 26px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
}

/* Menu orizzontale (desktop) */
.navbar .menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* voci affiancate */
    flex-direction: row;
    gap: 20px;
    align-items: center;
    justify-content: flex-start; /* allineamento a sinistra */
}

    /* Link voci top-level */
    .navbar .menu li a {
        color: #fff; /* testo bianco su barra nera */
        text-decoration: none;
        padding: 8px 0;
        display: block;
    }

        /* Hover top-level */
        .navbar .menu li a:hover {
            text-decoration: underline;
        }

    /* Area clic comoda + base per dropdown */
    .navbar .menu > li {
        position: relative; /* per posizionare .submenu assoluto */
        list-style: none;
    }

        .navbar .menu > li > a {
            padding: 8px 12px;
            border-radius: 6px;
        }

            .navbar .menu > li > a:hover {
                background: rgba(255,255,255,0.15);
                text-decoration: none;
            }

/* ===========================
SUBMENU (DROPDOWN)
=========================== */

.menu-item {
    position: relative;
}

/* Pannello dropdown: indent, contrasto e animazione */
.submenu {
    display: block; /* renderizzato, ma “nascosto” via opacity */
    position: absolute;
    top: 100%; /* distanza verticale originale */
    left: 28px; /* indent più a destra */
    min-width: 220px;
    /* ✓ tinta più delicata */
    background: #fafcff;
    /* bordo leggero */
    border: 1px solid #e9ecf5;
    /* OMBRA HARD multilivello */
    box-shadow: 0 12px 28px rgba(0,0,0,0.28), /* profonda */
    0 6px 12px rgba(0,0,0,0.18), /* media */
    0 2px 4px rgba(0,0,0,0.12); /* corta */
    /* bordi più netti */
    border-radius: 4px;
    padding: 10px 0;
    list-style: none;
    z-index: 1002;
    color: #333;
    /* Fade-in elegante */
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.18s ease-out, transform 0.18s ease-out;
    pointer-events: none; /* evita click quando invisibile */
}

/* Mostra il dropdown all'hover (desktop) con fade-in */
.menu-item:hover .submenu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Forza colore scuro nel submenu (vince su .navbar .menu li a) */
.navbar .menu .submenu li a {
    display: block;
    padding: 8px 20px;
    color: #333 !important;
    text-decoration: none;
}

    /* Hover delicato sul tint */
    .navbar .menu .submenu li a:hover {
        background: #f1f5ff;
        color: #000 !important;
    }

/* Divider armonizzato con il nuovo sfondo */
.submenu-divider {
    height: 1px;
    background: #e9ecf5;
    margin: 8px 0;
}

/* ===========================
CONTENUTO
=========================== */

.body-content {
    padding-top: 30px;
}

/* Contenitore centrato con larghezza massima */
.container {
    max-width: 1200px; /* puoi provare 1100 / 1140 / 1280 */
    margin: 0 auto; /* centra orizzontalmente */
    padding: 0 40px; /* respiro ai lati */
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px; /* riduci margini su mobile */
    }
}

/* ===========================
CARDS
=========================== */

.cards {max-width:1200px; margin:40px auto 0px auto;}
.cards2 {
    max-width: 800px;
    margin: 40px auto 0px auto;
}
.card {width:22%; margin:0 1.5%; float:left; background-color:#fff;min-height:570px; border-radius: 5px}
.card3 {width: 22%;margin: 0 1.5%;float: left;background-color: #fff;min-height: 500px;border-radius: 5px}
.card h3 {display: none;}
.card_cover_servizio {width: 100%;height: 150px;background-image: url(../images/rapporto.jpg);background-size: cover; -o-background-size: cover;-moz-background-size: cover;background-position: center center;}
.card_cover_postazione {width: 100%;height: 150px;background-image: url(../images/postazione.jpg);background-size: cover;-o-background-size: cover;-moz-background-size: cover;background-position: center top;}
.card_cover_parti {width: 100%;height: 150px;background-image: url(../images/adunanze.jpg);background-size: cover;-o-background-size: cover;-moz-background-size: cover;background-position: center center;}
.card_cover_dati{width: 100%;height: 150px;background-image: url(../images/logoico.png);background-size: cover;background-size: cover;-moz-background-size: cover;background-position: center center;}
.card_cover_ProgCom{width: 100%;height: 150px;background-image: url(../images/servizio/ComProg.jpg);background-size: cover;-o-background-size: cover;-moz-background-size: cover;background-position: center center;}
.card_cover_Orat{width: 100%;height: 250px;background-image: url(../images/logorat.png);background-size: cover;background-position: center center;}
.card_cover_Cong{width: 100%;height: 250px;background-image: url(../images/logocong.png);background-size: cover;background-position: center center;}
.card_cover_VediInd {
    width: 100%;
    height: 250px;
    background-image: url(../images/VedInd.jpg);
    background-size: cover;
    background-position: center center;
}

.card_cover_NewInd {
    width: 100%;
    height: 250px;
    background-image: url(../images/NewInd.jpg);
    background-size: cover;
    background-position: center center;
}

.card_cover_DataOraCom{width: 100%;height: 150px;background-image: url(../images/servizio/ComData.jpg);background-size: cover;-o-background-size: cover;-moz-background-size: cover;background-position: center center;}
.card_cover_CondCom{width: 100%;height: 150px;background-image: url(../images/servizio/ComCond.jpg);background-size: cover;-o-background-size: cover;-moz-background-size: cover;background-position: center center;}
.card_cover_MateCom{width: 100%;height: 150px;background-image: url(../images/servizio/ComMat.jpg);background-size: cover;-o-background-size: cover;-moz-background-size: cover;background-position: center center;}
.card_cover_Impostaz{width: 100%;height: 150px;background-image: url(../images/servizio/ComImpo2.jpg);background-size: cover;-o-background-size: cover;-moz-background-size: cover;background-position: center center;}
.card_copy {padding: 5px 20px;min-height: 220px}
.card_copy h2 {margin: 10px 0; font-weight: 600;}
.card_copy p{font-size:16px;}
.card_button_container{width:100%; margin-top:-15px}
.card_button_container3 {width: 100%; margin-top: -5px}
.card_button{margin:20px 30px}
.card_button a {border-radius: 3px;display: block;background-color: #4a6da7;font-size: 20px;padding: 10px 20px;margin: 5px auto;color: #fff;text-align:center;}
.card_button a:hover {background-color: #10264b;color: #fff;box-shadow: 1px 1px 4px #808080,-1px -1px 4px #808080,-1px 1px 4px #808080,1px -1px 4px #808080;}
.card_button3{margin: 10px 10px}
.card_button3 a {
    border-radius: 3px;
    display: block;
    background-color: #4a6da7;
    font-size: 20px;
    padding: 10px 20px;
    margin: 5px auto;
    color: #fff;
    text-align: center;
}

    .card_button3 a:hover {
        background-color: #10264b;
        color: #fff;
        box-shadow: 1px 1px 4px #808080,-1px -1px 4px #808080,-1px 1px 4px #808080,1px -1px 4px #808080;
    }


.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin: 40px 0;
}

.cardNew {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 25px 20px;
    flex: 1 1 250px;
    max-width: 300px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.3s ease;
    cursor: pointer;
}

    .cardNew:hover {
        transform: translateY(-8px) scale(1.03);
        box-shadow: 0 12px 20px rgba(0,0,0,0.2);
        background-color: #f9f9f9;
    }

    .cardNew h3 {
        margin-bottom: 15px;
        font-size: 18px;
        color: #333333;
    }

    .cardNew p {
        color: #555;
        font-size: 14px;
        line-height: 1.5;
    }

    .cardNew a.button {
        display: inline-block;
        margin-top: 15px;
        padding: 10px 20px;
        background-color: #0078D7;
        color: #fff;
        border-radius: 6px;
        text-decoration: none;
        transition: background-color 0.3s ease, transform 0.3s ease;
    }

        .cardNew a.button:hover {
            background-color: #005a9e;
            transform: scale(1.05);
        }

@media (max-width: 992px) {
    .cardNew {
        flex: 1 1 45%;
        max-width: 45%;
    }
}

@media (max-width: 600px) {
    .cardNew {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* ===========================
POLICY CARDS
=========================== */

.policy-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
}

.policy-card {
    background-color: #f4f4f4;
    border-left: 5px solid #0078D7;
    border-radius: 8px;
    padding: 20px 25px;
    flex: 1 1 250px;
    max-width: 320px;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

    .policy-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 10px rgba(0,0,0,0.12);
    }

    .policy-card h4 {
        margin-bottom: 10px;
        font-size: 16px;
        color: #333;
    }

    .policy-card p {
        color: #555;
        font-size: 14px;
        line-height: 1.5;
    }

    .policy-card a.button {
        display: inline-block;
        margin-top: 10px;
        padding: 8px 16px;
        background-color: #0078D7;
        color: #ffffff;
        border-radius: 5px;
        text-decoration: none;
        font-size: 13px;
        transition: background-color 0.3s ease;
    }

        .policy-card a.button:hover {
            background-color: #005a9e;
        }

@media (max-width: 992px) {
    .policy-card {
        flex: 1 1 45%;
        max-width: 45%;
    }
}

@media (max-width: 600px) {
    .policy-card {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* ===========================
RESPONSIVE MENU
=========================== */

@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: block; /* hamburger su mobile */
        order: 1; /* a sinistra, per primo */
    }

    .navbar .menu {
        order: 2; /* menu dopo il toggle */
        width: 100%;
        display: none; /* nascosto finché non è .active */
        flex-direction: column;
        align-items: flex-start; /* voci allineate a sinistra */
        gap: 10px;
        margin-top: 10px;
    }

        .navbar .menu.active {
            display: flex;
        }
}

/* ===========================
LOGIN BOX
=========================== */

.login-box {
    max-width: 420px;
    margin: 40px auto;
    padding: 30px 32px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,.08);
}

    .login-box h2 {
        text-align: center;
        font-size: 22px;
        margin-bottom: 25px;
    }

    .login-box input[type="text"],
    .login-box input[type="password"] {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #ccc;
        border-radius: 6px;
        margin: 6px 0 16px 0;
        font-size: 15px;
    }

    .login-box .login-button {
        width: 100%;
        padding: 12px;
        background: #0078d4;
        color: #fff;
        border: none;
        border-radius: 6px;
        font-size: 16px;
        cursor: pointer;
    }

        .login-box .login-button:hover {
            background: #0062b0;
        }

/* ===========================
INPUT ICON WRAPPER
=========================== */

.input-icon {
    position: relative;
}

.icon-left {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    pointer-events: none;
    width: 18px;
    height: 18px;
}

.icon-right {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.4;
    box-sizing: border-box;
    outline: none;
    transition: box-shadow .15s ease, border-color .15s ease;
}

    .form-input.with-icon-left {
        padding-left: 44px;
    }

    .form-input.with-icon-right {
        padding-right: 44px;
    }

    .form-input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(31,78,216,.15);
    }

.form-row {
    margin-bottom: 18px;
}

/* === Icone e input: padding AUTO se dentro .input-icon === */

/* Altezza/line-height coerente per evitare sovrapposizioni verticali */
.form-input {
    height: 40px; /* coerente con padding e icone */
    line-height: 1.2;
}

/* Se c'è un'icona a sinistra nel wrapper, aggiungi padding-left automaticamente */
.input-icon .icon-left + .form-input,
.input-icon .icon-left ~ input.form-input,
.input-icon svg.icon-left + .form-input {
    padding-left: 44px; /* spazio per l’icona sinistra */
}

/* Se c'è un’icona/bottone a destra nel wrapper, aggiungi padding-right automaticamente */
.input-icon .form-input ~ .icon-right,
.input-icon .form-input ~ .icon-button {
    /* nulla qui: serve solo come anchor per il selettore successivo */
}

.input-icon .form-input {
    padding-right: 44px; /* spazio per l’icona destra (es. occhio) */
}

/* Icone: z-index e click-through per non interferire con il cursore */
.icon-left,
.icon-right {
    z-index: 1;
    pointer-events: none; /* l’occhio, se è un button reale, NON usare questo */
}

/* Caso particolare: bottone “occhio” è cliccabile → non disabilitare i click */
.icon-button.icon-right {
    pointer-events: auto; /* consenti il click */
    z-index: 2;
}

/* ===========================
BUTTONS
=========================== */

.btn-row {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 10px;
    margin-bottom: 16px;
}

.btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.btn-primary {
    background: #0078d4;
    color: #fff;
}

    .btn-primary:hover {
        background: #0062b0;
    }

.btn-secondary {
    background: #fff;
    color: #333;
    border-color: #ccc;
}

    .btn-secondary:hover {
        background: #f5f5f5;
        border-color: #bbb;
    }

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid transparent;
    background: transparent;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
}

    .icon-button:hover {
        background: #f2f2f2;
        color: #333;
    }

    .icon-button.active {
        color: #0a66c2;
    }

@media (max-width: 480px) {
    .login-box {
        margin: 24px 12px;
    }

    .btn-row {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* ===========================
LOGIN BUTTON MODERNO
=========================== */

.btn-login-modern {
    padding: 6px 18px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background-color: #ffffff;
    color: #222;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

    .btn-login-modern:hover {
        background-color: #f3f3f3;
        border-color: #c2c2c2;
    }

    .btn-login-modern:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(150,150,150,0.3);
    }

/* ====== CONTENUTO MODERNO (pagina programma) ====== */

/* Contenitore centrale */
.page-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 40px;
}

@media (max-width: 768px) {
    .page-wrapper {
        padding: 24px 20px;
    }
}

/* Breadcrumb pulito */
.breadcrumb {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 18px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

    .breadcrumb a {
        color: #1f4ed8;
        text-decoration: none;
    }

        .breadcrumb a:hover {
            text-decoration: underline;
        }

/* Titolo di pagina */
.page-title {
    font-size: 32px;
    font-weight: 800;
    margin: 8px 0 20px;
    color: #1f2937;
    line-height: 1.25;
}

/* Card di sezione */
.section-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 32px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

/* Intestazione sezione con “chip” */

.section-chip {
    display: inline-flex;
    align-items: center;
    background-color: #1e3a8a;
    color: #ffffff;
    border-radius: 20px;
    /* ✅ padding più compatto */
    padding: 5px 10px;
    font-size: 13px;
    /* ✅ niente spazi inutili a sinistra */
    margin-left: 0;
    max-width: 100%;
}


    .section-chip .chip-icon {
        width: 18px;
        height: 18px;
        border-radius: 4px;
        background: #1f4ed8;
        opacity: .9;
    }

.section-chipFS {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #eef2ff; /* tinta chiara */
    color: #1f4ed8; /* primario */
    border-radius: 999px; /* pill */
    padding: 6px 12px;
    font-weight: 700;
    font-size: 14px;
    margin-top: 32px;
    margin-bottom: 16px !important;
}

.section-chipFS .chip-iconFS {
    width: 1px;
    height: 1px;
    border-radius: 4px;
    background: #1f4ed8;
    opacity: .9;
}

.section-chip strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    /* ✅ NO wrapping */
    white-space: nowrap;
}


/* Item numerato */
.item {
    margin: 18px 0 26px;
}

.item-title {
    font-weight: 700;
    color: #1f2a3a;
    font-size: 18px;
}

.item-meta {
    font-size: 13px;
    color: #6b7280;
    margin: 2px 0 12px;
}

/* Immagine arrotondata */
.item-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    margin: 8px 0 14px;
}

/* Testo descrittivo */
.item-text p {
    margin: 10px 0;
    color: #374151;
    line-height: 1.65;
    font-size: 16px;
}

.item-text a {
    color: #1f4ed8;
    text-decoration: none;
}

    .item-text a:hover {
        text-decoration: underline;
    }

/* Separatore morbido tra punti */
.hr-soft {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
    border: 0;
    margin: 20px 0;
}

/* --- Container & Card generiche --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
}

.card {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

.card-header {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.card-body {
    padding: 16px;
}

.section {
    margin-bottom: 14px;
}

/* --- Tipografia soft --- */
.text-danger-strong {
    color: #cc0000;
}

.muted {
    color: #6b7280;
}

.h-title {
    font-weight: 600;
    font-size: 1.1rem;
}

/* --- Layout responsive basilare --- */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.col {
    flex: 1 1 0;
    min-width: 260px;
}

.center {
    text-align: center;
}

/* --- Tabella scrollabile su mobile --- */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.gv-compact tr td, .gv-compact tr th {
    padding: 6px 8px;
}

/* --- Pulsanti compatti e gruppo azioni --- */
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.btn-compact {
    min-height: 30px;
    line-height: 1.1;
    padding: 4px 10px;
}

/* --- Separatore leggero --- */
.hr-light {
    border: 0;
    border-top: 1px solid #eee;
    margin: 8px 0 12px;
}

/* --- Riga selezionata GridView più evidente (senza cambiare SelectedRowStyle) --- */
tr.selected-row, .row-selected {
    background: #ffe8d6 !important;
}


.stack {
    display: flex;
    flex-direction: column;
}

.gap-md {
    gap: var(--space-md,12px);
}

.gap-lg {
    gap: var(--space-lg,16px);
}

/* Input group: bottone + input allineati in riga */
.input-group {
    display: flex;
    align-items: center;
    gap: .5rem;
}

    .input-group .btn {
        flex: 0 0 auto;
    }

    .input-group .input, .input-group input[type="text"] {
        flex: 1 1 auto;
    }

/* Accessibilità */
.visually-hidden {
    position: absolute;
    left: -9999px;
}

.action-bar {
    display: flex;
    gap: 10px;
    background: #fff;
    padding: 14px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

@media (max-width: 600px) {
    .action-bar {
        flex-direction: column;
    }
}

.alert {
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 18px;
    color: #fff;
    font-weight: 600;
    animation: fadeIn .3s ease-out;
}

.alert-success {
    background: #16a34a;
}

.alert-danger {
    background: #dc2626;
}

.alert-warning {
    background: #f59e0b;
}

.alert-info {
    background: #2563eb;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FORM MODERNO (stile NominativiDP) ===== */
.form-modern {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    max-width: 1100px;
    margin: auto;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
}

.form-group {
    flex: 1 1 250px;
    display: flex;
    flex-direction: column;
}

    .form-group label {
        font-size: 13px;
        font-weight: 600;
        color: #333;
        margin-bottom: 6px;
    }

.form-input {
    height: 36px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 13px;
}

/* ===== RADIO & CHECKBOX MODERNI ===== */
.form-options {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.form-option {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

    .form-option input {
        accent-color: #0d6efd; /* blu moderno */
        transform: scale(1.1);
    }

/* ===== BOTTONI ===== */
.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-modern {
    background: #0d6efd;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 18px;
    font-size: 12px;
    cursor: pointer;
}

    .btn-modern.secondary {
        background: #6c757d;
    }

/* === RADIO PRINCIPALI PIÙ EVIDENTI === */
.radio-modern {
    font-weight: 700; /* neretto deciso ma elegante */
}

/* === CHECK FIGLI PIÙ RIENTRATI === */
.option-children {
    margin-top: 10px;
    padding-left: 34px; /* prima era ~26px → +8px ≈ 5mm visivi */
}

/* check leggermente più leggeri rispetto al radio */
.check-modern span {
    font-weight: 500;
}

/* ==== DISTANZA TRA LE OPZIONI PRINCIPALI ==== */
.option-group {
    display: flex;
    flex-direction: column;
    gap: 20px; /* prima ~14px → più respiro */
}

/* ==== CARD RADIO ==== */
.option-card {
    border: 1px solid #e1e5ea;
    border-radius: 10px;
    padding: 16px 18px; /* leggermente più aria interna */
    background: #fff;
}

/* ==== RADIO ==== */
.radio-modern {
    font-weight: 700;
    margin-bottom: 4px; /* meno spazio verso i figli */
}

/* ==== CHECK / TOGGLE COLLEGATI ==== */
.option-children {
    margin-top: 4px; /* prima 10px → più vicini al radio */
    padding-left: 34px; /* indent “gerarchico” (~5 mm) */
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ==== TOGGLE MODERNO ==== */
.toggle-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

    /* nasconde il checkbox nativo */
    .toggle-modern input[type="checkbox"] {
        appearance: none;
        width: 38px;
        height: 20px;
        background: #cfd4da;
        border-radius: 20px;
        position: relative;
        transition: background 0.2s ease;
        cursor: pointer;
    }

        /* pallino */
        .toggle-modern input[type="checkbox"]::after {
            content: "";
            position: absolute;
            top: 2px;
            left: 2px;
            width: 16px;
            height: 16px;
            background: white;
            border-radius: 50%;
            transition: left 0.2s ease;
        }

        /* stato ON */
        .toggle-modern input[type="checkbox"]:checked {
            background: #0d6efd;
        }

            .toggle-modern input[type="checkbox"]:checked::after {
                left: 20px;
            }

    /* disabilita interazione sui toggle */
    .option-card.inactive .toggle-modern {
        pointer-events: none;
    }

    /* toggle spento visivamente */
    .option-card.inactive input[type="checkbox"] {
        background: #e2e6ea;
    }

/* === CARD ATTIVA === */

/* stato base */
.option-card {
    border: 1px solid #e1e5ea;
    border-radius: 10px;
    padding: 16px 18px;
    background: #fff;
    transition: all 0.2s ease;
}

    /* sezione selezionata */
    .option-card.active {
        border-color: #0d6efd;
        background: #f5f9ff;
        box-shadow: 0 0 0 2px rgba(13,110,253,0.15);
    }

    /* sezioni non attive */
    .option-card.inactive {
        opacity: 0.6;
    }


/* ===== FILE GRID ===== */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

/* ===== FILE CARD ===== */
.file-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e1e5ea;
    border-radius: 12px;
    background: #fff;
    transition: all 0.2s ease;
}

    .file-card:hover {
        background: #f5f9ff;
        border-color: #0d6efd;
    }

    /* checkbox */
    .file-card input[type="checkbox"] {
        transform: scale(1.1);
    }

/* icona */
.file-icon {
    width: 28px;
    height: 28px;
}

/* info */
.file-info {
    display: flex;
    flex-direction: column;
}

.file-name {
    font-size: 13px;
    font-weight: 600;
}

.file-date {
    font-size: 11px;
    color: #666;
}

/* ==============================
   LOGIN - ALLINEAMENTO PERFETTO
   ============================== */

/* riga campo */
.login-box .form-row {
    display: flex;
    align-items: center;
}

/* label con larghezza fissa */
.login-box .form-label {
    width: 90px; /* TUTTE le label uguali */
    margin-right: 10px;
    text-align: left;
}

/* contenitore input (UTENTE e PASSWORD IDENTICI) */
.login-box .input-icon {
    position: relative;
    width: 260px; /* <<== CHIAVE */
    flex-shrink: 0;
}

/* input vero e proprio */
.login-box .form-input {
    width: 100%;
    height: 42px;
    box-sizing: border-box;
    padding-left: 40px;
    padding-right: 40px; /* SEMPRE riservato */
    border-radius: 6px;
    border: 1px solid #cfd6dd;
    font-size: 14px;
    background-color: #eef4fd;
}

    /* focus */
    .login-box .form-input:focus {
        outline: none;
        border-color: #3b82f6;
        background-color: #ffffff;
    }

.chip-icon-infra {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-right: 6px;
    vertical-align: middle;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
    padding: 2px;
}

    .chip-icon-infra img {
        width: 20px;
        height: 20px;
        object-fit: contain;
        display: block;
    }

.efficaci-duoFS {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 16px;
    align-items: flex-start;
}

    .efficaci-duoFS .efficaci-block {
        flex: 0 1 auto;
        min-width: 220px;
    }
/* Titoli sezione */
.section-chip {
    margin-top: 32px;
    margin-bottom: 16px !important;
}


/* =====================================================
   STRUTTURA GENERALE FORM
   ===================================================== */

.mtg-section {
    margin-top: 20px;
}

.mtg-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    row-gap: 10px;
    column-gap: 12px;
    align-items: center;
}

/* Titoli di sezione */
.mtg-title {
    margin: 16px 0 8px;
    font-weight: 600;
}

/* =====================================================
   RIGHE INPUT
   ===================================================== */

.mtg-field {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}


* =====================================================
INPUT NUMERICI – cantico / schema (3 CIFRE REALI)
===================================================== */
.mtg-input-num {
    width: 3.5ch !important;
    min-width: 3.5ch !important;
    max-width: 3.5ch !important;
    height: 28px;
    text-align: center;
    padding: 2px 4px;
    flex: 0 0 3.5ch;
}

/* =====================================================
   INPUT TESTUALI PRINCIPALI
   ===================================================== */
.mtg-input-main {
    flex: 1 1 0;
    width: 100%;
    min-width: 300px;
}

/* =====================================================
   RIGA STANDARD (non grid!)
   ===================================================== */
.mtg-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/* =====================================================
   ORATORE + CONGREGAZIONE
   ===================================================== */
.mtg-dual {
    display: flex;
    gap: 24px;
    width: 100%;
}

    .mtg-dual > div {
        flex: 1 1 0;
    }

/* MOBILE */
@media (max-width: 992px) {
    .mtg-dual {
        flex-direction: column;
    }
}

/* =====================================================
   NOTE
   ===================================================== */
.mtg-notes {
    width: 100%;
    min-height: 60px;
    resize: vertical;
}

/* ==============================
   GRIGLIA SEZIONI STANDARD
   ============================== */
.mtg-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    column-gap: 16px;
    row-gap: 6px;
    align-items: center;
}

/* ==============================
   RIGA DISCORSO + CONF.
   ============================== */
.mtg-row-discorso {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 8px;
    align-items: center;
}

/* ==============================
   LABEL ALLINEATE
   ============================== */
.mtg-section label {
    margin-bottom: 4px;
}

/* ==============================
   NOTE: allineamento orizzontale
   ============================== */
.mtg-notes {
    margin-top: 4px;
}

/* ==============================
   APRI meno dominante
   ============================== */
.btn-w-70 {
    height: 28px;
    font-size: 0.8rem;
    padding: 0 8px;
}


.mtg-span-2 {
    grid-column: 1 / -1;
}

.mtg-row-discorso {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/* ==============================
   CAMPI CORTI DEFINITIVI
   ============================== */

.mtg-input-num {
    width: 60px !important;
    min-width: 50px;
    max-width: 70px;
    flex: 0 0 auto; /* <-- FONDAMENTALE */
    text-align: center;
}



/* ==============================
   DISCORSO – CHECK CONFERMATO
   ============================== */

.mtg-row-discorso {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

/* MOBILE: spezza la riga */
@media (max-width: 576px) {
    .mtg-row-discorso {
        flex-wrap: wrap;
    }

    .mtg-check {
        width: 100%;
        margin-top: 6px;
    }
}


* ==============================
PREGHIERA – STESSO PATTERN DEL DISCORSO
============================== */

.mtg-row-preghiera {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

/* MOBILE */
@media (max-width: 576px) {
    .mtg-row-preghiera {
        flex-wrap: wrap;
    }

        .mtg-row-preghiera .mtg-copy {
            width: 100%;
            margin-top: 6px;
        }
}


/* === FORM STANDARD (come NominativiDP) === */

.form-container {
    width: 100%;
}

.form-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid #ccc;
    margin-bottom: 10px;
}

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.form-col {
    display: flex;
    flex-direction: column;
}

.w-20 {
    width: 20%;
}

.w-30 {
    width: 30%;
}

.w-50 {
    width: 50%;
}

.w-70 {
    width: 70%;
}

.w-100 {
    width: 100%;
}

.form-label {
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 2px;
}

.form-input {
    height: 20px;
    padding: 2px 4px;
    font-size: 12px;
}

.form-textarea {
    padding: 4px;
    font-size: 12px;
}

.form-section {
    margin-top: 14px;
    padding-top: 8px;
    border-top: 1px solid #ddd;
}

.form-section-title {
    font-size: 12px;
    font-weight: bold;
    color: #b40000;
    margin-bottom: 6px;
    text-align: center;
}

.form-actions {
    display: flex;
    gap: 8px;
}

.box-actions .btn,
.box-actions input[type="submit"],
.box-actions button {
    padding: 6px 14px;     /* 👈 più bassi */
    font-size: 14px;
    line-height: 1.2;
    border-radius: 6px;
}


.box-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}


/* ===============================
   SEZIONI CHECKBOX – MOBILE FIRST
   =============================== */

/* Contenitore sezione */
.chk-section {
    margin: 28px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e0e0e0;
}

    /* Titolo sezione */
    .chk-section > .form-section-title {
        margin: 0 0 8px 0 !important;
        padding-top: 6px;
        font-weight: 600;
        color: #c00;
        font-size: 13px;
    }

    /* Riga checkbox – compatta */
    .chk-section .form-row {
        margin: 0 !important;
        gap: 6px;
    }

    /* Colonna checkbox */
    .chk-section .form-col.auto {
        padding: 2px 8px 2px 0 !important;
        margin: 0 !important;
        width: 100%; /* ✅ MOBILE: una per riga */
        display: flex;
        align-items: center;
    }

    /* Checkbox ASP.NET */
    .chk-section input[type="checkbox"] {
        margin: 0 6px 0 0 !important;
    }

    /* Label checkbox */
    .chk-section label {
        margin: 0 !important;
        white-space: nowrap;
        font-size: 13px;
    }


/* Tablet */
@media (min-width: 600px) {
    .chk-section .form-col.auto {
        width: 50%; /* 2 per riga */
    }
}

/* Desktop */
@media (min-width: 992px) {
    .chk-section .form-col.auto {
        width: auto; /* layout fluido come ora */
    }
}


.pa-chip {
    display: inline-flex;
    align-items: center; /* ✅ allineamento verticale */
    gap: 8px;
    background: #1f3b8b;
    color: #fff;
    padding: 6px 12px;
    border-radius: 22px;
}

.pa-chip-title {
    font-weight: 600;
    white-space: nowrap;
}

.pa-chip-input {
    height: 26px; /* ✅ stessa altezza */
    border-radius: 6px;
    border: none;
    padding: 0 8px;
    font-size: 13px;
    background: #fff;
    color: #000;
}

.pa-chip-year {
    width: 64px;
    text-align: center;
}

.pa-status {
    margin-top: 8px;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pa-status-dot {
    width: 8px;
    height: 8px;
    background: #1f3b8b;
    border-radius: 50%;
}

btn-whatsapp {
    background-color: #25D366;
    color: #fff !important;
    border-radius: 6px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    text-decoration: none;
}

.btn-whatsapp i {
    font-size: 16px;
}

.btn-whatsapp:hover {
    background-color: #1ebe5a;
}

.label-cerca {
    color: #ffffff; /* bianco */
}

.date-settimana {
    max-width: 180px;
    background-color: #f8fafc;
    cursor: pointer;
}

/* Evidenzia focus */
.date-settimana:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,.25);
}

/* Stato NON valido */
input.date-settimana.invalid,
input.input-validation-error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

/* Messaggio errore */
.validation-error {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 4px;
    display: block;
}

/* opzionale – solo indicativo UX */

.js-weekdays-only {
    background-color: #f8fafc;
}

.js-weekend-only {
    background-color: #fff7e6;
}


.js-date-settimana {
    font-size: 0.875rem; /* equivalente Bootstrap = fs-6 */
    line-height: 1.5;
}

.js-date-disabled {
    pointer-events: none;
    background-color: #f0f0f0;
    cursor: not-allowed;
}


/* Contenitore chip */
.section-chip {
    display: inline-flex;
    align-items: center;
    background-color: #1e3a8a;
    color: #ffffff;
    border-radius: 20px;
    padding-left: 6px; /* prima era troppo largo */
    padding-right: 8px; /* puoi anche lasciarlo com’è */
    margin-left: -4px;
    font-size: 14px;
}

    /* Wrapper testo + input */
    .section-chip strong {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-weight: 600;
    }

/* ✅ NUOVA CLASSE SOLO PER QUESTA DATA */
.chip-date-input {
    width: 95px;
    height: 22px;
    padding: 2px 6px;
    font-size: 13px;
    line-height: 18px;
    border-radius: 4px;
    border: 1px solid #cfd4dc;
    background-color: #ffffff;
    color: #000;
    text-align: center;
}

    /* Stato readonly */
    .chip-date-input[readonly] {
        background-color: #f1f3f5;
        cursor: default;
    }

/* Input ora, allineato alla data */
.chip-time-input {
    width: 60px;
    height: 22px;
    padding: 2px 6px;
    font-size: 13px;
    line-height: 18px;
    border-radius: 4px;
    border: 1px solid #cfd4dc;
    text-align: center;
}

/* Input data e ora dentro la chip */
.chip-date-input,
.chip-time-input {
    height: 22px;
    padding: 2px 6px;
    font-size: 13px;
    line-height: 18px;
    border-radius: 4px;
    border: 1px solid #cfd4dc;
    background-color: #ffffff;
    color: #000;
    text-align: center;
    box-sizing: border-box;
}

/* Larghezze dedicate */
.chip-date-input {
    width: 95px;
}

.chip-time-input {
    width: 58px;
}


/* Data: leggermente più bassa */
.section-chip .chip-date-input {
    height: 21px;
    padding-top: 1px;
    padding-bottom: 1px;
}

/* Ora: leggermente più alta */
.section-chip .chip-time-input {
    height: 23px;
    padding-top: 2px;
    padding-bottom: 2px;
}

.page-grid {
    display: grid;
    grid-template-columns: 1fr; /* UNA colonna su mobile */
    gap: 24px;
}


@media (min-width: 992px) {
    .page-grid.cols-2\@lg {
        grid-template-columns: 2fr 1fr;
    }
}


/* ==========================
   DiscorsiOUT layout FIX
   ========================== */

/* Default: mobile (una colonna) */
.page-grid.discorsiout-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

/* Desktop: due colonne */
@media (min-width: 992px) {
    .page-grid.discorsiout-layout {
        grid-template-columns: 2fr 1fr;
        align-items: start;
    }
}

/* DiscorsiOUT – layout definitivo */

.page-grid.discorsiout-layout {
    display: grid;
    grid-template-columns: 1fr; /* mobile */
    gap: 24px;
}

@media (min-width: 992px) {
    .page-grid.discorsiout-layout {
        grid-template-columns: 2fr 1fr; /* desktop */
        align-items: start;
    }
}

.alerts {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 0 30px; /* 👈 spazio a sinistra */
    padding: 12px 16px;
    background-color: #f5f7fa;
    border-left: 5px solid #0078d4;
    border-radius: 4px;
    font-size: 15px;
}

    .alerts img {
        flex-shrink: 0;
    }

.alert-text {
    color: #1a1a1a;
    font-weight: 500;
}

.alert-link {
    margin-left: 6px;
    color: #0078d4;
    font-weight: 600;
    text-decoration: none;
}

    .alert-link:hover {
        text-decoration: underline;
    }

.alert-btn {
    margin-left: 12px; /* 👈 distanza dal testo */
    padding: 6px 12px;
    background-color: #0078d4;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}

    .alert-btn:hover {
        background-color: #005fa3;
    }

.abilitazioni-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 20px;
}

.abilitazione-box {
    background-color: #ffffff;
    padding: 16px 18px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

@media (max-width: 1100px) {
    .abilitazioni-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .abilitazioni-grid {
        grid-template-columns: 1fr;
    }
}


.selettori-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 24px;
    margin-top: 16px;
}

.selettore {
    display: grid;
    grid-template-columns: 46px 1fr; /* toggle | testo */
    align-items: center;
}

.selettore-label {
    font-size: 14px;
}

.box-actions {
    margin-top: 18px;
    display: flex;
    gap: 10px;
}

@media (max-width: 900px) {
    .selettori-grid {
        grid-template-columns: 1fr;
    }
}

.selettore {
    display: grid;
    grid-template-columns: 46px 1fr; /* toggle | testo */
    align-items: center;
    column-gap: 8px;
}

@media (max-width: 900px) {
    .selettori-grid

{
    grid-template-columns: 1fr;
}

}

@media (max-width: 700px) {
    .abilitazioni-grid {
        grid-template-columns: 1fr;
    }
}

/* contenitore selettore */
.selettore {
    display: grid;
    grid-template-columns: 46px 1fr;
    align-items: center;
}

/* switch base */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

    /* checkbox nascosta */
    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

/* slider */
.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #cfd3d7;
    border-radius: 22px;
    transition: 0.3s;
}

    .slider::before {
        content: "";
        position: absolute;
        height: 18px;
        width: 18px;
        left: 2px;
        bottom: 2px;
        background-color: white;
        border-radius: 50%;
        transition: 0.3s;
    }

/* ON */
.switch input:checked + .slider {
    background-color: #2c7f8d;
}

    .switch input:checked + .slider::before {
        transform: translateX(18px);
    }


/* stato readonly */
.switch.locked {
    opacity: 0.6;
}

    /* blocca OGNI interazione */
    .switch.locked,
    .switch.locked * {
        pointer-events: none;
    }

.abilitazione-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px 20px;
    border: 1px solid #e6e9ee;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}


    .abilitazione-box:hover {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
        transform: translateY(-1px);
    }


.box-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.card-btn {
    padding: 6px 14px; /* 👈 più bassi */
    font-size: 12px;
    line-height: 1;
    border-radius: 6px;
    border: 1px solid #d0d4d9;
    background: #ffffff;
    cursor: pointer;
}

    .card-btn.primary {
        background-color: #0078d4;
        color: #ffffff;
        border-color: #0078d4;
    }

        .card-btn.primary:hover {
            background-color: #005fa3;
        }

.wm-label {
    font-weight: 500;
}

.wm-dropdown {
    min-width: 250px;
    padding: 4px;
}

.wm-btn-search {
    height: 26px;
    cursor: pointer;
}

.wm-grid {
    width: 100%;
}

.wm-link {
    cursor: pointer;
    color: #0078D4;
}

.wm-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.wm-btn-img {
    height: 26px;
    cursor: pointer;
}

.wm-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wm-form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wm-input {
    padding: 5px;
    min-height: 24px;
}

.wm-checkbox {
    margin-left: 10px;
}

.wm-btn-primary {
    background-color: #0078D4;
    color: white;
    border: none;
    padding: 6px 12px;
    cursor: pointer;
}

.wm-btn-secondary {
    background-color: #333;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
}

.wm-message {
    color: red;
    font-size: 13px;
}

.wm-inline-label {
    margin-left: 8px;
    font-weight: 500;
}

.wm-hidden {
    display: none;
}

.context-menu {
    position: absolute;
    display: none;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    padding: 5px 0;
    z-index: 1000;
}

    .context-menu div {
        padding: 8px 15px;
        cursor: pointer;
    }

        .context-menu div:hover {
            background: #f0f0f0;
        }
.files-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 20px;
}

/* CARD */
.file-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.25s ease;
}

    /* HOVER */
    .file-card:hover {
        transform: translateY(-4px) scale(1.02);
        box-shadow: 0 8px 18px rgba(0,0,0,0.15);
        border-color: #9db4ff;
    }

    /* ICONA */
    .file-card img {
        width: 26px;
        height: 26px;
    }

/* TESTO */
.file-name {
    font-size: 14px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

/* LINK */
.file-card a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    width: 100%;
}

/* HOVER TESTO */
.file-card:hover .file-name {
    color: #4a6cff;
}

.files-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px; /* più aria */
    padding: 20px;
}

.file-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 18px 20px; /* più spazio interno */
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.25s ease;
    min-height: 70px; /* ✅ altezza minima */
}

    .file-card:hover {
        transform: translateY(-5px) scale(1.03);
        box-shadow: 0 10px 22px rgba(0,0,0,0.18);
    }

    .file-card img {
        width: 32px; /* ✅ icona più grande */
        height: 32px;
    }

.file-name {
    font-size: 15px;
    font-weight: 500;
}

``
/* LINK */
.file-card a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    width: 100%;
}

/* HOVER TESTO */
.file-card:hover .file-name {
    color: #4a6cff;
}


.context-menu {
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.rename-input {
    font-size: 14px;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 100%;
}
.drop-zone {
    margin: 20px;
    padding: 30px;
    border: 2px dashed #bbb;
    border-radius: 12px;
    text-align: center;
    color: #666;
    transition: 0.2s;
}

    .drop-zone.dragover {
        background: #eef3ff;
        border-color: #4a6cff;
        color: #4a6cff;
    }

.loader {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4a6cff;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    display: none;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #4caf50;
    color: white;
    padding: 12px 18px;
    border-radius: 8px;
    display: none;
}

.rename-input {
    font-size: 15px;
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 100%;
}

    .rename-input:focus {
        outline: none;
        border-color: #4a6cff;
        box-shadow: 0 0 4px rgba(74,108,255,0.4);
    }


.file-card a.editing {
    pointer-events: none;
}

.rename-input {
    font-size: 15px;
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 100%;
}

    .rename-input:focus {
        outline: none;
        border-color: #4a6cff;
        box-shadow: 0 0 4px rgba(74,108,255,0.4);
    }


@media (max-width: 768px) {

    .col-tema,
    .col-disc {
        display: none;
    }
}
.wm-section-header {
    display: flex;
    align-items: center;
}

.wm-ddl {
    margin-left: auto;
    padding: 5px 28px 5px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background-color: white;
    font-size: 13px;
    cursor: pointer;
    appearance: none;
}

.wm-section-header {
    display: flex;
    align-items: center;
}

/* wrapper per freccia */
.wm-ddl-modern-wrapper {
    position: relative;
    margin-left: auto;
}

/* dropdown */
.wm-ddl-modern {
    padding: 6px 36px 6px 12px;
    border-radius: 8px;
    border: 1px solid #d0d5dd;
    background-color: #f9fafb;
    font-size: 13px;
    color: #344054;
    cursor: pointer;
    appearance: none;
    transition: all 0.2s ease;
}

    /* hover */
    .wm-ddl-modern:hover {
        background-color: #f1f5f9;
        border-color: #b0b7c3;
    }

    /* focus (super moderno) */
    .wm-ddl-modern:focus {
        outline: none;
        border-color: #3b82f6;
        background-color: #fff;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    }

/* freccia elegante */
.wm-ddl-modern-wrapper::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-right: 2px solid #667085;
    border-bottom: 2px solid #667085;
    transform: translateY(-50%) rotate(45deg);
    pointer-events: none;
}

.dash-space {
    height: 15px;
}


@media (max-width: 600px) {

    .mob-btn-big {
        width: 100%;
        padding: 14px;
        font-size: 16px;
        border-radius: 10px;
    }
}


@media (max-width: 600px) {

    .mob-space {
        height: 15px;
    }
}

/* =========================
   MOBILE OVERRIDE GLOBALI
   ========================= */
@media (max-width: 600px) {

    /* ✅ BOTTONI (tutti automaticamente) */
    .btn {
        width: 100%;
        padding: 14px;
        font-size: 16px;
        border-radius: 10px;
    }

    /* ✅ CARD */
    .wm-card {
        padding: 18px !important;
        margin: 10px !important;
        border-radius: 12px;
    }

    /* ✅ TITOLI */
    .wm-title {
        font-size: 20px !important;
        font-weight: 600;
    }

    /* ✅ TESTO */
    p {
        font-size: 14px;
    }

    /* ✅ TABELLE */
    .wm-table td,
    .wm-table th {
        padding: 8px !important;
        font-size: 14px;
    }

    /* ✅ WRAP TABELLA (importantissimo) */
    .wm-table-wrap {
        overflow-x: auto;
    }

    /* ✅ FOOTER */
    .form-footer {
        margin-top: 15px;
    }
}

/* CONTENITORE */
.session-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

/* CARD */
.session-card {
    background: #ffffff;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* ICONA */
.session-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

/* TITOLO */
.session-title {
    color: #c62828;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
}

/* TESTO */
.session-text {
    color: #444;
    font-size: 14px;
    margin-bottom: 20px;
}

/* BOTTONE */
.session-btn {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
}

/* SFONDO + CENTRATURA */
.session-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 20px;
}

/* CARD */
.session-box {
    background: #ffffff;
    max-width: 380px;
    width: 100%;
    padding: 30px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

/* ICONA */
.session-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

/* TITOLO */
.session-title {
    font-size: 22px;
    font-weight: 700;
    color: #c62828;
    margin-bottom: 10px;
}

/* TESTO */
.session-text {
    font-size: 14px;
    color: #555;
    margin-bottom: 25px;
    line-height: 1.4;
}

/* BOTTONE (molto migliorato) */
.session-btn {
    display: block;
    width: 100%;
    background: #1976d2;
    color: white;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

    /* hover */
    .session-btn:hover {
        background: #125aa0;
    }

/* CONTENITORE */
.rec-wrapper {
    max-width: 600px;
    margin: 20px auto;
    padding: 10px;
}

/* TITOLO PAGINA */
.rec-page-title {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: 20px;
}

/* CARD */
.rec-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* SEZIONI */
.rec-section-title {
    font-size: 18px;
    margin-bottom: 15px;
}

/* CAMPI */
.rec-field {
    margin-bottom: 15px;
}

    .rec-field label {
        font-size: 13px;
        color: #555;
        display: block;
        margin-bottom: 5px;
    }

/* INPUT */
.rec-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
}

/* BOTTONE */
.rec-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: #1976d2;
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    margin-top: 10px;
    text-decoration: none;
}

    .rec-btn:hover {
        background: #125aa0;
    }

/* MESSAGGIO */
.rec-msg {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: #c62828;
    font-weight: 600;
}

/* TABELLA */
.rec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

    .rec-table td,
    .rec-table th {
        padding: 8px;
        border-bottom: 1px solid #ddd;
    }

/* MOBILE */
@media (max-width: 600px) {

    .rec-page-title {
        font-size: 22px;
    }

    .rec-card {
        padding: 15px;
    }
}


/* LISTA RECENSIONI */
.rec-list {
    border: none;
}

/* SINGOLA RECENSIONE */
.rec-item {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1px solid #eee;
}


/* NOME UTENTE */
.rec-user {
    font-weight: 600;
    margin-bottom: 5px;
    color: #1a237e;
}

/* TESTO */
.rec-text {
    font-size: 14px;
    color: #444;
    line-height: 1.4;
}

.rec-stars {
    font-size: 26px;
    cursor: pointer;
    user-select: none;
}

    .rec-stars span {
        color: #ccc;
        transition: 0.2s;
    }

        /* stelle attive */
        .rec-stars span.active {
            color: #ffc107;
        }

.rec-rating {
    margin: 5px 0;
}

.star {
    color: #ccc;
    font-size: 16px;
}

    .star.filled {
        color: #ffc107;
    }

/* IMPORTANTISSIMO */
* {
    box-sizing: border-box;
}


.rec-wrapper {
    max-width: 600px;
    margin: 20px auto;
    padding: 10px;
}

/* MOBILE */
@media (max-width: 600px) {

    .rec-wrapper {
        padding: 10px; /* già ok */
    }

    .rec-card {
        margin: 10px 0; /* 🔴 niente margini laterali */
        width: 100%; /* 🔴 evita overflow */
    }
}

.rec-table-wrap {
    width: 100%;
    overflow: visible; /* 🔴 questo è fondamentale */
}


.rec-list {
    display: block;
    width: 100%;
}

    .rec-list tr {
        display: block;
        width: 100%;
    }

    .rec-list td {
        display: block;
        width: 100%;
        padding: 0;
        border: none;
    }

* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

.rec-card {
    width: 100%;
    margin: 10px 0;
}

.rec-item {
    width: 100%;
    display: block;
}

.alerts {
    padding: 15px;
}

/* Contenitore principale */
.alert-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 320px; /* 🔥 BLOCCO COMPATTO */
}

/* Barra blu */
.alert-bar {
    width: 4px;
    background-color: #1e73be;
    border-radius: 3px;
}


.alert-body {
    display: flex;
    flex-direction: column; /* 🔥 QUESTO È IL FIX */
    align-items: flex-start;
}


.alert-text {
    display: block; /* 🔥 forza il testo a occupare una riga */
    margin-bottom: 6px;
}


/* Bottone */
.alert-btn {
    align-self: flex-start; /* 🔥 evita centrature strane */
    font-size: 13px;
    padding: 6px 12px;
    display: inline-block;
    width: auto;
}

.alert-text {
    display: block !important;
}

/* wrapper più controllato */
.wm-agg-wrapper {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

/* card più larga e moderna */
.wm-agg-wrapper {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

.wm-agg-card.session-box {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto;
    padding: 25px;
    background: #f4f4f4;
    border-radius: 10px;
}

.wm-agg-table {
    width: 100% !important;
}

    .wm-agg-table th,
    .wm-agg-table td {
        padding: 10px;
    }


.login-box {
    max-width: 400px; /* oppure quello che usi */
    margin: 0 auto; /* centra la card */
    padding: 20px 25px;
}



.input-icon {
    position: relative;
    width: 100%;
}

.form-input {
    width: 100%;
    box-sizing: border-box; /* fondamentale */
}


.with-icon-left {
    padding-left: 40px;
}

.with-icon-right {
    padding-right: 40px;
}

.icon-left {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.icon-right {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}


.login-row {
    width: 100%;
    margin-bottom: 15px;
}


.login-box .form-row {
    width: 100%;
    margin-bottom: 15px;
}


.login-box .input-icon {
    width: 100%;
    display: block;
}

.login-box .form-input {
    width: 100%;
    box-sizing: border-box;
    display: block;
}


/* SOLO LOGIN */
.login-box .input-icon {
    width: 100%;
    display: block;
    position: relative;
}

.login-box .form-input {
    width: 100%;
    box-sizing: border-box;
    display: block;
}

/* COLONNE */
.search-col {
    display: flex;
    flex-direction: column;
}

    /* INPUT CHE SI ADATTA */
    .search-col.grow {
        flex: 1;
        min-width: 0; /* 🔥 fondamentale per mobile */
    }

    /* ELEMENTI FISSI */
    .search-col.auto {
        flex: 0 0 auto;
    }

.search-row {
    display: flex;
    align-items: flex-end; /* ancora importante */
    gap: 20px; /* 👈 prima era 12px */
    width: 100%;
}

.search-col {
    display: flex;
    flex-direction: column;
}

    .search-col.grow {
        flex: 1;
        min-width: 0;
    }

    .search-col.auto {
        flex: 0 0 auto;
    }

.search-input {
    width: 100%;
    box-sizing: border-box;
    height: 38px;
}

.search-row .btn-search {
    height: 38px; /* 👈 uguale all'input */
}

.btn-search {
    white-space: nowrap;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
}

/* 🔥 override forte nel caso btn-modern rompa tutto */
.search-row .btn-search {
    padding: 12px 24px !important;
    font-size: 14px !important;
}


.search-toggle {
    display: flex;
    flex-direction: column; /* 👈 label sotto */
    align-items: center; /* 👈 centrato orizzontalmente */
    gap: 4px;
    margin-top: 0; /* reset */
}

.search-toggle {
    position: relative;
    top: 0px; /* 👈 alza lo switch */
}


.toggle-label {
    font-size: 12px;
    line-height: 1;
}

.inline-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px; /* spazio tra ddl e textbox */
}

    .inline-filter .small-input {
        height: 28px;
        font-size: 12px;
        padding: 2px 6px;
    }

    .inline-filter select.small-input {
        width: 120px; /* larghezza dropdown */
    }

    .inline-filter input.small-input {
        width: 70px; /* larghezza anno */
    }

.login-error {
    display: block;
    color: #b00020;
    background-color: #fdecea;
    border: 1px solid #f5c2c7;
    padding: 10px;
    border-radius: 6px;
    margin-top: 12px;
    margin-bottom: 10px;
    font-size: 14px;
}

.login-links {
    margin-top: 8px;
}

.login-link {
    color: #0a57a3;
    display: inline-block;
    margin-right: 10px;
}

.register-text {
    margin-top: 10px;
}


.input-error {
    border: 1px solid #b00020 !important;
    background-color: #fff5f5 !important;
}
