:root{
    --bg:#f4f6f8;
    --surface:#ffffff;
    --ink:#0D1117;
    --muted:#5a6472;
    --brand:#0D1117;      /* Navy HNH */
    --brand-2:#5A8096;    /* Steel Blue HNH - Pantone 2165 */
    --brand-2-soft:#eaf1f4;
    --accent:#c98a3a;     /* accento caldo, coerente con la palette calda del Gruppo */
    --success:#5A8096;
    --line:#dbe2e8;
    --shadow:0 14px 40px rgba(13,17,23,.10);
    --radius:16px;
    --font-heading:"Cambria","Sabon MT","Georgia",serif;
    --font-body:"Calibri","DM Sans","Segoe UI",Arial,sans-serif;
}
*{box-sizing:border-box;}
.hidden { display: none !important; }
html{scroll-behavior:smooth;}
body{
    margin:0;
    font-family:var(--font-body);
    color:var(--ink);
    background:radial-gradient(circle at top left, rgba(90,128,150,.10), transparent 34rem),linear-gradient(180deg,#f8fafb 0%,var(--bg) 100%);
}
.app-shell{width:min(1760px, calc(100% - 32px));margin:0 auto;padding:24px 0 40px;}

.layout{
    display:grid;
    grid-template-columns:minmax(0, 1fr) 430px;
    gap:22px;
    align-items:start;
    min-width:0;
}

.hero{
    background:
        linear-gradient(
            135deg,
            #0D1117 0%,
            #5A8096 100%
            );
    color:white;
    border:1px solid rgba(13,17,23,.08);
    box-shadow:var(--shadow);
    border-radius:var(--radius);
    padding:18px 28px;
    margin-bottom:20px;
    display:block;
}

.hero h1{
    font-family:var(--font-heading);
    font-weight:400;
    margin:0px 0 18px;
    font-size:clamp(32px,4vw,54px);
    line-height:1.1;
    letter-spacing:-.01em;
    text-transform:none;
}
.hero p{
    margin:0;color:rgba(255,255,255,.85);max-width:820px;font-size:15.5px;line-height:1.65;}
.hero .motto{
    display:block;margin-top:10px;font-style:italic;color:rgba(255,255,255,.7);font-size:14px;}
.badge{display:inline-flex;align-items:center;gap:8px;border-radius:999px;padding:7px 13px;font-size:11.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--brand);background:var(--brand-2-soft);border:1px solid rgba(90,128,150,.25);}

.viewer-card,.panel{background:var(--surface);border:1px solid rgba(13,17,23,.08);border-radius:var(--radius);box-shadow:var(--shadow);}
.viewer-card{padding:18px;}
.viewer-toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:0 2px 14px;border-bottom:1px solid var(--line);margin-bottom:16px;}
.viewer-toolbar strong{font-family:var(--font-heading);font-weight:700;font-size:15px;}
.viewer-toolbar span{font-size:13px;color:var(--muted);}
.actions{display:flex;gap:8px;flex-wrap:wrap;}
.btn{border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:10px;padding:9px 13px;font-weight:600;font-family:var(--font-body);cursor:pointer;transition:.18s ease;}
.btn:hover{border-color:var(--brand-2);color:var(--brand-2);background:var(--brand-2-soft);}
.btn.primary{background:var(--brand);border-color:var(--brand);color:white;}
.btn.primary:hover{background:#1a2333;color:white;}

.payroll-frame{
    position:relative;
    width:100%;
    margin:0 auto;
    background:#fff;
    border-radius:10px;
    border:1px solid #e5e7eb;
    overflow:hidden;
}
.payroll-frame img{display:block;width:100%;height:auto;user-select:none;-webkit-user-drag:none;}
.overlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;}
.hotspot,.hotspot-label,.hotspot-number{pointer-events:auto;}
.hotspot{fill:rgba(90,128,150,.06);stroke:rgba(90,128,150,.45);stroke-width:2;cursor:pointer;transition:fill .18s ease, stroke .18s ease, stroke-width .18s ease;outline:none;}
.hotspot:hover,.hotspot:focus{fill:rgba(201,138,58,.24);stroke:var(--accent);stroke-width:4;}
.hotspot.active, .hotspot.active-hotspot{fill:rgba(90,128,150,.22);stroke:var(--brand-2);stroke-width:4;}
.hotspot.active-search{fill:rgba(201,138,58,.35);stroke:var(--accent);stroke-width:4;}
.overlay.hidden .hotspot{fill:transparent;stroke:transparent;}
.overlay.hidden .hotspot.active, .overlay.hidden .hotspot.active-hotspot{fill:rgba(90,128,150,.20);stroke:var(--brand-2);}
.hotspot-number{filter:drop-shadow(0 2px 4px rgba(0,0,0,.25));}
.overlay.hidden .hotspot-number{opacity:.18;}

