/* :root migrato al Design System (FASE 4).
   Le variabili legacy (--bg, --accent-main, --accent-green, --accent-red,
   --text, --radius, --transition, --shadow, ...) sono ora definite come alias
   semantici in design-tokens.css e pilotate da theme-*.css / accent-*.css.
   Vedi COLOR-TOKEN-MAP.md. Questo blocco e' stato rimosso per attivare
   la commutazione dark/light e red/purple. */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    color: var(--text);
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.d-flex.flex-nowrap {
    height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 250px;
    min-width: 220px;
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    padding: 30px 16px 0 16px;
    border-right: 1px solid var(--border-subtle);
    /*box-shadow: inset -1px 0 0 var(--border-subtle), 10px 0 28px rgba(0, 0, 0, 0.20);*/
    gap: 18px;
    z-index: 10;
    position: relative;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.25s cubic-bezier(.55, .14, .42, 1.35), min-width 0.25s cubic-bezier(.55, .14, .42, 1.35), padding 0.25s cubic-bezier(.55, .14, .42, 1.35), box-shadow 0.25s cubic-bezier(.55, .14, .42, 1.35), transform 0.25s cubic-bezier(.55, .14, .42, 1.35), opacity 0.25s cubic-bezier(.55, .14, .42, 1.35);
    will-change: width, min-width, padding, box-shadow, transform, opacity;
}

    /* SIDEBAR SHRINK / MINI MODE */
    .sidebar.shrink {
        width: 74px !important;
        min-width: 74px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow-x: hidden;
        transition: width 0.25s cubic-bezier(.55, .14, .42, 1.35), min-width 0.25s cubic-bezier(.55, .14, .42, 1.35), padding 0.25s cubic-bezier(.55, .14, .42, 1.35);
    }

        .sidebar.shrink .logo-full .logo-solo {
            max-height: 32px;
            margin: 0 auto;
            display: block;
        }

.logo .logo-full {
    display: block;
}

.logo .logo-solo {
    display: none;
}

.sidebar.shrink .logo .logo-full {
    display: none;
}

.sidebar.shrink .logo .logo-solo {
    display: block;
}

.sidebar.shrink .nav-item {
    justify-content: center !important;
    padding: 9px 0 !important;
    margin: 0 auto;
    gap: 0;
    text-align: center;
    width: 52px;
    min-height: 48px;
    border-radius: 10px;
}

.sidebar.shrink .icon {
    width: 38px;
    height: 38px;
    font-size: 1.50rem !important;
    margin: 0 auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    transform: none !important;
}

.sidebar.shrink .nav-item.active .icon {
    color: var(--text-title);
}

.sidebar.shrink .nav-item .label,
.sidebar.shrink .subnav,
.sidebar.shrink .subnav-item span,
.sidebar.shrink .chevron,

.sidebar.shrink .logout {
    display: none !important;
}

.sidebar.shrink .nav {
    gap: 8px !important;
}

.sidebar.shrink .nav-item:hover {
    transform: none !important;
    background: var(--bg-hover) !important;
    box-shadow: none !important;
}

/* SIDEBAR RESPONSIVE */
@media (max-width: 991.98px) {
    .sidebar {
        width: 280px;
        max-width: 82vw;
        min-width: 74px;
        padding-left: 16px;
        padding-right: 16px;
        height: 100vh !important;
        max-height: 100vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        position: fixed !important;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 11;
        transform: translateX(-110%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.25s cubic-bezier(.55, .14, .42, 1.35), opacity 0.25s cubic-bezier(.55, .14, .42, 1.35), box-shadow 0.25s cubic-bezier(.55, .14, .42, 1.35);
        will-change: transform, opacity, box-shadow;
    }

        .sidebar.open {
            transform: translateX(0);
            opacity: 1;
            pointer-events: all;
        }

        .sidebar::before {
            display: block !important;
        }

        .sidebar::after {
            display: none !important;
        }

    .sidebar-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: var(--bg-scrim);
        backdrop-filter: blur(5px);
        z-index: 9;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s cubic-bezier(.55, .14, .42, 1.35);
    }

    .sidebar.open ~ .sidebar-overlay {
        opacity: 1;
        pointer-events: all;
    }

    .sidebar:not(.open) ~ .sidebar-overlay {
        opacity: 0;
        pointer-events: none;
    }

    .nav-item:hover,
    .nav-item.active:hover {
        background: var(--bg-hover) !important;
        box-shadow: none !important;
        transform: none !important;
    }
}

/* LOGO */
.logo {
    margin-bottom: 12px;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: justify-content var(--transition-fast);
    position: relative;
    z-index: 1;
}

    .logo img {
        max-height: 54px;
        width: auto;
        display: block;
    }

        .logo img:hover {
            opacity: 0.98;
        }

@media (max-width: 991.98px) {
    .logo {
        justify-content: flex-start !important;
        padding-left: 8px;
    }
}

/* CLOSE SIDEBAR BUTTON */
.btn-close-sidebar {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 13;
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
    cursor: pointer;
    opacity: 0.95;
    user-select: none;
    padding: 0;
    background: var(--bg-hover);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    box-shadow: none;
}

    .btn-close-sidebar .material-icons-outlined {
        font-size: 1.55rem;
        color: inherit;
        display: block;
        margin: 0;
        line-height: 1;
        margin-top: 1px;
    }

    .btn-close-sidebar:hover {
        color: var(--text-title) !important;
        background: var(--bg-hover);
        border-color: var(--border-default);
        box-shadow: none;
    }

@media (max-width: 991.98px) {
    .btn-close-sidebar {
        display: flex;
    }
}

@media (min-width: 992px) {
    .btn-close-sidebar {
        display: none;
    }
}

/* NAVIGATION (SIDEBAR MENU + SUBNAV) */
.nav-dfend {
    display: flex;
    flex-direction: column !important;
    gap: 5px;
    position: relative;
    z-index: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    min-height: 50px;
    font-size: 0.98rem;
    font-weight: 540;
    letter-spacing: -0.012em;
    border-radius: 9px;
    color: var(--text-secondary);
    position: relative;
    background: transparent;
    border: 1px solid transparent;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    outline: none;
    cursor: pointer;
}

    .nav-item .icon {
        width: 38px;
        min-width: 38px;
        height: 38px;
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--color-primary);
        font-size: 1.32rem;
        box-shadow: none;
        transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    }

    .nav-item .material-icons-outlined {
        color: var(--color-primary);
    }

    .nav-item .label {
        flex: 1;
        line-height: 1.23;
    }

    .nav-item .chevron {
        margin-left: auto;
        color: var(--text-muted);
        transition: transform 0.22s ease, color 0.18s ease, opacity 0.18s ease;
        opacity: 0.9;
        font-size: 1.12rem;
    }

    .nav-item:hover,
    .nav-item.active:hover {
        color: var(--text-title);
        background: var(--bg-hover);
        border-color: var(--border-subtle);
        box-shadow: none;
        transform: none;
    }

        .nav-item:hover .icon {
            color: var(--text-title);
            box-shadow: none;
            transform: none;
        }

        .nav-item:hover .material-icons-outlined {
            color: var(--color-primary);
        }

        .nav-item:hover .chevron {
            color: var(--color-primary);
        }

    .nav-item.active {
        color: var(--text-title);
        background: var(--bg-hover);
        border-color: var(--border-default);
        box-shadow: inset 0 0 0 1px var(--border-subtle), 0 8px 20px rgba(0, 0, 0, 0.14);
        font-weight: 680;
    }

        .nav-item.active::before {
            content: "";
            position: absolute;
            left: -1px;
            top: 12px;
            bottom: 12px;
            width: 2px;
            border-radius: 999px;
            background: linear-gradient(180deg, var(--color-primary), var(--color-primary-border));
            box-shadow: 0 0 10px color-mix(in srgb, var(--color-primary) 22%, transparent);
        }

        .nav-item.active .icon {
            color: var(--text-title);
            box-shadow: none;
        }

        .nav-item.active .material-icons-outlined {
            color: var(--color-primary);
        }

.has-sub.open .chevron {
    transform: rotate(180deg);
    color: var(--color-primary);
    opacity: 1;
}

.nav-item:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--color-primary) 66%, transparent);
    outline-offset: 3px;
}

/* SUBMENU */
.subnav {
    background: none;
    margin-left: 0;
    padding: 0;
    position: relative;
    border-left: none;
    display: flex;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition), padding var(--transition);
    will-change: max-height, padding;
    z-index: 1;
}

.has-sub.open + .subnav {
    max-height: 460px;
    padding-bottom: 6px;
}

.subnav::before {
    content: "";
    position: absolute;
    left: 22px;
    top: 9px;
    bottom: 11px;
    width: 1px;
    background: linear-gradient(180deg, var(--border-subtle), var(--border-default), var(--border-subtle));
    border-radius: 2px;
}

.subnav-item {
    display: flex;
    align-items: center;
    padding: 8px 10px 8px 44px;
    color: var(--text-muted);
    font-size: 0.93rem;
    font-weight: 500;
    letter-spacing: -0.006em;
    border-radius: 8px;
    transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
    position: relative;
    margin: 1px 0;
    border: 1px solid transparent;
}

    .subnav-item .material-icons-outlined {
        font-size: 1.12em;
        color: var(--text-muted);
        background: none;
        margin-right: 10px;
        transition: color var(--transition-fast), transform var(--transition-fast);
    }

    .subnav-item:hover {
        background: var(--bg-hover);
        color: var(--text-title);
        border-color: var(--border-subtle);
        box-shadow: none;
        transform: none;
    }

        .subnav-item:hover .material-icons-outlined {
            color: var(--color-primary);
            transform: none;
        }

    .subnav-item.active {
        background: transparent;
        color: var(--color-primary);
        border-color: transparent;
        box-shadow: none;
        border-radius: 8px;
        font-weight: 660;
    }

        .subnav-item.active .material-icons-outlined {
            color: var(--color-primary);
        }

        .subnav-item.active::before {
            content: "";
            position: absolute;
            left: 22px;
            top: 50%;
            width: 5px;
            height: 5px;
            background: var(--color-primary);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            box-shadow: 0 0 8px color-mix(in srgb, var(--color-primary) 38%, transparent);
        }

.sidebar .nav-dfend,
.sidebar .nav {
    padding: 0;
    margin: 0;
}

.sidebar .nav-item:first-child {
    margin-top: 0;
}

.sidebar .nav-item + .nav-item,
.sidebar .subnav + .nav-item {
    margin-top: 5px;
}

/* SIDEBAR FOOTER */
.sidebar > .nav-dfend {
    flex: 1 1 auto;
}






/* MAIN*/
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow-y: auto;
    background: var(--bg-page);
}

@media (max-width: 900px) {
    .main {
        padding: 12px;
    }
}

@media (max-width: 800px) {
    .main {
        padding: 10px;
    }
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 3px;
    height: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 999px;
    min-height: 16px;
    min-width: 16px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--border-strong);
    }

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* TOPBAR */
.topbar {
    display: flex;
    align-items: center;
    z-index: 10;
    justify-content: space-between;
    gap: 20px;
    border-radius: 0;
    padding: 14px 22px 14px 18px;
    margin: -24px -24px 24px -24px;
    background: var(--bg-surface);
    border: none;
    border-bottom: 1px solid var(--border-subtle);
  /*  box-shadow: inset 0 -1px 0 var(--border-subtle), 0 10px 28px rgba(0, 0, 0, 0.20);*/
    transition: background var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
    position: relative;
}

    .topbar::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: -1px;
        height: 1px;
        pointer-events: none;
        background: linear-gradient( 90deg, var(--border-default) 0%, var(--border-subtle) 18%, color-mix(in srgb, var(--color-primary) 16%, transparent) 42%, var(--border-subtle) 72%, transparent 100% );
        opacity: 0.85;
    }

.topbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
}

.subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 1px;
    font-weight: 400;
    transition: font-size var(--transition-fast), color var(--transition-fast);
}

@media (max-width: 991.98px) {
    .topbar {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 14px;
        margin: -16px -16px 18px -16px;
        border-radius: 0;
        flex-wrap: nowrap;
    }

    .search-wrapper {
        flex: 1 1 auto;
        width: 100%;
        display: flex;
    }

    .search {
        width: 100%;
        max-width: 100%;
    }

        .search input {
            width: 100%;
            padding: 10px 38px 10px 12px;
            font-size: 0.95rem;
        }

    .topbar-right {
        gap: 4px;
    }
}

@media (max-width: 600px) {
    .topbar {
        gap: 6px;
        padding: 12px 12px;
        margin: -12px -12px 16px -12px;
    }

    .search {
        padding: 8px 34px 8px 10px;
        font-size: 0.9rem;
    }

    .welcome {
        font-size: 1rem;
    }

    .subtitle {
        font-size: 0.78rem;
    }
}

/* HAMBURGER MENU */
.btn-hamburger {
    background: transparent;
    border: 1px solid transparent;
    outline: none;
    border-radius: 9px;
    font-size: 1.7rem;
    padding: 7px;
    color: var(--text-secondary);
    box-shadow: none;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-hamburger:hover,
    .btn-hamburger:focus-visible {
        color: var(--text-title);
        background: var(--bg-hover);
        border-color: var(--border-subtle);
        box-shadow: none;
    }

/* TOPBAR USER AREA */
.topbar-user-area {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: 14px;
    padding-left: 12px;
}

.topbar-user-divider {
    width: 1px;
    height: 26px;
    flex: 0 0 1px;
    margin-right: 4px;
    background: linear-gradient( 180deg, transparent 0%, var(--border-subtle) 18%, var(--border-default) 50%, var(--border-subtle) 82%, transparent 100% );
}

.topbar-user-company {
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 620;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--text-secondary);
    white-space: nowrap;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* AVATAR TRIGGER */
.topbar-user-menu-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.avatar-trigger {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    padding: 0;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.avatar,
.avatar-lottie {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
}

.avatar {
    object-fit: cover;
    margin-right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
}

.avatar-trigger:hover .avatar {
    background: var(--bg-elevated);
    border-color: var(--border-strong);
}

.avatar-lottie {
    display: block;
    overflow: hidden;
    margin-right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-primary) 14%, transparent), 0 6px 16px rgba(0, 0, 0, 0.18);
}

/* AVATAR DROPDOWN */
.avatar-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    padding: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.50), inset 0 1px 0 var(--border-subtle);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    pointer-events: none;
    z-index: 1305;
    transition: opacity var(--transition-fast), visibility var(--transition-fast), transform var(--transition-fast);
}

    .avatar-dropdown.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: all;
    }

/* HEADER MENU */
.avatar-dropdown-header {
    position: relative;
    padding: 10px 10px 12px 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border-subtle);
}

