/* ==========================
    INDEX MONITORAMI
========================== */
        :root {
            /* Palette */
            --color-bg-gradient: linear-gradient(135deg, #eef6ff 0%, #ffffff 100%);
            --color-bg: #ffffff;
            --color-bg-alt: #f8fbff;
            --color-bg-card: #ffffff;
            --color-bg-dashboard: rgba(255,255,255,0.88);
            --color-bg-dashboard-summary: #eaf3ff;
            --color-bg-hero-before: #005cae;
            --color-bg-step: #fff;
            --color-bg-badge: #edf6ff;
            --color-bg-badge-light: #eef6ff;
            --color-bg-btn-outline: #fff;
            --color-bg-btn-outline-hover: #f5f9ff;
            --color-bg-btn-primary-gradient: linear-gradient(135deg,#1D3470 0%,#0755E3 60%,#3FA9F5 100%);
            --color-bg-step-number: linear-gradient(135deg,#13c8a1,#005cae);
            --color-bg-upload: #f8fbff;
            --color-bg-upload-border: #b7d7f5;
            --color-bg-upload-light: #f8fbff;
            --color-bg-border: #d7e5f3;
            --color-bg-border-strong: #dce8f5;
            --color-bg-border-focus: #005cae;
            --color-bg-border-dashboard: #e4edf7;
            --color-bg-border-dashboard-hover: #e4edf7;
            --color-bg-notification: #f8fbff;
            --color-bg-notification-dark: #213149;
            --color-bg-dashboard-summary-dark: #243852;
            --color-bg-step-dark: #182437;
            --color-bg-card-dark: #182437;
            --color-bg-dashboard-dark: #182437;
            --color-bg-alt-dark: #213149;
            --color-bg-btn-outline-dark: transparent;
            --color-bg-btn-outline-hover-dark: #314761;
            --color-bg-upload-dark: #213149;
            --color-bg-upload-border-dark: #314761;
            --color-bg-upload-light-dark: #213149;

            --color-text: #334155;
            --color-text-strong: #0c1c33;
            --color-text-hero: #475569;
            --color-text-topbar: #4a5a7a;
            --color-text-topbar-hover: #005cae;
            --color-text-btn-primary: #fff;
            --color-text-btn-outline: #005cae;
            --color-text-btn-outline-hover: #005cae;
            --color-text-badge: #0654a2;
            --color-text-dashboard-summary: #005cae;
            --color-text-dashboard-summary-dark: #fff;
            --color-text-notification-strong: #005cae;
            --color-text-company: #10213a;
            --color-text-timestamp: #7a8ca5;
            --color-text-muted: #64748b;
            --color-text-link: #005cae;
            --color-text-h: #0c1c33;
            --color-text-h2: #0c1c33;
            --color-text-white: #fff;
            --color-text-dark: #10213a;
            --color-text-upload: #212529;
            --color-text-badge-light: #212529;

            --color-border: #d7e5f3;
            --color-border-strong: #dce8f5;
            --color-border-focus: #005cae;
            --color-border-dashboard: #e4edf7;
            --color-border-dashboard-hover: #e4edf7;
            --color-border-step: #e4edf7;
            --color-border-btn-outline: #dce8f5;
            --color-border-btn-outline-hover: #005cae;
            --color-border-notification: #e4edf7;
            --color-border-notification-left: transparent;
            --color-border-upload: #b7d7f5;
            --color-border-upload-2: #b7d7f5;

            --color-card-shadow: 0 20px 60px rgba(0,92,174,0.10);
            --color-card-shadow-hover: 0 24px 55px rgba(13,27,47,.12);
            --color-dashboard-shadow: 0 18px 45px rgba(13,27,47,.10);
            --color-dashboard-shadow-hover: 0 24px 55px rgba(13,27,47,.12);
            --color-step-shadow: 0 10px 25px rgba(13,27,47,.08);
            --color-step-shadow-hover: 0 20px 40px rgba(0,92,174,.16);
            --color-btn-primary-shadow: 0 10px 30px rgba(7,85,227,.22), 0 2px 8px rgba(29,52,112,.12);
            --color-btn-primary-shadow-hover: 0 18px 40px rgba(7,85,227,.30), 0 6px 16px rgba(29,52,112,.18);

            --transition-main: background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
            --transition-btn: background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.2s;
            --transition-hover: background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.2s;
        }

        body.dark {
            --bs-border-color: #314761;
            --bs-progress-bg: #26384f;
            --color-bg-gradient: linear-gradient(135deg, #0f1724 0%, #142032 100%);
            --color-bg: #0f1724;
            --color-bg-alt: #213149;
            --color-bg-card: #182437;
            --color-bg-dashboard: #182437;
            --color-bg-dashboard-summary: rgba(255,255,255,.08);
            --color-bg-hero-before: #005cae;
            --color-bg-step: #182437;
            --color-bg-badge: rgba(255,255,255,.10);
            --color-bg-badge-light: #213149;
            --color-bg-btn-outline: transparent;
            --color-bg-btn-outline-hover: #314761;
            --color-bg-btn-primary-gradient: linear-gradient(45deg,#1d3470,#0755e3,#3fa9f5);
            --color-bg-step-number: linear-gradient(135deg,#13c8a1,#005cae);
            --color-bg-upload: #213149;
            --color-bg-upload-border: #314761;
            --color-bg-upload-light: #213149;
            --color-bg-border: rgba(255,255,255,.12);
            --color-bg-border-strong: #3e5676;
            --color-bg-border-focus: #005cae;
            --color-bg-border-dashboard: #2d4058;
            --color-bg-border-dashboard-hover: #2d4058;
            --color-bg-border-notification: #314761;
            --color-bg-notification: #213149;

            --color-text: #dbe6f3;
            --color-text-strong: #fff;
            --color-text-hero: #a8b7cb;
            --color-text-topbar: #dbe6f3;
            --color-text-topbar-hover: #fff;
            --color-text-btn-primary: #fff;
            --color-text-btn-outline: #fff;
            --color-text-btn-outline-hover: #fff;
            --color-text-badge: #ffffff;
            --color-text-dashboard-summary: #fff;
            --color-text-dashboard-summary-dark: #fff;
            --color-text-notification-strong: #fff;
            --color-text-company: #dbe6f3;
            --color-text-timestamp: #a8b7cb;
            --color-text-muted: #a8b7cb;
            --color-text-link: #fff;
            --color-text-h: #fff;
            --color-text-h2: #fff;
            --color-text-white: #fff;
            --color-text-dark: #fff;
            --color-text-upload: #dbe6f3;
            --color-text-badge-light: #fff;

            --color-border: rgba(255,255,255,.12);
            --color-border-strong: #3e5676;
            --color-border-focus: #005cae;
            --color-border-dashboard: #2d4058;
            --color-border-dashboard-hover: #2d4058;
            --color-border-step: #2d4058;
            --color-border-btn-outline: #3e5676;
            --color-border-btn-outline-hover: #005cae;
            --color-border-notification: #314761;
            --color-border-notification-left: transparent;
            --color-border-upload: #314761;
            --color-border-upload-2: #314761;

            --color-card-shadow: 0 18px 45px rgba(13,27,47,0.10);
            --color-card-shadow-hover: 0 24px 55px rgba(13,27,47,.12);
            --color-dashboard-shadow: 0 18px 45px rgba(13,27,47,.10);
            --color-dashboard-shadow-hover: 0 24px 55px rgba(13,27,47,.12);
            --color-step-shadow: 0 10px 25px rgba(13,27,47,.08);
            --color-step-shadow-hover: 0 20px 40px rgba(0,92,174,.16);
        }
        body {
            background: var(--color-bg-gradient);
            color: var(--color-text);
            font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            margin: 0;
            padding: 0;
            transition: var(--transition-main);
        }
        .container{
            max-width:1240px;
        }
        @media (min-width:1400px){
            .container{
                max-width:1280px;
            }
        }
        .topbar {
            position: sticky;
            top: 0;
            z-index: 1000;
            background: rgba(255,255,255,.92);
            background: var(--color-bg-card);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-bottom: 1px solid var(--color-border);
            padding: 18px 0;
            transition: var(--transition-main);
        }

        .topbar-inner{
            display:flex;
            align-items:center;
            justify-content:space-between;
            gap:24px;
        }

        .topbar-actions{
            display:flex;
            align-items:center;
            gap:8px;
            flex-shrink:0;
        }

        .topbar-mobile-toggle{
            display:none;
            align-items:center;
            justify-content:center;
            width:44px;
            height:44px;
            padding:0;
            border:1px solid var(--color-border-btn-outline);
            border-radius:14px;
            background:var(--color-bg-btn-outline);
            color:var(--color-text-btn-outline);
            font-size:1.25rem;
        }

        .topbar-mobile-menu{
            padding:14px 0 4px;
            border-top:1px solid var(--color-border);
        }

        .topbar-mobile-nav{
            display:flex;
            flex-direction:column;
            gap:8px;
        }

        .topbar-mobile-nav a,
        .topbar-mobile-nav button{
            display:flex;
            align-items:center;
            width:100%;
            min-height:46px;
            padding:11px 14px;
            border:0;
            border-radius:12px;
            background:transparent;
            color:var(--color-text-topbar);
            text-align:left;
            text-decoration:none;
            font-weight:600;
        }

        .topbar-mobile-nav a:hover,
        .topbar-mobile-nav button:hover{
            background:var(--color-bg-alt);
            color:var(--color-text-topbar-hover);
        }

        .topbar-mobile-actions{
            display:grid;
            grid-template-columns:repeat(2,minmax(0,1fr));
            gap:10px;
            margin-top:12px;
            padding-top:12px;
            border-top:1px solid var(--color-border);
        }

        .topbar-mobile-actions .btn{
            display:flex;
            align-items:center;
            width:100%;
            min-height:44px;
            justify-content:center;
        }
        .topbar nav a {
            color: var(--color-text-topbar);
            text-decoration: none;
            font-weight: 600;
            transition: var(--transition-btn);
        }
        .topbar nav a:hover {
            color: var(--color-text-topbar-hover);
        }
        .logo-monitorami {
            display: flex;
            align-items: center;
            text-decoration: none;
        }
        .logo-img{
            display:block;
            height:110px;
            width:auto;
            max-width:280px;
            object-fit:contain;
            object-position:left center;
        }
        .hero {
            position: relative;
            overflow: hidden;
            margin: 40px auto 0;
            max-width: 1280px;
            padding: 48px;
            background:
            linear-gradient(
            180deg,
            #ffffff 0%,
            #fcfdff 45%,
            #f6faff 100%
            );
            border: 1px solid var(--color-border);
            border-radius: 28px;
            box-shadow: var(--color-card-shadow);
            transition: var(--transition-main);
        }
        .hero::before {
            content: "";
            position: absolute;
            inset: 0;
            background:
                radial-gradient(circle at 12% 8%, rgba(29,52,112,.08), transparent 34%),
                radial-gradient(circle at 88% 18%, rgba(63,169,245,.08), transparent 30%);
            pointer-events: none;
        }

        .badge-monitorami {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 18px;
            border-radius: 999px;
            background: var(--color-bg-badge);
            color: var(--color-text-badge);
            font-size: 12px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: .08em;
            transition: var(--transition-main);
        }

        .cx-kicker {
            display: inline-flex;
            align-items: center;
            padding: 8px 16px;
            border-radius: 999px;
            background: var(--color-bg-badge-light);
            color: var(--color-text-btn-outline);
            font-size: .78rem;
            font-weight: 800;
            letter-spacing: .08em;
            text-transform: uppercase;
            border: 1px solid #d7e5f3;
        }

        h1 {
            margin-top: 22px;
            font-size: 3.6rem;
            line-height: 1.05;
            font-weight: 800;
            color: var(--color-text-h);
            font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            transition: var(--transition-main);
        }
        .hero p {
            max-width: 620px;
            margin: 32px 0 46px;
            font-size: 1.15rem;
            line-height: 1.7;
            color: var(--color-text-hero);
            transition: var(--transition-main);
        }

        .btn-primary, .btn.btn-primary {
            background: var(--color-bg-btn-primary-gradient);
            background-size: 200% 200%;
            border: 0;
            border-radius: 30px;
            padding: .75em 1.5em;
            font-weight: 600;
            color: var(--color-text-btn-primary) !important;
            box-shadow: var(--color-btn-primary-shadow);
            transition: var(--transition-btn);
        }
        .btn-primary:hover, .btn.btn-primary:hover {
            background-position: right center;
            transform: translateY(-3px) scale(1.02);
            box-shadow: var(--color-btn-primary-shadow-hover);
        }

        .btn-outline-dark, .btn.btn-outline-dark {
            border: 2px solid var(--color-border-btn-outline);
            border-radius: 30px;
            padding: .75em 1.5em;
            color: var(--color-text-btn-outline) !important;
            font-weight: 700;
            background: var(--color-bg-btn-outline);
            transition: var(--transition-btn);
        }
        .btn-outline-dark:hover, .btn.btn-outline-dark:hover {
            background: var(--color-bg-btn-outline-hover);
            border-color: var(--color-border-btn-outline-hover);
            color: var(--color-text-btn-outline-hover) !important;
        }

        .dashboard {
            background: linear-gradient(145deg,#061936 0%,#06315f 58%,#f97316 100%);
            padding: 42px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            position: relative;
            overflow: hidden;
            border-radius: 20px;
            color: #fff;
            box-shadow: 0 20px 50px rgba(6,25,54,.24);
        }
        body.dark .dashboard{
            background: linear-gradient(145deg,#0f1724 0%,#182437 55%,#005cae 100%);
        }
        body.dark .hero{
            background: linear-gradient(180deg,#182437 0%,#0f1724 100%);
            border-color: rgba(255,255,255,.10);
            box-shadow: 0 24px 60px rgba(0,0,0,.35);
        }
        body.dark .hero::before{
            background:
                radial-gradient(circle at 12% 8%, rgba(63,169,245,.10), transparent 34%),
                radial-gradient(circle at 88% 18%, rgba(2,195,146,.12), transparent 30%);
        }
        .dashboard::before{
            content:"";
            position:absolute;
            right:-120px;
            top:-120px;
            width:300px;
            height:300px;
            border-radius:999px;
            background:rgba(2,195,146,.24);
            filter:blur(6px);
        }
        .dashboard:hover {
            transform: translateY(-4px);
        }

        .dashboard .btn-primary{

            background:#fff;

            color:#10213a !important;

            border:none;

            box-shadow:0 10px 25px rgba(0,0,0,.15);

        }

        .dashboard .btn-primary:hover{

            background:#f5f8fc;

            color:#10213a !important;

        }

        .content-card{
            background: var(--color-bg-card);
            border: 1px solid var(--color-border);
            border-radius: 24px;
            padding: 40px;
            box-shadow: var(--color-card-shadow);
            color: var(--color-text);
            transition: var(--transition-main);
        }

        .content-card:hover{
            box-shadow: var(--color-card-shadow-hover);
            transform: translateY(-2px);
        }

        .content-card h2,
        .content-card h4,
        .content-card strong{
            color: var(--color-text-h);
        }

        .content-card-kpi{
            background: var(--color-bg-card);
            border: 1px solid var(--color-border);
            border-radius: 24px;
            padding: 40px;
            box-shadow: var(--color-card-shadow);
            color: var(--color-text);
            transition: var(--transition-main);
        }

        .content-card-kpi:hover{
            box-shadow: var(--color-card-shadow-hover);
            transform: translateY(-2px);
        }

        .content-card-kpi h2,
        .content-card-kpi h4,
        .content-card-kpi strong{
            color: var(--color-text-h);
        }
        .notification{

            display:flex;
            flex-direction:column;
            gap:8px;

            margin-bottom:16px;

            padding:20px 24px;

            background:var(--color-bg-alt);

            border:1px solid var(--color-border);

            border-left:4px solid var(--color-border-dashboard);

            border-radius:18px;

            transition:var(--transition-main);

        }

        .notification:last-child{

            margin-bottom:0;

        }

        .notification:hover{

            transform:translateY(-2px);

            box-shadow:var(--color-card-shadow);

            border-left-color:#0755E3;

        }

        .notification strong{

            display:block;

            margin:0;

            color:var(--color-text-h);

            font-size:1rem;

            font-weight:700;

        }

        .company-name{

            color:var(--color-text);

            font-weight:600;

        }

        .timestamp{

            color:var(--color-text-muted);

            font-size:.85rem;

        }

        .dashboard-summary {
            display: flex;
            justify-content: space-between;
            gap: 20px;
            margin-top: 28px;
            padding: 18px 22px;
            border-radius: 16px;
            background: rgba(255,255,255,.14);
            border: 1px solid rgba(255,255,255,.18);
            color: rgba(255,255,255,.96);
            font-weight: 600;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            transition: var(--transition-main);
        }

        .dashboard-summary div:first-child{
            font-weight:700;
            color:#fff;
        }

        .dashboard-summary div:last-child{
            color:rgba(255,255,255,.82);
            font-size:.92rem;
        }

        #funziona {
            padding: 140px 0;
        }
        #funziona h2 {
            font-size: 2.8rem;
            font-weight: 800;
            font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            text-transform: uppercase;
            letter-spacing: 2px;
            color: var(--color-text-h2);
            transition: var(--transition-main);
        }

        /* Selettori aggiuntivi per altri h2 */
        h2.fw-bold,
        section h2,
        #upload-csv h2,
        #inizia h2 {
            font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            text-transform: uppercase;
            letter-spacing: 2px;
            color: var(--color-text-h2);
            font-weight: bold;
            transition: var(--transition-main);
        }

        #funziona .h-100 {
            border-radius: 24px !important;
            border: 1px solid var(--color-border) !important;
            box-shadow: 0 12px 30px rgba(0,92,174,.10) !important;
            transition: var(--transition-main);
        }
        #funziona .h-100:hover {
            transform: translateY(-6px);
            box-shadow: var(--color-step-shadow-hover) !important;
        }

        .steps {
            display: grid;
            grid-template-columns: repeat(4,1fr);
            gap: 24px;
            margin-top: 56px;
        }

        .step,
        .step.active {
            display:flex;
            flex-direction:column;
            height:100%;
            padding:32px;
            border-radius:24px;
            background:var(--color-bg-step);
            border:1px solid var(--color-border-step);
            box-shadow:var(--color-step-shadow);
            transition:var(--transition-main);
        }

        .step:hover,
        .step.active:hover {
            transform:translateY(-6px);
            box-shadow:var(--color-step-shadow-hover);
        }

        .step h3,
        .step.active h3 {
            margin:0 0 12px;
            color:var(--color-text-h);
            font-size:1.2rem;
            font-weight:700;
        }

        .step p,
        .step.active p {
            margin:0;
            color:var(--color-text);
            line-height:1.6;
        }

        .step-number{
            width:44px;
            height:44px;
            border-radius:14px;
            display:flex;
            align-items:center;
            justify-content:center;
            background:#eef6ff;
            color:#0654a2;
            border:1px solid #cfe0f5;
            font-size:1rem;
            font-weight:800;
            margin-bottom:22px;
            box-shadow:0 6px 16px rgba(6,84,162,.08);
            transition:var(--transition-main);
        }

        body.dark .step-number{
            background:var(--color-bg-step-number);
            color:var(--color-text-white);
            border:none;
            box-shadow:0 10px 24px rgba(7,85,227,.22);
        }

        input.form-control,
        .form-control {
            background: var(--color-bg);
            color: var(--color-text);
            border: 1px solid var(--color-border);
            border-radius: 8px;
            transition: var(--transition-main);
        }
        input.form-control:focus,
        .form-control:focus {
            border-color: var(--color-border-focus);
            box-shadow: 0 0 0 2px rgba(0,92,174,0.08);
        }

        .badge.bg-light,
        .badge.bg-light.text-dark,
        .badge.bg-light.text-dark.border {
            background: var(--color-bg-badge-light) !important;
            color: var(--color-text-badge-light) !important;
            border: 1px solid var(--color-border);
            font-weight: 600;
            transition: var(--transition-main);
        }

        a {
            color: var(--color-text-link);
            transition: var(--transition-main);
        }
        a:hover {
            color: var(--color-text-topbar-hover);
        }

        .text-muted {
            color: var(--color-text-muted) !important;
            transition: var(--transition-main);
        }

        /* Upload CSV section */
        #upload-csv .border {
            border-style: dashed !important;
            border-color: var(--color-border-upload) !important;
            background: var(--color-bg-upload);
            transition: var(--transition-main);
        }
        #upload-csv .border.border-2{
            border-style:dashed !important;
            background:var(--color-bg-upload);
        }
        #upload-csv .bg-light {
            background: var(--color-bg-upload-light) !important;
        }

        .cx-footer {
            padding: 26px 18px 36px;
            background: #061936;
            color: rgba(255,255,255,.72);
            font-size: 13px;
            text-align: center;
        }

        .cx-footer p{
            margin:0;
        }

        .cx-footer strong,
        .cx-footer a{
            color:#fff;
            text-decoration:none;
            font-weight:600;
        }

        .cx-footer a:hover{
            text-decoration:underline;
        }

        .dashboard h4 {
            color: #fff;
        }

                /* Responsive */
        @media (max-width: 991px) {

            .topbar{
                padding:12px 0;
            }

            .topbar-inner{
                gap:12px;
            }

            .topbar-actions{
                display:none;
            }

            .topbar-mobile-toggle{
                display:inline-flex;
                flex-shrink:0;
            }

            .logo-img{
                height:64px;
                width:auto;
                max-width:200px;
            }

            .logo-img{
                height:64px;
                width:auto;
                max-width:200px;
            }

            .auth-logo{
                height:76px;
                width:auto;
                max-width:240px;
            }

            h1{
                font-size:2.5rem;
            }

            .hero{
                margin:30px 16px 0;
                max-width:none;
                padding:40px 32px;
                border-radius:24px;
                background:var(--color-bg-card);
                border:1px solid var(--color-border);
                backdrop-filter:blur(8px);
                box-shadow:var(--color-dashboard-shadow);
            }

            .hero .row{
                --bs-gutter-y:2rem;
            }

            .hero p{
                max-width:100%;
                margin:24px 0 32px;
            }

            .dashboard,
            .content-card,
            .content-card-kpi{
                margin-top:0;
                padding:32px;
            }

            .dashboard-summary{
                flex-direction:column;
            }

            #funziona{
                padding:90px 0;
            }

            .steps{
                grid-template-columns:repeat(2,minmax(0,1fr));
                gap:20px;
            }

            .dashboard-overview{
                padding:40px;
            }

            .dashboard-overview .text-lg-end{
                text-align:left!important;
            }

            .dashboard-showcase img{
                width:100%;
                max-width:620px!important;
                height:auto;
            }

        }

        @media (max-width: 767px) {

            body{
                overflow-x:hidden;
            }

            .container{
                width:100%;
                padding-left:18px;
                padding-right:18px;
            }

            .hero{
                margin:16px 12px 0;
                padding:30px 22px;
                border-radius:20px;
            }

            .hero h1{
                font-size:clamp(2.15rem,10vw,2.8rem);
                line-height:1.08;
            }

            .hero h1 br{
                display:none;
            }

            .hero p{
                margin:20px 0 28px;
                font-size:1rem;
                line-height:1.65;
            }

            .hero .row.g-3.mt-4 > .col-6{
                width:100%;
            }

            .hero .d-flex.flex-wrap.gap-3.mt-4{
                flex-direction:column;
                align-items:stretch;
            }

            .hero .d-flex.flex-wrap.gap-3.mt-4 .btn,
            .hero .d-flex.flex-wrap.gap-3.mt-4 button{
                width:100%;
                justify-content:center;
            }

            .dashboard{
                padding:24px 20px;
                border-radius:18px;
            }

            .dashboard > .d-flex.justify-content-between{
                flex-direction:column;
                align-items:flex-start!important;
                gap:10px;
            }

            .dashboard .row.g-3 > .col-4,
            .dashboard .row.g-3 > .col-6{
                width:100%;
            }

            .notification{
                padding:18px;
                border-radius:16px;
            }

            .content-card,
            .content-card-kpi{
                padding:26px 22px;
                border-radius:20px;
            }

            .steps{
                grid-template-columns:1fr;
                gap:16px;
                margin-top:32px;
            }

            .step,
            .step.active{
                padding:24px;
                border-radius:20px;
            }

            #funziona{
                padding:64px 0;
            }

            #funziona h2,
            section h2,
            h2.fw-bold{
                font-size:clamp(1.8rem,8vw,2.2rem)!important;
                line-height:1.2;
                letter-spacing:.04em;
            }

            .dashboard-overview{
                padding:30px 24px;
                border-radius:22px;
            }

            .dashboard-overview .btn,
            .content-card.text-center .btn{
                width:100%;
            }

            .dashboard-showcase img{
                width:100%;
                max-width:100%!important;
                height:auto;
            }

            .content-card.text-center.p-5{
                padding:32px 22px!important;
            }

        }

        @media (max-width: 575px) {

            .logo-img{
                height:48px;
                max-width:150px;
            }

            .topbar-inner{
                gap:8px;
            }

            .topbar-mobile-toggle{
                width:40px;
                height:40px;
                border-radius:12px;
            }

            .topbar-mobile-actions{
                grid-template-columns:1fr;
            }

            .hero{
                margin:12px 8px 0;
                padding:26px 18px;
                border-radius:18px;
            }

            .badge-monitorami,
            .cx-kicker{
                max-width:100%;
                white-space:normal;
                text-align:left;
                line-height:1.35;
            }

            .hero h1{
                font-size:clamp(2rem,11vw,2.45rem);
            }

            .dashboard{
                padding:22px 16px;
            }

            .dashboard-main{
                padding:16px;
            }

            .notification > .d-flex.justify-content-between{
                flex-direction:column;
                align-items:flex-start;
            }

            .notification .text-nowrap{
                white-space:normal!important;
            }

            .content-card,
            .content-card-kpi{
                padding:22px 18px;
            }

            .dashboard-overview{
                padding:26px 20px;
            }

            .btn,
            .btn-lg{
                min-height:48px;
                white-space:normal;
            }

        }

        /* Transitions for theme change */
        body,
        .hero,
        .dashboard,
        .step,
        .notification,
        .topbar,
        .dashboard-summary,
        .btn-primary,
        .btn-outline-dark,
        .badge-monitorami,
        .badge,
        .form-control,
        h1, h2, h3, h4, h5, h6,
        .company-name,
        .timestamp,
        .text-muted {
            transition: var(--transition-main);
        }

        .selected-companies-card{
            padding:24px;
            border-radius:18px;
            background: var(--color-bg-upload-light);
            border:1px solid var(--color-border);
            transition:var(--transition-main);
        }

        .selected-companies-card hr{
            border-color:var(--color-border);
            opacity:1;
        }

        .selected-companies-card strong{
            color:var(--color-text-h);
        }

        body.dark .selected-companies-card{
            background:#213149;
            border-color:rgba(255,255,255,.12);
        }

        body.dark .selected-companies-card strong,
        body.dark .selected-companies-card,
        body.dark .selected-companies-card .mb-2,
        body.dark .selected-companies-card .small{
            color:var(--color-text);
        }

        body.dark .selected-companies-card hr{
            border-color:rgba(255,255,255,.12);
        }