.panel{
    position:sticky;
    top:18px;
    max-height:calc(100vh - 36px);
    overflow:auto;
    padding:24px;
    scrollbar-width:thin;
    scrollbar-color:var(--brand-2) transparent;
}
.panel-top{padding-bottom:18px;border-bottom:1px solid var(--line);margin-bottom:18px;}
.panel h2{font-family:var(--font-heading);font-weight:400;margin:10px 0 10px;font-size:25px;line-height:1.2;color:var(--brand);}
.panel h3{margin:18px 0 8px;font-size:15.5px;color:var(--brand);}
.panel p{line-height:1.65;color:#344054;margin:0 0 12px;}
.panel ul{padding-left:20px;margin:8px 0 0;}
.panel li{margin:7px 0;line-height:1.5;color:#344054;}
.info-box{margin:14px 0;border-left:4px solid var(--brand-2);background:var(--brand-2-soft);border-radius:8px;padding:14px 15px;}
.info-box strong{color:var(--brand);}

.quick-list{display:grid;gap:9px;margin-top:15px;}
.quick-item{
    width:100%;
    text-align:left;
    border:1px solid var(--line);
    background:#fff;
    border-radius:12px;
    padding:11px 12px;
    cursor:pointer;
    display:flex;
    align-items:center;
    gap:10px;
    transition:.18s ease;
}
.quick-item:hover{border-color:var(--brand-2);background:var(--brand-2-soft);}
.quick-item.active{border-color:var(--brand-2);background:var(--brand-2-soft);}
.quick-num{width:25px;height:25px;border-radius:50%;display:grid;place-items:center;color:#fff;background:var(--brand-2);font-size:12px;font-weight:700;flex:0 0 auto;}
.quick-item.active .quick-num{background:var(--brand);}
.quick-title{font-weight:700;display:block;color:var(--ink);}
.quick-desc{font-size:12px;color:var(--muted);display:block;margin-top:1px;}

.disclaimer{margin-top:18px;padding:13px 14px;border-radius:12px;background:#fbf3e9;border:1px solid #ecd3ac;color:#6b4a1e;font-size:13px;line-height:1.55;}
.footer-note{margin-top:20px;color:var(--muted);font-size:12px;line-height:1.6;text-align:center;}
.footer-note strong{color:var(--brand);font-family:var(--font-heading);}

.mobile-tip{display:none;}

.hero-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:16px;
    margin-bottom:10px;
}

.faq{
    margin-top:24px;
    padding-top:20px;
    border-top:1px solid var(--line);
}

.faq h2{
    font-family:var(--font-heading);
    font-size:24px;
    margin-bottom:10px;
    color:var(--brand);
}

@media (max-width:1120px){

    .layout{
        display:flex;
        flex-direction:column;
        gap:22px;
    }

    .viewer-card{
        order:1;
        width:100%;
    }

    .panel{
        width:100%;
        position:relative;
        top:auto;
        order:2;
    }

}


@media (max-width:720px){
    .app-shell{
        width:100%;
        padding:8px;
    }
    .hero{
        padding:16px;
        border-radius:14px;
    }
    .hero h1{
        font-size:28px;
    }
    .hero p{font-size:14.5px;}
    .viewer-card{padding:10px;border-radius:14px;}
    .viewer-toolbar{align-items:stretch;flex-direction:column;gap:10px;border-bottom:none;padding-bottom:6px;margin-bottom:10px;}
    .viewer-toolbar strong{font-size:16px;}
    .actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
    .btn{padding:12px 10px;font-size:13.5px;text-align:center;}
    .panel{padding:18px;border-radius:14px;}
    .panel h2{font-size:21px;}
    .panel p,.panel li{font-size:14.5px;}
    .hotspot{stroke-width:3;}
    .mobile-tip{display:flex;align-items:center;gap:8px;background:var(--brand-2-soft);border:1px solid rgba(90,128,150,.3);color:var(--brand);border-radius:10px;padding:10px 12px;font-size:13px;line-height:1.5;margin-bottom:14px;}
    .quick-list{margin-top:12px;}
    .quick-item{
        padding:14px 12px;
        min-height:64px;
        border-radius:14px;
    }
    .quick-num{width:30px;height:30px;font-size:13px;}
    .quick-title{font-size:15px;}
    .quick-desc{font-size:12.5px;}
    .disclaimer,.info-box{font-size:13.5px;}
    .footer-note{font-size:11.5px;padding:0 6px;}
    .hero-actions{
    display:grid;
    grid-template-columns:1fr;
}

    .payroll-frame img,
    .payroll-frame svg{
        width:100%;
    }
}

.smart-search{
    margin-top:12px;
    margin-bottom:12px;
}

.smart-search input{
    width:100%;
    padding:20px 24px;
    border:1px solid var(--line);
    border-radius:14px;
    font-size:18px;
    font-family:var(--font-body);
    height:64px;
    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.smart-search input:focus{
    outline:none;
    border-color:var(--brand-2);
    box-shadow:0 0 0 4px rgba(90,128,150,.15);
}

.hero-logo{
    width:110px;
    height:auto;
    display:block;
    margin-bottom:10px;
    max-width:100%;
}

.hero-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:18px;
}

.hero-subtitle{
    margin-top:12px;
    font-size:16px;
    color:rgba(255,255,255,.85);
    max-width:700px;
    line-height:1.6;
}

.panel::-webkit-scrollbar{
    width:8px;
}

.panel::-webkit-scrollbar-thumb{
    background:var(--brand-2);
    border-radius:999px;
}

.panel::-webkit-scrollbar-track{
    background:transparent;
}

@media (max-width:480px){

    .hero-top{
        flex-direction:column;
        align-items:flex-start;
        gap:12px;
    }

}

.panel.flash{
    animation:flashPanel .7s ease;
}

@keyframes flashPanel{

    0%{
        box-shadow:0 0 0 0 rgba(90,128,150,.5);
    }

    50%{
        box-shadow:0 0 0 10px rgba(90,128,150,.15);
    }

    100%{
        box-shadow:var(--shadow);
    }
}

/* --- BARRA SESSIONE COLLABORATORE / SIMULAZIONE ACCESSI --- */
.user-portal-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0D1117;
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius);
    margin-bottom: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    flex-wrap: wrap;
    gap: 12px;
}

.portal-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.portal-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--brand-2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.portal-user-text strong {
    display: block;
    font-size: 0.95rem;
    color: #fff;
}

.portal-user-text span {
    font-size: 0.8rem;
    color: #9cb3c9;
}

.contract-badge {
    background: #c98a3a;
    color: #fff;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 6px;
}

.portal-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
}