.avatar-dropdown-name {
    font-size: 0.92rem;
    font-weight: 680;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--text-title);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.avatar-dropdown-role {
    margin-top: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ITEMS */
.avatar-dropdown-section {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.avatar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 9px 10px;
    border-radius: 9px;
    border: 1px solid transparent;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.90rem;
    font-weight: 540;
    letter-spacing: -0.008em;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

    .avatar-dropdown-item .material-icons-outlined {
        width: 24px;
        min-width: 24px;
        font-size: 1.18rem;
        color: var(--color-primary);
        transition: color var(--transition-fast);
    }

    .avatar-dropdown-item:hover {
        color: var(--text-title);
        background: var(--bg-hover);
        border-color: var(--border-subtle);
        box-shadow: none;
    }

        .avatar-dropdown-item:hover .material-icons-outlined {
            color: var(--color-primary);
        }

.avatar-dropdown-divider {
    width: calc(100% - 12px);
    height: 1px;
    margin: 8px auto;
    background: linear-gradient( 90deg, transparent 0%, var(--border-subtle) 18%, var(--border-default) 50%, var(--border-subtle) 82%, transparent 100% );
}

/* DANGER / LOGOUT */
.avatar-dropdown-item.danger {
    color: var(--text-secondary);
}

    .avatar-dropdown-item.danger .material-icons-outlined {
        color: var(--color-danger);
    }

    .avatar-dropdown-item.danger:hover {
        color: var(--text-title);
        background: var(--color-danger-soft);
        border-color: var(--color-danger-border);
    }

        .avatar-dropdown-item.danger:hover .material-icons-outlined {
            color: var(--color-danger);
        }

/* MOBILE */

@media (max-width: 600px) {
    .topbar-user-area {
        gap: 10px;
        margin-left: 2px;
        padding-left: 0;
    }

    .topbar-user-divider {
        height: 24px;
    }

    .avatar-trigger,
    .avatar,
    .avatar-lottie {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .avatar-dropdown {
        width: 240px;
        right: -4px;
    }
}



/* NOTIFICATION ICON + BADGE */
.notif {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    color: var(--text-secondary);
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 7px;
    background: transparent;
    box-shadow: none;
    transition: background var(--transition-fast), border var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), filter var(--transition-fast);
}

    .notif:hover,
    .notif:focus-visible {
        color: var(--text-title);
        background: var(--bg-hover);
        border-color: var(--border-subtle);
        box-shadow: none;
        transform: none;
    }

    .notif .material-icons-outlined {
        transition: color var(--transition-fast), filter var(--transition-fast);
        color: inherit;
    }

    .notif .badge {
        position: absolute;
        top: -2px;
        right: -3px;
        background: var(--color-primary);
        color: var(--color-primary-contrast);
        font-size: 0.70rem;
        min-width: 18px;
        height: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 5px;
        border-radius: 999px;
        font-weight: 750;
        z-index: 2;
    }

/* NOTIFICATION DROPDOWN */
.drop-notifications {
    min-width: 380px;
    max-height: 600px;
    overflow-y: auto;
    padding: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.46), inset 0 1px 0 var(--border-subtle);
    backdrop-filter: blur(7px);
}

   

    .drop-notifications .dropdown-item {
        padding: 0;
        background: transparent;
        color: inherit;
    }

        .drop-notifications .dropdown-item:hover,
        .drop-notifications .dropdown-item:active {
            background: transparent;
        }

/* HEADER NOTIFICHE */
.drop-notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px 12px 8px;
    background: transparent;
    border-bottom: 1px solid var(--border-subtle);
    border-radius: 0;
    margin-bottom: 10px;
}

    .drop-notifications-header h6 {
        margin: 0;
        font-size: 0.90rem;
        font-weight: 650;
        letter-spacing: -0.006em;
        color: var(--text-title);
    }

    

    .drop-notifications-header .mark-all {
        font-size: 0.78rem;
        font-weight: 650;
        color: var(--text-muted);
        cursor: pointer;
        transition: color var(--transition-fast), opacity var(--transition-fast);
    }

        .drop-notifications-header .mark-all:hover {
            color: var(--text-title);
        }

/* DATE NOTIFICHE */
.drop-notifications .notif-date {
    padding: 0 8px 8px 8px;
    background: transparent;
    font-size: 0.70rem;
    font-weight: 650;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .055em;
}

/* CARD NOTIFICA */
.dfend-notification .notif-card {
    position: relative;
    display: flex;
    gap: 11px;
    padding: 12px 12px 12px 14px;
    margin: 0 0 8px 0;
    background: transparent;
    border: 1px solid transparent;
    border-left: 1px solid transparent;
    border-radius: 9px;
    cursor: pointer;
    box-shadow: none;
    transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

    .dfend-notification .notif-card::before {
        content: "";
        position: absolute;
        left: -1px;
        top: 12px;
        bottom: 12px;
        width: 2px;
        border-radius: 999px;
        background: transparent;
        box-shadow: none;
        transition: background var(--transition-fast), box-shadow var(--transition-fast);
    }

    .dfend-notification .notif-card.unread {
        background: var(--bg-hover);
        border-color: var(--border-default);
        box-shadow: inset 0 0 0 1px var(--border-subtle), 0 8px 20px rgba(0, 0, 0, 0.14);
    }

        .dfend-notification .notif-card.unread::before {
            background: linear-gradient(180deg, var(--color-primary), var(--color-primary-border));
            box-shadow: 0 0 10px color-mix(in srgb, var(--color-primary) 22%, transparent);
        }

    .dfend-notification .notif-card.read {
        background: transparent;
        border-color: transparent;
        opacity: 0.88;
    }

        .dfend-notification .notif-card.unread:hover,
        .dfend-notification .notif-card.read:hover {
            background: var(--bg-hover);
            border-color: var(--border-subtle);
            box-shadow: none;
            transform: none;
        }

            .dfend-notification .notif-card.unread:hover::before,
            .dfend-notification .notif-card.read:hover::before {
                background: linear-gradient(180deg, color-mix(in srgb, var(--color-primary) 76%, transparent), color-mix(in srgb, var(--color-primary) 28%, transparent));
                box-shadow: 0 0 8px color-mix(in srgb, var(--color-primary) 14%, transparent);
            }

/* ICONS NOTIFICA */
.dfend-notification .notif-left {
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
    padding-top: 1px;
}

.dfend-notification .notif-icon {
    width: 30px;
    min-width: 30px;
    height: 30px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    line-height: 1;
    color: var(--text-muted);
    background: transparent;
    filter: none;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.drop-notifications .material-icons-outlined {
    filter: none !important;
    transition: color var(--transition-fast), background var(--transition-fast) !important;
    color: inherit !important;
}

.dfend-notification .notif-icon.info {
    color: var(--text-muted) !important;
}

.dfend-notification .notif-card.unread .notif-icon,
.dfend-notification .notif-card.unread .notif-icon.info {
    color: var(--text-secondary) !important;
}

.dfend-notification .notif-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.dfend-notification .notif-title {
    font-weight: 650;
    font-size: 0.88rem;
    color: var(--text-title);
    margin-bottom: 1px;
    letter-spacing: -0.006em;
}

.dfend-notification .notif-message {
    font-size: 0.80rem;
    line-height: 1.45;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.dfend-notification .notif-card.unread .notif-message {
    color: var(--text-secondary);
}

.dfend-notification .notif-card.read .notif-title,
.dfend-notification .notif-card.read .notif-message {
    color: var(--text-muted);
    font-style: italic;
}

.dfend-notification .notif-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.dfend-notification .notif-time {
    font-style: italic;
    color: var(--text-muted);
    letter-spacing: 0.25px;
}

.dfend-notification .notif-link {
    font-size: 0.78rem;
    font-weight: 650;
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast), opacity var(--transition-fast);
}

    .dfend-notification .notif-link:hover {
        color: var(--text-title);
    }

.drop-notifications .text-muted {
    padding: 14px 16px;
    color: var(--text-muted) !important;
    font-size: 0.82rem;
    text-align: center;
}

/* AUTOCOMPLETE & DROPDOWN MENU */
.ui-autocomplete,
.dropdown-menu {
    z-index: 1301;
    background: var(--bg-elevated) !important;
    border-radius: 9px !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.46) !important;
    padding: 10px !important;
    border: 1px solid var(--border-subtle) !important;
}

/* SWITCH AZIENDA */
.drop-company {
    min-width: 340px;
    padding: 10px;
    border-radius: 0 0 10px 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-top: none;
    backdrop-filter: blur(7px);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.46), inset 0 1px 0 var(--border-subtle);
    overflow-y: auto;
    max-height: 500px;
}

.drop-company-header {
    padding: 6px 8px 12px 8px;
    background: transparent;
    border-bottom: 1px solid var(--border-subtle);
    border-radius: 0;
    margin-bottom: 10px;
}

    .drop-company-header h6 {
        margin: 0;
        font-size: 0.88rem;
        font-weight: 650;
        letter-spacing: -0.006em;
        color: var(--text-title);
    }

.company-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    min-height: 50px;
    margin: 0 0 8px 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    cursor: pointer;
    box-shadow: none;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.company-card::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.company-card:hover {
    background: var(--bg-hover);
    border-color: var(--border-subtle);
    transform: none;
    box-shadow: none;
}

.company-card:hover::before {
    background: linear-gradient(180deg, color-mix(in srgb, var(--color-primary) 76%, transparent), color-mix(in srgb, var(--color-primary) 28%, transparent));
    box-shadow: 0 0 8px color-mix(in srgb, var(--color-primary) 14%, transparent);
}

.company-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.company-icon {
    width: 36px;
    min-width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.22rem;
    line-height: 1;
    color: var(--color-primary) !important;
    filter: none;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.company-card:hover .company-icon {
    color: var(--color-primary) !important;
}

.company-card:last-child {
    margin-bottom: 0;
}

.company-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 540;
    line-height: 1.23;
    letter-spacing: -0.012em;
    color: var(--text-secondary);
    transition: color var(--transition-fast), font-weight var(--transition-fast);
}

.company-card:hover .company-title {
    color: var(--text-title);
}

.company-card.active {
    background: var(--bg-hover);
    border-color: var(--border-default);
    opacity: 1;
    transform: none;
    box-shadow: inset 0 0 0 1px var(--border-subtle), 0 8px 20px rgba(0, 0, 0, 0.14);
}

    .company-card.active::before {
        background: linear-gradient(180deg, var(--color-primary), var(--color-primary-border));
        box-shadow: 0 0 10px color-mix(in srgb, var(--color-primary) 22%, transparent);
    }

    .company-card.active .company-title {
        color: var(--text-title);
        font-weight: 680;
    }

    .company-card.active .company-icon {
        color: var(--color-primary) !important;
    }

/* CARD */
 .card-dark 
{   
    min-height: 0;
    max-height: 520px;    
}
.card 
{
    border-radius: 9px;
    padding: 18px 20px;
    transition: background-color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text);
   
}
/* RESPONSIVE FIXES FOR ROWS */

@media (max-width: 767.98px) {
    /* Esclude le row con gutter verticale gy-*, dove la spaziatura è già gestita da Bootstrap */
    .row:not([class*="gy-"]) > [class^="col-"]:not(:last-child) {
        margin-bottom: 1.5rem;
    }

    .dfend-footer .row > div {
        text-align: center !important;
    }

    .dfend-footer .footer-logo {
        margin: 0 auto;
    }

    .dfend-footer .d-flex.flex-md-row {
        flex-direction: column !important;
        align-items: center;
    }
}

/* FILTERS & SELECT - DA MODIFICARE */


.filter {
    flex: 1;
    position: relative;
}

    .filter label {
        font-size: 0.875rem;
        font-weight: 500;
        color: var(--text-light);
        margin-bottom: 4px;
        display: block;
    }

    .filter select {
        width: 100%;
        padding: 8px 12px;
        border-radius: var(--radius);
        border: none;
        background: var(--bg-alt);
        color: var(--text);
        appearance: none;
        font-size: 1rem;
    }

    .filter::after {
        content: '▼';
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-light);
        pointer-events: none;
    }

/* BUTTONS & HOVER STATES - DA MODIFICARE */

button,
.btn {
    background: var(--accent-main);
    color: var(--color-primary-contrast);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    padding: 10px 22px;
    transition: opacity var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast), filter var(--transition-fast);
    cursor: pointer;
}

    button:hover,
    .btn:hover {
        opacity: 0.93;
        filter: brightness(1.06);
    }

/* SEARCH */
.search-wrapper {
    position: relative;
}

.search-icon {
    cursor: pointer;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 9px;
    background: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

    .search-icon:hover,
    .search-icon:focus-visible {
        color: var(--text-title);
        background: var(--bg-hover);
        border-color: var(--border-subtle);
        box-shadow: none;
        transform: none;
    }

.search-wrapper.active .search-icon {
    color: var(--text-title);
    background: var(--bg-hover);
    box-shadow: inset 0 0 0 1px var(--border-subtle), 0 8px 20px rgba(0, 0, 0, 0.14);
}

.search-expanded {
    position: absolute;
    top: -4px;
    right: 0;
    width: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-elevated);
    padding: 9px 0;
    border-radius: 9px;
    border: 1px solid transparent;
    box-shadow: none;
    transition: width var(--transition-fast), opacity var(--transition-fast), padding var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
    backdrop-filter: blur(7px);
}

.search-wrapper.active .search-expanded {
    width: 270px;
    opacity: 1;
    pointer-events: all;
    padding: 9px 14px;
    background: var(--bg-elevated);
    border-color: var(--border-subtle);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38), inset 0 1px 0 var(--border-subtle);
}

.search-expanded input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: -0.006em;
    transition: color var(--transition-fast);
}

.search-expanded input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: -0.004em;
}

.search-expanded input:focus {
    color: var(--text-title);
    filter: none;
}

.search-expanded .material-icons-outlined {
    color: var(--color-primary);
    font-size: 1.30rem;
    transition: color var(--transition-fast);
}

.search-expanded:focus-within .material-icons-outlined {
    color: var(--color-primary);
}

/* FOOTER */
.footer-right a {
    color: var(--text-secondary);
}

    .footer-right a:hover {
        color: var(--color-primary-hover);
    }

.brand-highlight {
    color: var(--text-primary);
}

/* KPI */
.kpi-card {
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid transparent;
    min-height: 122px;
    padding: 21px 18px 18px;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.kpi-details-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    margin-bottom: 4px;
    width: 100%;
}

.kpi-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    box-shadow: inset 0 1px 0 var(--border-subtle), 0 5px 12px rgba(0, 0, 0, 0.26);
    flex-shrink: 0;
}

.kpi-icon .material-icons-round {
    font-size: 1.42rem;
    color: var(--text-primary);
    text-shadow: none;
}

.bg-red {
    background: var(--color-danger-soft) !important;
    border-color: var(--color-danger-border) !important;
    color: var(--color-danger) !important;
}

.bg-acqua {
    background: var(--color-success-soft) !important;
    border-color: var(--color-success-border) !important;
    color: var(--color-success) !important;
}

.bg-magenta {
    background: rgba(138, 46, 112, 0.22) !important;
    border-color: rgba(138, 46, 112, 0.34) !important;
    color: #ad4d92 !important;
}

.bg-yellow {
    background: var(--color-warning-soft) !important;
    border-color: var(--color-warning-border) !important;
    color: var(--color-warning) !important;
}

.bg-gray {
    background: var(--bg-hover) !important;
    border-color: var(--border-strong) !important;
    color: var(--text-secondary) !important;
}

.bg-blue {
    background: var(--color-info-soft) !important;
    border-color: var(--color-info-border) !important;
    color: var(--color-info) !important;
}


.kpi-main {
    font-size: 2.05rem;
    font-weight: 820;
    letter-spacing: -0.028em;
    line-height: 1;
    color: var(--text-title);
    text-shadow: none;
}

.kpi-red {
    color: var(--color-danger);
}

.kpi-acqua {
    color: var(--color-success);
}

.kpi-magenta {
    color: #ad4d92;
}

.kpi-yellow {
    color: var(--color-warning);
}

.kpi-gray {
    color: var(--text-secondary);
}

.kpi-blue {
    color: var(--color-info);
}

.kpi-acqua-muted {
    color: var(--color-secondary);
}

.kpi-label {
    margin-top: 3px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 640;
    letter-spacing: -0.010em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-shadow: none;
    line-height: 1.12;
    width: 100%;
    text-align: center;
}

.kpi-info {
    font-size: 1.15rem !important;
    margin-left: 4px;
    color: var(--text-muted) !important;
    cursor: pointer;
    vertical-align: text-bottom;
    transition: color 0.18s ease, opacity 0.18s ease;
    opacity: 0.88;
}

    .kpi-info:hover {
        color: var(--color-primary) !important;
        opacity: 1;
    }