/* ==========================
LOGIN MONITORAMI
========================== */

.auth-shell{
    display:grid;
    grid-template-columns:minmax(0,1.2fr) minmax(420px,.8fr);
    min-height:100vh;
}

.auth-visual{
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding:70px;
}

.auth-panel{
    display:grid;
    align-items:center;
    padding:clamp(24px,3vw,40px);
}

.panel-surface{
    background:var(--color-bg-card);
    border:1px solid var(--color-border);
    border-radius:32px;
    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);
    box-shadow:var(--color-card-shadow);
}

.auth-panel-inner{
    width:100%;
    max-width:460px;
    margin:auto;
}

.auth-brand{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:60px;
}

.auth-brand-actions{
    display:flex;
    align-items:center;
    gap:14px;
}

.auth-chip{
    padding:8px 16px;
    border-radius:999px;
    background:var(--color-bg-badge);
    color:var(--color-text-badge);
    font-size:.82rem;
    font-weight:700;
}

.auth-copy{
    max-width:640px;
}

.auth-copy h1{
    margin:18px 0 24px;
}

.auth-copy p{
    color:var(--color-text-hero);
    line-height:1.7;
    font-size:1.08rem;
}

.auth-feature-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:18px;
    margin-top:48px;
}

.auth-feature-grid article{
    background:var(--color-bg-card);
    border:1px solid var(--color-border);
    border-radius:22px;
    padding:24px;
    box-shadow:0 12px 30px rgba(13,27,47,.06);
}