.portal-switcher label {
    font-size: 0.82rem;
    color: #c0d1e2;
}

.portal-select {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.25);
    background: #1a2333;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

.portal-hr-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.2);
    transition: background 0.15s;
}

.portal-hr-link:hover {
    background: rgba(255,255,255,0.22);
}

.contract-notice {
    background: #eaf1f4;
    border-left: 4px solid var(--brand-2);
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
    font-size: 0.88rem;
    margin-bottom: 16px;
    color: #1e3a54;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notice-badge {
    background: var(--brand-2);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 1px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    color: var(--brand);
}

.badge-input:focus {
    border-color: var(--brand-2);
    box-shadow: 0 0 0 4px rgba(90, 128, 150, 0.2);
}

.portal-logout-btn {
    background: rgba(255,255,255,0.12);
    color: #e2e8f0;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.portal-logout-btn:hover {
    background: rgba(255,255,255,0.22);
    color: #fff;
}

/* --- MODALE BENVENUTO / PRIMA VISITA PER LINK UNICO --- */
.welcome-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(13, 17, 23, 0.85);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(4px);
}

.welcome-modal-backdrop.hidden {
    display: none !important;
}

.welcome-card {
    background: #ffffff;
    width: 100%;
    max-width: 440px;
    border-radius: 18px;
    padding: 28px 24px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    text-align: center;
    animation: fadeInScale 0.25s ease-out;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.94); }
    to { opacity: 1; transform: scale(1); }
}