.kpi-delta {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 0.74rem;
    font-weight: 700;
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 7px;
    padding: 2px 7px;
    min-width: 40px;
    height: 23px;
    line-height: 1;
    box-shadow: none;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

    .kpi-delta .material-icons-round {
        font-size: 0.82rem !important;
        margin-left: 4px;
        vertical-align: middle;
    }

    .kpi-delta.kpi-positive {
        background: var(--color-success-soft);
        border-color: var(--color-success-border);
        color: var(--color-success);
    }

    .kpi-delta.kpi-negative {
        background: var(--color-danger-soft);
        border-color: var(--color-danger-border);
        color: var(--color-danger);
    }

    .kpi-delta.kpi-alert {
        background: var(--color-danger-soft);
        border-color: var(--color-danger-border);
        color: var(--color-danger-hover);
    }

    .kpi-delta.neutral {
        background: var(--bg-hover);
        border-color: var(--border-subtle);
        color: var(--text-secondary);
    }

    .kpi-delta.kpi-critical {
        background: rgba(138, 46, 112, 0.16);
        border-color: rgba(138, 46, 112, 0.25);
        color: #b86aa5;
    }

    .kpi-delta.kpi-medium {
        background: var(--color-warning-soft);
        border-color: var(--color-warning-border);
        color: var(--color-warning);
    }

    .kpi-delta.kpi-low {
        background: rgba(150, 166, 42, 0.14);
        border-color: rgba(150, 166, 42, 0.22);
        color: #b4c447;
    }

.border-accent-red {
    border-bottom-color: var(--color-danger-border) !important;
}

.border-accent-acqua {
    border-bottom-color: var(--color-success-border) !important;
}

.border-accent-magenta {
    border-bottom-color: rgba(138, 46, 112, 0.58) !important;
}

.border-accent-yellow {
    border-bottom-color: var(--color-warning-border) !important;
}

.border-accent-gray {
    border-bottom-color: var(--border-strong) !important;
}

.border-accent-blue {
    border-bottom-color: var(--color-info-border) !important;
}

.border-accent-acqua-muted {
    border-bottom-color: var(--color-secondary-border) !important;
}

@media (max-width: 1700px) {
    .kpi-card {
        min-height: 112px;
        padding: 19px 16px 17px;
    }

    .kpi-icon {
        width: 40px;
        height: 40px;
    }

        .kpi-icon .material-icons-round {
            font-size: 1.34rem;
        }

    .kpi-main {
        font-size: 1.88rem;
    }

    .kpi-label {
        font-size: 0.91rem;
    }
}

@media (max-width: 1400px) {
    .kpi-card {
        min-height: 100px;
        padding: 16px 14px;
    }

    .kpi-details-row {
        gap: 10px;
    }

    .kpi-icon {
        width: 37px;
        height: 37px;
    }

        .kpi-icon .material-icons-round {
            font-size: 1.24rem;
        }

    .kpi-main {
        font-size: 1.62rem;
    }

    .kpi-label {
        font-size: 0.85rem;
    }

    .kpi-delta {
        height: 22px;
        min-width: 38px;
        font-size: 0.72rem;
        padding: 2px 6px;
    }
}

@media (max-width: 900px) {
    .kpi-card {
        min-height: 84px;
        padding: 12px 10px;
    }

    .kpi-details-row {
        gap: 8px;
    }

    .kpi-icon {
        width: 34px;
        height: 34px;
    }

        .kpi-icon .material-icons-round {
            font-size: 1.14rem;
        }

    .kpi-main {
        font-size: 1.36rem;
    }

    .kpi-label {
        font-size: 0.80rem;
    }
}

/* ===== DFEND AI RISK CARD (palette Utils.VulnColors) ===== */
.ai-risk-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 12px;
    min-height: 122px;
    padding: 17px 19px 14px;
    border: 1px solid var(--border-default) !important;
    border-radius: 10px;
    overflow: hidden;
}

.ai-risk-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
}

.ai-risk-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.ai-logo-wrapper {
    position: relative;
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-risk-card .kpi-logo {
    border: 1px solid var(--border-default);
    box-shadow: none;
}

.ai-logo-img {
    width: 27px;
    height: 27px;
    object-fit: contain;
    color: var(--text-primary);
    text-shadow: none;
}

.ai-risk-heading {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.ai-risk-heading-text {
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 640;
    letter-spacing: -0.01em;
    line-height: 1.2;
    white-space: nowrap;
}

.ai-risk-eyebrow {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

.ai-risk-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    width: 100%;
}

.ai-risk-value-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.ai-risk-card .kpi-main {
    display: block;
    font-size: 2.05rem;
    font-weight: 780;
    line-height: 1;
    letter-spacing: -0.035em;
    overflow-wrap: anywhere;
}

.ai-risk-scale {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
}

.ai-risk-segment {
    flex: 1;
    height: 4px;
    background: var(--border-default);
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.ai-risk-segment:nth-child(1) {
    background: rgba(186,154,40,0.2); /* Low - VulnColorsAlpha */
}

.ai-risk-segment:nth-child(2) {
    background: rgba(189,112,56,0.2); /* Medium - VulnColorsAlpha */
}

.ai-risk-segment:nth-child(3) {
    background: rgba(198,74,85,0.2); /* High - VulnColorsAlpha */
}

.ai-risk-segment:nth-child(4) {
    background: rgba(132,92,190,0.2); /* Critical - VulnColorsAlpha */
}

.ai-low .ai-risk-segment:nth-child(1),
.ai-medium .ai-risk-segment:nth-child(1),
.ai-high .ai-risk-segment:nth-child(1),
.ai-critical .ai-risk-segment:nth-child(1) {
    background: #BA9A28; /* Low - VulnColors */
}

.ai-medium .ai-risk-segment:nth-child(2),
.ai-high .ai-risk-segment:nth-child(2),
.ai-critical .ai-risk-segment:nth-child(2) {
    background: #BD7038; /* Medium - VulnColors */
}

.ai-high .ai-risk-segment:nth-child(3),
.ai-critical .ai-risk-segment:nth-child(3) {
    background: #C64A55; /* High - VulnColors */
}

.ai-critical .ai-risk-segment:nth-child(4) {
    background: #845CBE; /* Critical - VulnColors */
}

.ai-risk-footer {
    width: 100%;
    border-top: 1px solid var(--border-subtle);
    padding-top: 10px;
}

.ai-risk-details-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 26px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    text-align: left;
    transition: color 0.18s ease;
}

.ai-risk-details-trigger:hover {
    color: var(--text-primary);
}

.ai-risk-details-trigger:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
}

.ai-risk-details-trigger-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.3;
}

.ai-risk-details-trigger .material-icons-round {
    font-size: 1.05rem;
    font-weight: normal;
    flex-shrink: 0;
    color: var(--text-muted);
}

.ai-risk-details-arrow {
    transition: transform 0.18s ease, color 0.18s ease;
}

.ai-risk-details-trigger:hover .ai-risk-details-arrow {
    transform: translate(2px, -2px);
    color: var(--text-primary);
}

.ai-risk-details-trigger[aria-expanded="true"] .ai-risk-details-arrow {
    transform: rotate(45deg);
}

.ai-risk-popover {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1090;
    width: 380px;
    max-width: calc(100vw - 24px);
    max-height: min(400px, calc(100dvh - 24px));
    display: flex;
    flex-direction: column;
    padding: 19px 20px;
    background: var(--bg-elevated, #222326);
    border: 1px solid var(--border-default, #38393c);
    border-radius: 12px;
    box-shadow:
        0 14px 40px rgba(0, 0, 0, 0.28),
        0 2px 8px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition:
        opacity 0.18s ease,
        transform 0.18s ease,
        visibility 0.18s ease;
}

.ai-risk-popover.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.ai-risk-popover-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 13px;
}

.ai-risk-popover-heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.ai-risk-popover-eyebrow {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.085em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.ai-risk-popover-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 650;
    letter-spacing: -0.015em;
    line-height: 1.35;
    color: var(--text-title);
}

.ai-risk-popover-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition:
        background 0.18s ease,
        color 0.18s ease;
}

.ai-risk-popover-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.ai-risk-popover-close:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.ai-risk-popover-close .material-icons-round {
    font-size: 1.15rem;
}

.ai-risk-popover-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 3px;
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.ai-risk-popover-body::-webkit-scrollbar {
    width: 5px;
}

.ai-risk-popover-body::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 10px;
}

.ai-risk-popover-body::-webkit-scrollbar-track {
    background: transparent;
}

/* Colori di rischio da Utils.VulnColors: logo (sfondo/bordo) e valore */
.ai-low .kpi-logo {
    background: rgba(186,154,40,0.2) !important;
    color: #BA9A28 !important;
    border-color: rgba(186,154,40,0.34) !important;
    box-shadow: none !important;
}

.ai-low .kpi-main {
    color: #BA9A28 !important;
}

.ai-medium .kpi-logo {
    background: rgba(189,112,56,0.2) !important;
    color: #BD7038 !important;
    border-color: rgba(189,112,56,0.34) !important;
    box-shadow: none !important;
}

.ai-medium .kpi-main {
    color: #BD7038 !important;
}

.ai-high .kpi-logo {
    background: rgba(198,74,85,0.2) !important;
    color: #C64A55 !important;
    border-color: rgba(198,74,85,0.34) !important;
    box-shadow: none !important;
}

.ai-high .kpi-main {
    color: #C64A55 !important;
}

.ai-critical .kpi-logo {
    background: rgba(132,92,190,0.22) !important;
    color: #845CBE !important;
    border-color: rgba(132,92,190,0.34) !important;
    box-shadow: none !important;
}

.ai-critical .kpi-main {
    color: #845CBE !important;
}

.ai-low,
.ai-medium,
.ai-high,
.ai-critical {
    border-color: var(--border-default) !important;
}

/* DARK MODE */
.ai-risk-card .logo-dark {
    display: none;
}

.ai-risk-card .logo-light {
    display: inline-block;
}

/* LIGHT MODE */
[data-theme="light"] .ai-risk-card .logo-dark {
    display: inline-block;
}

[data-theme="light"] .ai-risk-card .logo-light {
    display: none;
}

@media (max-width: 1700px) {
    .ai-risk-card {
        padding: 15px 16px 13px;
        gap: 10px;
    }

    .ai-risk-main {
        gap: 8px;
    }

    .ai-risk-card .kpi-main {
        font-size: 1.88rem;
    }

    .ai-risk-footer {
        padding-top: 9px;
    }
}

@media (max-width: 1400px) {
    .ai-risk-card {
        padding: 14px;
        gap: 9px;
    }

    .ai-logo-wrapper {
        width: 35px;
        height: 35px;
        min-width: 35px;
    }

    .ai-logo-img {
        width: 25px;
        height: 25px;
    }

    .ai-risk-heading-text {
        font-size: 0.81rem;
    }

    .ai-risk-eyebrow {
        font-size: 0.61rem;
    }

    .ai-risk-card .kpi-main {
        font-size: 1.75rem;
    }

    .ai-risk-details-trigger-text {
        font-size: 0.72rem;
    }
}

@media (max-width: 900px) {
    .ai-risk-card {
        padding: 13px 12px;
        gap: 10px;
    }

    .ai-risk-card .kpi-main {
        font-size: 1.7rem;
    }
}

@media (max-width: 480px) {
    .ai-risk-eyebrow {
        display: none;
    }

    .ai-risk-popover {
        max-width: calc(100vw - 24px);
        padding: 16px;
    }

    .ai-risk-popover-body {
        font-size: 0.79rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ai-risk-popover,
    .ai-risk-segment,
    .ai-risk-details-trigger,
    .ai-risk-details-arrow {
        transition: none;
    }
}

/* TITOLO */
.dfend-section-header {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    padding: 0 0 0 13px;
}

    .dfend-section-header::before {
        content: "";
        position: absolute;
        left: 0;
        top: 5px;
        bottom: 4px;
        width: 2px;
        border-radius: 999px;
        background: linear-gradient( 180deg, var(--color-primary), var(--color-primary-border) );
        opacity: 0.72;
        box-shadow: 0 0 5px var(--color-primary-glow);
    }

.dfend-section-title {
    color: rgba(238, 240, 245, 0.94);
    font-size: 29px;
    font-weight: 720;
    line-height: 1.08;
    letter-spacing: -0.58px;
    margin: 0 0 4px 0;
    text-align: left;
}

.dfend-section-subtitle {
    color: rgba(226, 229, 235, 0.60);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.006em;
    margin: 0;
    padding: 0;
    text-align: left;
}

    .dfend-section-header::after,
    .dfend-section-subtitle::before {
        content: none;
    }

/* =============================================================================
   DFEND FILTERS
   ============================================================================= */

.dfend-filter-label-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 740;
    line-height: 1.2;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.dfend-filter-icon {
    color: var(--color-primary);
    font-size: 15px;
    line-height: 1;
}

.dfend-filter-separator {
    margin: 0 2px;
    color: var(--text-muted);
    opacity: 0.72;
}

.dfend-filter-date-range {
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 720;
    line-height: 1.2;
    letter-spacing: -0.004em;
    text-transform: none;
}


/* TIME FILTERS — secondary-action-btn style */
.dfend-time-filter-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
    width: 100%;
    margin-top: 8px;
}

.dfend-time-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--border-default);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.77rem;
    font-weight: 740;
    line-height: 1;
    letter-spacing: -0.004em;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

    .dfend-time-filter:hover {
        background: var(--bg-hover);
        border-color: var(--border-strong);
        color: var(--text-primary);
    }

    .dfend-time-filter.active {
        background: var(--color-primary-soft);
        border-color: var(--color-primary-border);
        color: var(--color-primary);
        font-weight: 760;
    }

    .dfend-time-filter:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px var(--color-primary-soft);
    }

    .dfend-time-filter:active {
        background: var(--bg-active);
    }


/* MOBILE */
@media (max-width: 768px) {
    .dfend-filter-label-group,
    .dfend-time-filter-group {
        justify-content: center;
    }

    .dfend-filter-label-group {
        text-align: center;
        gap: 6px;
    }

    .dfend-time-filter-group {
        gap: 6px;
    }

    .dfend-time-filter {
        min-height: 32px;
        padding: 0 12px;
        font-size: 0.74rem;
    }
}

.cyber-textarea {
    background: #E2E2E2; 
    border: 1px solid rgba(162, 50, 58, 0.35); 
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.08); 
    color: #2B2B2B;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: all 0.25s ease;
    outline: none;
}

    .cyber-textarea::placeholder {
        color: #6C6E75;
        opacity: 0.7;
    }

    .cyber-textarea:focus {
        border: 1px solid #A2323A; 
        box-shadow: 0 0 8px rgba(162, 50, 58, 0.25), inset 0 0 4px rgba(0, 0, 0, 0.05);
        background: #E6E6E6; 
        color: #2B2B2B;
    }

/* SWEET ALERT — DFEND / SORYON UI */
.swal2-popup.swal-dark,
.swal2-popup.swal-info,
.swal2-popup.swal-error,
.swal2-popup.swal-success-remediated {
    width: 100%;
    max-width: 580px;
    padding: 30px 28px 24px !important;
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-lg);
    font-family: 'Inter', 'Roboto', sans-serif;
    overflow: hidden;
    text-align: center !important;
}

.swal2-popup.swal-dark {
    border-color: var(--color-primary-border);
}

.swal2-popup.swal-info {
    border-color: var(--color-info-border);
}

.swal2-popup.swal-error {
    border-color: var(--color-danger-border);
}

.swal2-popup.swal-success-remediated {
    border-color: var(--color-success-border);
}

.swal2-popup:has(.swal2-icon.swal2-warning) {
    border-color: var(--color-danger-border);
}

.swal2-title {
    margin: 0 0 14px;
    padding: 0;
    color: var(--text-title);
    font-size: 1.16rem;
    font-weight: 720;
    line-height: 1.18;
    letter-spacing: -0.018em;
    text-align: center;
    text-shadow: none;
}

    .swal2-title::before {
        content: "";
        display: none;
    }

.swal2-html-container {
    margin: 0;
    padding: 0 4px;
    max-height: 360px;
    overflow-y: auto;
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 540;
    line-height: 1.55;
    letter-spacing: -0.004em;
    text-align: center !important;
}

.swal2-icon.swal2-info,
.swal2-popup.swal-info .swal2-icon.swal2-info,
.swal2-popup.swal-info .swal2-icon.swal2-question {
    color: var(--color-info);
    border-color: var(--color-info-border);
}

/* Warning — rosso */
.swal2-icon.swal2-warning,
.swal2-popup .swal2-icon.swal2-warning,
.swal2-popup.swal-dark .swal2-icon.swal2-warning {
    color: var(--color-danger);
    border-color: var(--color-danger-border);
}

/* Error */
.swal2-popup.swal-error .swal2-icon.swal2-error {
    color: var(--color-danger);
    border-color: var(--color-danger-border);
}

    .swal2-popup.swal-error .swal2-icon.swal2-error [class^="swal2-x-mark-line"] {
        background-color: var(--color-danger) !important;
    }

/* Success */
.swal2-popup.swal-success-remediated .swal2-icon.swal2-success {
    border-color: var(--color-success-border);
}

    .swal2-popup.swal-success-remediated .swal2-icon.swal2-success .swal2-success-ring {
        border-color: var(--color-success-border) !important;
    }

    .swal2-popup.swal-success-remediated .swal2-icon.swal2-success [class^="swal2-success-line"] {
        background-color: var(--color-success) !important;
    }


/* BLOCCO VIOLAZIONE */
.violation-entry {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0 22px;
    padding: 16px 18px;
    border-radius: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    box-shadow: none;
    text-align: left;
    transition: background 0.16s ease, border-color 0.16s ease;
}

.violation-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 790;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.045em;
}

.violation-service {
    color: var(--color-info);
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.045em;
}

.violation-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 540;
    line-height: 1.45;
    letter-spacing: -0.004em;
}

    .violation-row .material-icons-outlined {
        width: 18px;
        min-width: 18px;
        height: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 1px 0 0;
        padding: 0;
        color: var(--color-info);
        font-size: 18px;
        line-height: 1;
        text-shadow: none;
        flex-shrink: 0;
    }