.auth-feature-grid strong{
    display:block;
    margin-bottom:10px;
    color:var(--color-text-h);
}

.auth-feature-grid span{
    color:var(--color-text);
    line-height:1.6;
}

.monitorami-phone{
    width:290px;
    margin-top:55px;
    padding:14px;
    border-radius:38px;
    background:#162848;
    box-shadow:var(--color-dashboard-shadow);
}

.monitorami-phone-notch{
    width:110px;
    height:22px;
    margin:0 auto 18px;
    border-radius:999px;
    background:#08131f;
}

.monitorami-phone-screen{
    background:#fff;
    border-radius:28px;
    padding:22px;
}

.phone-title{
    display:block;
    margin:8px 0 20px;
    font-size:1.2rem;
    color:#10213a;
}

.phone-card{
    padding:14px 16px;
    margin-bottom:12px;
    border-radius:16px;
}

.phone-card.success{background:#ECFDF5;}
.phone-card.warning{background:#FFF7E6;}
.phone-card.danger{background:#FEF2F2;}
.phone-card.info{background:#EEF6FF;}

.phone-card strong{
    display:block;
    margin-bottom:4px;
    color:#10213a;
}

.phone-card span{
    color:#64748b;
    font-size:.9rem;
}

.phone-footer{
    margin-top:18px;
    text-align:center;
    color:var(--color-text-link);
    font-weight:700;
}

.auth-switcher{
    display:flex;
    gap:10px;
    margin-bottom:32px;
}

.auth-switcher a{
    flex:1;
    padding:12px 18px;
    text-align:center;
    text-decoration:none;
    border-radius:999px;
    background:var(--color-bg-alt);
    color:var(--color-text);
    font-weight:600;
    transition:var(--transition-btn);
}

.auth-switcher a.active{
    background:var(--color-bg-btn-primary-gradient);
    color:#fff;
}


.stack-lg{
    display:flex;
    flex-direction:column;
    gap:18px;
}

.stack-lg label{
    display:block;
}

.stack-lg label span{
    display:block;
    margin-bottom:8px;
    font-weight:600;
    color:var(--color-text-h);
}

.stack-lg input{
    width:100%;
}

.auth-link{
    display:block;
    margin-top:18px;
    text-align:center;
    text-decoration:none;
    color:var(--color-text-link);
    font-weight:600;
}

.auth-logo{
    display:block;
    height:85px;
    width:auto;
    max-width:240px;
    object-fit:contain;
    object-position:left center;
}

.theme-toggle{
    width:44px;
    height:44px;
    border:none;
    border-radius:999px;
    background:var(--color-bg-card);
    color:var(--color-text-h);
    cursor:pointer;
    box-shadow:var(--color-card-shadow);
    transition:var(--transition-btn);
}

.theme-toggle:hover{
    transform:translateY(-2px);
}

.full-width{
    width:100%;
}

/* ==========================
   LOGIN - TEMA SCURO
   ========================== */

body.dark .panel-surface{
    background: var(--color-bg-card);
    border-color: var(--color-border);
}

body.dark .auth-feature-grid article{
    background: var(--color-bg-card);
    border-color: var(--color-border);
}

body.dark .monitorami-phone{
    background:#0f1724;
}

body.dark .monitorami-phone-notch{
    background:#050b12;
}

body.dark .monitorami-phone-screen{
    background:var(--color-bg-card);
}

body.dark .phone-title,
body.dark .phone-card strong{
    color:var(--color-text-h);
}

body.dark .phone-card span{
    color:var(--color-text);
}

body.dark .phone-card.success{
    background:#163a2c;
}

body.dark .phone-card.warning{
    background:#4a3712;
}

body.dark .phone-card.danger{
    background:#4a1f24;
}

body.dark .phone-card.info{
    background:#17314f;
}

body.dark .theme-toggle{
    background:var(--color-bg-card);
    color:var(--color-text-h);
    border:1px solid var(--color-border);
}

body.dark .stack-lg input{
    background:var(--color-bg);
    color:var(--color-text);
    border-color:var(--color-border);
}

body.dark .stack-lg input::placeholder{
    color:var(--color-text-muted);
}

.form-copy{
    margin-bottom:40px;
}

.form-copy h2{
    margin:0 0 12px;
    font-size:2rem;
    font-weight:800;
    line-height:1.15;
    color:var(--color-text-h);
}

.form-copy p{
    margin:0;
    font-size:1rem;
    line-height:1.7;
    color:var(--color-text-muted);
}

.stack-lg{
    display:flex;
    flex-direction:column;
    gap:22px;
}

.stack-lg label{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.stack-lg label span{
    font-size:.78rem;
    font-weight:700;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:var(--color-text-muted);
}

.stack-lg input{
    width:100%;
    height:60px;
    padding:0 22px;
    border:1px solid var(--color-border);
    border-radius:18px;
    background:var(--color-bg-card);
    color:var(--color-text);
    font-size:1rem;
    font-weight:500;
    box-shadow:0 4px 14px rgba(13,27,47,.04);
    transition:var(--transition-main);
}

.stack-lg input::placeholder{
    color:var(--color-text-muted);
    opacity:.8;
}

.stack-lg input:hover{
    border-color:#8EC5FF;
}

.stack-lg input:focus{
    outline:none;
    background:var(--color-bg-card);
    border-color:#3FA9F5;
    box-shadow:0 0 0 4px rgba(63,169,245,.14);
}

.auth-link{
    display:inline-flex;
    align-self:flex-end;
    margin-top:-6px;
    margin-bottom:6px;
    font-size:.9rem;
    font-weight:600;
    color:var(--color-text-link);
    text-decoration:none;
    transition:var(--transition-btn);
}

.auth-link:hover{
    color:#3FA9F5;
    text-decoration:underline;
}

.full-width{
    width:100%;
    height:60px;
    border:none;
    border-radius:30px;
    background:var(--color-bg-btn-primary-gradient);
    background-size:200% 200%;
    color:#fff;
    font-size:1rem;
    font-weight:700;
    letter-spacing:.02em;
    box-shadow:var(--color-btn-primary-shadow);
    transition:var(--transition-btn);
}

.full-width:hover{
    background-position:right center;
    transform:translateY(-2px);
    box-shadow:var(--color-btn-primary-shadow-hover);
}

.full-width:active{
    transform:translateY(0);
}

/* Login: il layout desktop a due colonne non deve comprimere il form su tablet e mobile. */
@media (max-width:991.98px){
    .auth-shell{
        display:block;
        min-height:100dvh;
    }

    .auth-visual{
        display:block;
        padding:24px 28px 0;
    }

    .auth-brand{
        margin:0;
    }

    .auth-copy,
    .auth-feature-grid{
        display:none;
    }

    .auth-panel{
        display:block;
        padding:30px 28px 44px;
    }

    .panel-surface{
        border:0;
        border-radius:0;
        background:transparent;
        box-shadow:none;
        backdrop-filter:none;
        -webkit-backdrop-filter:none;
    }

    .auth-panel-inner{
        max-width:560px;
    }
}

@media (max-width:575.98px){
    .auth-visual{
        padding:18px 20px 0;
    }

    .auth-brand-actions{
        gap:10px;
    }

    .auth-chip{
        display:none;
    }

    .auth-panel{
        padding:30px 20px 38px;
    }

    .auth-switcher{
        gap:8px;
        margin-bottom:26px;
    }

    .auth-switcher a{
        padding:11px 10px;
        font-size:.86rem;
    }

    .form-copy{
        margin-bottom:28px;
    }

    .form-copy h2{
        font-size:clamp(1.65rem,8vw,2rem);
        line-height:1.15;
    }

    .form-copy p{
        font-size:.94rem;
        line-height:1.55;
    }

    .stack-lg{
        gap:16px;
    }

    .stack-lg input,
    .full-width{
        height:56px;
    }

    .stack-lg input{
        border-radius:16px;
    }

    .full-width{
        border-radius:28px;
    }
}



.dashboard-overview{

    position:relative;
    overflow:hidden;

    padding:56px;

    border-radius:28px;

    background:linear-gradient(145deg,#061936 0%,#06315f 58%,#f97316 100%);

    color:#fff;

    box-shadow:0 20px 50px rgba(6,25,54,.24);

}

.dashboard-overview::before{

    content:"";

    position:absolute;

    right:-140px;
    top:-140px;

    width:340px;
    height:340px;

    border-radius:50%;

    background:rgba(2,195,146,.18);

    filter:blur(10px);

}

.dashboard-overview::after{

    content:"";

    position:absolute;

    left:-90px;
    bottom:-90px;

    width:220px;
    height:220px;

    border-radius:50%;

    background:rgba(255,255,255,.08);

}

.dashboard-overview small{

    color:rgba(255,255,255,.70);
    text-transform:uppercase;
    letter-spacing:.08em;
    font-weight:700;

}

.dashboard-overview h2,
.dashboard-overview h3{

    color:#fff;

}

.dashboard-overview p{

    color:rgba(255,255,255,.82);

}

.dashboard-overview .badge{

    background:rgba(255,255,255,.12)!important;
    border:1px solid rgba(255,255,255,.18)!important;
    color:#fff!important;
    font-weight:600;

}

.dashboard-overview .btn-primary{

    background:#fff;
    color:#10213a!important;
    border:none;

}

.dashboard-overview .btn-primary:hover{

    background:#f3f7fb;

}

.content-card-kpi{

    position:relative;
    overflow:hidden;

}

.content-card-kpi::before{

    content:"";

    position:absolute;

    left:0;
    right:0;
    top:0;

    height:8px;

    border-radius:24px 24px 0 0;

    background: linear-gradient(
        90deg,
        #061936 0%,
        #06315f 58%,
        #F97316 100%
    );

}

body.dark .dashboard-overview{

    background:linear-gradient(145deg,#0f1724 0%,#182437 55%,#005cae 100%);

    box-shadow:0 24px 60px rgba(0,0,0,.35);

}

body.dark .dashboard-overview::before{

    background:rgba(63,169,245,.18);

}

body.dark .dashboard-overview::after{

    background:rgba(255,255,255,.06);

}

body.dark .dashboard-overview small{

    color:rgba(255,255,255,.72);

}

body.dark .dashboard-overview p{

    color:rgba(255,255,255,.82);

}

body.dark .dashboard-overview .badge{

    background:rgba(255,255,255,.10)!important;

    border:1px solid rgba(255,255,255,.15)!important;

    color:#fff!important;

}

body.dark .dashboard-overview .btn-primary{

    background:#fff;

    color:#10213a!important;

}

body.dark .dashboard-overview .btn-primary:hover{

    background:#f5f8fc;

}

body.dark .content-card-kpi{

    background:var(--color-bg-card);

    border:1px solid var(--color-border);

    box-shadow:var(--color-card-shadow);

}

body.dark .content-card-kpi h2,
body.dark .content-card-kpi h3,
body.dark .content-card-kpi h4,
body.dark .content-card-kpi strong{

    color:var(--color-text-h);

}

body.dark .content-card-kpi p,
body.dark .content-card-kpi small{

    color:var(--color-text);

}

body.dark .content-card-kpi::before{

    background:linear-gradient(
        90deg,
        #0f1724 0%,
        #1d3470 55%,
        #3FA9F5 82%,
        #13C8A1 92%,
        #F97316 100%
    );

}

body.dark .content-card-kpi:hover{

    box-shadow:0 24px 55px rgba(0,0,0,.35);

}

/* Analisi portafoglio: superfici e separatori meno contrastati nel tema scuro. */
body.dark .portfolio-composition .border{
    border-color:#314761!important;
}

body.dark .portfolio-composition .badge.border{
    border-color:#3a506c!important;
    background:#213149!important;
}

body.dark .portfolio-composition .progress{
    background:#26384f;
}

body.dark .monitorami-card-body{
    background:var(--color-bg-card);
    color:var(--color-text);
}

/* ==========================================================
   DASHBOARD MONITORAMI
========================================================== */

.monitorami-dashboard{
    display:grid;
    grid-template-columns:280px 1fr;
    min-height:100vh;
    background:var(--color-bg-gradient);
}

/* ==========================================================
   SIDEBAR
========================================================== */

.dashboard-sidebar{

    position:sticky;
    top:0;

    height:100vh;

    overflow-y:auto;

    padding:32px 24px;

    background:var(--color-bg-card);

    border-right:1px solid var(--color-border);

    box-shadow:12px 0 30px rgba(15,23,42,.05);

    z-index:100;

}

body.dark .dashboard-sidebar{

    box-shadow:12px 0 30px rgba(0,0,0,.35);

}

.sidebar-logo{
    margin-bottom:42px;
}

.sidebar-menu{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.sidebar-menu a{

    display:flex;
    align-items:center;
    gap:14px;

    padding:15px 18px;

    border-radius:18px;

    color:var(--color-text);

    text-decoration:none;

    font-weight:600;

    transition:all .25s ease;

}

.sidebar-menu a i{
    font-size:1.1rem;
}

.sidebar-menu a:hover{
    background:var(--color-bg-alt);
    transform:translateX(3px);
}

.sidebar-menu a.active{
    background:var(--color-bg-btn-primary-gradient);
    color:#fff;
    box-shadow:0 10px 25px rgba(7,85,227,.22);
}

/* ==========================================================
   MAIN
========================================================== */

.dashboard-main{
    padding:36px;
    overflow:hidden;
}

/* ==========================================================
   TOPBAR
========================================================== */

.dashboard-topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:24px;
    margin-bottom:28px;
}

.dashboard-search{
    display:flex;
    align-items:center;
    gap:14px;
    flex:1;
    max-width:520px;
    height:58px;
    padding:0 20px;
    border-radius:18px;
    background:var(--color-bg-card);
    border:1px solid var(--color-border);
    box-shadow:var(--color-card-shadow);
}

.dashboard-search i{
    font-size:1.1rem;
    color:var(--color-text-muted);
}

.dashboard-search input{
    flex:1;
    border:none;
    background:transparent;
    color:var(--color-text);
    outline:none;
}

.dashboard-topbar-right{
    display:flex;
    align-items:center;
    gap:14px;
}

.dashboard-icon{
    position:relative;
    width:48px;
    height:48px;
    border:none;
    border-radius:16px;
    background:var(--color-bg-card);
    color:var(--color-text);
    border:1px solid var(--color-border);
    transition:var(--transition-btn);
}

.dashboard-icon:hover{
    transform:translateY(-2px);
    box-shadow:var(--color-card-shadow);
}

.dashboard-badge{
    position:absolute;
    top:-5px;
    right:-5px;
    width:20px;
    height:20px;
    border-radius:50%;
    background:#ef4444;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:11px;
    font-weight:700;
}

.dashboard-user{
    display:flex;
    align-items:center;
    gap:14px;
}

.dashboard-avatar{
    width:46px;
    height:46px;
    border-radius:50%;
    background:var(--color-bg-btn-primary-gradient);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
}

/* ==========================================================
   HEADER
========================================================== */

.dashboard-header-bar{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:30px;

    margin-bottom:30px;

    padding:28px 34px;

    background:var(--color-bg-card);

    border:1px solid var(--color-border);

    border-radius:26px;

    box-shadow:var(--color-card-shadow);

}

.dashboard-header-bar h2{
    margin:0 0 6px;
    font-size:2rem;
    font-weight:800;
}

.dashboard-header-bar p{
    margin:0;
    color:var(--color-text-muted);
}

.dashboard-header-actions{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}

/* ==========================================================
   KPI
========================================================== */

.dashboard-kpi{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:20px;
    margin:28px 0;
}

/* ==========================================================
   GRID
========================================================== */

.dashboard-grid{
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:24px;
    margin:24px 0;
}

/* ==========================================================
   THEME BUTTON
========================================================== */

.dashboard-theme-toggle{

    position:fixed;
    right:30px;
    bottom:30px;
    z-index:999;

}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width:1400px){

    .dashboard-kpi{
        grid-template-columns:repeat(3,1fr);
    }

}

@media (max-width:991px){

    .monitorami-dashboard{
        grid-template-columns:1fr;
    }

    .dashboard-sidebar{
        display:none;
    }

    .dashboard-main{
        width:100%;
        padding:24px;
        overflow-x:hidden;
        background:var(--color-bg-gradient);
    }

    .dashboard-topbar{
        flex-direction:column;
        align-items:stretch;
    }

    .dashboard-search{
        max-width:100%;
    }

    .dashboard-header-bar{
        flex-direction:column;
        align-items:flex-start;
    }

    .dashboard-header-actions{
        width:100%;
    }

    .dashboard-header-actions .btn{
        flex:1;
    }

    .dashboard-kpi{
        grid-template-columns:1fr;
    }

    .dashboard-grid{
        grid-template-columns:1fr;
    }

}

.dashboard-status{

    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;

    margin:24px 0 36px;

}

.status-item{

    padding:22px 26px;

    background:var(--color-bg-card);

    border:1px solid var(--color-border);

    border-radius:20px;

    box-shadow:var(--color-card-shadow);

}

.status-item small{

    display:block;

    color:var(--color-text-muted);

    margin-bottom:8px;

    text-transform:uppercase;

    letter-spacing:.08em;

    font-size:.72rem;

    font-weight:700;

}

.status-item strong{

    font-size:1.45rem;

    color:var(--color-text-h);

}

.nav-link-monitorami{
    background:none;
    border:none;
    padding:0;
    margin:0;
    color:var(--color-text-topbar);
    font-weight:600;
    cursor:pointer;
    transition:var(--transition-btn);
}

.nav-link-monitorami:hover{
    color:var(--color-text-topbar-hover);
}

/* ==========================================================
   MODALE IMPORTAZIONE
========================================================== */

.modal-content{
    background:var(--color-bg-card);
    border:1px solid var(--color-border);
    color:var(--color-text);
    border-radius:28px;
    box-shadow:var(--color-card-shadow);
}

.modal-header,
.modal-footer{
    border-color:var(--color-border);
}

.modal-title,
.modal-content h4,
.modal-content h5,
.modal-content h6{
    color:var(--color-text-h);
}

.modal-content p,
.modal-content li,
.modal-content td,
.modal-content th{
    color:var(--color-text);
}

.modal-content .border{
    border-color:var(--color-border)!important;
}

.modal-content .content-card{
    background:var(--color-bg-alt);
    border:1px solid var(--color-border);
    box-shadow:none;
}

.modal-content .form-control{
    background:var(--color-bg);
    color:var(--color-text);
    border-color:var(--color-border);
}

.modal-content .form-control::file-selector-button{
    background:var(--color-bg-alt);
    color:var(--color-text);
    border:none;
}

.modal-content .table{
    color:var(--color-text);
}

.modal-content .table td,
.modal-content .table th{
    border-color:var(--color-border);
}

.modal-content hr{
    border-color:var(--color-border);
    opacity:1;
}


/* ==========================================================
   STRUTTURA MODALE IMPORTAZIONE
========================================================== */

.monitorami-import-dialog{
    width:min(1200px,calc(100% - 32px));
    max-width:1200px;
    margin-right:auto;
    margin-left:auto;
}

.monitorami-import-modal{
    overflow:hidden;
}

.monitorami-import-header{
    align-items:flex-start;
    gap:24px;
}

.monitorami-import-header > div{
    min-width:0;
}

.monitorami-import-header .btn-close{
    flex-shrink:0;
    margin:4px 0 0;
}

.monitorami-manual-actions{
    display:flex;
    flex-direction:column;
}

.monitorami-manual-actions .btn{
    white-space:nowrap;
}

.monitorami-upload-box{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
}

.monitorami-upload-box .form-control{
    width:100%;
}

.monitorami-import-footer{
    gap:12px;
}


/* ==========================================================
   MODALE IMPORTAZIONE - DARK MODE
========================================================== */

body.dark .modal-content{
    background:#182437;
    border:1px solid rgba(255,255,255,.10);
    color:#dbe6f3;
}

body.dark .modal-header,
body.dark .modal-footer{
    border-color:rgba(255,255,255,.10);
}

body.dark .modal-content .border{
    border-color:#314761!important;
    background:#213149;
}

body.dark .modal-content .content-card{
    background:#213149;
    border-color:#314761;
}

body.dark .modal-content .form-control{
    background:#0f1724;
    border-color:#314761;
    color:#fff;
}

body.dark .modal-content .form-control::file-selector-button{
    background:#213149;
    color:#fff;
}

body.dark .modal-content .table{
    color:#dbe6f3;
}

body.dark .modal-content .table td,
body.dark .modal-content .table th{
    border-color:#314761;
}

body.dark .modal-content .alert-success{
    background:#143d2e;
    border-color:#1b6f4d;
    color:#d9fff0;
}

body.dark .modal-content .alert-danger{
    background:#4a1f24;
    border-color:#9d4048;
    color:#ffd9dc;
}

body.dark .modal-content .btn-close{
    filter:invert(1);
}


/* ==========================================================
   MODALE IMPORTAZIONE - TABLET
========================================================== */

@media (max-width:991.98px){

    .monitorami-import-dialog{
        width:calc(100% - 24px);
        max-width:none;
        margin:12px auto;
    }

    .monitorami-import-modal{
        max-height:calc(100vh - 24px);
        border-radius:22px!important;
    }

    .monitorami-import-header{
        padding:24px!important;
    }

    .monitorami-import-modal .modal-body{
        padding:0 24px 24px!important;
    }

    .monitorami-manual-actions{
        width:100%;
    }

    .monitorami-manual-actions .btn{
        width:100%;
    }

    .monitorami-upload-box{
        padding:32px!important;
    }

    .monitorami-import-footer{
        padding:0 24px 24px!important;
    }

}


/* ==========================================================
   MODALE IMPORTAZIONE - MOBILE
========================================================== */

@media (max-width:575.98px){

    .monitorami-import-dialog{
        width:100%;
        min-height:100%;
        margin:0;
    }

    .monitorami-import-modal{
        min-height:100vh;
        max-height:100vh;
        border-radius:0!important;
    }

    .monitorami-import-header{
        padding:20px 18px 16px!important;
        gap:14px;
    }

    .monitorami-import-header h4{
        font-size:1.3rem;
        line-height:1.25;
    }

    .monitorami-import-header p{
        font-size:.9rem;
        line-height:1.55;
    }

    .monitorami-import-header .badge-monitorami{
        padding:8px 12px;
        font-size:.68rem;
        white-space:normal;
    }

    .monitorami-import-modal .modal-body{
        padding:0 16px 20px!important;
    }

    .monitorami-import-modal .content-card{
        padding:22px 18px;
        border-radius:18px;
    }

    .monitorami-manual-row{
        --bs-gutter-y:1rem;
    }

    .monitorami-manual-actions{
        width:100%;
    }

    .monitorami-manual-actions .btn{
        width:100%;
        min-height:48px;
    }

    #monitoramiFeedbackManuale{
        width:100%;
        margin-bottom:0;
    }

    .monitorami-upload-box{
        min-height:auto!important;
        padding:26px 18px!important;
        border-radius:18px!important;
    }

    .monitorami-upload-box > i{
        font-size:48px!important;
    }

    .monitorami-upload-box p{
        font-size:.9rem;
        line-height:1.6;
    }

    .monitorami-upload-box .btn{
        width:100%;
        min-height:48px;
    }

    #monitoramiImportResult{
        overflow:hidden;
        padding:18px;
    }

    #monitoramiImportResult .table{
        width:100%;
        table-layout:fixed;
    }

    #monitoramiImportResult th{
        width:32%;
        white-space:nowrap;
    }

    #monitoramiImportResult td{
        width:68%;
        padding-right:12px;
        white-space:normal;
    }

    .monitorami-import-footer{
        display:grid;
        grid-template-columns:1fr;
        padding:0 16px 18px!important;
    }

    .monitorami-import-footer .btn{
        width:100%;
        min-height:48px;
        margin:0;
    }

}

/* ==========================================================
   NOTIFICATION CENTER
========================================================== */

.notification-center{
    width:460px;
    max-width:100vw;
    border-left:none;
    background:var(--color-bg-card);
}

.notification-center .offcanvas-header{
    padding:28px 28px 20px;
    background:var(--color-bg-card);
    border-bottom:1px solid var(--color-border);
}

.notification-center .offcanvas-title{
    font-size:1.35rem;
    font-weight:800;
    color:var(--color-text-h);
}

.notification-center .offcanvas-body{
    padding:24px;
    background:var(--color-bg-alt);
    overflow-y:auto;
}

/* Toolbar */

.notification-toolbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:22px;
}