.welcome-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--brand-2);
    background: var(--brand-2-soft);
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.welcome-card h2 {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    color: var(--brand);
    margin: 0 0 8px;
}

.welcome-subtitle {
    font-size: 0.92rem;
    color: var(--muted);
    margin: 0 0 20px;
    line-height: 1.45;
}

.contract-picker-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.contract-pick-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: all 0.18s ease;
    width: 100%;
}

.contract-pick-btn:active,
.contract-pick-btn:hover {
    border-color: var(--brand-2);
    background: #f0f7fb;
    transform: translateY(-1px);
}

.pick-icon {
    font-size: 1.7rem;
    min-width: 36px;
    text-align: center;
}

.pick-text {
    flex: 1;
}

.pick-text strong {
    display: block;
    font-size: 0.98rem;
    color: var(--ink);
    margin-bottom: 2px;
}

.pick-text span {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.25;
    display: block;
}

.pick-arrow {
    font-size: 1.3rem;
    color: var(--brand-2);
    font-weight: bold;
}

.welcome-footer-note {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.4;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
}

/* --- SELETTORE MODALITÀ MOBILE (SCHEDE vs GRAFICO) --- */
.mobile-mode-selector {
    display: none;
    margin-bottom: 16px;
    background: #e2e8f0;
    padding: 4px;
    border-radius: 12px;
    gap: 6px;
}

.mode-tab-btn {
    flex: 1;
    border: none;
    padding: 12px 14px;
    border-radius: 9px;
    font-size: 0.92rem;
    font-weight: 700;
    font-family: inherit;
    color: #4a5568;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 48px;
}

.mode-tab-btn.active {
    background: #ffffff;
    color: var(--brand);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* --- VISTA A SCHEDE TOUCH (OTTIMIZZATA PER SMARTPHONE) --- */
.cards-view-section {
    display: none;
    width: 100%;
}

.cards-view-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.cards-view-header h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--brand);
    margin: 0 0 4px;
}

.cards-view-header p {
    font-size: 0.88rem;
    color: var(--muted);
    margin: 0;
}

.category-group {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.category-header {
    background: #f8fafc;
    padding: 14px 18px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand);
    border-bottom: 1px solid #edf2f7;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-items-grid {
    display: flex;
    flex-direction: column;
}

.touch-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border: none;
    background: transparent;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
    width: 100%;
    cursor: pointer;
    transition: background 0.15s ease;
    min-height: 60px;
}

.touch-card:last-child {
    border-bottom: none;
}

.touch-card:active,
.touch-card:hover {
    background: #f0f7fb;
}

.touch-card-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.touch-card-icon {
    font-size: 1.6rem;
    min-width: 36px;
    text-align: center;
}

.touch-card-info h4 {
    margin: 0 0 2px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
}

.touch-card-info p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.touch-card-arrow {
    font-size: 1.2rem;
    color: var(--brand-2);
    margin-left: 10px;
    font-weight: bold;
}