.remediation-status {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    color: var(--color-success);
    font-size: 0.78rem;
    font-weight: 740;
    line-height: 1.35;
    letter-spacing: -0.004em;
    text-shadow: none;
}

    .remediation-status button.btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: auto;
        min-height: 30px;
        max-width: fit-content;
        margin-top: 4px;
        padding: 0 12px;
        border-radius: 7px;
        border: 1px solid var(--color-success-border);
        background: var(--color-success-soft);
        color: var(--text-primary);
        font-size: 0.74rem;
        font-weight: 760;
        line-height: 1;
        box-shadow: none;
        cursor: pointer;
        transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
    }

        .remediation-status button.btn:hover {
            color: var(--color-success-hover);
        }

        .remediation-status button.btn .material-icons-outlined {
            margin: 0;
            position: static;
            color: currentColor;
            font-size: 16px;
            line-height: 1;
            text-shadow: none;
        }


/* BOTTONI SWEETALERT */
.swal2-actions {
    gap: 10px;
    margin-top: 22px;
}

    .swal2-actions button,
    .swal2-actions .btn,
    .btn-glow-cyan,
    .btn-glow-red,
    .btn-glow-success,
    .btn-generic {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 36px;
        padding: 0 17px;
        border-radius: 8px;
        border: 1px solid var(--color-primary-border);
        background: var(--color-primary-softer);
        color: var(--color-primary);
        font-size: 0.82rem;
        font-weight: 780;
        line-height: 1;
        letter-spacing: -0.010em;
        text-transform: none;
        text-decoration: none;
        box-shadow: none;
        cursor: pointer;
        transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
    }

    /* BOTTONI — DEFAULT / PRIMARY */
    .swal2-actions .swal2-confirm,
    .swal2-popup.swal-dark .swal2-actions .swal2-confirm,
    .btn-generic {
        border-color: var(--color-primary-border);
        background: var(--color-primary-softer);
        color: var(--text-primary);
    }

        .swal2-actions .swal2-confirm:hover,
        .swal2-popup.swal-dark .swal2-actions .swal2-confirm:hover,
        .btn-generic:hover {
            color: var(--color-primary-hover);
            border-color: var(--color-primary-border);
            background: var(--color-primary-softer);
        }


/* BOTTONI — INFO / CIANO */
.swal2-popup.swal-info .swal2-actions .swal2-confirm,
.swal2-popup.swal-info .swal2-actions .swal2-deny,
.btn-glow-cyan {
    border-color: var(--color-info-border);
    background: var(--color-info-soft);
    color: var(--text-primary);
}

    .swal2-popup.swal-info .swal2-actions .swal2-confirm:hover,
    .swal2-popup.swal-info .swal2-actions .swal2-deny:hover,
    .btn-glow-cyan:hover {
        color: var(--color-info-hover);
    }


/* BOTTONI — ERROR / DANGER */
.swal2-popup.swal-error .swal2-actions .swal2-confirm,
.swal2-popup.swal-error .swal2-actions .swal2-deny,
.btn-glow-red {
    border-color: var(--color-danger-border);
    background: var(--color-danger-soft);
    color: var(--text-primary);
}

    .swal2-popup.swal-error .swal2-actions .swal2-confirm:hover,
    .swal2-popup.swal-error .swal2-actions .swal2-deny:hover,
    .btn-glow-red:hover {
        color: var(--color-danger-hover);
    }


/* BOTTONI — WARNING ROSSO */
.swal2-popup:has(.swal2-icon.swal2-warning) .swal2-actions .swal2-confirm,
.swal2-popup:has(.swal2-icon.swal2-warning) .swal2-actions .swal2-deny {
    border-color: var(--color-danger-border);
    background: var(--color-danger-soft);
    color: var(--text-primary);
}

    .swal2-popup:has(.swal2-icon.swal2-warning) .swal2-actions .swal2-confirm:hover,
    .swal2-popup:has(.swal2-icon.swal2-warning) .swal2-actions .swal2-deny:hover {
        color: var(--color-danger-hover);
    }


/* BOTTONI — SUCCESS */
.swal2-popup.swal-success-remediated .swal2-actions .swal2-confirm,
.swal2-popup.swal-success-remediated .swal2-actions .swal2-deny,
.btn-glow-success {
    border-color: var(--color-success-border);
    background: var(--color-success-soft);
    color: var(--text-primary);
}

    .swal2-popup.swal-success-remediated .swal2-actions .swal2-confirm:hover,
    .swal2-popup.swal-success-remediated .swal2-actions .swal2-deny:hover,
    .btn-glow-success:hover {
        color: var(--color-success-hover);
    }

/* BOTTONI — CANCEL / SECONDARY */
.swal2-actions .swal2-cancel,
.swal2-actions .btn-outline-secondary,
.btn-outline-secondary {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid var(--border-default) !important;
    background: var(--bg-card) !important;
    color: var(--text-secondary) !important;
    border-radius: 8px;
    font-size: 0.77rem;
    font-weight: 740;
    letter-spacing: -0.004em;
    box-shadow: none;
}

    .swal2-actions .swal2-cancel:hover,
    .swal2-actions .btn-outline-secondary:hover,
    .btn-outline-secondary:hover {
        background: var(--bg-hover) !important;
        border-color: var(--border-strong) !important;
        color: var(--text-primary) !important;
        text-decoration: none;
    }


/* Icone dentro i bottoni */
.swal2-actions button .material-icons-outlined,
.swal2-actions .btn .material-icons-outlined,
.btn-glow-cyan .material-icons-outlined,
.btn-glow-red .material-icons-outlined,
.btn-glow-success .material-icons-outlined {
    color: currentColor;
    font-size: 17px;
    line-height: 1;
}


/* CLOSE BUTTON */
.swal2-close-custom,
.swal2-popup .swal2-close {
    border-radius: 8px;
    border: 1px solid var(--border-default);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 30px;
    opacity: 1;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .swal2-close-custom:hover,
    .swal2-popup .swal2-close:hover {
        background: var(--bg-hover);
        border-color: var(--border-strong);
        color: var(--text-primary);
    }

/* FOOTER */
.swal2-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 22px 0 0 !important;
    padding: 18px 4px 2px !important;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    font-weight: 550;
    line-height: 1.4;
    letter-spacing: -0.004em;
    text-align: center;
}

    /* Contenitore interno del footer */
    .swal2-footer .swal-support {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 11px;
        width: 100%;
        text-align: center;
    }

        .swal2-footer .swal-support span {
            display: block;
            width: 100%;
            font-size: 0.8rem;
            font-weight: 560;
            line-height: 1.4;
            text-align: center;
        }

    .swal2-footer .btn-outline-secondary {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: auto;
        min-width: 160px;
        min-height: 38px;
        margin: 0 auto;
        padding: 0 18px;
        border: 1px solid var(--border-default) !important;
        border-radius: 8px;
        background: var(--bg-card) !important;
        color: var(--text-secondary) !important;
        font-size: 0.82rem;
        font-weight: 700;
        line-height: 1;
        letter-spacing: -0.004em;
        text-decoration: none;
        box-shadow: none;
        transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
    }

        .swal2-footer .btn-outline-secondary:hover,
        .swal2-footer .btn-outline-secondary:focus {
            background: var(--bg-hover) !important;
            border-color: var(--border-strong) !important;
            color: var(--text-primary) !important;
            text-decoration: none;
        }

        .swal2-footer .btn-outline-secondary .support-icon {
            width: auto;
            font-size: 18px;
            font-weight: 400;
            line-height: 1;
            margin-right: 7px;
            color: var(--color-danger);
        }


/* SCROLLBAR SWEETALERT */
.swal2-html-container {
    scrollbar-width: thin;
}

/* Scrollbar info */
.swal2-popup.swal-info .swal2-html-container {
    scrollbar-color: var(--color-info-border) transparent;
}

    .swal2-popup.swal-info .swal2-html-container::-webkit-scrollbar-thumb {
        background: var(--color-info-border);
    }

        .swal2-popup.swal-info .swal2-html-container::-webkit-scrollbar-thumb:hover {
            background: var(--color-info);
        }


/* Scrollbar error / danger / warning rossa */
.swal2-popup.swal-error .swal2-html-container,
.swal2-popup:has(.swal2-icon.swal2-warning) .swal2-html-container,
.swal-scroll-red .swal2-html-container {
    scrollbar-color: var(--color-danger-border) transparent;
}

    .swal2-popup.swal-error .swal2-html-container::-webkit-scrollbar-thumb,
    .swal2-popup:has(.swal2-icon.swal2-warning) .swal2-html-container::-webkit-scrollbar-thumb,
    .swal-scroll-red .swal2-html-container::-webkit-scrollbar-thumb {
        background: var(--color-danger-border);
    }

        .swal2-popup.swal-error .swal2-html-container::-webkit-scrollbar-thumb:hover,
        .swal2-popup:has(.swal2-icon.swal2-warning) .swal2-html-container::-webkit-scrollbar-thumb:hover,
        .swal-scroll-red .swal2-html-container::-webkit-scrollbar-thumb:hover {
            background: var(--color-danger);
        }


/* Scrollbar success */
.swal2-popup.swal-success-remediated .swal2-html-container {
    scrollbar-color: var(--color-success-border) transparent;
}

    .swal2-popup.swal-success-remediated .swal2-html-container::-webkit-scrollbar-thumb {
        background: var(--color-success-border);
    }

        .swal2-popup.swal-success-remediated .swal2-html-container::-webkit-scrollbar-thumb:hover {
            background: var(--color-success);
        }


/* RESPONSIVE */
@media (max-width: 991.98px) {

    .swal2-popup.swal-dark,
    .swal2-popup.swal-info,
    .swal2-popup.swal-error,
    .swal2-popup.swal-success-remediated {
        width: 92% !important;
        max-width: none !important;
        padding: 26px 20px 22px !important;
        border-radius: 10px;
    }

    .swal2-title {
        margin-bottom: 12px;
        font-size: 1.04rem !important;
        line-height: 1.2;
    }

    .swal2-html-container {
        max-height: 240px !important;
        padding-right: 2px;
        font-size: 0.80rem;
    }

    .violation-entry {
        margin: 14px 0 20px;
        padding: 14px 15px;
        gap: 8px;
        border-radius: 9px;
    }

    .violation-header {
        font-size: 0.68rem;
    }

    .violation-service {
        font-size: 0.72rem;
    }

    .violation-row {
        font-size: 0.78rem;
    }

        .violation-row .material-icons-outlined {
            width: 17px;
            min-width: 17px;
            height: 17px;
            font-size: 17px;
        }

    .remediation-status {
        font-size: 0.74rem;
    }

        .remediation-status button.btn {
            min-height: 29px;
            padding: 0 11px;
            font-size: 0.72rem;
            border-radius: 7px;
        }

    .swal2-actions {
        width: 100%;
        gap: 8px;
        margin-top: 18px;
    }

        .swal2-actions button,
        .swal2-actions .btn,
        .btn-glow-cyan,
        .btn-glow-red,
        .btn-glow-success,
        .swal2-actions .btn-outline-secondary,
        .btn-outline-secondary {
            min-height: 34px;
            padding: 0 14px !important;
            border-radius: 8px;
            font-size: 0.77rem !important;
        }

    .swal2-close-custom,
    .swal2-popup .swal2-close {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        font-size: 28px;
        border-radius: 8px;
    }

    .swal2-footer {
        gap: 8px;
        margin-top: 18px !important;
        padding: 14px 2px 0 !important;
        font-size: 0.69rem;
        line-height: 1.4;
    }

        .swal2-footer .btn-outline-secondary {
            min-height: 34px;
            padding: 0 13px !important;
            font-size: 0.74rem !important;
        }
}

.btn .material-icons-outlined {
    font-size: 20px;
    vertical-align: middle;
    line-height: 1;
    text-shadow: 0 0 2px #00000022;
}

.text-cyan {
    color: #2a99b0;
}


.card-scroll {
    max-height: 150px; 
    overflow-y: auto; 
    padding-right: 4px; 
    scroll-behavior: smooth; 
}

    .card-scroll::-webkit-scrollbar {
        width: 6px;
    }

    .card-scroll::-webkit-scrollbar-thumb {
        background-color: #991A1E66;
        border-radius: 10px;
        border: 1px solid #991A1E66;
    }

    .card-scroll::-webkit-scrollbar-track {
        background: transparent;
    }

.card-scroll {
    scrollbar-color: #991A1E66 transparent;
    scrollbar-width: thin;
}

/* CHART*/
.placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(226, 229, 235, 0.58);
    font-size: 1.02rem;
    font-weight: 500;
}

/* Responsive Fix */
@media (max-width: 767.98px) {
    /* Esclude le row con gutter verticale gy-*, dove la spaziatura è già gestita da Bootstrap */
    .row:not([class*="gy-"]) > [class^="col-"]:not(:last-child) {
        margin-bottom: 1.5rem;
    }

    .dfend-footer .row > div {
        text-align: center !important;
    }

    .dfend-footer .footer-logo {
        margin: 0 auto;
    }

    .dfend-footer .d-flex.flex-md-row {
        flex-direction: column !important;
        align-items: center;
    }
}

.chart-title .material-icons-outlined {
    font-size: 19px;
    text-shadow: none;
}

.chart-container .material-icons-outlined {
    font-size: 17px;
    line-height: 1;
    flex-shrink: 0;
    text-shadow: none;
}

/* GRAFICI */
.chart-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 140px;
}

#areaChart {
    width: 100% !important;
    max-width: 680px !important;
    max-height: 245px !important;
    margin: 0 auto !important;
}

.chart-title {
    position: relative;
    font-weight: 710;
    margin-bottom: 12px;
    color: rgba(232, 235, 240, 0.86);
    font-size: 1.08rem;
    line-height: 1.16;
    letter-spacing: -0.018em;
    text-align: center;
    text-shadow: none;
}

    .chart-title small {
        display: block;
        margin-top: 4px;
        color: rgba(226, 229, 235, 0.50);
        font-size: 0.72rem;
        font-weight: 460;
        letter-spacing: -0.006em;
        text-shadow: none;
    }

/* LEGENDA GRAFICI */
.legend-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    justify-content: center;
    align-items: center;
    margin-top: 8px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 540;
    line-height: 1.2;
    color: rgba(226, 229, 235, 0.64);
    white-space: nowrap;
    letter-spacing: -0.006em;
}

.legend-color {
    width: 9px;
    height: 9px;
    min-width: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    margin-right: 0;
    border: 1px solid rgba(255, 255, 255, 0.050);
    box-shadow: none !important;
    opacity: 0.88;
}

/* LEGENDA PIE */
#legendPie {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 5px 14px;
    justify-content: center;
    align-items: center;
    margin-top: 12px;
    width: auto;
    max-width: 100%;
    max-height: 165px;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 0 9px;
}

@media (max-width: 1280px) {
    #legendPie {
        grid-template-columns: repeat(1, max-content) !important;
        justify-content: start;
        text-align: left;
        padding-left: 16px;
    }
}
/* CONTATORI  */
.metric-number {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-top: 10px;
    color: var(--accent-green);
    transition: color 0.3s ease;
    text-shadow: 0 0 8px rgba(25, 135, 84, 0.08); 
}

.metric-label {
    font-size: 0.9rem;
    text-align: center;
    color: var(--text-title-small);
    margin-bottom: 0;
}

/* CONTATORI */
.metric-danger {
    color: #8E1F27; 
}

.metric-warning {
    color: #9C7A00; 
}

.metric-success {
    color: #146C49; 
}

.metric-info {
    color: #167CA8; 
}

.metric-neutral {
    color: var(--text-light);
}

/* INPUT */
.dfend-input {
    background: #131518;
    border: 1px solid #2a2a2a !important;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.92rem;
    color: var(--text-light);
    transition: all 0.25s ease-in-out;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.35);
}

    .dfend-input:hover {
        border-color: #333;
        background: #181c1e;
    }

    .dfend-input:focus {
        outline: none;
        border-color: var(--accent-glow);
        background: #17191c;
        box-shadow: 0 0 12px var(--accent-glow), inset 0 0 6px rgba(0,0,0,0.6);
        color: var(--text-light);
    }