.notification-toolbar small{
    font-size:.82rem;
    font-weight:600;
    color:var(--color-text-muted);
}

.notification-toolbar button{
    padding:0;
    border:none;
    background:none;
    color:#0755E3;
    font-weight:700;
    transition:.2s;
}

.notification-toolbar button:hover{
    opacity:.75;
}

/* Lista */

.notification-list{
    display:flex;
    flex-direction:column;
    gap:16px;
}

/* Card */

.notification-item{

    display:flex;
    gap:16px;
    align-items:flex-start;

    padding:18px;

    background:var(--color-bg-card);

    border:1px solid var(--color-border);

    border-radius:22px;

    transition:.25s;

    cursor:pointer;

}

.notification-item:hover{

    transform:translateY(-3px);

    box-shadow:0 18px 40px rgba(15,23,42,.10);

}

.notification-item.unread{

    border-left:4px solid #0755E3;

}

/* Icona */

.notification-icon{

    width:48px;
    height:48px;

    flex-shrink:0;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:16px;

    background:#EEF6FF;

    color:#0755E3;

    font-size:1.15rem;

}

/* Testo */

.notification-content{

    flex:1;

    min-width:0;

}

.notification-content h6{

    margin:0;

    font-size:1rem;

    font-weight:700;

    color:var(--color-text-h);

}

.notification-company{

    margin-top:3px;

    font-size:.82rem;

    font-weight:600;

    color:var(--color-text-muted);

    text-transform:uppercase;

    letter-spacing:.04em;

}

.notification-description{

    margin-top:12px;

    color:var(--color-text);

    line-height:1.55;

}

.notification-change{

    display:inline-flex;

    align-items:center;

    gap:6px;

    margin-top:14px;

    padding:8px 12px;

    border-radius:12px;

    background:#EEF6FF;

    font-size:.85rem;

    font-weight:600;

    color:#3F5676;

}

.notification-change strong{

    color:#0755E3;

}

.notification-footer{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-top:14px;

}

.notification-time{

    font-size:.78rem;

    color:var(--color-text-muted);

}

