/* Colori */

:root { 
    --gpv-primary: #0754A6; 
    --gpv-danger: #dc2626; 
    --gpv-bg: #c2defa42; 
    --gpv-border: #e5e7eb; 
    --gpv-text: #374151; 
    --gpv-hover: white; 
    --gpv-exit: #5f5f5fd4;
}

/* Login */

.gpv-login-wrap { max-width: 380px; margin: 40px auto; background: #f9fafb; border: 1px solid var(--gpv-border); padding: 25px; border-radius: 8px; font-family: system-ui, sans-serif; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.gpv-login-wrap h3 { margin-top: 0; color: var(--gpv-text); margin-bottom: 20px; text-align: center; }
.gpv-login-wrap .login-username, .gpv-login-wrap .login-password { margin-bottom: 15px; }
.gpv-login-wrap label { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 600; color: var(--gpv-text); }
.gpv-login-wrap input[type="text"], .gpv-login-wrap input[type="password"] { width: 100%; padding: 10px; border: 1px solid #d1d5db; border-radius: 4px; box-sizing: border-box; }
.gpv-login-wrap .login-remember { font-size: 13px; margin-bottom: 15px; display: flex; align-items: center; gap: 5px; }
.gpv-login-wrap .login-remember label { font-weight: normal; margin: 0; display: inline; }
.gpv-login-wrap .button-primary { width: 100%; background: var(--gpv-primary); color: #fff; padding: 10px; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; transition: 0.2s; font-size: 14px; }
.gpv-login-wrap .button-primary:hover { filter: brightness(1.1); }
.gpv-login-meta { display: flex; justify-content: center; font-size: 13px; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--gpv-border); }
.gpv-login-meta a { color: var(--gpv-primary); text-decoration: none; font-weight: 500; }
.gpv-login-meta a:hover { text-decoration: underline; }

/* Struttura principale */

.gpv-app-wrapper { font-family: system-ui, sans-serif; color: var(--gpv-text); background: #fff; border: 1px solid var(--gpv-border); border-radius: 8px; padding: 20px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.gpv-tabs-container { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; border-bottom: 2px solid var(--gpv-border); flex-wrap: wrap; gap: 10px; }
.gpv-tabs { display: flex; gap: 5px; padding-bottom: 0; margin-bottom: 0; }
.gpv-tabs button { background: var(--gpv-bg); color: #6b7280; border: 1px solid var(--gpv-border); border-bottom: none; padding: 10px 22px; font-size: 15px; font-weight: 600; cursor: pointer; border-radius: 8px 8px 0 0; transition: all 0.2s ease; margin-bottom: -2px; }
.gpv-btn-tutorial button { background: var(--gpv-primary); color: white; margin-top: 12px; padding: 8px 14px; border: 1px solid var(--gpv-primary); }
.gpv-btn-tutorial button:hover { background: #fff !important; color: var(--gpv-primary) !important;  border: 1px solid var(--gpv-primary);}
.gpv-tabs button:hover { background: #e5e7eb; color: var(--gpv-text) ; }
.gpv-tabs button.active { background: #fff; color: var(--gpv-primary); border: 2px solid var(--gpv-border); border-top: 3px solid var(--gpv-primary); border-bottom: 2px solid #fff; }

/* Tabelle */

.gpv-table-wrapper { margin-top: 15px; background: #fff; }
.gpv-table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; background: #fff; margin: 15px 0; position: relative; }
.gpv-table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 0; font-size: 14px; border: 1px solid var(--gpv-border); border-radius: 8px; }
.gpv-table th, .gpv-table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--gpv-border); vertical-align: middle; }
.gpv-table th { background: var(--gpv-bg); font-weight: 600; }
.gpv-table tbody tr:last-child td { border-bottom: none; }
.gpv-table thead tr:first-child th:first-child { border-top-left-radius: 7px; }
.gpv-table thead tr:first-child th:last-child { border-top-right-radius: 7px; }
.gpv-table tbody tr:last-child td:first-child { border-bottom-left-radius: 7px; }
.gpv-table tbody tr:last-child td:last-child { border-bottom-right-radius: 7px; }
.gpv-table thead { position: relative; z-index: 10; }
.gpv-table thead th { background-color: #fff !important; box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.gpv-sticky-cell { position: sticky; left: 0; z-index: 5; background-color: #fff !important; box-shadow: 1px 0 2px rgba(0,0,0,0.1); }
.gpv-table thead th.gpv-sticky-head { position: sticky; left: 0; z-index: 15; background-color: #fff !important; box-shadow: 1px 1px 2px rgba(0,0,0,0.1); }

.gpv-form-container { background: var(--gpv-bg); padding: 15px; border-radius: 8px; border: 1px solid var(--gpv-border); margin-bottom: 20px; display: none; }
.gpv-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.gpv-form-group { display: flex; flex-direction: column; }
.gpv-form-group label { font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.gpv-form-group input, .gpv-form-group select { padding: 8px; border: 1px solid var(--gpv-primary); border-radius: 8px; }

/* Bottoni ecc... */  
#gpv-loginform p, .gpv-login-wrap h3, #gpv-frontend-container h2, #gpv-frontend-container h3 {font-family: "Plus Jakarta Sans", Sans-serif; color: #14213D;}
/* Allineo select e bottoni nelle barre di controllo (calendario/report) alla stessa
   altezza: senza questo, il bottone risultava più alto/basso dei menu a tendina accanto. */
#gpv-tour-cal-controls select, #gpv-tour-cal-controls .gpv-btn,
#gpv-tour-riepilogo-controls select, #gpv-tour-riepilogo-controls .gpv-btn { height: 40px; box-sizing: border-box; }
#gpv-btn-genera-griglia {padding: 10px 14px; height: 40px;}
#gpv-btn-genera-riepilogo {padding: 10px 14px; height: 40px;}
.gpv-btn { border: 1px solid var(--gpv-primary) !important; background: var(--gpv-primary); color: white; padding: 8px 14px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size:13px; transition: 0.2s; display: inline-flex; align-items: center; gap: 5px; }
.gpv-btn:focus { border: 1px solid var(--gpv-primary) !important; background-color: var(--gpv-primary); }
.gpv-btn:hover { filter: brightness(1.1); background: white; color: var(--gpv-primary); }
.gpv-btn-outline { background: var(--gpv-primary); color: white; border: 1px solid #d1d5db; padding: 8px 14px; border-radius: 6px; cursor: pointer; font-size:13px; transition: 0.2s; }
.gpv-btn-danger-solid { background: var(--gpv-danger, #dc2626) !important; color: #ffffff !important; border: 1px solid var(--gpv-danger, #dc2626) !important; padding: 8px 14px; border-radius: 6px; cursor: pointer; font-size: 13px; transition: 0.2s; }
.gpv-btn-danger-solid:hover { background: #b91c1c !important; border-color: #b91c1c !important; }
.gpv-btn-outline:focus { border: 1px solid var(--gpv-primary) !important; background-color: var(--gpv-primary); }
.gpv-btn-outline:hover { background: var(--gpv-hover); color: var(--gpv-primary); border: 1px solid var(--gpv-primary);}
.gpv-action-btn { background: var(--gpv-bg); border: 1px solid var(--gpv-border); padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 12px; color: var(--gpv-text);}
.gpv-action-btn:hover { background: var(--gpv-hover); }
.gpv-doc-badge { display: inline-flex; align-items: center; gap: 4px; background: var(--gpv-primary); color: white; padding: 4px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; text-decoration: none; border: 1px solid #d1d5db; transition: all 0.2s; }
.gpv-doc-badge:hover { background: #f3f4f6; color: var(--gpv-primary); border-color: var(--gpv-primary); }
.gpv-doc-badge svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gpv-doc-missing { font-size: 11px; color: #9ca3af; padding: 4px 0; }
.gpv-action-group { display: flex; gap: 6px; justify-content: flex-end; }
.gpv-btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; background: var(--gpv-primary); color: white; border: 1px solid #d1d5db; border-radius: 6px; cursor: pointer; transition: all 0.2s ease; padding: 0; }
.gpv-btn-icon:hover { background: #f3f4f6 !important; color: var(--gpv-primary); border-color: #9ca3af; }
.gpv-btn-icon.delete:hover { background: #fee2e2; color: var(--gpv-danger); border-color: #fca5a5; }
.gpv-btn-icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.gpv-ente-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #374151; }
.gpv-ente-label svg { width: 16px; height: 16px; stroke: #9ca3af; fill: none; stroke-width: 2; }
select { -webkit-appearance: none; -moz-appearance: none; appearance: none; padding-right: 30px !important; background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; box-sizing: border-box; min-width: 75px; background-position: right 8px center; background-size: 16px; }
select::-ms-expand { display: none; }

/* Download ZIP documenti/certificati in Riepilogo (usa gli stessi stili .gpv-btn-outline e .gpv-doc-badge già presenti nel resto del plugin, per coerenza grafica) */
.gpv-riepilogo-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.gpv-ente-label.orfano { color: #b91c1c; }
.gpv-ente-label.orfano svg { stroke: #ef4444; }    
.gpv-cal-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 4px 6px; font-size: 10px; font-weight: 600; border-radius: 4px; border: 1px solid transparent; width: 100%; margin-top: 4px; cursor: pointer; transition: all 0.2s; text-decoration: none; }
.gpv-cal-btn svg { width: 12px; height: 12px; stroke-width: 2; fill: none; stroke: currentColor; }
.gpv-cal-btn-upload { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.gpv-cal-btn-upload:hover { background: #fde68a; }
.gpv-cal-btn-view { background: #d1fae5; color: #047857; border-color: #a7f3d0; }
.gpv-cal-btn-view:hover { background: #a7f3d0; }
.exit-button-scu:hover { background: #dc26269e !important;}               
#link-doc-rf a, #link-doc-iban a, #link-doc-contratto a { color: var(--gpv-primary) !important;}

/* Popups (modali) */

.gpv-modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(17, 24, 39, 0.6); z-index: 100002; align-items: center; justify-content: center; backdrop-filter: blur(3px); }
.gpv-modal-box { background: #fff; padding: 24px; border-radius: 12px; width: 420px; max-width: 90%; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); border: 1px solid var(--gpv-border); }
.gpv-modal-header { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.gpv-modal-header svg { width: 24px; height: 24px; stroke: var(--gpv-primary); fill: none; stroke-width: 2; }
.gpv-modal-title { margin: 0; font-size: 18px; color: #111827; }
.gpv-modal-desc { font-size: 13px; color: #6b7280; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--gpv-border); }
.gpv-file-input-wrapper { border: 2px dashed #d1d5db; border-radius: 8px; padding: 20px; text-align: center; background: #f9fafb; transition: all 0.2s; margin-bottom: 15px; }
.gpv-file-input-wrapper:hover { border-color: var(--gpv-primary); background: #f0f9ff; }
.gpv-file-input-wrapper input[type="file"] { max-width: 100%; font-size: 13px; cursor: pointer; }
.gpv-modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.gpv-modal-actions button { flex: 1; justify-content: center; }
.gpv-status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; background: #f3f4f6; border: 1px solid #d1d5db; text-decoration: none; color: #374151; transition: 0.2s; }
.gpv-status-badge.success { background: #d1fae5; color: #047857; border-color: #a7f3d0; }
.gpv-status-badge.success:hover { background: #a7f3d0; }

/* Tutorial */

[data-tooltip] { position: relative; }
[data-tooltip]::after { content: attr(data-tooltip); position: absolute; bottom: calc(100% + 9px); left: 50%; transform: translateX(-50%) translateY(4px); background: #111827; color: #fff; padding: 6px 11px; border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.15s ease, transform 0.15s ease; z-index: 30; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.2); }
[data-tooltip]::before { content: ''; position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%) translateY(4px); border: 5px solid transparent; border-top-color: #111827; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.15s ease, transform 0.15s ease; z-index: 30; }
[data-tooltip]:hover::after, [data-tooltip]:hover::before { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

.gpv-tour-highlight { position: fixed; border-radius: 8px; box-shadow: 0 0 0 9999px rgba(17,24,39,0.65); transition: all 0.35s ease; pointer-events: none; z-index: 100001; }
.gpv-tour-card { position: fixed; background: #fff; border-radius: 10px; padding: 18px 20px; width: 300px; max-width: 90vw; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.25); z-index: 100010; transition: all 0.35s ease; }
.gpv-tour-card h4 { margin: 0 0 8px 0; font-size: 15px; color: #111827; }
.gpv-tour-card p { margin: 0 0 16px 0; font-size: 13px; color: #4b5563; line-height: 1.5; }
.gpv-tour-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.gpv-tour-progress { font-size: 11px; color: #9ca3af; white-space: nowrap; }
.gpv-tour-actions { display: flex; gap: 6px; }
.gpv-tour-actions button { font-size: 12px; padding: 6px 10px; }
.gpv-tour-highlight.gpv-tour-interattivo { animation: gpv-tour-pulse 1.6s ease-out infinite; }
@keyframes gpv-tour-pulse { 0% { box-shadow: 0 0 0 9999px rgba(17,24,39,0.65), 0 0 0 0 rgba(37,99,235,0.6); } 70% { box-shadow: 0 0 0 9999px rgba(17,24,39,0.65), 0 0 0 14px rgba(37,99,235,0); } 100% { box-shadow: 0 0 0 9999px rgba(17,24,39,0.65), 0 0 0 0 rgba(37,99,235,0); } }
.gpv-tour-hint { position: fixed; background: #2563eb; color: #fff; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; z-index: 100011; pointer-events: none; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.25); animation: gpv-tour-hint-salta 1s ease-in-out infinite; white-space: nowrap; }
@keyframes gpv-tour-hint-salta { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* --- Utility di allineamento/icone per l'HTML generato via AJAX (calendario/riepilogo) --- */
/* Nota: selettori scoperti con specificità sufficiente a vincere sulle regole base di .gpv-table */

.gpv-ico16 { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: -3px; }
.gpv-no-underline { text-decoration: none; }
.gpv-riepilogo-toolbar a { text-decoration: none; }
.gpv-doc-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }

.gpv-table th.gpv-c, .gpv-table td.gpv-c { text-align: center; }
.gpv-table td.gpv-nowrap { white-space: nowrap; }

/* Numeri del riepilogo */
.gpv-table td.gpv-num { text-align: center; font-weight: bold; color: #6b7280; }
.gpv-table td.gpv-num.pos-green  { color: #166534; }
.gpv-table td.gpv-num.pos-red    { color: #dc2626; }
.gpv-table td.gpv-num.pos-blue   { color: #2563eb; }
.gpv-table td.gpv-num.pos-purple { color: #8b5cf6; }
.gpv-table td.gpv-num.pos-pink   { color: #ec4899; }
.gpv-table td.gpv-num.pos-arancio { color: #b45309; font-weight: bold; }

/* Calendario */
.gpv-cal-table { min-width: 1200px; }
.gpv-table th.gpv-sticky-head { position: sticky; left: 0; z-index: 2; background: var(--gpv-bg); border-right: 2px solid var(--gpv-border); }
.gpv-cal-table td.gpv-sticky-cell { position: sticky; left: 0; z-index: 1; background: #fff; border-right: 2px solid var(--gpv-border); min-width: 180px; }
.gpv-cal-table th.gpv-cal-day { text-align: center; padding: 5px; }
.gpv-cal-table td.gpv-cal-cell { padding: 5px; text-align: center; vertical-align: top; }
.gpv-cal-select { width: 55px; font-size: 12px; padding: 4px; padding-right: 18px !important; display: block; margin: 0 auto; background-position: right 3px center; background-size: 12px; }
.gpv-lim-wrap { font-size: 11px; margin-top: 6px; }
.gpv-lim-badge { display: inline-block; padding: 3px 6px; border-radius: 4px; }
.gpv-lim-mal { color: #166534; background: #bbf7d0; margin-bottom: 3px; }
.gpv-lim-perm { color: #1e40af; background: #bfdbfe; }
.gpv-lim-badge.over { color: #fff; background: var(--gpv-danger); }
.gpv-lim-badge.non-retrib { color: #fff; background: #b45309; }
.gpv-lim-badge.decaduto { color: #fff; background: var(--gpv-danger); font-weight: bold; }

/* Pulsanti "X" di chiusura (hover via CSS, non più inline) */
.gpv-close-icon:hover { background: #f3f4f6 !important; color: #ef4444 !important; }

/* --- Toast (sostituisce alert()) --- */
#gpv-toast-host { position: fixed; bottom: 20px; right: 20px; z-index: 100050; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.gpv-toast { background: #1f2937; color: #fff; padding: 12px 16px; border-radius: 8px; font-size: 13px; line-height: 1.4; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3); opacity: 0; transform: translateY(10px); transition: opacity 0.3s ease, transform 0.3s ease; }
.gpv-toast.show { opacity: 1; transform: translateY(0); }
.gpv-toast-error { background: #b91c1c; }
.gpv-toast-success { background: #047857; }
.gpv-toast-info { background: #1f2937; }

/* --- Conferma modale (sostituisce confirm()) --- */
.gpv-confirm-overlay { position: fixed; inset: 0; background: rgba(17,24,39,0.6); z-index: 100060; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(3px); }
.gpv-confirm-box { background: #fff; border-radius: 12px; padding: 24px; width: 380px; max-width: 90%; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2); }
.gpv-confirm-msg { margin: 0 0 20px; font-size: 14px; color: var(--gpv-text); line-height: 1.5; }
.gpv-confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }
.gpv-confirm-actions button { min-width: 100px; justify-content: center; }

/* --- Overlay "sessione scaduta" per inattività (non chiudibile) --- */
.gpv-session-overlay { position: fixed; inset: 0; background: rgba(17,24,39,0.75); z-index: 100070; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.gpv-session-box { background: #fff; border-radius: 12px; padding: 28px; width: 420px; max-width: 90%; text-align: center; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.25); }
.gpv-session-box h3 { margin: 0 0 10px; font-size: 18px; color: var(--gpv-text); }
.gpv-session-box p { margin: 0 0 20px; font-size: 14px; color: #4b5563; line-height: 1.5; }
.gpv-session-box .gpv-btn { justify-content: center; width: 100%; }

/* Mobile */

   @media screen and (max-width: 768px) {
    header { flex-direction: column; align-items: flex-start !important; gap: 15px !important; }
    header > div:last-child { flex-direction: row !important; width: 100%; justify-content: space-between; gap: 10px; }
    header > div:last-child a, header > div:last-child button { flex: 1; justify-content: center; }
    .gpv-tabs-container { flex-direction: column; align-items: stretch !important; gap: 15px; border-bottom: none; }
    .gpv-tabs { display: flex; flex-direction: column; gap: 6px; }
    .gpv-tabs button { border-radius: 6px !important; border: 1px solid var(--gpv-border) !important; padding: 10px; }
    .gpv-tabs button.active { border-color: var(--gpv-primary) !important; background: var(--gpv-primary); color: white; }
    .gpv-tabs-container > div { width: 100% !important; max-width: 100% !important; }
    #gpv-btn-nuovo-volontario { width: 100%; justify-content: center; margin-top: 10px; }
    .gpv-view > div[style*="justify-content:space-between"] { flex-direction: column; align-items: flex-start !important; }
    .gpv-form-grid, #gpv-tour-documenti { grid-template-columns: 1fr !important; }
    .gpv-form-group[style*="grid-column"] { grid-column: span 1 !important; }
    .gpv-form-group > div[style*="display: flex"] { flex-wrap: wrap; gap: 10px; }
    #form-salva-volontario > div:last-child { flex-direction: column; gap: 10px; }
    #form-salva-volontario > div:last-child button { width: 100%; justify-content: center; margin: 0 !important; }
    #gpv-tour-cal-controls > div, #gpv-tour-riepilogo-controls > div { flex-direction: column; align-items: stretch !important; gap: 10px; width: 100%; }
    #gpv-tour-cal-controls button, #gpv-tour-riepilogo-controls button { width: 100%; justify-content: center; }
    #gpv-tour-cal-controls > div:nth-child(2) > div { display: grid !important; grid-template-columns: 1fr 1fr; font-size: 11px; padding: 10px !important; gap: 8px !important; }
    .gpv-table th, .gpv-table td { padding: 8px 6px; font-size: 12px; }
    .gpv-table-responsive { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; width: calc(100% + 40px); box-sizing: border-box; }
    .gpv-table th:first-child, .gpv-table td:first-child { min-width: 110px !important; }
    .gpv-cal-btn { font-size: 9px; padding: 4px; }
    .gpv-action-group { flex-wrap: wrap; gap: 6px; }
    .gpv-modal-box { width: 92%; padding: 15px; }
    .gpv-modal-actions { flex-direction: column; gap: 10px; margin-top: 15px; }
    .gpv-modal-actions button { width: 100%; }
}








/* Sfondo generale della pagina di login per allinearsi al mockup */
body.wp-singular.page-template-default {
    background-color: #f0f6ff !important; /* L'azzurro chiarissimo tipico del mockup */
}

/* Contenitore principale del Form (Card) */
.gpv-login-wrap {
    background: #ffffff !important;
    border-radius: 15px !important; /* Angoli arrotondati come le card del mockup */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05) !important; /* Ombra morbida e moderna */
    padding: 40px 32px !important;
    max-width: 420px !important;
    margin: 40px auto !important;
    border: none !important;
}

/* Titolo "Accedi all'area Enti" */
.gpv-login-wrap h3 {
    color: #1e293b !important; /* Blu scuro/antracite elegante */
    font-size: 24px !important;
    font-weight: 700 !important;
    text-align: center !important;
    margin-bottom: 28px !important;
}

/* Campi di Input (Testo ed Email) */
.gpv-login-wrap input[type="text"],
.gpv-login-wrap input[type="password"] {
    width: 100% !important;
    height: 48px !important;
    background-color: #f8fafc !important; /* Sfondo grigio/azzurro chiarissimo */
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    font-size: 15px !important;
    color: #334155 !important;
    transition: all 0.2s ease-in-out !important;
    box-sizing: border-box !important;
}

/* Focus sui campi di input */
.gpv-login-wrap input[type="text"]:focus,
.gpv-login-wrap input[type="password"]:focus {
    background-color: #ffffff !important;
    border-color: #0284c7 !important; /* Colore focus (azzurro del brand) */
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
    outline: none !important;
}

/* Etichette dei campi (Label) */
.gpv-login-wrap label {
    display: block !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    color: #475569 !important;
    margin-bottom: 6px !important;
    text-align: left !important;
}

/* Spaziature dei paragrafi del form */
.gpv-login-wrap p {
    margin-bottom: 20px !important;
}

/* Checkbox "Ricordami" */
.gpv-login-wrap input[type="checkbox"] {
    border-radius: 4px !important;
    border: 1.5px solid #cbd5e1 !important;
    width: 16px !important;
    height: 16px !important;
    margin-right: 8px !important;
    vertical-align: middle !important;
}

/* Testo "Ricordami" */
.gpv-login-wrap .login-remember label {
    display: inline-block !important;
    font-size: 13px !important;
    color: #64748b !important;
    font-weight: 500 !important;
    cursor: pointer !important;
}

/* Pulsante di Accesso */
.gpv-login-wrap input[type="submit"], 
.gpv-login-wrap button[type="submit"] {
    width: 100% !important;
    height: 48px !important;
    background-color: #c2410c !important; /* Arancione scuro "Rethink Yourself" per l'azione principale */
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
    margin-top: 10px !important;
}

.gpv-login-wrap input[type="submit"]:hover,
.gpv-login-wrap button[type="submit"]:hover {
    background-color: #ea580c !important; /* Hover arancione leggermente più luminoso */
}

/* Link di recupero password */
.gpv-login-meta a {
    display: block !important;
    text-align: center !important;
    color: #0284c7 !important; /* Azzurro per i link */
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    margin-top: 15px !important;
    transition: color 0.2s ease !important;
}

.gpv-login-meta a:hover {
    color: #0369a1 !important;
    text-decoration: underline !important;
}

.gpv-alert-limiti {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid var(--gpv-danger, #dc2626);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 15px;
}
.gpv-alert-limiti-titolo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    color: #991b1b;
    margin-bottom: 6px;
}
.gpv-alert-limiti-titolo svg {
    width: 18px;
    height: 18px;
    stroke: #991b1b;
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
}
.gpv-alert-limiti-lista {
    margin: 0;
    padding-left: 20px;
    color: #7f1d1d;
    font-size: 13px;
}
.gpv-alert-limiti-lista li { margin-bottom: 2px; }

/* Alert collassabili: titolo cliccabile, scelta memorizzata nel browser */
.gpv-alert-limiti-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.gpv-alert-limiti-header .gpv-alert-limiti-titolo { margin-bottom: 0; flex: 1; }
.gpv-alert-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.gpv-alert-toggle-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
}
.gpv-alert-limiti-lista {
    overflow: hidden;
    max-height: 400px;
    transition: max-height 0.2s ease, margin-top 0.2s ease;
    margin-top: 6px;
}
.gpv-alert-collassato .gpv-alert-toggle-btn { transform: rotate(-90deg); }
.gpv-alert-collassato .gpv-alert-limiti-lista { max-height: 0; margin-top: 0; }

/* Varianti di colore (sostituiscono i vecchi stili inline duplicati) */
.gpv-alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    border-left-color: #b45309;
}
.gpv-alert-warning .gpv-alert-limiti-titolo,
.gpv-alert-warning .gpv-alert-limiti-titolo svg { color: #92400e; stroke: #92400e; }
.gpv-alert-warning .gpv-alert-limiti-lista { color: #78350f; }

/* Colonna "Registro": compatta, con icone leggibili e ad alto contrasto */
.gpv-col-registro { width: 60px; text-align: center !important; }
.gpv-registro-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    padding: 0;
    border: 1.5px solid transparent;
}
.gpv-registro-badge svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.gpv-registro-ok { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.gpv-registro-mancante { background: #fef3c7; color: #92400e; border-color: #fde68a; cursor: pointer; transition: all 0.2s ease; }
.gpv-registro-mancante:hover { background: #fde68a; color: #78350f; }

/* Riga che richiede attenzione (registro mancante), meno grave del contratto decaduto */
.gpv-riga-attenzione { background: #fffbeb; }
.gpv-riga-attenzione:hover { background: #fef3c7; }

.gpv-registri-box {
    background: #fff;
    border: 1px solid var(--gpv-border, #e5e7eb);
    border-radius: 8px;
    padding: 16px 20px;
}
.gpv-registri-box h3, .gpv-registri-box h4 {
    margin-top: 0;
}

/* ---------------------------------------------------------------- */
/* MODULISTICA: pensata per essere semplicissima e leggibile anche   */
/* per chi non ha esperienza con i sistemi digitali (font grandi,    */
/* icone chiare, un solo pulsante grande per azione).                */
/* ---------------------------------------------------------------- */
.gpv-modulistica-avviso {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 15px;
    line-height: 1.4;
}
.gpv-modulistica-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 10px;
    align-items: stretch;
}
.gpv-modulo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    background: var(--gpv-bg);
    border: 1px solid var(--gpv-border, #e5e7eb);
    border-radius: 10px;
    padding: 18px 14px;
    height: 100%;
    box-sizing: border-box;
    min-width: 0;
}
.gpv-modulo-icona {
    font-size: 36px;
    line-height: 1;
    flex-shrink: 0;
}
.gpv-modulo-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    min-width: 0;
    /* Spinge il pulsante in fondo, così tutti i tasti restano allineati
       sulla stessa linea anche con titoli di lunghezza molto diversa. */
    flex-grow: 1;
}
.gpv-modulo-info strong {
    font-size: 15px;
    line-height: 1.35;
    color: var(--gpv-text);
    /* I titoli lunghi senza spazi (es. "Registro_Formazione_Specifica_...")
       devono andare a capo e spezzarsi, non sfondare la card. */
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}
.gpv-modulo-info span {
    font-size: 13px;
    color: #6b7280;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.gpv-modulo-btn {
    width: 100%;
    justify-content: center;
    font-size: 15px !important;
    padding: 10px 14px !important;
    margin-top: auto;
    flex-shrink: 0;
}

.gpv-riga-contratto-decaduto {
    outline: 2px solid var(--gpv-danger, #dc2626);
    outline-offset: -2px;
    background: #fef2f2 !important;
}
.gpv-riga-contratto-decaduto td {
    background: #fef2f2 !important;
}