input.form-control.dfend-input {
    color: var(--text-light);
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* PLACEHOLDER */
.dfend-input::placeholder {
    color: #777; 
    font-style: italic;
    letter-spacing: 0.5px;
    transition: color 0.25s ease, opacity 0.25s ease;
}

.dfend-input:focus::placeholder {
    color: #991a1e; 
    opacity: 0.65; 
}

.dfend-readonly {
    background: linear-gradient(135deg, #17191c, #101214);
    border: 1px solid #292a2d;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.92rem;
    color: var(--text-light);
    letter-spacing: 0.4px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease-in-out;
}

/* NEW CAMPAIGN */
.dfend-form-section {
    width: 100%;
    border-radius: 14px;
    padding: 2rem 3rem;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--bg) 88%, #19090a 135%);
    border: 1.8px solid #1a1012;
    color: var(--text);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(20, 8, 10, 0.35);
}

    .dfend-form-section label {
        display: block;
        font-weight: 600;
        font-size: 1rem;
        margin-bottom: 10px;
        letter-spacing: 0.25px;
        text-align: center;
        color: var(--text-title);
        text-align: center;
        text-shadow: 0 0 6px rgba(0, 255, 204, 0.15);
    }

    .dfend-form-section .form-group {
        margin-bottom: 1.1rem;
        text-align: center;
    }

    .dfend-form-section .form-control {
        width: 70%;
        margin: 0 auto;
        border-radius: 7px;
        border: 1.2px solid #17191c;
        background-color: #E2E2E2;
        color: #2B2B2B;
        font-size: 0.95rem;
        transition: all 0.25s ease;
        box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
    }

        .dfend-form-section .form-control::placeholder {
            color: #8e8e8e;
            opacity: 0.7;
        }

.CodeMirror {
    border-radius: 8px;
    border: 1.8px solid #17191c;
}

    .dfend-form-section .btn-primary {
        display: block;
        margin: 1.3rem auto 0;
        background-color: #991a1e;
        border: 1px solid #991a1e;
        color: #f3f3f3;
        font-weight: 600;
        padding: 0.65rem 1.4rem;
        border-radius: 10px;
        transition: all 0.25s ease;
        width: 40%;
        min-width: 200px;
    }

        .dfend-form-section .btn-primary:hover {
            background-color: #aa2225;
            border-color: #aa2225;
            box-shadow: 0 0 10px rgba(153, 26, 30, 0.35);
            transform: translateY(-1px);
        }

control-label {
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    color: var(--text-title);
    text-shadow: 0 0 6px rgba(0, 255, 204, 0.15);
}

@media (max-width: 992px) {
    .dfend-form-section {
        padding: 1.5rem;
    }

        .dfend-form-section .form-control {
            width: 100%;
        }

        .dfend-form-section .btn-primary {
            width: 100%;
        }
}


.dfend-tabs {
    gap: 0.5rem;
    padding: 0.2rem;
}

    .dfend-tabs::after {
        background: linear-gradient( to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.18) 12%, rgba(255, 255, 255, 0.18) 88%, rgba(255, 255, 255, 0) 100% );
        box-shadow: 0 0 6px rgba(153, 26, 30, 0.25), 0 0 10px rgba(0, 255, 204, 0.12);
    }

    .dfend-tabs .nav-link {
        background: #16191c;
        color: #bfc1c9;
        border-radius: 10px 10px 0 0;
        padding: 10px 24px;
        font-size: 15px;
        font-weight: 500;
        border: 1px solid transparent;
        border-bottom: 2px solid transparent;
        box-sizing: border-box;
        transition: all 0.25s ease;
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

        .dfend-tabs .nav-link .material-icons-outlined {
            font-size: 18px;
            transition: color 0.25s ease;
        }

        .dfend-tabs .nav-link:hover {
            background: linear-gradient(145deg, var(--bg-alt) 0%, var(--active-color) 100%);
            border-bottom: 2px solid transparent;
            transform: translateY(-1px);
        }


            .dfend-tabs .nav-link:hover .material-icons-outlined {
                color: #ff4a57;
            }

        /* Active */
        .dfend-tabs .nav-link.active {
            color: #fff;
            background: #121417;
            font-weight: 600;
            border: 1px solid var(--accent-main);
            border-bottom: 2px solid #991A1E;
            box-shadow: 0 0 0 1px #991A1E55, 0 0 12px #991A1E66, inset 0 0 12px #991A1E33;
        }

            .dfend-tabs .nav-link.active .material-icons-outlined {
                color: #ff4a57;
            }

            .dfend-tabs .nav-link.active::after {
                background: #121417;
            }

@media (max-width: 768px) {
    .dfend-tabs .nav-link {
        padding: 8px 16px;
        font-size: 14px;
    }
}




.campaign-code {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: #b82222; 
    text-shadow: 0 0 12px rgba(120, 20, 22, 0.9);
    text-align: center;
    margin-bottom: 10px;
}

.range-container {
    margin: 14px 0;
}

    .range-container input[type=range] {
        width: 100%;
        height: 6px;
        appearance: none;
        background: rgba(255,255,255,0.12);
        border-radius: 4px;
        outline: none;
    }

        .range-container input[type=range]::-webkit-slider-thumb {
            appearance: none;
            height: 14px;
            width: 14px;
            border-radius: 50%;
            background: #991A1E;
            box-shadow: 0 0 10px rgba(153, 26, 30, 0.9);
            cursor: not-allowed;
        }

.range-labels {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
}

.campaign-info {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 12px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* SUCCESS */
.text-success {
    color: var(--color-success) !important;
}

/* WARNING */
.text-warning {
    color: var(--color-warning) !important;
}

/* DANGER */
.text-danger {
    color: var(--color-danger) !important;
}

/* INFO */
.text-info {
    color: var(--color-info) !important;
}

/* SECONDARY */
.text-secondary {
    color: var(--text-secondary) !important;
}

/* MUTED */
.text-muted {
    color: var(--text-muted) !important;
}

/* PRIMARY */
.text-primary {
    color: var(--color-primary) !important;
}

/* GRIGLIE */
.tabulator {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-default) !important;
    border-radius: 9px !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
    overflow: hidden;
}

    .tabulator .tabulator-header,
    .tabulator-headers {
        background: var(--bg-elevated) !important;
        border-bottom: 1px solid var(--border-subtle) !important;
        color: var(--text-primary) !important;
        font-weight: 600;
        box-shadow: none !important;
    }

        .tabulator .tabulator-header .tabulator-col,
        .tabulator-col {
            background: transparent !important;
            padding: 9px 10px;
            color: var(--text-secondary) !important;
            border-right: none !important;
            box-shadow: none !important;
        }

            .tabulator .tabulator-header .tabulator-col:last-child,
            .tabulator-col:last-child {
                border-right: none !important;
            }

            .tabulator-col .tabulator-col-title {
                color: var(--text-primary) !important;
                font-weight: 600;
                font-size: 0.80rem;
                letter-spacing: 0;
                line-height: 1.4;
            }

            .tabulator-col .material-icons-outlined {
                font-size: 15px;
                vertical-align: middle;
                color: var(--color-primary) !important;
                transform: translateY(-1px);
            }

            .tabulator-col .tabulator-col-sorter {
                color: var(--text-muted) !important;
                opacity: 0.65;
                transition: opacity 0.18s ease;
            }

            .tabulator-col:hover .tabulator-col-sorter {
                opacity: 1;
            }

            .tabulator .tabulator-header .tabulator-col
            .tabulator-col-sorter .tabulator-arrow {
                border-bottom-color: var(--text-muted) !important;
                border-top-color: var(--text-muted) !important;
            }

            .tabulator .tabulator-header .tabulator-col[aria-sort="asc"]
            .tabulator-col-sorter .tabulator-arrow {
                border-bottom-color: var(--color-primary) !important;
            }

            .tabulator .tabulator-header .tabulator-col[aria-sort="desc"]
            .tabulator-col-sorter .tabulator-arrow {
                border-top-color: var(--color-primary) !important;
            }

            .tabulator-col .tabulator-header-popup-button i,
            .tabulator-row .tabulator-responsive-collapse-toggle {
                color: var(--text-muted) !important;
            }

.tabulator-header-filter {
    margin-top: 8px;
}

    .tabulator-header-filter input,
    .tabulator-header-filter select {
        width: 100%;
        min-height: 29px;
        background: var(--bg-elevated) !important;
        border: 1px solid var(--border-default) !important;
        color: var(--text-primary) !important;
        border-radius: 6px !important;
        padding: 6px 9px;
        font-size: 0.77rem;
        font-weight: 400;
        outline: none !important;
        box-shadow: none !important;
        transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    }

        .tabulator-header-filter input::placeholder,
        .tabulator .tabulator-header input::placeholder {
            color: var(--text-muted) !important;
            font-size: 0.75rem;
            font-weight: 400;
        }

        .tabulator-header-filter input:hover,
        .tabulator-header-filter select:hover {
            background: var(--bg-hover) !important;
            border-color: var(--border-strong) !important;
        }

        .tabulator-header-filter input:focus,
        .tabulator-header-filter select:focus {
            background: var(--bg-hover) !important;
            border-color: var(--border-strong) !important;
            box-shadow: none !important;
        }

.tabulator .tabulator-table,
.tabulator .tabulator-tableholder {
    background: var(--bg-card) !important;
}

/* RIGHE */
.tabulator-row {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    transition: background-color 0.18s ease, color 0.18s ease;
}

    .tabulator-row.tabulator-row-even {
        background: var(--bg-card) !important;
    }

    .tabulator-row:hover,
    .tabulator .tabulator-row:hover,
    .tabulator .tabulator-row.tabulator-row-even:hover {
        background: var(--bg-hover) !important;
    }

    .tabulator-row.tabulator-selected,
    .tabulator-row.tabulator-selected:hover {
        background: var(--color-primary-soft) !important;
        box-shadow: none !important;
    }

/* CELLE */
.tabulator-cell {
    padding: 12px 13px;
    border: none !important;
    color: var(--text-primary) !important;
    font-size: 0.82rem;
    font-weight: 450;
    line-height: 1.45;
    vertical-align: middle;
}

.tabulator .tabulator-cell:hover {
    background-color: transparent !important;
    border: none !important;
}

.tabulator-col,
.tabulator-header,
.tabulator-cell,
.tabulator-row {
    color: var(--text-primary) !important;
}

/* PLACEHOLDER */
.tabulator .tabulator-placeholder {
    background: var(--bg-card) !important;
    color: var(--text-secondary) !important;
}

    .tabulator .tabulator-placeholder span {
        color: var(--text-secondary) !important;
        font-weight: 400;
        font-size: 0.82rem;
    }

.tabulator .tabulator-footer {
    background: var(--bg-elevated) !important;
    border-top: 1px solid var(--border-subtle) !important;
    color: var(--text-secondary) !important;
    box-shadow: none !important;
    padding: 10px 14px !important;
    min-height: 44px !important;
    font-size: 0.80rem !important;
    font-weight: 500 !important;
}

    /* COUNTER */
    .tabulator .tabulator-footer .tabulator-page-counter {
        color: var(--text-secondary) !important;
        font-size: 0.78rem !important;
        font-weight: 450 !important;
        white-space: nowrap !important;
    }

    /* PAGINATOR */
    .tabulator .tabulator-footer .tabulator-paginator {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 6px !important;
        margin-left: auto !important;
    }

    /* BLOCCO NUMERI */
    .tabulator .tabulator-footer .tabulator-pages {
        display: inline-flex !important;
        align-items: center !important;
        gap: 5px !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* PAGINE / COMANDI */
    .tabulator .tabulator-footer .tabulator-page {
        background: transparent !important;
        border: 1px solid transparent !important;
        color: var(--text-secondary) !important;
        border-radius: 6px !important;
        padding: 5px 7px !important;
        margin: 0 !important;
        font-size: 0.78rem !important;
        font-weight: 550 !important;
        line-height: 1.2 !important;
        box-shadow: none !important;
        min-width: 27px !important;
        min-height: 27px !important;
        text-align: center !important;
        transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    }

        /* HOVER PAGINE */
        .tabulator .tabulator-footer .tabulator-page:hover {
            background: var(--bg-hover) !important;
            border-color: var(--border-strong) !important;
            color: var(--text-primary) !important;
        }

        /* PAGINA ATTIVA */
        .tabulator .tabulator-footer .tabulator-page.active {
            background: var(--color-primary-soft) !important;
            border-color: var(--border-default) !important;
            color: var(--text-primary) !important;
            min-width: 27px !important;
            min-height: 27px !important;
            padding: 5px 7px !important;
            font-weight: 650 !important;
            box-shadow: none !important;
        }

        /* FRECCE */
        .tabulator .tabulator-footer .tabulator-page[data-page="first"],
        .tabulator .tabulator-footer .tabulator-page[data-page="prev"],
        .tabulator .tabulator-footer .tabulator-page[data-page="next"],
        .tabulator .tabulator-footer .tabulator-page[data-page="last"] {
            color: var(--text-secondary) !important;
            font-size: 1.05rem !important;
            font-weight: 650 !important;
            padding: 4px 6px !important;
            min-width: 25px !important;
            line-height: 1 !important;
        }

            /* HOVER FRECCE */
            .tabulator .tabulator-footer .tabulator-page[data-page="first"]:hover,
            .tabulator .tabulator-footer .tabulator-page[data-page="prev"]:hover,
            .tabulator .tabulator-footer .tabulator-page[data-page="next"]:hover,
            .tabulator .tabulator-footer .tabulator-page[data-page="last"]:hover {
                color: var(--text-primary) !important;
                background: var(--bg-hover) !important;
                border-color: var(--border-strong) !important;
            }

        /* DISABILITATI */
        .tabulator .tabulator-footer .tabulator-page:disabled {
            background: transparent !important;
            border-color: transparent !important;
            color: var(--text-muted) !important;
            opacity: 0.38 !important;
            cursor: not-allowed !important;
        }

        /* FRECCE DISABILITATE */
        .tabulator .tabulator-footer .tabulator-page[data-page="first"]:disabled,
        .tabulator .tabulator-footer .tabulator-page[data-page="prev"]:disabled,
        .tabulator .tabulator-footer .tabulator-page[data-page="next"]:disabled,
        .tabulator .tabulator-footer .tabulator-page[data-page="last"]:disabled {
            color: var(--text-muted) !important;
            font-size: 1.05rem !important;
            font-weight: 650 !important;
            background: transparent !important;
            border-color: transparent !important;
        }

    /* SELECT PAGE SIZE */
    .tabulator .tabulator-footer .tabulator-page-size {
        background: var(--bg-inset) !important;
        border: 1px solid var(--border-subtle) !important;
        color: var(--text-secondary) !important;
        border-radius: 6px !important;
        padding: 5px 8px !important;
        font-size: 0.78rem !important;
        font-weight: 500 !important;
        outline: none !important;
        box-shadow: none !important;
    }

        .tabulator .tabulator-footer .tabulator-page-size:focus {
            border-color: var(--color-primary) !important;
        }

.tabulator-tooltip {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border-default) !important;
    border-radius: 8px !important;
    color: var(--text-primary) !important;
    font-size: 0.80rem;
    font-weight: 450 !important;
    box-shadow: none !important;
}

.tabulator-cell .severity-dot,
.tabulator-cell .status-dot {
    box-shadow: none !important;
}

.tabulator-cell a {
    color: var(--text-primary) !important;
    text-decoration: none;
}

    .tabulator-cell a:hover {
        color: var(--color-primary) !important;
    }

.tabulator-cell button,
.tabulator-cell .btn {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border-default) !important;
    color: var(--text-secondary) !important;
    border-radius: 6px;
    box-shadow: none !important;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

    .tabulator-cell button:hover,
    .tabulator-cell .btn:hover {
        background: var(--bg-hover) !important;
        border-color: var(--border-strong) !important;
        color: var(--text-primary) !important;
    }

.tabulator .tabulator-tableholder::-webkit-scrollbar,
.tabulator-tableholder::-webkit-scrollbar {
    width: 4px !important;
    height: 4px !important;
}

.tabulator .tabulator-tableholder::-webkit-scrollbar-track,
.tabulator-tableholder::-webkit-scrollbar-track {
    background: transparent !important;
}

.tabulator .tabulator-tableholder::-webkit-scrollbar-thumb,
.tabulator-tableholder::-webkit-scrollbar-thumb {
    background: var(--border-strong) !important;
    border-radius: 999px !important;
    border: none !important;
    min-height: 16px !important;
    min-width: 16px !important;
}

    .tabulator .tabulator-tableholder::-webkit-scrollbar-thumb:hover,
    .tabulator-tableholder::-webkit-scrollbar-thumb:hover {
        background: var(--text-muted) !important;
    }

.selected-host-name {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
    margin: 0 auto 14px auto;
    padding: 6px 18px;
    position: relative;
}

    .selected-host-name::before,
    .selected-host-name::after {
        content: "";
        display: block;
        height: 1px;
        width: 115%;
        border-radius: 2px;
        position: absolute;
        left: -7.5%;
    }

    .selected-host-name::before {
        top: -3px;
    }

    .selected-host-name::after {
        bottom: -3px;
    }

.tabulator-row.tabulator-group {
    background: linear-gradient(90deg, rgba(14,16,19,0.95), rgba(23,25,28,0.95));
    color: #e2e2e2;
    font-weight: 600;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 8px 14px;
    box-shadow: inset 0 1px 0 rgba(0, 255, 204, 0.05);
    font-size: 0.95rem;
    transition: background 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .tabulator-row.tabulator-group:hover {
        cursor: pointer;
        background: rgba(0, 255, 204, 0.03);
    }
}

.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow {
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--text-light);
    border-bottom: 0;
    margin-right: 12px;
}