.notification-actions{

    display:flex;

    gap:14px;

}

.notification-actions button{

    padding:0;

    border:none;

    background:none;

    color:#0755E3;

    font-size:.82rem;

    font-weight:700;

}

.notification-actions button:hover{

    text-decoration:underline;

}

/* Nessuna notifica */

.notification-empty{

    display:flex;

    flex-direction:column;

    align-items:center;

    justify-content:center;

    padding:70px 30px;

    text-align:center;

}

.notification-empty i{

    font-size:3.5rem;

    color:#B6C5D9;

    margin-bottom:18px;

}

.notification-empty h5{

    margin-bottom:8px;

    color:var(--color-text-h);

}

.notification-empty p{

    margin:0;

    color:var(--color-text-muted);

}

/* Scroll */

.notification-center .offcanvas-body::-webkit-scrollbar{

    width:7px;

}

.notification-center .offcanvas-body::-webkit-scrollbar-thumb{

    background:#CCD9E8;

    border-radius:30px;

}

/* Dark mode */

body.dark .notification-center{

    background:#182437;

}

body.dark .notification-center .offcanvas-body{

    background:#142032;

}

body.dark .notification-item{

    background:#1B2B41;

    border-color:#314761;

    box-shadow:none;

}

body.dark .notification-item:hover{

    box-shadow:0 20px 45px rgba(0,0,0,.35);

}

body.dark .notification-icon{

    background:#223955;

    color:#7EC3FF;

}

body.dark .notification-change{

    background:#223955;

    color:#dbe6f3;

}

body.dark .notification-change strong{

    color:#7EC3FF;

}

body.dark .notification-toolbar button,
body.dark .notification-actions button{

    color:#7EC3FF;

}


.monitorami-table-wrapper{
    width:100%;
    border:1px solid var(--color-bg-border);
    border-radius:20px;
    overflow-x:auto;
    overflow-y:hidden;
    background:var(--color-bg-card);
    box-shadow:0 8px 24px rgba(15,23,42,.05);
    -webkit-overflow-scrolling:touch;
}


.monitorami-table{
    margin:0;
    color:var(--color-text);
    --bs-table-bg:transparent;
    --bs-table-hover-bg:rgba(7,85,227,.05);
    --bs-table-hover-color:inherit;
}

.monitorami-table thead th{
    background:var(--color-bg-alt);
    color:var(--color-text-strong);
    border:none;
    padding:16px 20px;
    font-size:.82rem;
    text-transform:uppercase;
    letter-spacing:.08em;
    font-weight:700;
}

.monitorami-table tbody td{
    padding:18px 20px;
    border-top:1px solid var(--color-bg-border);
    background:transparent;
    color:var(--color-text);
    vertical-align:middle;
}

.monitorami-table tbody tr:hover td{
    background:rgba(7,85,227,.04);
}


.monitorami-table{
    margin:0;
    width:100%;
    color:var(--color-text);
    --bs-table-bg:transparent;
    --bs-table-hover-bg:rgba(7,85,227,.05);
    --bs-table-hover-color:inherit;
}

.monitorami-table thead th{
    background:var(--color-bg-alt);
    color:var(--color-text-strong);
    border:none;
    padding:16px 20px;
    font-size:.82rem;
    text-transform:uppercase;
    letter-spacing:.08em;
    font-weight:700;
    white-space:nowrap;
}

.monitorami-table tbody td{
    padding:18px 20px;
    border-top:1px solid var(--color-bg-border);
    background:transparent;
    color:var(--color-text);
    vertical-align:middle;
}

.monitorami-table tbody tr{
    transition:.2s ease;
}

.monitorami-table tbody tr:hover td{
    background:rgba(7,85,227,.04);
}

.monitorami-table a{
    font-weight:600;
    text-decoration:none;
}

.monitorami-table .badge{
    font-weight:700;
}

.monitorami-table .btn{
    border-radius:12px;
}

body.dark .monitorami-table-wrapper{
    background:#182437;
    border-color:#314761;
}

body.dark .monitorami-table thead th{
    background:#223955;
    color:#fff;
}

body.dark .monitorami-table tbody td{
    background:transparent;
    color:#dbe7f5;
    border-top-color:#314761;
}

body.dark .monitorami-table tbody tr:hover td{
    background:#263b55;
}

/* ==========================================
   Progress Monitorami
========================================== */

.monitorami-progress{
    height:10px;
    background:#e8f1fb;
    border-radius:999px;
}

body.dark .monitorami-progress{
    background:#223955;
}

.progress-bilancio{
    background:linear-gradient(90deg,#1D3470,#0755E3)!important;
}

.progress-anagrafica{
    background:linear-gradient(90deg,#13C8A1,#39D98A)!important;
}

.progress-attivita{
    background:linear-gradient(90deg,#F59E0B,#FBBF24)!important;
}

.progress-struttura{
    background:linear-gradient(90deg,#3FA9F5,#66C7FF)!important;
}

.progress-negativita{
    background:linear-gradient(90deg,#EF4444,#DC2626)!important;
}

.progress-economico{
    background:linear-gradient(90deg,#8B5CF6,#6366F1)!important;
}

.progress-default{
    background:linear-gradient(90deg,#64748B,#94A3B8)!important;
}



/* ==========================================================
   PAGINA PREZZI
========================================================== */

.pricing-page{
    padding:60px 0 100px;
}

.pricing-hero{
    padding:40px 0 70px;
    text-align:center;
}

.pricing-hero h1{
    max-width:900px;
    margin:22px auto 24px;
}

.pricing-hero .lead{
    font-size:1.15rem;
    color:var(--color-text-muted)!important;
}

.pricing-pill{

    display:inline-flex;
    align-items:center;

    padding:12px 18px;

    border-radius:999px;

    background:var(--color-bg-badge-light);

    border:1px solid var(--color-border);

    color:var(--color-text);

    font-size:.92rem;

    font-weight:600;

}

.pricing-section{
    padding-bottom:80px;
}

.pricing-card{

    position:relative;

    display:flex;
    flex-direction:column;

    padding:42px;

    background:var(--color-bg-card);

    border:1px solid var(--color-border);

    border-radius:28px;

    box-shadow:var(--color-card-shadow);

    transition:all .3s ease;

}

.pricing-card:hover{

    transform:translateY(-8px);

    box-shadow:var(--color-card-shadow-hover);

}

.pricing-card-featured{

    border:2px solid #0755E3;

    transform:scale(1.03);

}

.pricing-card-featured:hover{

    transform:scale(1.03) translateY(-8px);

}

.pricing-badge{

    position:absolute;

    top:-16px;

    left:50%;

    transform:translateX(-50%);

    padding:8px 18px;

    border-radius:999px;

    background:var(--color-bg-btn-primary-gradient);

    color:#fff;

    font-size:.75rem;

    font-weight:800;

    letter-spacing:.08em;

    text-transform:uppercase;

    box-shadow:var(--color-btn-primary-shadow);

}

.pricing-plan{

    display:inline-flex;

    width:max-content;

    margin-bottom:26px;

    padding:8px 16px;

    border-radius:999px;

    background:var(--color-bg-badge-light);

    border:1px solid var(--color-border);

    color:var(--color-text-link);

    font-size:.78rem;

    font-weight:800;

    letter-spacing:.08em;

    text-transform:uppercase;

}

.pricing-card h3{

    margin-bottom:18px;

    font-size:1.9rem;

    line-height:1.25;

    color:var(--color-text-h);

}

.pricing-card h3 strong{

    display:block;

    margin-top:6px;

    font-size:2.2rem;

}

.pricing-price{

    margin-top:12px;

    font-size:4rem;

    line-height:1;

    font-weight:800;

    color:var(--color-text-h);

}

.pricing-period{

    margin-top:10px;

    color:var(--color-text-muted);

    font-weight:600;

}

.pricing-card hr{

    margin:34px 0;

    border-color:var(--color-border);

    opacity:1;

}

.pricing-list{

    flex:1;

    margin:0;

    padding:0;

    list-style:none;

}

.pricing-list li{

    position:relative;

    padding-left:30px;

    margin-bottom:18px;

    color:var(--color-text);

    line-height:1.6;

}

.pricing-list li::before{

    content:"✓";

    position:absolute;

    left:0;

    top:0;

    font-weight:800;

    color:#13C8A1;

}

.pricing-card .btn{

    margin-top:34px;

}

/* Dark mode */

body.dark .pricing-card{

    background:var(--color-bg-card);

    border-color:var(--color-border);

}

body.dark .pricing-card-featured{

    border-color:#3FA9F5;

}

body.dark .pricing-pill,
body.dark .pricing-plan{

    background:rgba(255,255,255,.06);

    border-color:rgba(255,255,255,.10);

}

body.dark .pricing-list li::before{

    color:#3FA9F5;

}

/* Responsive */

@media (max-width:991px){

    .pricing-page{
        padding:30px 0 70px;
    }

    .pricing-card-featured{

        transform:none;

    }

    .pricing-card-featured:hover{

        transform:translateY(-8px);

    }

    .pricing-price{

        font-size:3rem;

    }

}

.btn-remove-monitorami{

    display:inline-flex;
    align-items:center;
    gap:10px;

    padding:10px 18px;

    border:none;
    border-radius:14px;

    background:#fff5f5;

    color:#d92d20;

    font-size:.90rem;
    font-weight:700;

    transition:.25s ease;

}

.btn-remove-monitorami i{

    font-size:1rem;

}

.btn-remove-monitorami:hover{

    background:#d92d20;

    color:#fff;

    transform:translateY(-2px);

    box-shadow:0 12px 24px rgba(217,45,32,.25);

}

body.dark .btn-remove-monitorami{

    background:#3d1d20;

    color:#ff8c8c;

}

body.dark .btn-remove-monitorami:hover{

    background:#d92d20;

    color:#fff;

}


/* ==========================================================
   DETTAGLIO AZIENDA
========================================================== */

.company-detail-page {
    width: min(100% - 32px, 1320px);
    margin: 0 auto;
    padding: 40px 0 72px;
}


/* Header azienda */

.company-hero {
    position: relative;
    overflow: hidden;
    padding: 36px;
    border: 1px solid #dfe8f3;
    border-radius: 26px;
    background:
        radial-gradient(
            circle at 92% 10%,
            rgba(63, 169, 245, 0.18),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f3f8ff 100%
        );
    box-shadow: 0 20px 55px rgba(12, 28, 51, 0.08);
}

.company-hero::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -110px;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(7, 85, 227, 0.08);
    border-radius: 50%;
}

.company-hero__title {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #0c1c33;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.company-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid #cfe0f7;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #0755e3;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.company-status-badge--success {
    border-color: rgba(25, 135, 84, 0.18);
    color: #107755;
}

.company-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #198754;
    box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.1);
}

.company-meta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-top: 22px;
}

.company-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #64748b;
    font-size: 0.92rem;
}

.company-meta i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(7, 85, 227, 0.08);
    color: #0755e3;
}

.company-meta strong {
    margin-left: 3px;
    color: #25344c;
    font-weight: 650;
}


/* Stato monitoraggio */

.monitoring-status-card {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 1px solid rgba(25, 135, 84, 0.18);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 14px 32px rgba(12, 28, 51, 0.07);
    backdrop-filter: blur(12px);
}

.monitoring-status-card__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, #107755, #20a473);
    color: #ffffff;
    font-size: 1.5rem;
    box-shadow: 0 10px 22px rgba(16, 119, 85, 0.22);
}

.monitoring-status-card small,
.monitoring-status-card strong,
.monitoring-status-card span {
    display: block;
}

.monitoring-status-card small {
    color: #718096;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.monitoring-status-card strong {
    margin-top: 3px;
    color: #107755;
    font-size: 1.2rem;
}

.monitoring-status-card span {
    margin-top: 3px;
    color: #718096;
    font-size: 0.8rem;
    line-height: 1.35;
}


/* Sezione dettaglio */

.detail-section {
    overflow: hidden;
    border: 1px solid #e1e9f3;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 16px 42px rgba(12, 28, 51, 0.06);
}

.detail-section__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 28px 30px 24px;
    border-bottom: 1px solid #edf1f6;
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fbfdff 100%
        );
}

.detail-section__kicker {
    display: block;
    margin-bottom: 8px;
    color: #0755e3;
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.detail-section__header h2 {
    margin: 0;
    color: #0c1c33;
    font-size: 1.35rem;
    font-weight: 750;
    letter-spacing: -0.025em;
}

.detail-section__header p {
    margin: 7px 0 0;
    color: #718096;
    font-size: 0.9rem;
}

.detail-section__header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #eaf2ff;
    color: #0755e3;
    font-size: 1.25rem;
}

.detail-section__body {
    padding: 30px;
}


/* Campi anagrafici */

.detail-field {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    height: 100%;
    min-height: 92px;
    padding: 17px;
    border: 1px solid #e8edf4;
    border-radius: 17px;
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fafcff 100%
        );
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.detail-field:hover {
    transform: translateY(-2px);
    border-color: #cbd9ea;
    box-shadow: 0 10px 24px rgba(12, 28, 51, 0.06);
}

.detail-field--featured {
    border-color: rgba(7, 85, 227, 0.18);
    background:
        linear-gradient(
            135deg,
            #f8fbff 0%,
            #eef5ff 100%
        );
}

.detail-field__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 39px;
    height: 39px;
    border-radius: 12px;
    background: #eaf2ff;
    color: #0755e3;
    font-size: 1rem;
}

.detail-field small {
    display: block;
    margin-bottom: 6px;
    color: #7a889c;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.detail-field strong {
    display: block;
    color: #18263d;
    font-size: 0.94rem;
    font-weight: 650;
    line-height: 1.45;
    overflow-wrap: anywhere;
}


/* Responsive */

@media (max-width: 991.98px) {

    .company-detail-page {
        width: min(100% - 24px, 1320px);
        padding-top: 24px;
    }

    .company-hero {
        padding: 28px;
    }

    .monitoring-status-card {
        margin-top: 4px;
    }

}