/* --- BARRA ZOOM MOBILE --- */
.mobile-zoom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f1f5f9;
    padding: 8px 14px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.zoom-title {
    font-weight: 600;
    color: #475569;
}

.zoom-btn-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.zoom-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    min-height: 36px;
    min-width: 36px;
    color: var(--brand);
}

.zoom-btn.reset {
    font-size: 0.78rem;
    padding: 6px 10px;
}

.zoom-btn:active {
    background: #e2e8f0;
}

.zoom-badge {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--brand);
    min-width: 44px;
    text-align: center;
}

/* --- SCROLL WRAPPER PER CEDOLINO --- */
.payroll-scroll-wrapper {
    width: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #eef2f6;
    margin-bottom: 16px;
    touch-action: pan-x pan-y;
}

.payroll-scroll-wrapper .payroll-frame {
    transition: width 0.15s ease-out;
    margin: 0 auto;
}

/* --- BOTTOM SHEET MODALE DA SMARTPHONE --- */
.bottom-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(13, 17, 23, 0.65);
    z-index: 10000;
    backdrop-filter: blur(2px);
    transition: opacity 0.25s ease;
}

.bottom-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.25);
    z-index: 10001;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    transform: translateY(0);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-sheet.hidden,
.bottom-sheet-backdrop.hidden {
    display: none !important;
}

.bottom-sheet-handle-bar {
    padding: 12px 18px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    user-select: none;
}

.bottom-sheet-handle {
    width: 44px;
    height: 5px;
    background: #cbd5e1;
    border-radius: 999px;
}

.bottom-sheet-close {
    position: absolute;
    right: 16px;
    top: 8px;
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottom-sheet-content {
    padding: 10px 20px 34px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

.desktop-only-tip {
    display: none;
}

/* --- REGOLE MOBILE RESPONSIVE AVANZATE --- */
@media (max-width: 960px) {
    .mobile-mode-selector {
        display: flex;
    }

    /* Modalità attiva: mostra solo la sezione scelta */
    .mobile-view-cards #cardsViewSection {
        display: block;
    }
    .mobile-view-cards #viewerCard {
        display: none;
    }

    .mobile-view-visual #cardsViewSection {
        display: none;
    }
    .mobile-view-visual #viewerCard {
        display: block;
    }

    /* Su schermi mobili il pannello laterale statico viene nascosto poiché c'è il Bottom Sheet */
    .panel {
        display: none;
    }

    .user-portal-bar {
        padding: 12px 14px;
    }
    .portal-user-info {
        width: 100%;
        margin-bottom: 6px;
    }
    .portal-switcher {
        width: 100%;
        justify-content: space-between;
    }
    .portal-select {
        flex: 1;
        max-width: 220px;
    }

    /* Input search touch-friendly senza zoom forzato di iOS */
    .smart-search input {
        font-size: 16px !important;
        height: 52px;
        padding: 12px 16px;
    }

    .hero h1 {
        font-size: 24px;
        margin-bottom: 10px;
    }
    .hero-actions .btn {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14.5px;
    }
}

@media (min-width: 961px) {
    /* Su desktop mostra sempre sia il viewer che il panel */
    #cardsViewSection {
        display: none !important;
    }
    #viewerCard {
        display: block !important;
    }
    .panel {
        display: block !important;
    }
    .bottom-sheet, .bottom-sheet-backdrop {
        display: none !important;
    }
    .desktop-only-tip {
        display: block;
        background: #f0f7fb;
        border: 1px solid #c7e1f4;
        padding: 8px 12px;
        border-radius: 8px;
        font-size: 0.82rem;
        color: #1d70b8;
        margin: 12px 0;
    }
}

@media print{body{background:white;}.hero,.panel,.viewer-toolbar,.footer-note,.user-portal-bar,.contract-notice,.mobile-mode-selector,.cards-view-section,.bottom-sheet,.bottom-sheet-backdrop{display:none!important;}.app-shell{width:100%;padding:0;}.viewer-card{box-shadow:none;border:none;padding:0;}.overlay{display:none;}}