.tabulator-row.tabulator-group .tabulator-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 12px;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid var(--text-light);
    vertical-align: middle;
    transition: transform 0.2s ease;
}

.tabulator-row.tabulator-group .tabulator-group-toggle {
    display: inline-flex;
    align-items: center;
}

/* DROPDOWN TABULATOR */
.tabulator .tabulator-cell.tabulator-editing,
.tabulator .tabulator-cell.tabulator-editing input[type="search"],
.tabulator .tabulator-cell.tabulator-editing input[type="text"] {
    border-radius: 6px !important;
    border: 0.5px solid #1D68CD !important;
    font-weight: 500;
}

/* DROPDOWN HOST */
.dfend-group-editor-wrapper {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    background: var(--bg-alt);
    border: 1px solid #2c2d31;
    border-radius: 11px;
    padding: 14px 14px;
    min-width: 230px;
    opacity: 0;
    transform-origin: top center;
    animation: dfendFadeDown 0.18s cubic-bezier(0.21,0.72,0.29,1) forwards;
}

@keyframes dfendFadeDown {
    from {
        opacity: 0;
        transform: translate(-50%, -4px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0px);
    }
}


.dfend-group-dropdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.dfend-group-section-title {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.8;
    padding-left: 4px;
}

.dfend-group-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #d6d7db;
    transition: 0.15s;
}

    .dfend-group-item:hover {
        background: rgba(30, 144, 255, 0.12);
        box-shadow: inset 0 -2px 6px rgba(30, 144, 255, 0.35), inset 0 0 0 1px rgba(30, 144, 255, 0.22);
        color: #78baff;
    }

.dfend-group-separator {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 4px 0 0;
}

.dfend-group-input {
    width: 100%;
    padding: 8px 10px;
    border: 0.5px solid #1D68CD !important;
    border-radius: 8px;
    color: #e6e6e6;
    font-size: 13px;
    transition: 0.18s ease;
}

    .dfend-group-input:focus {
        outline: none;
        border-color: #1E90FF;
        box-shadow: 0 0 6px rgba(30, 144, 255, 0.24);
    }

.dfend-group-add-btn {
    padding: 9px 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    background: rgba(30,144,255,0.10);
    color: #6bb6ff;
    cursor: pointer;
    transition: 0.2s ease;
}

.dfend-group-add-btn:hover {
    background: rgba(30,144,255,0.18);
    box-shadow: 0 0 6px rgba(30,144,255,0.25);
}
.dfend-group-input-wrapper {
    position: relative;
    width: 100%;
}

.dfend-group-input {
    width: 100%;
    padding-right: 24px; 
    box-sizing: border-box;
}

.dfend-group-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-weight: bold;
    color: #6bb6ff;
    user-select: none;
    font-size: 13px;
}

.dfend-group-empty {
    padding: 6px 4px;
    font-size: 12px;
    color: #737983;
    font-style: italic;
}

.dfend-btn-raw {
    padding: 4px 10px;
    border: 1px solid var(--border-default);
    background: var(--color-primary-soft);
    color: var(--text-primary);
    font-size: 0.78rem;
    border-radius: 7px;
    transition: 0.25s ease-in-out;
}

    .dfend-btn-raw:hover {
        background: var(--color-primary-soft);
        border: 1px solid var(--border-default);
        color: var(--text-primary);
        filter: brightness(1.20);
    }

    .dfend-btn-raw i {
        font-size: 12px;
        color: var(--color-primary);
    }

.dfend-btn-raw-green {
    padding: 4px 10px;
    border: 1px solid var(--border-default);
    background: var(--color-success-soft);
    color: var(--text-primary);
    font-size: 0.78rem;
    border-radius: 7px;
    transition: 0.25s ease-in-out;
}

    .dfend-btn-raw-green:hover {
        background: var(--color-success-soft);
        border: 1px solid var(--border-default);
        color: var(--text-primary);
        filter: brightness(1.20);
    }

    .dfend-btn-raw-green i {
        font-size: 12px;
        color: var(--color-success);
    }

.dfend-btn-raw-cyan {
    padding: 4px 10px;
    border: 1px solid var(--border-default);
    background: var(--color-info-soft);
    color: var(--text-primary);
    font-size: 0.78rem;
    border-radius: 7px;
    transition: 0.25s ease-in-out;
}

    .dfend-btn-raw-cyan:hover {
        background: var(--color-info-soft);
        border: 1px solid var(--border-default);
        color: var(--text-primary);
        filter: brightness(1.20);
    }

    .dfend-btn-raw-cyan i {
        font-size: 12px;
        color: var(--color-info);
    }

.dfend-btn-raw-orange {
    padding: 4px 10px;
    border: 1px solid var(--border-default);
    background: var(--color-warning-soft);
    color: var(--text-primary);
    font-size: 0.78rem;
    border-radius: 7px;
    transition: 0.25s ease-in-out;
}

    .dfend-btn-raw-orange:hover {
        background: var(--color-warning-soft);
        border: 1px solid var(--border-default);
        color: var(--text-primary);
        filter: brightness(1.20);
    }

    .dfend-btn-raw-orange i {
        font-size: 12px;
        color: var(--color-warning);
    }

.cvss-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.cvss-value {
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}

.cvss-info {
    font-size: 0.75rem;
    opacity: 0.6;
}

.cvss-cell:hover .cvss-info {
    opacity: 1;
}

.json-tree-wrapper {
    font-size: 13px;
    line-height: 1.32em;
    color: #e4e4e4;
    white-space: normal;
    word-break: break-word;
}

.json-node {
    margin-left: 12px;
    padding-left: 10px;
    border-left: 1px solid rgba(255,255,255,0.10);
}

.json-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 4px;
}

.json-toggle {
    cursor: pointer;
    user-select: none;
    opacity: .8;
    font-size: 14px;
    transition: transform .15s ease;
}

.json-children {
    display: none;
    margin-left: 4px;
    margin-top: 3px;
    transition: all .15s ease;
}

.json-value-block {
    display: block;
    padding-left: 26px; 
    margin-top: 2px;
    white-space: normal;
    word-break: break-word;
}

.json-value-string {
    color: #199CD8; 
}

.json-value-number {
    color: #D8B319; 
}

.json-value-bool-true {
    color: #19D89E; 
}

.json-value-bool-false {
    color: #D81947; 
}

.json-value-null {
    color: #708A9A; 
}

/* GRID SEARCH */
.dfend-grid-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 260px;
    height: 38px;
    background: #101215;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
    border-bottom: 2px solid var(--accent-main);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.35);
    padding: 0 12px 0 38px;
    transition: border-color 0.18s ease, background 0.18s ease;
}

    .dfend-grid-search:focus-within {
        outline: none;
        border-color: var(--accent-glow);
        background: #17191c;
        box-shadow: 0 0 12px var(--accent-glow), inset 0 0 6px rgba(0,0,0,0.6);
        color: var(--text-light);
    }

.dfend-grid-search-icon {
    position: absolute;
    left: 12px;
    font-size: 17px !important;
    color: var(--text-title) !important;
    opacity: 0.85;
    pointer-events: none;
}

.dfend-grid-search-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--text-title);
}

    .dfend-grid-search-input::placeholder {
        color: var(--text-title);
    }

    /* SIEM STATUS BAR */
.siem-status-bar {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--bg) 78%, #2a0d12 140%);
    border: 2px solid var(--bg-alt);
    border-radius: 16px;
    gap: 14px !important;
    transform: translateX(12px);
    min-width: 610px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    backdrop-filter: blur(4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.45), inset 0 0 20px rgba(153,0,0,0.05);
}

.siem-status-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: 0.6px;
    white-space: nowrap;
    text-shadow: 0 0 6px rgba(0,255,204,0.18);
}

.siem-status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.28rem;
    white-space: nowrap;
}

.siem-divider {
    width: 1px;
    height: 30px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.25), transparent);
    opacity: 0.4;
}

.siem-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    background: #444;
    position: relative;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.6), 0 0 8px rgba(0,0,0,0.35);
    transition: 0.25s ease;
}

.siem-ok {
    background: linear-gradient(145deg, #27d75b, #16b145);
    box-shadow: inset 0 0 6px rgba(0,0,0,0.7), 0 0 8px rgba(0,255,120,0.35);
}

.siem-bad {
    background: linear-gradient(145deg, #ff4d4d, #c92828);
    box-shadow: inset 0 0 7px rgba(0,0,0,0.7), 0 0 10px rgba(255,90,90,0.4);
}

.siem-warn {
    background: linear-gradient(145deg, #ffce4e, #c79a19);
    box-shadow: inset 0 0 7px rgba(0,0,0,0.65), 0 0 10px rgba(255,200,60,0.35);
}

.siem-label {
    color: var(--text-light);
    font-size: 1.28rem;
    font-weight: 700;
    opacity: 0.95;
}

.siem-total-num {
    font-size: 1.32rem;
    font-weight: 800;
    color: var(--accent-main);
    letter-spacing: 0.4px;
}

.siem-icon-neutral {
    font-size: 1.35rem;
    opacity: 0.85;
    color: var(--accent-main);
}

@media (max-width: 1400px) {
    .siem-status-bar {
        min-width: 100%;
        padding: 14px 22px;
        gap: 26px !important;
    }
}

@media (max-width: 992px) {
    .siem-divider {
        display: none;
    }

    .siem-status-bar {
        gap: 18px !important;
        padding: 14px;
    }
}

@media (max-width: 576px) {
    .siem-status-bar {
        border-radius: 12px;
        padding: 12px 14px;
        gap: 14px !important;
    }

    .siem-status-title {
        font-size: 1.05rem;
    }

    .siem-total-num {
        font-size: 1.1rem;
    }
}

.badge-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    white-space: normal !important;
    justify-content: center;
    max-width: 100%;
}

.badge-grid {
    border-radius: 6px;
    color: var(--text-primary);
    padding: 2px 8px;
    font-weight: 500;
    font-size: 0.72rem;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
    text-wrap: balance;
    display: inline-flex;
    align-items: center;
}

.badge-success {
    background-color: var(--color-success-soft);
    border: 1px solid var(--color-success-border);
} 

.badge-warning {
    background-color: var(--color-warning-soft);
    border: 1px solid var(--color-warning-border);
}

.badge-danger {
    background-color: var(--color-danger-soft);
    border: 1px solid var(--color-danger-border);
}

.badge-pending {
    background-color: var(--color-info-soft);
    border: 1px solid var(--color-info-border);
}

    #openPorts .badge,
    #detectedServices .badge {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 50px;
        padding: 6px 10px;
        text-align: center;
        font-size: 0.8rem;
        border-radius: 8px;
    }

    #openPorts .badge:hover,
    #detectedServices .badge:hover {
        filter: brightness(1.25);
        transform: translateY(-1px);
    }

.form-check-input:checked {
    background-color: var(--accent-main);
    border-color: var(--accent-main);
}

/* OS ICON */
.os-icon {
    margin-right: 3px;
    transition: color 0.2s ease, text-shadow 0.2s ease;
    opacity: 0.95;
}

.os-win {
    color: #0078B8;
}

.os-linux {
    color: #C49F1D;
}

.os-mac, .os-ios {
    color: #8E8E8E;
}

.os-android {
    color: #2FA866;
}

.os-unknown {
    color: #666;
}

#map {
    width: 100%;
    height: 480px;
    border-radius: 12px;
    background-color: #111315;
}

.severity-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 7px;
    margin-bottom: 4px;
    vertical-align: middle;
    border: 1px solid rgba(255, 255, 255, 0.050);
}
/*Nascondo Logout e Tema */
@media (max-width: 767px) {
    #themebtn {
        display: none !important;
    }
    #logoutbtn {
        display: none !important;
    }
}




/*SWEET ALERT FINDINGS*/
.violation-section {
    margin-bottom: 18px;
}

.violation-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    color: #f8f9fa;
    user-select: none;
    padding: 4px 0;
}

.violation-arrow {
    font-size: 14px;
    color: #9aa0a6;
    transition: transform .25s ease;
}

.violation-section.open .violation-arrow {
    transform: rotate(90deg);
}

.violation-content {
    display: none;
    margin-left: 32px;
    margin-top: 6px;
    line-height: 1.45rem;
}

.violation-section.open .violation-content {
    display: block;
}

.cvss-block {
    margin-bottom: 14px;
}

.cvss-vector {
    font-size: 0.85rem;
    opacity: 0.9;
}

.violation-checkbox {
    cursor: pointer;
    margin-right: 8px;
}

.violation-headerFinding {
    margin-bottom: 18px;
}

/* CERCA VULNERABILITY SWEET ALERT */
.dfend-search-swal {
    background: linear-gradient(135deg, #0e1012 60%, #12181d 140%);
    border: 1.5px solid #39c6e155;
    border-radius: 16px;
    padding: 20px 26px 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(57, 198, 225, 0.06), 0 0 18px rgba(57, 198, 225, 0.08);
    overflow: hidden;
}

.dfend-search-swal-html {
    margin: 0;
    padding: 0;
}

.dfend-search-modal {
    color: #d9e7ee;
    text-align: left;
}

.dfend-search-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.95rem;
    margin-bottom: 1.1rem;
    text-align: center;
}

.dfend-search-hero-title {
    font-size: 1.95rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #f3f8fb;
    text-shadow: 0 0 10px rgba(57, 198, 225, 0.08);
}

.dfend-search-hero-subtitle {
    font-size: 0.94rem;
    color: #92a8b3;
}