@media (max-width: 575.98px) {

    .people-table-wrapper{
        overflow:visible;
        border:0;
        border-radius:0;
        background:transparent;
        box-shadow:none;
    }

    .people-table-wrapper .monitorami-table{
        display:block;
        width:100%;
        min-width:0;
    }

    .people-table-wrapper .monitorami-table thead{
        display:none;
    }

    .people-table-wrapper .monitorami-table tbody{
        display:flex;
        flex-direction:column;
        gap:16px;
    }

    .people-table-wrapper .monitorami-table tbody tr{
        display:block;
        overflow:hidden;
        width:100%;
        border:1px solid var(--color-border);
        border-radius:18px;
        background:var(--color-bg-card);
        box-shadow:0 8px 22px rgba(15,23,42,.06);
    }

    .people-table-wrapper .monitorami-table tbody td{
        display:flex;
        align-items:flex-start;
        justify-content:space-between;
        gap:18px;
        width:100%;
        padding:13px 16px;
        border:0;
        border-bottom:1px solid var(--color-border);
        text-align:right!important;
        white-space:normal;
        overflow-wrap:anywhere;
    }

    .people-table-wrapper .monitorami-table tbody td:last-child{
        border-bottom:0;
    }

    .people-table-wrapper .monitorami-table tbody td::before{
        content:attr(data-label);
        flex:0 0 42%;
        color:var(--color-text-muted);
        font-size:.7rem;
        font-weight:800;
        letter-spacing:.06em;
        line-height:1.4;
        text-align:left;
        text-transform:uppercase;
    }

    .people-table-wrapper .monitorami-table tbody td > *{
        max-width:58%;
    }

    .people-table-wrapper .monitorami-table tbody td:first-child{
        display:block;
        padding:18px 16px;
        background:var(--color-bg-alt);
        text-align:left!important;
    }

    .people-table-wrapper .monitorami-table tbody td:first-child::before{
        display:block;
        margin-bottom:7px;
    }

    .people-table-wrapper .monitorami-table tbody td:first-child > *{
        max-width:100%;
    }

    .people-table-wrapper .monitorami-table tbody td .badge{
        flex-shrink:0;
    }

    body.dark .people-table-wrapper .monitorami-table tbody tr{
        background:#182437;
        border-color:#314761;
        box-shadow:0 10px 26px rgba(0,0,0,.22);
    }

    body.dark .people-table-wrapper .monitorami-table tbody td{
        border-bottom-color:#314761!important;
    }

    body.dark .people-table-wrapper .monitorami-table tbody td:first-child{
        background:#213149!important;
    }

    .company-hero {
        padding: 22px;
        border-radius: 20px;
    }

    .company-meta {
        flex-direction: column;
        gap: 10px;
    }

    .detail-section {
        border-radius: 20px;
    }

    .detail-section__header {
        padding: 22px;
    }

    .detail-section__body {
        padding: 18px;
    }

    .detail-section__header-icon {
        display: none;
    }

}

/* ==========================================================
   SOLIDITÀ ECONOMICO-FINANZIARIA
========================================================== */

.financial-metric {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 190px;
    padding: 22px;
    border: 1px solid #e5ebf3;
    border-radius: 18px;
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f9fbfe 100%
        );
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.financial-metric:hover {
    transform: translateY(-2px);
    border-color: #cbd9ea;
    box-shadow: 0 12px 28px rgba(12, 28, 51, 0.08);
}

.financial-metric__topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.financial-metric__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #eaf2ff;
    color: #0755e3;
    font-size: 1.15rem;
}

.financial-metric__trend {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.financial-metric__trend.is-positive {
    background: rgba(25, 135, 84, 0.1);
    color: #107755;
}

.financial-metric__trend.is-negative {
    background: rgba(220, 53, 69, 0.1);
    color: #c72d3d;
}

.financial-metric__trend.is-neutral {
    background: rgba(255, 193, 7, 0.15);
    color: #8a6800;
}

.financial-metric > small {
    display: block;
    color: #718096;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.financial-metric__value {
    display: block;
    margin-top: 8px;
    color: #15233b;
    font-size: clamp(1.55rem, 2.4vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.financial-metric__caption {
    display: block;
    margin-top: auto;
    padding-top: 18px;
    color: #7a889c;
    font-size: 0.78rem;
    line-height: 1.4;
}

@media (max-width: 575.98px) {

    .financial-metric {
        min-height: 170px;
        padding: 18px;
    }

    .financial-metric__value {
        font-size: 1.6rem;
    }

}

.rating-a{
    background:#28A745!important;
    color:#fff!important;
}

.rating-b{
    background:#8BC34A!important;
    color:#fff!important;
}

.rating-c{
    background:#FFC107!important;
    color:#fff!important;
}

.rating-d{
    background:#FD7E14!important;
    color:#fff!important;
}

.rating-e{
    background:#DC3545!important;
    color:#fff!important;
}

.rating-nd{
    background:#6C757D!important;
    color:#fff!important;
}


/* ==========================================================
   CENTRO NOTIFICHE
========================================================== */

.notification-item{
    position:relative;
    display:flex;
    align-items:flex-start;
    gap:16px;

    width:100%;
    min-width:0;
    max-width:100%;

    margin-bottom:18px;
    padding:18px;

    overflow:hidden;

    background:var(--color-bg-card);
    border:1px solid var(--color-border);
    border-radius:22px;

    box-shadow:0 10px 28px rgba(15,23,42,.05);

    transition:.25s ease;
}

.notification-item:last-child{
    margin-bottom:0;
}

.notification-item::before{
    content:"";

    position:absolute;
    left:0;
    top:0;
    bottom:0;

    width:4px;

    border-radius:22px 0 0 22px;

    background:#0755E3;

    opacity:.15;

    transition:.25s ease;
}

.notification-item.unread::before{
    opacity:1;
}

.notification-item:hover{
    transform:translateY(-3px);

    box-shadow:0 20px 45px rgba(15,23,42,.10);
}

.notification-item[role="link"]:focus-visible{
    outline:3px solid #0755e3;
    outline-offset:3px;
}

.notification-content{
    flex:1 1 auto;

    min-width:0;
    max-width:100%;
}

.notification-content h6{
    margin:0;

    color:var(--color-text-h);

    font-size:1rem;
    font-weight:700;
    line-height:1.35;

    overflow-wrap:anywhere;
    word-break:break-word;
}

.notification-company{
    margin-top:3px;

    color:var(--color-text-muted);

    font-size:.82rem;
    font-weight:700;
    line-height:1.4;

    text-transform:uppercase;
    letter-spacing:.04em;

    overflow-wrap:anywhere;
    word-break:break-word;
}

.notification-description{
    max-width:100%;

    margin-top:12px;

    color:var(--color-text);

    line-height:1.55;

    overflow-wrap:anywhere;
    word-break:break-word;
}

.notification-change{
    display:flex;
    flex-direction:column;
    gap:10px;

    width:100%;
    min-width:0;
    max-width:100%;

    margin-top:14px;
    padding:12px 14px;

    overflow:hidden;

    background:#EEF6FF;
    border-radius:12px;

    color:#3F5676;

    font-size:.85rem;
    line-height:1.45;

    overflow-wrap:anywhere;
    word-break:break-word;
}

.notification-change__subject{
    max-width:100%;

    padding-bottom:8px;

    border-bottom:1px solid #d7e5f3;

    color:#52657f;

    font-size:.75rem;
    font-weight:700;

    overflow-wrap:anywhere;
    word-break:break-word;
}

.notification-change__row{
    display:flex;
    flex-direction:column;
    gap:5px;

    min-width:0;
    max-width:100%;
}

.notification-change__label{
    display:block;

    max-width:100%;

    color:#536883;

    font-size:.72rem;
    font-weight:700;

    overflow-wrap:anywhere;
    word-break:break-word;
}

.notification-change__values{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:6px;

    min-width:0;
    max-width:100%;

    color:#0755E3;

    overflow-wrap:anywhere;
    word-break:break-word;
}

.notification-change__values strong{
    display:inline;

    max-width:100%;
    margin:0;

    color:#0755E3;

    font-size:.85rem;
    font-weight:700;

    overflow-wrap:anywhere;
    word-break:break-word;
}

.notification-change table{
    width:100%;
    table-layout:fixed;
}

.notification-change td{
    padding:3px 0;

    vertical-align:top;

    overflow-wrap:anywhere;
    word-break:break-word;
}

/* ==========================================================
   ULTIMI AGGIORNAMENTI
========================================================== */

.recent-updates-list{
    display:flex;
    flex-direction:column;
    gap:18px;
}

.monitoring-summary{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
}

.monitoring-summary__metric{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
    padding:16px;
    border:1px solid var(--color-bg-border);
    border-radius:14px;
    background:var(--color-bg-alt);
}

.monitoring-summary__icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:38px;
    height:38px;
    flex:0 0 38px;
    border-radius:11px;
    background:rgba(7,85,227,.10);
    color:var(--color-primary);
    font-size:1rem;
}

.monitoring-summary__icon.is-alert{
    background:rgba(220,53,69,.12);
    color:#dc3545;
}

.monitoring-summary__metric strong,
.monitoring-summary__metric small{
    display:block;
}

.monitoring-summary__metric strong{
    color:var(--color-text-strong);
    font-size:1.1rem;
    font-weight:800;
    line-height:1.2;
}

.monitoring-summary__metric small{
    margin-top:3px;
    color:var(--color-text-muted);
    font-size:.78rem;
    line-height:1.3;
}

.monitoring-summary__categories{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:8px;
    margin-top:16px;
    color:var(--color-text-muted);
    font-size:.82rem;
}

.monitoring-summary__category{
    display:inline-flex;
    align-items:center;
    gap:7px;
    padding:5px 9px;
    border-radius:999px;
    background:var(--color-bg-alt);
    color:var(--color-text);
    font-weight:600;
}

.monitoring-summary__category strong{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:20px;
    height:20px;
    border-radius:50%;
    background:rgba(7,85,227,.10);
    color:var(--color-primary);
    font-size:.72rem;
}

.significant-movements-section__period{
    display:inline-flex;
    align-items:center;
    gap:7px;
    padding:8px 11px;
    border-radius:999px;
    background:var(--color-bg-alt);
    color:var(--color-text-muted);
    font-size:.8rem;
    font-weight:700;
}

.significant-movements-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:16px;
}

.significant-movement-panel{
    overflow:hidden;
    min-height:258px;
    border:1px solid #dfe5ec;
    border-radius:17px;
    background:#fbfcfe;
}

.significant-movement-panel__header{
    display:flex;
    align-items:center;
    gap:9px;
    padding:15px 16px;
    border-bottom:1px solid #e5e9ef;
    color:var(--color-text-strong);
    font-size:.88rem;
}

.significant-movement-panel__header > span{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:28px;
    height:28px;
    border-radius:8px;
}

.significant-movement-panel__header small{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:21px;
    height:21px;
    margin-left:auto;
    border-radius:50%;
    background:rgba(100,116,139,.12);
    color:var(--color-text-muted);
    font-size:.72rem;
    font-weight:800;
}

.significant-movement-panel.is-growth .significant-movement-panel__header > span{
    background:rgba(25,135,84,.12);
    color:#198754;
}

.significant-movement-panel.is-decline .significant-movement-panel__header > span{
    background:rgba(253,126,20,.13);
    color:#d56a00;
}

.significant-movement-panel.is-risk .significant-movement-panel__header > span{
    background:rgba(220,53,69,.12);
    color:#dc3545;
}

.significant-movement-panel__empty{
    margin:0;
    padding:18px 14px;
    color:var(--color-text-muted);
    font-size:.82rem;
    line-height:1.45;
}

.significant-movement-item{
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto;
    gap:4px 10px;
    padding:14px 16px;
    border-bottom:1px solid #e5e9ef;
    color:inherit;
    text-decoration:none;
}

.significant-movement-item:last-child{
    border-bottom:0;
}

.significant-movement-item:hover{
    background:#f5f7fa;
}

.significant-movement-item__company{
    overflow:hidden;
    color:var(--color-text-strong);
    font-size:.86rem;
    font-weight:800;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.significant-movement-item__label{
    grid-column:1;
    color:var(--color-text-muted);
    font-size:.79rem;
}

.significant-movement-item__delta{
    grid-column:2;
    grid-row:1 / span 2;
    align-self:center;
    color:#198754;
    font-size:.9rem;
    font-weight:800;
}

.is-decline .significant-movement-item__delta,
.is-risk .significant-movement-item__delta{
    color:#b42318;
}

.significant-movement-item__delta.is-text{
    font-size:.72rem;
    text-align:right;
}

.significant-movement-item__bar{
    grid-column:1 / -1;
    height:4px;
    overflow:hidden;
    border-radius:999px;
    background:rgba(100,116,139,.12);
}

.significant-movement-item__bar i{
    display:block;
    height:100%;
    border-radius:inherit;
    background:#198754;
}

.is-decline .significant-movement-item__bar i{
    background:#d56a00;
}

.significant-movement-item__values{
    grid-column:1 / -1;
    color:var(--color-text-muted);
    font-size:.75rem;
}

.significant-movement-item__values i{
    margin:0 4px;
    font-size:.7rem;
}

.monitoring-alert-modal__meta{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:8px 16px;
    padding-bottom:14px;
    border-bottom:1px solid var(--color-bg-border);
    color:var(--color-text-muted);
    font-size:.8rem;
    font-weight:600;
}

.monitoring-alert-modal__meta span{
    display:inline-flex;
    align-items:center;
    gap:6px;
}

.monitoring-alert-modal__meta .is-alert{
    color:#b42318;
    font-weight:800;
}

.monitoring-alert-modal__heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin:16px 0 10px;
}

.monitoring-alert-modal__heading h5{
    margin:0;
    color:var(--color-text-strong);
    font-size:1rem;
    font-weight:800;
}

.monitoring-alert-modal__grid{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:10px;
}

.monitoring-alert-modal__group{
    padding:0 12px;
    border:1px solid var(--color-bg-border);
    border-radius:12px;
    background:var(--color-bg-alt);
}

.monitoring-alert-modal__category{
    display:flex;
    align-items:center;
    gap:9px;
    margin:0;
    padding:10px 0 7px;
    border-bottom:1px solid var(--color-bg-border);
    color:var(--color-text-strong);
    font-size:.83rem;
    font-weight:800;
}

.monitoring-alert-modal__category span{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:21px;
    height:21px;
    border-radius:50%;
    background:rgba(7,85,227,.10);
    color:var(--color-primary);
    font-size:.72rem;
}

.monitoring-alert-modal__event{
    display:flex;
    align-items:flex-start;
    gap:11px;
    padding:8px 0;
    border:0;
    border-bottom:1px solid var(--color-bg-border);
    border-radius:0;
    background:transparent;
}

.monitoring-alert-modal__event + .monitoring-alert-modal__event{
    margin-top:0;
}

.monitoring-alert-modal__event-icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:26px;
    height:26px;
    flex:0 0 26px;
    border-radius:8px;
    background:rgba(7,85,227,.10);
    color:var(--color-primary);
    font-size:.82rem;
}

.monitoring-alert-modal__event strong,
.monitoring-alert-modal__event p,
.monitoring-alert-modal__event small{
    display:block;
}

.monitoring-alert-modal__event strong{
    color:var(--color-text-strong);
    font-size:.9rem;
}

.monitoring-alert-modal__event p{
    margin:2px 0 3px;
    color:var(--color-text-muted);
    font-size:.82rem;
    line-height:1.45;
}

.monitoring-alert-modal__event:last-child{
    border-bottom:0;
}

.monitoring-alert-modal__event small{
    color:var(--color-text-muted);
    font-size:.75rem;
}

.recent-update-card{
    overflow:hidden;
    border:1px solid var(--color-bg-border);
    border-left:4px solid rgba(7,85,227,.55);
    border-radius:20px;
    background:var(--color-bg-card);
    box-shadow:0 10px 28px rgba(15,23,42,.05);
    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.recent-update-card:hover{
    transform:translateY(-2px);
    border-color:rgba(7,85,227,.18);
    box-shadow:0 18px 38px rgba(15,23,42,.09);
}

.recent-update-card__toggle{
    width:100%;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:24px;
    padding:22px 24px;

    border:0;

    background:linear-gradient(
        180deg,
        var(--color-bg-card) 0%,
        var(--color-bg-alt) 100%
    );

    color:inherit;
    text-align:left;
    cursor:pointer;
}

.recent-update-card__toggle:hover{
    background:var(--color-bg-alt);
}

.recent-update-card__toggle:focus-visible{
    outline:3px solid rgba(7,85,227,.22);
    outline-offset:-3px;
}

.recent-update-card__icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:46px;
    height:46px;
    flex:0 0 46px;
    border-radius:14px;
    background:rgba(7,85,227,.10);
    color:var(--color-primary);
    font-size:1.15rem;
}

.recent-update-card__company{
    color:var(--color-text-strong);
    font-size:1.08rem;
    font-weight:800;
    line-height:1.35;
    text-decoration:none;
}

.recent-update-card__company:hover{
    color:var(--color-primary);
}

.recent-update-card__identifier{
    display:block;
    margin-top:5px;
    color:var(--color-text-muted);
    font-size:.78rem;
    line-height:1.35;
}

.recent-update-card__meta{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    flex-wrap:wrap;
    gap:9px 12px;
    padding-top:3px;
}

.recent-update-card__status{
    display:inline-flex;
    align-items:center;
    min-height:30px;
    padding:0 11px;
    border-radius:999px;
    background:rgba(7,85,227,.10);
    color:var(--color-primary);
    font-size:.78rem;
    font-weight:800;
    white-space:nowrap;
}

.recent-update-card__when{
    color:var(--color-text-muted);
    font-size:.78rem;
    font-weight:600;
    white-space:nowrap;
}

.recent-update-card__chevron{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    width:32px;
    height:32px;

    border-radius:10px;

    background:rgba(100,116,139,.10);
    color:var(--color-text-muted);

    transition:
        transform .22s ease,
        background .22s ease;
}

.recent-update-card__toggle:not(.collapsed)
.recent-update-card__chevron{
    transform:rotate(180deg);
    background:rgba(7,85,227,.10);
    color:var(--color-primary);
}

.recent-update-card__footer{
    display:flex;
    justify-content:flex-end;
    padding:0 24px 22px;
}

.recent-update-card__body{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
    padding:20px 24px 24px;
}

.recent-update-group{
    overflow:hidden;
    border:1px solid var(--color-bg-border);
    border-radius:16px;
    background:var(--color-bg-alt);
}

.recent-update-group__title{
    display:flex;
    align-items:center;
    gap:10px;
    padding:13px 15px;
    border-bottom:1px solid var(--color-bg-border);
    color:var(--color-text-strong);
}

.recent-update-group__icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:30px;
    height:30px;
    flex:0 0 30px;
    border-radius:9px;
    background:rgba(100,116,139,.12);
    color:#64748b;
}

.recent-update-group__count{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:26px;
    height:26px;
    margin-left:auto;
    padding:0 8px;
    border-radius:999px;
    background:rgba(100,116,139,.12);
    color:var(--color-text-muted);
    font-size:.78rem;
    font-weight:800;
}

.recent-update-group__list{
    margin:0;
    padding:8px 14px 12px;
    color:var(--color-text);
    list-style:none;
}

.recent-update-group__list li+li{
    margin-top:6px;
}

.recent-update-group__list li{
    position:relative;
    padding:8px 10px 8px 22px;
    border-radius:9px;
    background:var(--color-bg-card);
    font-size:.88rem;
    line-height:1.35;
}

.recent-update-group__list li::before{
    position:absolute;
    top:14px;
    left:10px;
    width:5px;
    height:5px;
    border-radius:50%;
    background:currentColor;
    content:'';
}

.recent-update-group.is-bilancio .recent-update-group__icon{
    background:rgba(13,110,253,.12);
    color:#0d6efd;
}

.recent-update-group.is-anagrafica .recent-update-group__icon{
    background:rgba(13,202,240,.12);
    color:#0aa2c0;
}

.recent-update-group.is-attivita .recent-update-group__icon{
    background:rgba(25,135,84,.12);
    color:#198754;
}

.recent-update-group.is-struttura .recent-update-group__icon{
    background:rgba(108,117,125,.14);
    color:#6c757d;
}

.recent-update-group.is-esponenti .recent-update-group__icon{
    background:rgba(111,66,193,.12);
    color:#6f42c1;
}

.recent-update-group.is-negativita .recent-update-group__icon{
    background:rgba(220,53,69,.12);
    color:#dc3545;
}

.recent-updates-empty{
    padding:56px 24px;
    text-align:center;
}

.recent-updates-empty__icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:68px;
    height:68px;
    border-radius:20px;
    background:rgba(25,135,84,.12);
    color:#198754;
    font-size:1.85rem;
}

body.dark .recent-update-card{
    background:var(--color-bg-card-dark);
    border-color:#314761;
    box-shadow:0 14px 34px rgba(0,0,0,.20);
}

body.dark .monitoring-summary__metric,
body.dark .monitoring-summary__category,
body.dark .monitoring-alert-modal__group,
body.dark .significant-movement-panel{
    background:#213149;
    border-color:#314761;
}

body.dark .recent-update-card:hover{
    border-color:#3b82f6;
    box-shadow:0 20px 44px rgba(0,0,0,.30);
}

body.dark .recent-update-card__toggle{
    background:linear-gradient(
        180deg,
        #1b2b41 0%,
        #182437 100%
    );

    color:#ffffff;
}

body.dark .recent-update-card__toggle:hover{
    background:#213149;
}

body.dark .recent-update-card__company{
    color:#ffffff;
}

body.dark .recent-update-group{
    background:#213149;
    border-color:#314761;
}

body.dark .recent-update-group__title{
    border-bottom-color:#314761;
    color:#ffffff;
}

body.dark .recent-update-group__list{
    color:#dbe7f5;
}

body.dark .recent-update-group__list li{
    background:#182437;
}

@media (max-width:767.98px){

    .monitoring-summary{
        grid-template-columns:1fr;
    }

    .significant-movements-grid{
        grid-template-columns:1fr;
    }

    .monitoring-alert-modal__heading{
        align-items:flex-start;
        flex-direction:column;
    }

    .monitoring-alert-modal__grid{
        grid-template-columns:1fr;
    }

    .recent-update-card__header{
        flex-direction:column;
        padding:20px;
    }

    .recent-update-card__body{
        grid-template-columns:1fr;
        padding:16px 20px 20px;
    }

    .recent-update-card__toggle{
        gap:14px;
        padding:18px;
    }

    .recent-update-card__meta{
        justify-content:flex-start;
        padding-left:60px;
    }
}

/* ==========================================================
   DETTAGLIO AZIENDA - DARK MODE
========================================================== */

body.dark .company-hero{
    border-color:rgba(255,255,255,.10);
    background:
        radial-gradient(circle at 92% 10%, rgba(63,169,245,.15), transparent 32%),
        linear-gradient(180deg,#182437 0%,#142032 100%);
    box-shadow:0 24px 60px rgba(0,0,0,.35);
}

body.dark .company-hero::after{
    border-color:rgba(255,255,255,.08);
}

body.dark .company-hero__title{
    color:#fff;
}

body.dark .company-status-badge{
    background:rgba(255,255,255,.08);
    border-color:rgba(255,255,255,.12);
    color:#7EC3FF;
}

body.dark .company-meta > span{
    color:#b5c5d8;
}

body.dark .company-meta i{
    background:#223955;
    color:#7EC3FF;
}

body.dark .company-meta strong{
    color:#fff;
}

/* Card monitoraggio */

body.dark .monitoring-status-card{
    background:#1b2b41;
    border-color:#2f4966;
    box-shadow:none;
}

body.dark .monitoring-status-card small{
    color:#8ea7c1;
}

body.dark .monitoring-status-card strong{
    color:#39d98a;
}

body.dark .monitoring-status-card span{
    color:#c4d2df;
}

/* Sezioni */

body.dark .detail-section{
    background:#182437;
    border-color:#314761;
    box-shadow:0 20px 45px rgba(0,0,0,.30);
}

body.dark .detail-section__header{
    background:#1b2b41;
    border-bottom:1px solid #314761;
}

body.dark .detail-section__kicker{
    color:#7EC3FF;
}

body.dark .detail-section__header h2{
    color:#fff;
}

body.dark .detail-section__header p{
    color:#b5c5d8;
}

body.dark .detail-section__header-icon{
    background:#223955;
    color:#7EC3FF;
}

/* Campi */

body.dark .detail-field{
    background:#213149;
    border-color:#314761;
}

body.dark .detail-field:hover{
    border-color:#46607e;
    box-shadow:0 14px 30px rgba(0,0,0,.28);
}

body.dark .detail-field--featured{
    background:linear-gradient(135deg,#223955 0%,#2a4668 100%);
    border-color:#3b5c82;
}

body.dark .detail-field__icon{
    background:#223955;
    color:#7EC3FF;
}

body.dark .detail-field small{
    color:#8ea7c1;
}

body.dark .detail-field strong{
    color:#fff;
}

/* Solidità economico-finanziaria */

body.dark .financial-metric{
    background:#213149;
    border-color:#314761;
}

body.dark .financial-metric:hover{
    border-color:#46607e;
    box-shadow:0 18px 36px rgba(0,0,0,.28);
}

body.dark .financial-metric__icon{
    background:#223955;
    color:#7EC3FF;
}

body.dark .financial-metric>small{
    color:#8ea7c1;
}

body.dark .financial-metric__value{
    color:#fff;
}

body.dark .financial-metric__caption{
    color:#b5c5d8;
}

/* ==========================================================
   TABELLE GLOBALI - DARK MODE
   Dashboard, portafoglio clienti e dettaglio azienda
========================================================== */

body.dark .table-responsive{
    background:transparent !important;
}

body.dark .table{
    --bs-table-bg:transparent;
    --bs-table-color:var(--color-text);
    --bs-table-border-color:#314761;
    --bs-table-striped-bg:rgba(255,255,255,.025);
    --bs-table-striped-color:var(--color-text);
    --bs-table-hover-bg:#263b55;
    --bs-table-hover-color:#ffffff;

    margin-bottom:0;
    color:var(--color-text);
    background:transparent !important;
}

body.dark .table > :not(caption) > * > *{
    background-color:transparent !important;
    color:var(--color-text) !important;
    border-color:#314761 !important;
    box-shadow:none !important;
}

body.dark .table thead,
body.dark .table thead tr,
body.dark .table thead th{
    background:#223955 !important;
    color:#ffffff !important;
    border-color:#314761 !important;
}

body.dark .table tbody,
body.dark .table tbody tr,
body.dark .table tbody th,
body.dark .table tbody td{
    background:transparent !important;
    color:var(--color-text) !important;
    border-color:#314761 !important;
}

body.dark .table tbody tr:nth-child(even) > *{
    background:rgba(255,255,255,.018) !important;
}

body.dark .table-hover > tbody > tr:hover > *{
    background:#263b55 !important;
    color:#ffffff !important;
}

body.dark .table tfoot,
body.dark .table tfoot tr,
body.dark .table tfoot th,
body.dark .table tfoot td{
    background:#1b2b41 !important;
    color:#ffffff !important;
    border-color:#314761 !important;
}

body.dark .table .table-light,
body.dark .table .table-light > th,
body.dark .table .table-light > td,
body.dark .table-light,
body.dark .table-light > th,
body.dark .table-light > td{
    --bs-table-bg:#1b2b41;
    --bs-table-color:#ffffff;
    background:#1b2b41 !important;
    color:#ffffff !important;
    border-color:#314761 !important;
}

body.dark .table .text-dark,
body.dark .table strong{
    color:#ffffff !important;
}

body.dark .table .text-muted,
body.dark .table small{
    color:#a8b7cb !important;
}

body.dark .content-card .table-responsive,
body.dark .detail-section .table-responsive,
body.dark .monitorami-table-wrapper,
body.dark .modal-content .table-responsive{
    background:var(--color-bg-card) !important;
    border-color:#314761 !important;
}

body.dark .monitorami-pagination .page-link{
    background:#213149;
    border-color:#314761;
    color:#dbe6f3;
}

body.dark .monitorami-pagination .page-link:hover{
    background:#2b425f;
    color:#fff;
}

body.dark .monitorami-pagination .page-item.active .page-link{
    background:#0755E3;
    border-color:#0755E3;
    color:#fff;
}

body.dark .monitorami-pagination .page-item.disabled .page-link{
    background:#182437;
    border-color:#314761;
    color:#7f93aa;
}

body.dark .monitorami-pagination .text-muted{
    color:#a8b7cb !important;
}

/* ==========================================================
   MODALE AZIENDE PER RATING
========================================================== */

#modalAziendeRating .modal-dialog{
    max-width:920px;
}

#modalAziendeRating .modal-content{
    overflow:hidden;
    border:1px solid var(--color-border);
    border-radius:26px;
    background:var(--color-bg-card);
    box-shadow:0 28px 70px rgba(15,23,42,.22);
}