.dfend-search-panel {
    background: linear-gradient(135deg, rgba(14, 16, 18, 0.76) 60%, rgba(18, 24, 29, 0.9) 140%);
    border: 1px solid rgba(57, 198, 225, 0.12);
    border-radius: 14px;
    padding: 1rem 1rem 1.1rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.dfend-search-section + .dfend-search-section {
    margin-top: 1.05rem;
}

.dfend-search-label {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: #8ea7b2;
}

.dfend-search-type-switch {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.dfend-radio-card {
    position: relative;
    min-width: 145px;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.78rem 0.95rem;
    border-radius: 12px;
    border: 1px solid rgba(57, 198, 225, 0.16);
    background: linear-gradient(135deg, rgba(14, 16, 18, 0.92) 60%, rgba(18, 24, 29, 0.96) 140%);
    color: #d7e8ef;
    cursor: pointer;
    transition: all 0.22s ease;
    user-select: none;
}

    .dfend-radio-card input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .dfend-radio-card .material-icons-outlined {
        font-size: 1.1rem;
        color: #39c6e1;
    }

    .dfend-radio-card:hover {
        border-color: rgba(57, 198, 225, 0.34);
        box-shadow: 0 8px 16px rgba(0,0,0,0.22);
        transform: translateY(-1px);
    }

    .dfend-radio-card.active {
        border-color: rgba(57, 198, 225, 0.52);
        background: linear-gradient(135deg, rgba(17, 26, 31, 0.98) 60%, rgba(22, 35, 41, 1) 140%);
        box-shadow: 0 0 0 1px rgba(57, 198, 225, 0.05), 0 0 16px rgba(57, 198, 225, 0.09);
    }

.dfend-search-inline-group {
    align-items: stretch;
}

    .dfend-search-inline-group .form-control {
        border-right: 0;
        box-shadow: none;
    }

        .dfend-search-inline-group .form-control:focus {
            box-shadow: none;
            border-color: rgba(57, 198, 225, 0.22);
        }

.dfend-search-submit-btn {
    min-width: 118px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

    .dfend-search-submit-btn .material-icons-outlined {
        font-size: 1.05rem;
        line-height: 1;
    }

.dfend-results-wrapper {
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(57, 198, 225, 0.1);
}

.dfend-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.dfend-results-title {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 1rem;
    font-weight: 700;
    color: #edf6fb;
}

.dfend-results-title .material-icons-outlined {
    color: #39c6e1;
    font-size: 1.1rem;
}

.dfend-results-counter {
    padding: 0.28rem 0.68rem;
    border-radius: 999px;
    font-size: 0.77rem;
    font-weight: 700;
    color: #a7dcea;
    background: rgba(57, 198, 225, 0.08);
    border: 1px solid rgba(57, 198, 225, 0.14);
}

.dfend-results-list {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.dfend-results-stack {
    display: flex;
    flex-direction: column;
    gap: 0.68rem;
}

.dfend-result-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.95rem 1rem;
    border-radius: 13px;
    border: 1px solid rgba(57, 198, 225, 0.14);
    background: linear-gradient(135deg, rgba(14, 16, 18, 0.9) 60%, rgba(18, 24, 29, 0.97) 140%);
    cursor: pointer;
    transition: all 0.22s ease;
}

    .dfend-result-item:hover {
        border-color: rgba(57, 198, 225, 0.28);
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2), 0 0 10px rgba(57, 198, 225, 0.05);
    }

    .dfend-result-item.selected {
        border-color: rgba(57, 198, 225, 0.48);
        background: linear-gradient(135deg, rgba(17, 26, 31, 0.98) 60%, rgba(22, 35, 41, 1) 140%);
        box-shadow: 0 0 0 1px rgba(57, 198, 225, 0.05), 0 0 16px rgba(57, 198, 225, 0.09);
    }

.dfend-result-icon,
.dfend-result-check {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dfend-result-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: rgba(57, 198, 225, 0.07);
    border: 1px solid rgba(57, 198, 225, 0.14);
}

    .dfend-result-icon .material-icons-outlined {
        font-size: 1.08rem;
        color: #39c6e1;
    }

.dfend-result-check .material-icons-outlined {
    font-size: 1.18rem;
    color: #728b96;
    transition: color 0.2s ease;
}

.dfend-result-item.selected .dfend-result-check .material-icons-outlined {
    color: #39c6e1;
}

.dfend-result-body {
    flex: 1 1 auto;
    min-width: 0;
}

.dfend-result-title {
    font-size: 0.94rem;
    font-weight: 800;
    color: #f3f8fb;
    margin-bottom: 0.16rem;
}

.dfend-result-subtitle {
    font-size: 0.92rem;
    color: #c6d8e1;
    line-height: 1.45;
    word-break: break-word;
}

.dfend-empty-results {
    padding: 2rem 1rem;
    text-align: center;
    border: 1px dashed rgba(57, 198, 225, 0.18);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(14, 16, 18, 0.84) 60%, rgba(18, 24, 29, 0.92) 140%);
}

    .dfend-empty-results .material-icons-outlined {
        font-size: 2rem;
        color: #6f95a3;
        margin-bottom: 0.35rem;
    }

.dfend-empty-results-title {
    font-size: 1rem;
    font-weight: 700;
    color: #e8f2f7;
}

.dfend-empty-results-text {
    margin-top: 0.25rem;
    font-size: 0.9rem;
    color: #90a7b2;
}

.campaigns-overall-page {
    color: var(--text-primary);
}

.primary-action-btn,
.secondary-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: none;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.primary-action-btn {
    min-height: 36px;
    padding: 0 17px;
    border: 1px solid var(--color-primary-border);
    background: var(--color-primary-softer);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 780;
    letter-spacing: -0.010em;
}

    .primary-action-btn:hover {
        background: var(--color-primary-soft);
        border-color: var(--color-primary-border);
        color: var(--text-title);
        text-decoration: none;
    }

    .primary-action-btn:active {
        transform: translateY(0);
        background: var(--bg-active);
    }

    .primary-action-btn:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px var(--color-primary-soft);
    }

    .primary-action-btn .material-icons-outlined,
    .primary-action-btn .material-icons-round {
        font-size: 17px;
        line-height: 1;
        color: var(--color-primary);
    }

    .primary-action-btn:hover .material-icons-outlined,
    .primary-action-btn:hover .material-icons-round {
        color: var(--color-primary-hover);
    }

.secondary-action-btn {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid var(--border-default);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.77rem;
    font-weight: 740;
    letter-spacing: -0.004em;
}

    .secondary-action-btn:hover {
        background: var(--bg-hover);
        border-color: var(--border-strong);
        color: var(--text-primary);
        text-decoration: none;
    }

    .secondary-action-btn:active {
        background: var(--bg-active);
    }

    .secondary-action-btn:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px var(--color-primary-soft);
    }

    .secondary-action-btn .material-icons-outlined {
        font-size: 16px;
        color: var(--text-muted);
    }

    .secondary-action-btn:hover .material-icons-outlined {
        color: var(--text-primary);
    }


/* FILTER */
.period-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.period-filter-tabs {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    box-shadow: none;
}

.period-filter-tab {
    appearance: none;
    border: 0;
    min-height: 29px;
    padding: 0 15px;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 760;
    letter-spacing: -0.004em;
    transition: background 0.14s ease, color 0.14s ease;
}

    .period-filter-tab:hover {
        background: var(--bg-hover);
        color: var(--text-primary);
    }

    .period-filter-tab.active {
        background: var(--color-primary-soft);
        color: var(--color-primary);
        box-shadow: none;
    }


/* SUMMARY CARD */
.summary-card-body {
    position: relative;
    z-index: 1;
    padding: 0 12px;
}

.summary-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.summary-card-title {
    margin: 0;
    font-weight: 720;
    color: var(--text-primary);
    font-size: 1.08rem;
    line-height: 1.16;
    letter-spacing: -0.018em;
}

.summary-card-subtitle {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 540;
    letter-spacing: -0.004em;
}

.summary-progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
}

.summary-progress {
    position: relative;
    width: 100%;
    height: 5px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--bg-active);
    box-shadow: none;
}

.summary-progress-bar {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: var(--color-primary);
    box-shadow: none;
    transition: width 0.32s ease;
}

.summary-progress-value {
    min-width: 38px;
    text-align: right;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1;
    letter-spacing: -0.018em;
    text-shadow: none;
}

.summary-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    margin-top: 24px;
    max-width: calc(100% - 125px);
}

.summary-metric-card {
    min-width: 0;
    min-height: 44px;
    padding: 8px 11px 7px;
    border-radius: 7px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    box-shadow: none;
}

.summary-metric-label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 0.58rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.095em;
    font-weight: 760;
}

.summary-metric-value {
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1;
    letter-spacing: -0.022em;
}

.decorative-card-icon {
    display: block;
    position: absolute;
    right: 23px;
    bottom: -1px;
    transform: none;
    font-size: 142px;
    line-height: 1;
    color: var(--bg-hover);
    pointer-events: none;
    user-select: none;
}


/* SCORE CHART */
.score-ring {
    position: relative;
    flex: 1;
    min-height: 116px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .score-ring canvas {
        max-width: 138px;
        max-height: 138px;
    }

.score-description {
    margin: 3px auto 0;
    max-width: 270px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.36;
    font-weight: 540;
}


/* STATUS PILLS */
.status-pill-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transform: translateY(2px);
    margin-left: 3px;
}

.count-pill,
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 12px;
    border-radius: 6px;
    line-height: 1;
    box-sizing: border-box;
    font-size: 0.60rem;
    font-weight: 790;
    text-transform: uppercase;
    letter-spacing: 0.035em;
    border: 1px solid var(--border-default);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    box-shadow: none;
}

    .status-pill.active {
        color: var(--color-primary);
        border-color: var(--color-primary-border);
        background: var(--color-primary-soft);
        box-shadow: none;
    }

/* TABULATOR CELL COMPONENTS */
.table-type-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid var(--border-default);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    box-shadow: none;
}

    .table-type-icon .material-icons-outlined {
        font-size: 15px;
    }

.table-title-main {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
    font-weight: 760;
    letter-spacing: -0.008em;
}

.table-title-sub {
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 500;
}

.table-progress-wrap {
    width: 135px;
    max-width: 100%;
}

.table-progress-label {
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-size: 0.66rem;
    font-weight: 820;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.table-progress {
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: var(--bg-active);
    overflow: hidden;
}

    .table-progress span {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: var(--color-primary);
        box-shadow: none;
    }

.table-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 52px);
    column-gap: 18px;
    align-items: center;
    justify-content: flex-start;
    width: max-content;
    max-width: 100%;
}

.table-stat-item {
    min-width: 0;
}

    .table-stat-item strong {
        display: block;
        color: var(--text-primary);
        font-size: 0.78rem;
        font-weight: 780;
        line-height: 1;
    }

    .table-stat-item span {
        display: block;
        margin-top: 3px;
        color: var(--text-secondary);
        font-size: 0.56rem;
        line-height: 1;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        font-weight: 650;
    }

/* ROW ACTION MENU */
.row-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 26px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid var(--border-default);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 0.70rem;
    font-weight: 740;
    letter-spacing: -0.006em;
    box-shadow: none;
    cursor: pointer;
}

    .row-action-btn:hover,
    .row-action-btn.active {
        color: var(--text-primary);
        background: var(--color-primary-soft);
        border-color: var(--color-primary-border);
        box-shadow: none;
    }

    .row-action-btn .material-icons-outlined, .row-action-btn .fas {
        font-size: 14px;
        line-height: 1;
        color: var(--color-primary);
        transition: color 0.16s ease;
    }

    .row-action-btn:hover .material-icons-outlined,
    .row-action-btn.active .material-icons-outlined {
        color: var(--color-primary-hover);
    }

.floating-action-menu {
    position: fixed;
    z-index: 999999;
    width: 188px;
    padding: 10px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-lg);
}

.floating-action-item {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 540;
    letter-spacing: -0.008em;
    text-align: left;
    cursor: pointer;
}

    .floating-action-item:hover {
        color: var(--text-primary);
        background: var(--bg-hover);
        border-color: var(--border-subtle);
        box-shadow: none;
        text-decoration: none;
    }

    .floating-action-item .material-icons-outlined {
        width: 22px;
        min-width: 22px;
        font-size: 1.08rem;
        color: var(--color-primary);
        transition: color 0.16s ease;
    }

    .floating-action-item:hover .material-icons-outlined {
        color: var(--color-primary-hover);
    }

    .floating-action-item.danger {
        color: var(--text-secondary);
    }

        .floating-action-item.danger .material-icons-outlined {
            color: var(--color-danger);
        }

        .floating-action-item.danger:hover {
            color: var(--color-danger);
            background: var(--color-danger-soft);
            border-color: var(--color-danger-border);
        }

            .floating-action-item.danger:hover .material-icons-outlined {
                color: var(--color-danger-hover);
            }

.floating-action-divider {
    width: calc(100% - 12px);
    height: 1px;
    margin: 8px auto;
    background: var(--border-default);
}

/* TEMPLATE CARDS */
.template-section {
    margin-top: 20px;
}

.template-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.template-title {
    margin: 0;
    font-weight: 710;
    color: var(--text-primary);
    font-size: 1.08rem;
    line-height: 1.16;
    letter-spacing: -0.018em;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.template-card {
    position: relative;
    min-height: 104px;
    padding: 13px 14px;
    border-radius: 9px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    overflow: hidden;
    box-shadow: none;
    transition: border-color 0.16s ease, background 0.16s ease;
}

    .template-card:hover {
        background: var(--bg-hover);
        border-color: var(--border-strong);
    }

.template-card-top {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 10px;
    min-width: 0;
}

.template-thumb,
.template-fallback-icon {
    width: 31px;
    height: 31px;
    border-radius: 7px;
    flex: 0 0 auto;
    border: 1px solid var(--border-default);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    box-shadow: none;
}

.template-thumb {
    object-fit: cover;
}

.template-fallback-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .template-fallback-icon .material-icons-outlined {
        font-size: 17px;
    }

.template-card.phishing .template-fallback-icon {
    color: var(--color-primary);
    border-color: var(--color-primary-border);
    background: var(--color-primary-soft);
}

.template-card.policy .template-fallback-icon {
    color: var(--text-secondary);
    border-color: var(--border-default);
    background: var(--bg-elevated);
}

.template-card.warning .template-fallback-icon {
    color: var(--color-warning);
    border-color: var(--color-warning-border);
    background: var(--color-warning-soft);
}

.template-name {
    margin: 0;
    color: var(--text-title);
    font-size: 0.84rem;
    line-height: 1.24;
    font-weight: 790;
    letter-spacing: -0.014em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-bottom: 1px;
    min-width: 0;
}

.template-subject {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.34;
    font-weight: 530;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@@media (max-width: 1199.98px) {
    .template-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@@media (max-width: 767.98px) {
    .period-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .primary-action-btn,
    .secondary-action-btn {
        width: 100%;
    }

    .period-filter-tabs {
        width: 100%;
        overflow-x: auto;
    }

    .period-filter-tab {
        flex: 0 0 auto;
    }

    .summary-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 100%;
    }

    .template-grid {
        grid-template-columns: 1fr;
    }
}

/* TABULATOR FLOATING MENU */
.tabulator-menu {
    z-index: 999999 !important;
    width: 188px !important;
    min-width: 188px !important;
    padding: 9px !important;
    border-radius: 10px !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-default) !important;
    box-shadow: var(--shadow-lg) !important;
    overflow: hidden !important;
}

    .tabulator-menu .tabulator-menu-item {
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        background: transparent !important;
        color: inherit !important;
    }

        .tabulator-menu .tabulator-menu-item:hover {
            background: transparent !important;
        }

    .tabulator-menu .tabulator-context-action {
        width: 100%;
        min-height: 38px;
        margin: 0;
    }

    .tabulator-menu .tabulator-menu-item + .tabulator-menu-item {
        margin-top: 2px !important;
    }

    .tabulator-menu .tabulator-menu-item-disabled {
        opacity: 0.42 !important;
        cursor: not-allowed !important;
    }

        .tabulator-menu .tabulator-menu-item-disabled .floating-action-item {
            pointer-events: none;
            cursor: not-allowed;
        }

    .tabulator-menu .tabulator-menu-separator {
        width: calc(100% - 12px) !important;
        height: 1px !important;
        margin: 8px auto !important;
        background: var(--border-default) !important;
    }


.card.recognition-card-earned {
    border-color: color-mix(in srgb, var(--color-primary) 48%, var(--border-default));
}

.card.recognition-card-locked {
    border-color: color-mix(in srgb, var(--border-default) 78%, transparent);
    background: color-mix(in srgb, var(--bg-card) 92%, #000 8%);
}


/* TITLE Da usare insieme a .summary-metric-label */
.recognition-title {
    max-width: 170px;
    color: var(--text-primary);
    letter-spacing: .13em;
    line-height: 1.25;
}

.recognition-title-center {
    max-width: 132px;
    margin: 0 auto;
    text-align: center;
}

.card.recognition-card-locked .recognition-title {
    color: color-mix(in srgb, var(--text-secondary) 82%, transparent);
}


/* LOCKED TEXT STATE */
.card.recognition-card-locked .summary-metric-label,
.card.recognition-card-locked .summary-card-subtitle {
    color: color-mix(in srgb, var(--text-muted) 86%, transparent);
}

.card.recognition-card-locked .recognition-description {
    color: color-mix(in srgb, var(--text-secondary) 82%, transparent);
}


/* CORNER ICON */
.recognition-corner-icon {
    color: var(--color-primary);
    font-size: 20px;
    opacity: 0.9;
}

.card.recognition-card-locked .recognition-corner-icon {
    color: var(--text-muted);
    opacity: 0.56;
}

/* DESCRIPTION Da usare insieme a .summary-card-subtitle */
.recognition-description {
    line-height: 1.45;
    min-height: 42px;
}

.recognition-preview {
    min-height: 98px;
    padding: 2px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
}


/* EMPTY STATE */
.recognition-empty-state {
    padding: 8px 0 2px;
}

/* STEP */
.summary-step-labels {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-top: 13px;
}

.summary-step-label {
    color: var(--text-secondary);
    font-size: .82rem;
    font-weight: 760;
    line-height: 1.2;
    letter-spacing: -.004em;
    white-space: nowrap;
}

    .summary-step-label.active {
        color: var(--text-primary);
    }

    .summary-step-label.completed {
        color: var(--color-primary);
    }

.summary-step-content {
    min-height: 218px;
}

/* FORM */
.summary-form .form-control,
.summary-form .form-select {
    min-height: 34px;
    border-radius: 7px;
    border: 1px solid var(--border-default);
    background-color: var(--bg-elevated);
    color: var(--text-primary);
    font-size: .78rem;
    font-weight: 540;
    box-shadow: none;
}

    .summary-form .form-control::placeholder {
        color: var(--text-muted);
        opacity: 1;
    }

    .summary-form .form-control:focus,
    .summary-form .form-select:focus {
        border-color: var(--color-primary-border);
        background-color: var(--bg-card);
        color: var(--text-primary);
        box-shadow: none;
        outline: none;
    }


/* SELECT */
.summary-form .form-select {
    cursor: pointer;
    padding-top: .375rem;
    padding-bottom: .375rem;
}

    .summary-form .form-select option {
        background-color: var(--bg-elevated);
        color: var(--text-primary);
    }


/* DATETIME */
.summary-form input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    cursor: pointer;
}


/* READONLY */
.summary-form .form-control[readonly] {
    border-color: var(--border-default);
    background-color: var(--bg-elevated);
    color: var(--text-secondary);
    opacity: 1;
    cursor: default;
    box-shadow: none;
}

    .summary-form .form-control[readonly]:focus {
        background-color: var(--bg-inset);
        border-color: var(--border-default);
        color: var(--text-secondary);
        box-shadow: none;
        outline: none;
    }


/* SELECT DISABLED */
.summary-form .form-select:disabled {
    background-color: var(--bg-inset);
    border-color: var(--border-default);
    color: var(--text-secondary);
    opacity: 1;
    cursor: default;
    box-shadow: none;
}

    .summary-form .form-select:disabled:focus {
        background-color: var(--bg-inset);
        border-color: var(--border-default);
        color: var(--text-secondary);
        box-shadow: none;
        outline: none;
    }


.alert-danger,
.alert-success {
    border-radius: 8px;
    font-size: .76rem;
    font-weight: 560;
    line-height: 1.35;
    box-shadow: none;
    width: fit-content;
    max-width: 100%;
}

.alert-danger {
    background: var(--color-danger-soft);
    border: 1px solid var(--color-danger-border);
    color: var(--text-secondary);
}

    .alert-danger i {
        color: var(--color-danger) !important;
        font-size: .9rem;
        flex-shrink: 0;
    }

.alert-success {
    background: var(--color-success-soft);
    border: 1px solid var(--color-success-border);
    color: var(--text-secondary);
}

    .alert-success i {
        color: var(--color-success) !important;
        font-size: .9rem;
        flex-shrink: 0;
    }

/* CARD STEP 1 */
.summary-type-card {
    width: 100%;
    min-height: 104px;
    padding: 22px 14px;
    border-radius: 9px;
    border: 1px solid var(--border-default);
    background: var(--bg-card);
    color: var(--text-secondary);
    box-shadow: none;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, color .16s ease;
}

    .summary-type-card:hover {
        background: var(--bg-hover);
        border-color: var(--border-strong);
        color: var(--text-primary);
    }

    .summary-type-card.active {
        color: var(--text-primary);
        border-color: var(--color-primary-border);
        background: var(--color-primary-softer);
    }

    .summary-type-card .material-icons-outlined,
    .summary-type-card i {
        color: var(--color-primary);
        font-size: 32px;
        line-height: 1;
    }

/* TABELLA */
.summary-type-label {
    color: currentColor;
    font-size: .82rem;
    font-weight: 800;
    line-height: 1;
}

.summary-table-shell {
    border: 1px solid var(--border-default);
    border-radius: 9px;
    background: var(--bg-card);
    overflow: hidden;
}

    .summary-table-shell .table-responsive {
        max-height: 400px;
        overflow-y: auto;
    }

.summary-table-shell-sm .table-responsive {
    max-height: 300px;
}

.summary-table {
    margin: 0;
    border-color: var(--border-default);
    --bs-table-bg: var(--bg-card);
    --bs-table-color: var(--text-primary);
    --bs-table-border-color: var(--border-subtle);
    --bs-table-hover-bg: var(--bg-hover);
    --bs-table-hover-color: var(--text-primary);
    --bs-table-striped-bg: var(--bg-elevated);
    --bs-table-striped-color: var(--text-primary);
}

    .summary-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--bg-elevated);
        color: var(--text-primary);
        border-bottom: 1px solid var(--border-default);
        font-size: .74rem;
        font-weight: 790;
        letter-spacing: -.006em;
        white-space: nowrap;
        vertical-align: middle;
    }

    .summary-table tbody td {
        color: var(--text-primary);
        border-top: 1px solid var(--border-subtle);
        font-size: .78rem;
        font-weight: 540;
        vertical-align: middle;
    }

    .summary-table tbody tr:hover td {
        background: var(--bg-hover);
    }