#modalAziendeRating .modal-header{
    padding:28px 30px;
    border-bottom:1px solid var(--color-border);
    background:
        radial-gradient(
            circle at 92% 8%,
            rgba(63,169,245,.12),
            transparent 30%
        ),
        linear-gradient(
            180deg,
            var(--color-bg-card) 0%,
            var(--color-bg-alt) 100%
        );
}

#modalAziendeRatingBadge{
    width:56px!important;
    height:56px!important;
    border-radius:16px!important;
    font-size:1.25rem;
    box-shadow:0 10px 24px rgba(15,23,42,.14);
}

#modalAziendeRatingTitolo{
    color:var(--color-text-h);
    font-size:1.45rem;
    font-weight:800;
    letter-spacing:-.02em;
}

#modalAziendeRatingDescrizione{
    max-width:520px;
    color:var(--color-text-muted)!important;
    line-height:1.55;
}

#modalAziendeRatingRiepilogo{
    padding:22px 30px!important;
    background:var(--color-bg-alt);
    color:var(--color-text);
    font-size:.95rem;
}

#modalAziendeRatingRiepilogo strong{
    color:var(--color-text-h);
}

#modalAziendeRating .table-responsive{
    max-height:460px;
}

#modalAziendeRating .table{
    margin:0;
    color:var(--color-text);
    --bs-table-bg:transparent;
    --bs-table-hover-bg:rgba(7,85,227,.05);
    --bs-table-hover-color:inherit;
}

#modalAziendeRating .table thead th{
    position:sticky;
    top:0;
    z-index:2;
    padding:15px 22px;
    border-bottom:1px solid var(--color-border);
    background:var(--color-bg-alt);
    color:var(--color-text-strong);
    font-size:.76rem;
    font-weight:800;
    letter-spacing:.08em;
    text-transform:uppercase;
}

#modalAziendeRating .table tbody td{
    padding:17px 22px;
    border-bottom:1px solid var(--color-border);
    background:transparent;
    color:var(--color-text);
    vertical-align:middle;
}

#modalAziendeRating .table tbody tr:last-child td{
    border-bottom:none;
}

#modalAziendeRating .table tbody tr:hover td{
    background:rgba(7,85,227,.045);
}

#modalAziendeRating .table tbody td:first-child a{
    color:var(--color-text-link);
    font-weight:700;
}

#modalAziendeRating .table tbody td:first-child a:hover{
    color:var(--color-text-topbar-hover);
}

#modalAziendeRating .btn-outline-primary{
    border-radius:999px;
    padding:.45rem .85rem;
    font-weight:700;
}

#modalAziendeRating .modal-footer{
    padding:18px 30px;
    border-top:1px solid var(--color-border);
    background:var(--color-bg-card);
}


/* ==========================================================
   MODALE RATING - DARK MODE
========================================================== */

body.dark #modalAziendeRating .modal-content{
    background:#182437;
    border-color:#314761;
    box-shadow:0 30px 80px rgba(0,0,0,.42);
}

body.dark #modalAziendeRating .modal-header{
    background:
        radial-gradient(
            circle at 92% 8%,
            rgba(63,169,245,.14),
            transparent 30%
        ),
        linear-gradient(
            180deg,
            #1b2b41 0%,
            #182437 100%
        );
    border-bottom-color:#314761;
}

body.dark #modalAziendeRatingRiepilogo{
    background:#213149;
    border-bottom-color:#314761!important;
}

body.dark #modalAziendeRating .table thead th{
    background:#223955;
    color:#ffffff;
    border-bottom-color:#314761;
}

body.dark #modalAziendeRating .table tbody td{
    color:#dbe6f3;
    border-bottom-color:#314761;
}

body.dark #modalAziendeRating .table tbody tr:hover td{
    background:#263b55;
}

body.dark #modalAziendeRating .modal-footer{
    background:#182437;
    border-top-color:#314761;
}


.bg-orange{
    background-color:#fd7e14!important;
    color:#ffffff!important;
}

/* ==========================================================
   MODALE RATING - RESPONSIVE
========================================================== */

@media (max-width:767.98px){

    #modalAziendeRating .modal-header{
        padding:22px;
    }

    #modalAziendeRatingRiepilogo{
        padding:18px 22px!important;
    }

    #modalAziendeRating .table thead th,
    #modalAziendeRating .table tbody td{
        padding:14px 16px;
    }

    #modalAziendeRating .modal-footer{
        padding:16px 22px;
    }
}


.btn-logout{
    height:40px;
    padding:0 18px;
    border-radius:999px;
    border:1px solid #f3d2d6;
    background:#fff;
    color:#d73d53;
    font-weight:600;
    transition:.25s ease;
}

.btn-logout:hover{
    background:#d73d53;
    color:#fff;
    border-color:#d73d53;
    transform:translateY(-1px);
    box-shadow:0 8px 20px rgba(215,61,83,.25);
}

.btn-logout i{
    font-size:1rem;
}

body.dark .btn-logout{
    background:#1b2738;
    border-color:#3a495f;
    color:#ff8c9c;
}

body.dark .btn-logout:hover{
    background:#d73d53;
    color:#fff;
    border-color:#d73d53;
}



/* ==========================================================
   PRIVACY POLICY
========================================================== */

.privacy-pdf{
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 12px;
    background: linear-gradient(
        180deg,
        #ffffff 0%,
        #f8fbff 100%
    );
    border: 1px solid var(--color-border);
    box-shadow: var(--color-card-shadow);
}

.privacy-pdf::before{
    content:"Anteprima documento";
    display:block;
    padding:12px 18px;
    margin-bottom:12px;
    font-size:.8rem;
    font-weight:700;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:var(--color-text-muted);
}

.privacy-pdf iframe{
    display:block;
    width:100%;
    height:80vh;
    min-height:800px;
    border:none;
    border-radius:18px;
    background:#fff;
}

body.dark .privacy-pdf{
    background:#182437;
    border-color:#314761;
}

body.dark .privacy-pdf iframe{
    background:#fff;
}

@media (max-width:768px){

    .privacy-pdf iframe{
        min-height:65vh;
    }

}


/* ==========================================================
   FAQ
========================================================== */

.faq-item{
    margin-bottom:16px;
    border:1px solid var(--color-bg-border) !important;
    border-radius:18px !important;
    overflow:hidden;
    background:#fff;
    box-shadow:0 4px 16px rgba(15,23,42,.04);
}

.faq-item .accordion-button{
    font-weight:600;
    padding:1.2rem 1.4rem;
    box-shadow:none!important;
}

.faq-item .accordion-button:not(.collapsed){
    background:#f8fbff;
    color:var(--color-primary);
}

.faq-item .accordion-body{
    color:#5b6472;
    line-height:1.75;
}

body.dark .faq-item{
    background:#182437;
    border-color:#314761!important;
}

body.dark .faq-item .accordion-button{
    background:#182437;
    color:#fff;
}

body.dark .faq-item .accordion-button:not(.collapsed){
    background:#213149;
}

body.dark .faq-item .accordion-body{
    color:#d5dde8;
}

/*
|--------------------------------------------------------------------------
| Popover negatività
|--------------------------------------------------------------------------
*/

.popover-monitorami {
    --bs-popover-max-width: 320px;
    --bs-popover-border-color: rgba(15, 23, 42, 0.08);
    --bs-popover-border-radius: 18px;
    --bs-popover-box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
    --bs-popover-header-bg: #ffffff;
    --bs-popover-header-color: #0f172a;
}

.popover-monitorami .popover-header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid #eef2f7;
    font-size: 0.82rem;
    font-weight: 700;
}

.popover-monitorami .popover-body {
    padding: 0;
}

.negativity-popover-card {
    min-width: 260px;
    background: #ffffff;
}

.negativity-popover-card__header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 16px 12px;
}

.negativity-popover-card__eyebrow {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.negativity-popover-card__title {
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 700;
}

.negativity-popover-card__list {
    padding: 0 16px 14px;
}

.negativity-popover-card__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 11px 0;
    border-top: 1px solid #eef2f7;
}

.negativity-popover-card__label {
    color: #475569;
    font-size: 0.84rem;
    font-weight: 600;
}

.negativity-popover-card__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}

.negativity-popover-card__status.is-positive {
    border-color: #abefc6;
    background: #ecfdf3;
    color: #067647;
}

.negativity-popover-card__status.is-negative {
    border-color: #fecdca;
    background: #fef3f2;
    color: #b42318;
}

/* ==========================================================================
   Popover negatività - Dark mode
========================================================================== */

body.dark .popover-monitorami{

    --bs-popover-bg:#182437;
    --bs-popover-border-color:#314761;
    --bs-popover-header-bg:#1b2b41;
    --bs-popover-header-color:#ffffff;

}

body.dark .popover-monitorami .popover-header{

    border-bottom:1px solid #314761;
    color:#ffffff;

}

body.dark .popover-monitorami .popover-body{

    background:#182437;

}

body.dark .negativity-popover-card{

    background:#182437;

}

body.dark .negativity-popover-card__eyebrow{

    color:#8ea7c1;

}

body.dark .negativity-popover-card__title{

    color:#ffffff;

}

body.dark .negativity-popover-card__row{

    border-top:1px solid #314761;

}

body.dark .negativity-popover-card__label{

    color:#dbe6f3;

}

body.dark .negativity-popover-card__status.is-positive{

    background:rgba(19,200,161,.14);
    border-color:rgba(19,200,161,.28);
    color:#39D98A;

}

body.dark .negativity-popover-card__status.is-negative{

    background:rgba(239,68,68,.16);
    border-color:rgba(239,68,68,.30);
    color:#ff8b8b;

}

/* Dashboard guest: anteprime dedicate alla modalità scura */
body.dark .dashboard-preview--portafoglio{
    content:url("/img/dashboard-portafoglio-dark.png");
}

body.dark .dashboard-preview--rating{
    content:url("/img/dashboard-rating-dark.png");
}

body.dark .dashboard-preview--elenco{
    content:url("/img/dashboard-elenco-dark.png");
}

body.dark .dashboard-preview--dettaglio{
    content:url("/img/dashboard-dettaglio-azienda-dark.png");
}

/* ==========================================================
   CENTRO NOTIFICHE - Dark mode: contrasto e gerarchia visiva
========================================================== */

body.dark .notification-center .offcanvas-header{
    background:#182437;
    border-bottom-color:#3b5573;
}

body.dark .notification-center .offcanvas-header .text-muted,
body.dark .notification-toolbar small,
body.dark .notification-time{
    color:#b9cae0 !important;
}

body.dark .notification-center .btn-close{
    filter:invert(1) grayscale(1) brightness(1.8);
    opacity:.9;
}

body.dark .notification-item{
    background:#1b2b41;
    border-color:#3b5573;
}

body.dark .notification-item.unread{
    background:#1d314b;
    border-color:#5397d6;
    box-shadow:0 0 0 1px rgba(126,195,255,.16), 0 14px 32px rgba(0,0,0,.2);
}

body.dark .notification-item::before{
    background:#7ec3ff;
}

body.dark .notification-item:hover{
    border-color:#6aaddf;
    box-shadow:0 18px 38px rgba(0,0,0,.32);
}

body.dark .notification-content h6,
body.dark .notification-company a{
    color:#ffffff !important;
}

body.dark .notification-company{
    color:#b9cae0;
}

body.dark .notification-description{
    color:#e3edf8;
}

body.dark .notification-icon{
    background:#254565;
    border:1px solid #48779f;
    color:#a9d9ff;
}

body.dark .notification-change{
    background:#142a43;
    border:1px solid #365b7d;
    color:#dce9f6;
}

body.dark .notification-change strong,
body.dark .notification-change__values,
body.dark .notification-change__values strong{
    color:#9bd2ff;
}

body.dark .notification-change__subject{
    color:#d5e4f3;
    border-bottom-color:#365b7d;
}

body.dark .notification-change__label{
    color:#b9cae0;
}

body.dark .notification-actions button,
body.dark .notification-toolbar button{
    color:#9bd2ff;
}

body.dark .notification-actions button:hover,
body.dark .notification-toolbar button:hover{
    color:#ffffff;
}

body.dark .notification-empty i{
    color:#7ec3ff;
}

body.dark .notification-center .offcanvas-body::-webkit-scrollbar-thumb{
    background:#3b5573;
}