.summary-form .form-check-input {
    width: 15px;
    height: 15px;
    margin-top: 0;
    border-radius: 4px;
    border: 1px solid var(--border-default);
    background-color: var(--bg-elevated);
    box-shadow: none;
}

    .summary-form .form-check-input:checked {
        border-color: var(--color-primary);
        background-color: var(--color-primary);
    }

    .summary-form .form-check-input:focus {
        box-shadow: none;
    }

.summary-nav-row {
    padding-top: 18px;
    border-top: 1px solid var(--border-default);
}

@media (max-width: 991.98px) {
    .summary-step-labels {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .summary-step-labels {
        grid-template-columns: 1fr;
    }
}

/* AWARENESS MODULI */
.awareness-overview-page {
    color: var(--text-primary);
}

/* CARD */
.awareness-course-card {
    position: relative;
    padding: 0;
    overflow: hidden;
    border-color: var(--border-default);
    background: var(--bg-card);
    transition: border-color .16s ease, background .16s ease;
}

    .awareness-course-card:hover {
        border-color: var(--border-strong);
    }

    /* QUIZ DISPONIBILE */
    .awareness-course-card.awareness-card-gotoquiz {
        border-color: var(--color-warning-border);
    }

    /* BLOCCATA */
    .awareness-course-card.awareness-course-card-locked {
        border-color: var(--border-subtle);
    }

        .awareness-course-card.awareness-course-card-locked .awareness-video-thumb img {
            opacity: .60;
        }

        .awareness-course-card.awareness-course-card-locked .awareness-course-body,
        .awareness-course-card.awareness-course-card-locked .awareness-course-footer {
            opacity: .76;
        }

/* THUMBNAIL */
.awareness-video-thumb {
    position: relative;
    height: 164px;
    min-height: 164px;
    overflow: hidden;
    background: var(--bg-inset);
    border-bottom: 1px solid var(--border-subtle);
}

    .awareness-video-thumb img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: .88;
        transition: opacity .18s ease;
    }

.awareness-course-card:hover .awareness-video-thumb img {
    opacity: .96;
}

.awareness-card-link::after {
    z-index: 1;
}

/*  BADGE MODULO */
.awareness-module-pill {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 4;
    gap: 5px;
    min-height: 23px;
    padding: 0 10px;
    font-size: .58rem;
    font-weight: 790;
    letter-spacing: .035em;
}

    .awareness-module-pill .material-icons-outlined {
        font-size: 14px;
        line-height: 1;
    }

/* STATUS FOOTER */
.awareness-status {
    gap: 6px;
    min-height: 24px;
    padding: 0 11px;
    text-transform: none;
    letter-spacing: -.004em;
    font-size: .66rem;
    font-weight: 760;
}

    .awareness-status .material-icons-outlined {
        font-size: 14px;
        line-height: 1;
    }


.awareness-badge-clickable,
.awareness-status-clickable {
    cursor: pointer;
}

/* COMPLETATO */
.awareness-state-completed {
    color: var(--color-success);
    border-color: var(--color-success-border);
    background: var(--bg-elevated);
}

/* IN CORSO */
.awareness-state-inprogress {
    color: var(--color-info);
    border-color: var(--color-info-border);
    background: var(--bg-elevated);
}

/* NON INIZIATO */
.awareness-state-notstarted {
    color: var(--text-muted);
    border-color: var(--border-default);
    background: var(--bg-elevated);
}

/* QUIZ */
.awareness-state-gotoquiz {
    color: var(--color-warning);
    border-color: var(--color-warning-border);
    background: var(--bg-elevated);
}

/* PLAY */
.awareness-thumb-action {
    position: absolute;
    right: 12px;
    bottom: 11px;
    z-index: 5;
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    text-decoration: none;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

    .awareness-thumb-action .material-icons-outlined {
        font-size: 19px;
        line-height: 1;
        color: currentColor;
    }

    .awareness-thumb-action:hover {
        text-decoration: none;
    }

    /* PLAY COMPLETATO */
    .awareness-thumb-action.awareness-action-completed {
        color: var(--color-success);
        border-color: var(--color-success-border);
        background: var(--bg-elevated);
    }

        .awareness-thumb-action.awareness-action-completed:hover {
            border-color: var(--color-success);
        }

    /* PLAY IN CORSO */
    .awareness-thumb-action.awareness-action-inprogress {
        color: var(--color-info);
        border-color: var(--color-info-border);
        background: var(--bg-elevated);
    }

        .awareness-thumb-action.awareness-action-inprogress:hover {
            border-color: var(--color-info);
        }

    /* PLAY NON INIZIATO */
    .awareness-thumb-action.awareness-action-notstarted {
        color: var(--text-secondary);
        border-color: var(--border-strong);
        background: var(--bg-elevated);
    }

        .awareness-thumb-action.awareness-action-notstarted:hover {
            border-color: var(--text-muted);
        }

    /* PLAY QUIZ */
    .awareness-thumb-action.awareness-action-gotoquiz {
        color: var(--color-warning);
        border-color: var(--color-warning-border);
        background: var(--bg-elevated);
    }

        .awareness-thumb-action.awareness-action-gotoquiz:hover {
            border-color: var(--color-warning);
        }

/* PROGRESS */
.awareness-video-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    width: 100%;
    height: 3px;
    margin: 0;
    border-radius: 0;
    background: var(--bg-active);
}

    .awareness-video-progress .summary-progress-bar {
        height: 100%;
        border-radius: 0;
        transition: width .32s ease;
    }


.awareness-progress-completed .summary-progress-bar {
    background: var(--color-success);
}

.awareness-progress-inprogress .summary-progress-bar {
    background: var(--color-info);
}

.awareness-progress-notstarted .summary-progress-bar {
    background: var(--text-muted);
}

.awareness-progress-gotoquiz .summary-progress-bar {
    background: var(--color-warning);
}

/* LIGHT MODE */
body.light .awareness-progress-completed .summary-progress-bar {
    background: #2ca96f;
}

body.light .awareness-progress-inprogress .summary-progress-bar {
    background: #3a8ca9;
}

body.light .awareness-progress-notstarted .summary-progress-bar {
    background: #8d9093;
}

body.light .awareness-progress-gotoquiz .summary-progress-bar {
    background: #d0a03a;
}

/* BODY */
.awareness-course-body {
    position: relative;
    z-index: 1;
    padding: 17px 20px 16px;
}

.awareness-course-title {
    margin-bottom: 7px;
    color: var(--text-title);
    font-size: 1rem;
    font-weight: 720;
    line-height: 1.28;
    letter-spacing: -.015em;
}

.awareness-course-description {
    margin: 0;
    color: var(--text-secondary);
    font-size: .79rem;
    font-weight: 540;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* FOOTER */
.awareness-course-footer {
    min-height: 53px;
    margin-top: auto;
    padding: 11px 20px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid var(--border-subtle);
}


.awareness-course-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: var(--text-secondary);
    font-size: .76rem;
    font-weight: 540;
    line-height: 1;
}

    .awareness-course-meta .material-icons-outlined {
        flex: 0 0 auto;
        color: var(--text-muted);
        font-size: 16px;
        line-height: 1;
    }


.awareness-course-footer-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
}

@media (max-width: 767.98px) {

    .awareness-video-thumb {
        height: 150px;
        min-height: 150px;
    }

    .awareness-course-body {
        padding: 16px;
    }

    .awareness-course-footer {
        min-height: auto;
        padding: 11px 16px 12px;
    }
}

/* VIDEO PLAYER AWARENESS */
.awareness-video-page {
    color: var(--text-primary);
}

/* PLAYER */
.awareness-player {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    background: var(--bg-inset);
    transition: border-color .16s ease, background .16s ease;
}


    .awareness-player:hover {
        border-color: var(--border-strong);
    }


.awareness-player-video {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    background: var(--bg-inset);
}


.awareness-player-frame {
    pointer-events: none;
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px var(--border-subtle);
}

/* CONTROLLI */
.awareness-player-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
}

/* BUTTON */
.awareness-player-button {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}


    .awareness-player-button:hover {
        border-color: var(--text-muted);
        background: var(--bg-active);
        color: var(--text-title);
    }


    .awareness-player-button:focus-visible {
        outline: 2px solid var(--color-info-border);
        outline-offset: 2px;
    }

/* PROGRESS */
.awareness-player-progress {
    position: relative;
    flex: 1 1 auto;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--bg-active);
    cursor: pointer;
}


.awareness-player-progress-bar {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: var(--color-info);
    transition: width .32s linear;
}


/* TEMPO */
.awareness-player-time {
    min-width: 80px;
    color: var(--text-secondary);
    font-size: .76rem;
    font-weight: 540;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

/* VOLUME */
.awareness-player-volume {
    width: 76px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* INFO VIDEO */
.awareness-video-info {
    padding: 18px 20px;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    background: var(--bg-card);
    transition: border-color .16s ease, background .16s ease;
}


    .awareness-video-info:hover {
        border-color: var(--border-strong);
    }

/* TITOLO VIDEO */
.awareness-video-title {
    margin: 0 0 7px;
    color: var(--text-title);
    font-size: 1rem;
    font-weight: 720;
    line-height: 1.28;
    letter-spacing: -.015em;
}

/* DESCRIZIONE VIDEO */
.awareness-video-description {
    margin: 0;
    color: var(--text-secondary);
    font-size: .79rem;
    font-weight: 540;
    line-height: 1.45;
}

/* RESPONSIVE */
@media (max-width: 767.98px) {

    .awareness-player-controls {
        gap: 8px;
        padding: 9px 10px;
    }


    .awareness-player-button {
        width: 32px;
        min-width: 32px;
        height: 32px;
        min-height: 32px;
    }


    .awareness-player-time {
        min-width: 72px;
        font-size: .70rem;
    }


    .awareness-player-volume {
        display: none;
    }


    .awareness-video-info {
        padding: 16px;
    }
}

/* KPI AWARENESS */
.recognition-kpi-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 13px;
    width: 100%;
    min-height: 80px;
    padding: 14px 18px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    box-shadow: none;
}

.recognition-kpi-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-default);
}

    .recognition-kpi-icon .material-icons-round {
        font-size: 19px;
        line-height: 1;
    }

.recognition-kpi-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.recognition-kpi-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.67rem;
    font-weight: 720;
    line-height: 1.1;
    letter-spacing: 0.015em;
}

.recognition-kpi-value {
    display: block;
    font-size: 1.48rem;
    font-weight: 760;
    line-height: 1;
    letter-spacing: -0.035em;
    font-variant-numeric: tabular-nums;
    margin-left: auto;
}

.recognition-kpi-success {
    color: var(--color-success);
    background: var(--color-success-soft);
    border-color: var(--color-success-border);
}

.recognition-kpi-info {
    color: var(--color-info);
    background: var(--color-info-soft);
    border-color: var(--color-info-border);
}

.recognition-kpi-warning {
    color: var(--color-warning);
    background: var(--color-warning-soft);
    border-color: var(--color-warning-border);
}

.recognition-kpi-success-text {
    color: var(--color-success);
}

.recognition-kpi-info-text {
    color: var(--color-info);
}

.recognition-kpi-warning-text {
    color: var(--color-warning);
}

.recognition-heading {
    min-height: 105px;
}

.recognition-heading-content {
    min-width: 0;
}

.recognition-state {
    min-height: 14px;
}

.recognition-title {
    min-height: 32px;
    display: flex;
    align-items: flex-start;
}

.recognition-date {
    min-height: 20px;
}

.recognition-badge-area {
    width: 100%;
    min-height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.recognition-badge-image {
    width: 210px;
    height: 210px;
    display: block;
    object-fit: contain;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
}

.card.recognition-card-earned {
    border-color: var(--border-default);
    box-shadow: none;
}

.card.recognition-card-locked .recognition-badge-image {
    opacity: .60;
}

.recognition-description {
    width: 100%;
    min-height: 72px;
    padding-left: 14px;
    padding-right: 14px;
    flex-shrink: 0;
}

.card.recognition-card-locked .recognition-description {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
}

.card.recognition-card-earned .recognition-description {
    text-align: left;
}

@@media (max-width: 575.98px) {

    .recognition-badge-area {
        min-height: 190px;
    }

    .recognition-badge-image {
        width: 190px;
        height: 190px;
    }
}