@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

@font-face {
    font-family: 'Material Symbols Rounded';
    font-style: normal;
    font-weight: 100 700;
    font-display: block;
    src: url('../fonts/material-symbols/material-symbols-rounded.woff2') format('woff2');
}

.material-symbols-rounded {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-feature-settings: 'liga';
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

    .material-symbols-rounded.icon-sm {
        font-size: 18px;
        font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 20;
    }

    .material-symbols-rounded.filled {
        font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    }

.nav-menu-icon {
    width: 2rem;
    min-width: 2rem;
    margin-right: 0.5rem;
    color: inherit;
    font-size: 22px;
    line-height: 1;
    vertical-align: middle;
    font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

.nav-menu-icon--toggle {
    width: auto;
    min-width: 0;
    margin-right: 0;
    font-size: 26px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

    .btn-icon.btn-sm {
        width: 2.1rem;
        height: 2.1rem;
        padding: 0;
    }

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #0366d6;
}
.headText {
    color: #fff;
    background-color: #525d6c;
    padding: 1em;
}

.btn-primary {
    color: #fff;
    background-color: #dd9933;
    border-color: #dd9933;
}

    .btn-primary:hover {
        color: #fff;
        background-color: #c7892c;
        border-color: #c7892c;
    }

    .btn-primary:active {
        color: #fff;
        background-color: #c7892c;
        border-color: #af7929;
    }

    .btn-primary:focus {
        box-shadow: 0 0 0 .2rem #ffc107;
    }

    .btn-primary:not(:disabled):not(.disabled).active, .btn-primary:not(:disabled):not(.disabled):active, .show > .btn-primary.dropdown-toggle {
        color: #fff;
        background-color: #c7892c;
        border-color: #af7929;
    }

    .btn-primary:not(:disabled):not(.disabled).active:focus, .btn-primary:not(:disabled):not(.disabled):active:focus, .show > .btn-primary.dropdown-toggle:focus {
        box-shadow: 0 0 0 .2rem #ffc107;
    }

.btn-primary-view {
    color: #fff;
    background-color: #0957C2;
    border-color: #0957C2;
}

    .btn-primary-view:hover {
        color: #fff;
        background-color: #06459b;
        border-color: #06459b;
    }

    .btn-primary-view:active {
        color: #fff;
        background-color: #06459b;
        border-color: #053e8b;
    }

    .btn-primary-view:focus {
        box-shadow: 0 0 0 .2rem #82afed;
    }

    .btn-primary-view:not(:disabled):not(.disabled).active, .btn-primary-view:not(:disabled):not(.disabled):active, .show > .btn-primary-view.dropdown-toggle {
        color: #fff;
        background-color: #06459b;
        border-color: #053e8b;
    }

        .btn-primary-view:not(:disabled):not(.disabled).active:focus, .btn-primary-view:not(:disabled):not(.disabled):active:focus, .show > .btn-primary-view.dropdown-toggle:focus {
            box-shadow: 0 0 0 .2rem #82afed;
        }

    .content {
        padding-top: 1.1rem;
    }

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }


.navbar-brand > img {
    width: 100%;
}

.circular-right {
    border-radius: 2em;
    position: absolute;
    right: 1em;
    top: 1em;
}

.mappageo {
    width: 100%;
    height: 250px;
}

.pulsantiera {
    position: absolute;
    top: 0;
    right: 0.5em;
    z-index: 9999;
    background-color: #ffffffb5;
    border-bottom-left-radius: .5em;
    padding: .5em;
    padding-right: 1em;
}

allegato {
    display: block;
    position: relative;
    padding: 0;
    border-radius: .5em;
    overflow: hidden;
    width: 200px;
    height: 150px;
    margin: 1em;
}

allegato img {
    height: 100%;
}

allegato tipo {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: #3b5e7bad;
    text-align: center;
    color: white;
}

allegato quando {
    display: block;
    position: absolute;
    bottom: 0;
    background-color: #ffffff9c;
    right: 0;
    padding: .2em;
}

    allegato .cancella {
        position: absolute;
        background-color: red;
        color: white;
        top: calc(100% - 2em);
        left: 0;
        cursor: pointer;
        width: 2em;
        height: 2em;
        padding-left: .5em;
        padding-top: .5em;
    }

.heading-row {
    padding-bottom: .5em;
    margin-bottom: 1em;
    border-bottom: 1px solid #dee2e6;
}

.heading-text {
    font-weight: bold;
}

.colnum {
    text-align: right !important;
}

.popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #0000005e;
    z-index: 9999;
}

    .popup > .lavagna {
        width: 90%;
        border-radius: 12px;
        background-color: white;
        min-width: 300px;
        max-height: 85%;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: auto;
        box-shadow:0px 0px 5px 0 #000000ab;
        position: fixed;
    }

        .popup > .lavagna > h1 {
            display: block;
            border-top-left-radius: 12px;
            border-top-right-radius: 12px;
            background-color: #212529;
            color: white;
            height: 20%;
            padding-top: 1em;
            padding-left: 1em;
        }

        .popup > .lavagna > form {
            border-bottom-left-radius: 12px;
            border-bottom-right-radius: 12px;
            padding: 1em;
            overflow-y: auto;
            height: 80%;
            background-color: white;
        }

.kato-widget {
    width: 18rem;
    display: inline-block;
    margin: 1em;
    box-shadow: 5px 5px 5px #80808029;
}

.insieme {
    flex-flow: nowrap;
}

.thumbnail-icon-doc {
    font-size: 62pt;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@media print {
    .no-print, .no-print * {
        display: none !important;
    }
}


/*-----------------------*/
.top-row {
    min-height: 3.75rem;
    height: 3.75rem;
    display: flex;
    align-items: center;
    z-index: 999;
}

.main {
    flex: 1;
}

    .main .top-row {
        justify-content: flex-end;
    }

        .main .top-row > a,
        .main .top-row .btn-link {
            white-space: nowrap;
            margin-left: 1.5rem;
        }

        .main .top-row a:first-child {
            overflow: hidden;
            text-overflow: ellipsis;
        }

.sidebar {
    z-index: 999;
    position: sticky;
    top: 0;
    background-color: rgb(8, 31, 63);
    /*box-shadow: 5px 0 5px #0000001c;*/
}

    .sidebar .top-row {
       /* background-color: rgb(239, 239, 239);*/
        background-color: #ffffff;
    }

    .sidebar .navbar-brand {
        font-size: 1.1rem;
        color: white;
    }

    .sidebar .oi {
        width: 2rem;
        font-size: 1.1rem;
        vertical-align: text-top;
        top: -2px;
    }

    .sidebar .nav-item {
        font-size: 0.9rem;
        padding-bottom: 0.5rem;
    }

        .sidebar .nav-item:first-of-type {
            padding-top: 1rem;
        }

        .sidebar .nav-item:last-of-type {
            padding-bottom: 1rem;
        }

        .sidebar .nav-item a {
            color: white;
            border-radius: 4px;
            height: 2.5rem;
            display: flex;
            align-items: center;
            line-height: 3rem;
        }

            .sidebar .nav-item a.active {
                background-color: white;
                color: rgb(8, 31, 63);
                border-radius: 5px;
            }

            .sidebar .nav-item a:hover {
                background-color: white;
                color: rgb(8, 31, 63);
                border-radius: 5px;
            }

/* =========================================
   NAVMENU TOP ROW
========================================= */

.navmenu-top-row {
    position: sticky;
    top: 0;
    padding: 0 1rem 0 1rem;
    background-color: rgb(239, 239, 239);
    border-bottom: 1px solid #ced4da;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navmenu-brand {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    min-width: 0;
    max-width: 180px;
}

.navmenu-logo {
    display: block;
    width: 100%;
    max-width: 150px;
    height: auto;
    object-fit: contain;
}

.navmenu-toggler-custom {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: none;
    border-radius: 0.85rem;
    background-color: rgb(8, 31, 63);
    color: #efefef;
    box-shadow: 0 4px 10px rgba(8, 31, 63, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

    .navmenu-toggler-custom:hover {
        background-color: #efefef;
        color: rgb(8, 31, 63);
        box-shadow: 0 6px 14px rgba(8, 31, 63, 0.24);
    }

    .navmenu-toggler-custom:focus {
        outline: none;
        box-shadow: 0 0 0 0.2rem rgba(8, 31, 63, 0.18);
    }

/* =========================================
   MAIN TOP ROW
========================================= */

.main-top-row {
    position: sticky;
    top: 50px;
    padding: 0 1rem 0 1rem;
    /*background-color: rgb(239, 239, 239);*/
    background-color: #ffffff;
    border-bottom: 1px solid #ced4da;
    /*box-shadow: 0 8px 20px rgba(8, 31, 63, 0.10);*/
}

.main-top-row-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    min-width: 0;
}

.main-top-row-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.main-top-row-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.main-top-user-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* =========================================
   DESKTOP / TABLET LARGE
========================================= */

@media (min-width: 992px) {
    .navmenu-top-row {
        min-height: 4rem;
        height: 4rem;
        padding: 0 1.25rem 0 1.25rem;
        /*box-shadow: 20px 6px 12px rgb(8 31 63 / 20%);*/
        justify-content: center;
    }

    .main-top-row {
        min-height: 4rem;
        height: 4rem;
        padding: 0 1.5rem 0 1.5rem;
        /*box-shadow: 20px 4px 12px rgb(8 31 63 / 20%);  */
    }

    .navmenu-brand {
        max-width: 190px;
    }

    .navmenu-logo {
        max-width: 165px;
    }
}

/* =========================================
   MOBILE / TABLET SMALL
========================================= */

@media (max-width: 991.98px) {
    .sidebar {
        box-shadow: none;
    }

    .navmenu-top-row,
    .main-top-row {
        min-height: 4rem;
        height: 4rem;
    }

    .navmenu-top-row {
        /*border-bottom: 1px solid #d9e0e7;*/
        border-bottom: 1px solid #ced4da;
        padding: 0 1.25rem 0 1.25rem;
    }

    .main-top-row {
        /*box-shadow: none;*/
        /*box-shadow: 20px 4px 12px rgb(8 31 63 / 20%);*/
    }

    .navmenu-brand {
        max-width: 150px;
    }

    .navmenu-logo {
        max-width: 132px;
    }

    .navmenu-toggler-custom {
        display: none;
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 0.5rem;
    }

    .main-top-row-inner {
        gap: 0.5rem;
    }

    .main-top-row-left,
    .main-top-row-right {
        gap: 0.5rem;
    }

    .main .top-row > a,
    .main .top-row .btn-link {
        margin-left: 0.75rem;
        font-size: 0.95rem;
    }

    .content.px-4 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

@media (max-width: 640px){
    .navmenu-toggler-custom {
        display: inline-flex;
        width: 2.35rem;
        height: 2.35rem;
        border-radius: 0.5rem;
    }
}

/* =========================================
   VERY SMALL DEVICES
========================================= */

@media (max-width: 575.98px) {
    .top-row,
    .navmenu-top-row,
    .main-top-row {
        min-height: 4rem;
        height: 4rem;
    }

    .navmenu-top-row,
    .main-top-row {
        padding: 0 0.75rem 0 0.75rem;
        box-shadow: none;
    }

    .navmenu-brand {
        max-width: 128px;
    }

    .navmenu-logo {
        max-width: 118px;
    }

    .navmenu-toggler-custom {
        display: inline-flex;
        width: 2.35rem;
        height: 2.35rem;
        border-radius: 0.5rem;
    }

    .main-top-row {
        top: 46.6px;
    }

    .main .top-row > a,
    .main .top-row .btn-link {
        margin-left: 0.5rem;
        font-size: 0.9rem;
    }

    .content.px-4 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .main-top-row-inner {
        justify-content: space-between;
        gap: 0.5rem;
    }
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgb(8 31 63 / 10%)
}

    .data-table th, .data-table td {
        padding: 1rem;
        /* text-align: center;*/
        border-bottom: 1px solid #dee2e6;
    }

    .data-table thead {
        background-color: #525d6c;
        color: white;
        font-weight: 500;
    }

    .data-table tbody tr:hover {
        background-color: #f1f3f5;
    }

.stylish-table {
    overflow-y: auto;
    border-bottom: 9px solid transparent;
    border-radius: 0.75rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

    /* Custom scrollbar */
    .stylish-table::-webkit-scrollbar {
        width: 6px;
    }

    .stylish-table::-webkit-scrollbar-track {
        background: #f1f5f9;
    }

    .stylish-table::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;
    }

        .stylish-table::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }

/* =========================================
   STATO MODAL - LIGHT MODERN UI
========================================= */

.popup--stati {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-color: rgba(3, 18, 33, 0.58);
}

    .popup--stati > .lavagna.stato-modal {
        position: relative;
        inset: auto;
        width: min(1120px, 96vw);
        max-height: 88vh;
        margin: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border-radius: 18px;
        border: 1px solid #d8e2ec;
        background-color: #ffffff;
        box-shadow: 0 12px 28px rgba(8, 31, 63, 0.16);
    }

.stato-modal__form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.stato-modal__header {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    border-top-right-radius: 12px;
    border-top-left-radius: 12px;
    background-color: #525d6c;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.stato-modal__title-area {
    min-width: 0;
}

.stato-modal__eyebrow {
    margin: 0 0 0.25rem 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #b9c7d8;
}

.stato-modal__header h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.25;
}

.stato-modal__subtitle {
    max-width: 680px;
    margin: 0.35rem 0 0 0;
    color: #d7e0ea;
    font-size: 0.95rem;
    line-height: 1.45;
}

.stato-modal__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    flex-shrink: 0;
}

.stato-btn {
    min-height: 2.55rem;
    padding: 0.55rem 1rem;
    border-radius: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.stato-btn--primary {
    background-color: #23845f;
    border-color: #23845f;
    color: #ffffff;
}

    .stato-btn--primary:hover,
    .stato-btn--primary:focus {
        background-color: #1d7352;
        border-color: #1d7352;
        color: #ffffff;
    }

.stato-btn--secondary {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.38);
    color: #ffffff;
}

    .stato-btn--secondary:hover,
    .stato-btn--secondary:focus {
        background-color: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.58);
        color: #ffffff;
    }

.stato-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    overflow-y: auto;
    padding: 1.25rem;
    border-radius: 0;
    /*border-bottom: 0;*/
    border-bottom-right-radius: 12px;
    border-bottom-left-radius: 12px;
    background-color: #f5f7fa;
    box-shadow: none;
}

.stato-validation {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid #f0c4c4;
    border-radius: 0.9rem;
    background-color: #fff6f6;
    color: #a33131;
}

.stato-section {
    margin-bottom: 1rem;
    padding: 1.15rem;
    border: 1px solid #dfe7f0;
    border-radius: 1rem;
    background-color: #ffffff;
}

.stato-section--last {
    margin-bottom: 0;
}

.stato-section__head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding-bottom: 0.95rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #edf1f5;
}

.stato-section__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    border-radius: 999px;
    background-color: #eef4fa;
    color: rgb(8, 31, 63);
    font-size: 0.78rem;
    font-weight: 800;
}

.stato-section__head h3 {
    margin: 0;
    color: #182536;
    font-size: 1rem;
    font-weight: 800;
}

.stato-section__head p {
    margin: 0.2rem 0 0 0;
    color: #667085;
    font-size: 0.9rem;
    line-height: 1.35;
}

.stato-grid {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

    .stato-grid > [class*="col-"] {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        margin-bottom: 1rem;
    }

        .stato-grid > [class*="col-"]:last-child {
            margin-bottom: 0;
        }

.stato-field {
    margin-bottom: 0;
}

.stato-label {
    display: block;
    margin-bottom: 0.4rem;
    color: #344054;
    font-size: 0.84rem;
    font-weight: 700;
}

.form-control.stato-input {
    min-height: 2.7rem;
    border: 1px solid #cfd8e3;
    border-radius: 0.75rem;
    /*background-color: #ffffff;*/
    color: #1f2937;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

    .form-control.stato-input:focus {
        border-color: rgb(8, 31, 63);
        /*background-color: #ffffff;*/
        box-shadow: none;
    }

.stato-select {
    cursor: pointer;
}

.stato-check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-height: 100%;
    margin: 0;
    padding: 0.9rem;
    border: 1px solid #dfe7f0;
    border-radius: 0.9rem;
    background-color: #fbfcfe;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

    .stato-check:hover {
        border-color: #b8c7d8;
        background-color: #f6f9fc;
    }

.stato-check--compact {
    min-height: 2.7rem;
}

.stato-check__input {
    width: 1.05rem;
    height: 1.05rem;
    margin-top: 0.15rem;
    flex: 0 0 auto;
    accent-color: rgb(8, 31, 63);
}

.stato-check__content {
    display: block;
    min-width: 0;
}

.stato-check__title {
    display: block;
    color: #243244;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.25;
}

.stato-check__hint {
    display: block;
    margin-top: 0.18rem;
    color: #667085;
    font-size: 0.82rem;
    line-height: 1.35;
}

/* StatiSelector */
.stati-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.stati-selector__item {
    position: relative;
    display: block;
    margin: 0;
    cursor: pointer;
}

.stati-selector__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.stati-selector__card {
    display: block;
    min-height: 100%;
    padding: 0.85rem 0.95rem;
    border: 1px solid #dfe7f0;
    border-radius: 0.9rem;
    background-color: #fbfcfe;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.stati-selector__item:hover .stati-selector__card {
    border-color: #b8c7d8;
    background-color: #f6f9fc;
}

.stati-selector__input:checked + .stati-selector__card {
    border-color: rgb(8, 31, 63);
    background-color: #eef4fa;
}

.stati-selector__input:focus-visible + .stati-selector__card {
    outline: 2px solid rgba(8, 31, 63, 0.28);
    outline-offset: 2px;
}

.stati-selector__main {
    display: block;
    color: #243244;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.25;
}

.stati-selector__sub {
    display: block;
    margin-top: 0.25rem;
    color: #667085;
    font-size: 0.8rem;
    line-height: 1.3;
}

/* Responsive */
@media (max-width: 767.98px) {
    .popup--stati {
        align-items: stretch;
        padding: 0.75rem;
    }

        .popup--stati > .lavagna.stato-modal {
            width: 100%;
            max-height: 94vh;
            border-radius: 1rem;
        }

    .stato-modal__header {
        flex-direction: column;
        padding: 1rem;
    }

    .stato-modal__actions {
        width: 100%;
    }

        .stato-modal__actions .stato-btn {
            flex: 1 1 0;
        }

    .stato-modal__body {
        padding: 1rem;
    }

    .stato-section {
        padding: 1rem;
    }

    .stati-selector {
        grid-template-columns: 1fr;
    }
}

.weblook{
    display: none !important;
}

.phonelook {
    display: flex !important;
}

/* =========================================
   UTENTE MODAL - EXTENSION
========================================= */

.popup--utenti > .utente-modal {
    width: min(1080px, 96vw);
}

.utente-modal .stato-section__head h3 {
    text-transform: none;
}

.utente-field-hint {
    display: block;
    margin-top: 0.35rem;
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.3;
}

.utenti-listini-selector {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

@media (max-width: 767.98px) {
    .popup--utenti > .utente-modal {
        width: 100%;
    }

    .utenti-listini-selector {
        grid-template-columns: 1fr;
    }
}

/*Alert Modal*/

.modal-overlay-alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content-alert {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    width: 35%;
    position: relative;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    border: 1px solid rgba(0, 0, 0, .2);
    outline: 0;
}

.modal-buttons-alert {
    margin-top: 20px;
}

.ok-btn {
    background-color: #1675b2;
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    width: 6vw;
    min-width: min-content;
}

    .ok-btn:hover {
        background-color: #0f4c73;
    }

/*Confirmation Modal*/

.modal-overlay-confirmation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content-confirmation {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    width: 35%;
    position: relative;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    border: 1px solid rgba(0, 0, 0, .2);
    outline: 0;
}

.modal-buttons-confirmation {
    margin-top: 20px;
}

.confirm-btn {
    background-color: #1675b2;
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
    margin-right: 10px;
    border-radius: 5px;
    width: 6vw;
    min-width: min-content;
}

    .confirm-btn:hover {
        background-color: #0f4c73
    }

.cancel-btn {
    background-color: gray;
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    width: 6vw;
    min-width: min-content;
}

    .cancel-btn:hover {
        background-color: #5a5959;
    }

@media (max-width: 768px) {

    .modal-content-alert {
        width: 80%;
    }

    .ok-btn {
        width: 30%;
    }

    .modal-content-confirmation {
        width: 80%;
    }

    .confirm-btn {
        width: 30%;
    }

    .cancel-btn {
        width: 30%;
    }
}

/* =========================================
   RUOLO MODAL - EXTENSION
========================================= */

.popup--ruoli > .ruolo-modal {
    width: min(680px, 96vw);
}

.ruolo-modal .stato-modal__body {
    min-height: auto;
}

.ruolo-modal .stato-section {
    margin-bottom: 0;
}

@media (max-width: 767.98px) {
    .popup--ruoli > .ruolo-modal {
        width: 100%;
    }
}

/* =========================================
   MODELLO MODAL - EXTENSION
========================================= */

.popup--modelli > .modello-modal {
    width: min(680px, 96vw);
}

.modello-modal .stato-modal__body {
    min-height: auto;
}

.modello-modal .stato-section {
    margin-bottom: 0;
}

.modello-field-hint {
    display: block;
    margin-top: 0.35rem;
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.3;
}

@media (max-width: 767.98px) {
    .popup--modelli > .modello-modal {
        width: 100%;
    }
}

/* =========================================
   TIPO ALLEGATO MODAL - EXTENSION
========================================= */

.popup--tipi-allegati > .tipo-allegato-modal {
    width: min(760px, 96vw);
}

.tipo-allegato-modal .stato-modal__body {
    min-height: auto;
}

.tipo-allegato-modal .stato-section {
    margin-bottom: 1rem;
}

.tipo-allegato-modal .stato-section--last {
    margin-bottom: 0;
}

.tipo-allegato-field-hint {
    display: block;
    margin-top: 0.35rem;
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.3;
}

@media (max-width: 767.98px) {
    .popup--tipi-allegati > .tipo-allegato-modal {
        width: 100%;
    }
}

/* =========================================
   LISTINO MODAL - EXTENSION
========================================= */

.popup--listini > .listino-modal {
    width: min(920px, 96vw);
}

.listino-modal .stato-modal__body {
    min-height: auto;
}

.listino-modal .stato-section {
    margin-bottom: 1rem;
}

.listino-modal .stato-section--last {
    margin-bottom: 0;
}

.listino-field-hint {
    display: block;
    margin-top: 0.35rem;
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.3;
}

@media (max-width: 767.98px) {
    .popup--listini > .listino-modal {
        width: 100%;
    }
}

/* =========================================
   SERVICE BULLETIN MODAL - EXTENSION
========================================= */

.popup--service-bulletins > .service-bulletin-modal {
    width: min(1040px, 96vw);
}

.service-bulletin-modal .stato-modal__body {
    min-height: auto;
}

.service-bulletin-modal .stato-section {
    margin-bottom: 1rem;
}

.service-bulletin-modal .stato-section--last {
    margin-bottom: 0;
}

.service-bulletin-field-hint {
    display: block;
    margin-top: 0.35rem;
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.3;
}

.service-bulletin-textarea {
    min-height: 10rem;
    resize: vertical;
}

@media (max-width: 767.98px) {
    .popup--service-bulletins > .service-bulletin-modal {
        width: 100%;
    }
}

/* =========================================
   MACCHINA MODAL - EXTENSION
========================================= */

.popup--macchine > .macchina-modal {
    width: min(960px, 96vw);
}

.macchina-modal .stato-modal__body {
    min-height: auto;
}

.macchina-modal .stato-section {
    margin-bottom: 1rem;
}

.macchina-modal .stato-section--last {
    margin-bottom: 0;
}

.macchina-field-hint {
    display: block;
    margin-top: 0.35rem;
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.3;
}

@media (max-width: 767.98px) {
    .popup--macchine > .macchina-modal {
        width: 100%;
    }
}

/* =========================================
   PROFILO MODAL - EXTENSION
========================================= */

.popup--profili > .profilo-modal {
    width: min(880px, 96vw);
}

.profilo-modal .stato-modal__body {
    min-height: auto;
}

.profilo-modal .stato-section {
    margin-bottom: 1rem;
}

.profilo-modal .stato-section--last {
    margin-bottom: 0;
}

.profilo-field-hint {
    display: block;
    margin-top: 0.35rem;
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.3;
}

@media (max-width: 767.98px) {
    .popup--profili > .profilo-modal {
        width: 100%;
    }
}

/* =========================================
   CLAIM MODAL - EXTENSION
========================================= */

.popup--claims {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-color: rgba(3, 18, 33, 0.58);
}

    .popup--claims > .claim-modal {
        position: relative;
        inset: auto;
        width: min(1180px, 96vw);
        max-height: 90vh;
        margin: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border-radius: 18px;
        border: 1px solid #d8e2ec;
        background-color: #ffffff;
        box-shadow: 0 12px 28px rgba(8, 31, 63, 0.16);
    }

.claim-modal__form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.claim-modal .stato-modal__body {
    min-height: 0;
}

.claim-modal .stato-section {
    margin-bottom: 1rem;
}

.claim-modal .stato-section--last {
    margin-bottom: 0;
}

.claim-field-hint {
    display: block;
    margin-top: 0.35rem;
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.3;
}

.claim-status-note {
    margin-top: 0.75rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0.75rem;
    background-color: rgba(255, 255, 255, 0.08);
    color: #e5eef8;
    font-size: 0.88rem;
    line-height: 1.35;
}

.claim-map-wrap {
    position: relative;
    border: 1px solid #dfe7f0;
    border-radius: 1rem;
    overflow: hidden;
    background-color: #ffffff;
}

.claim-map {
    width: 100%;
    height: 280px;
    margin-bottom: 0;
    border-radius: 0;
}

.claim-map-toolbar {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid #dfe7f0;
    border-radius: 0.75rem;
    background-color: rgba(255, 255, 255, 0.92);
    color: #243244;
    font-size: 0.82rem;
    z-index: 500;
}

.claim-textarea {
    min-height: 8rem;
    resize: vertical;
}

@media (max-width: 767.98px) {
    .popup--claims {
        align-items: stretch;
        padding: 0.75rem;
    }

        .popup--claims > .claim-modal {
            width: 100%;
            max-height: 94vh;
            border-radius: 1rem;
        }

    .claim-map {
        height: 220px;
    }

    .claim-map-toolbar {
        position: static;
        justify-content: space-between;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
    }
}

/* =========================================
   CLAIM HISTORY PAGE
========================================= */

.claim-history-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.claim-history-hero,
.claim-history-card,
.claim-history-section {
    border: 1px solid #d8e2ec;
    border-radius: 1rem;
    background-color: #ffffff;
}

.claim-history-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem;
    background: #525d6c;
    color: #ffffff;
}

.claim-history-hero__main {
    min-width: 0;
}

.claim-history-hero__eyebrow,
.claim-history-card__eyebrow,
.claim-history-section__title p {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.claim-history-hero__eyebrow {
    color: rgba(255, 255, 255, 0.72);
}

.claim-history-hero h2 {
    margin: 0.25rem 0 0.6rem;
    color: #ffffff;
    font-size: 1.65rem;
    font-weight: 700;
}

.claim-history-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.9rem;
}

.claim-history-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.claim-history-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.claim-history-badge--success {
    background-color: rgba(18, 183, 106, 0.18);
    color: #d1fadf;
    border: 1px solid rgba(18, 183, 106, 0.35);
}

.claim-history-badge--info {
    background-color: rgba(132, 202, 255, 0.18);
    color: #d1e9ff;
    border: 1px solid rgba(132, 202, 255, 0.35);
}

.claim-history-badge--muted {
    background-color: rgba(255, 255, 255, 0.12);
    color: #e5eef8;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.claim-history-hero__actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.6rem;
    min-width: max-content;
}

    .claim-history-hero__actions .stato-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
    }

.claim-history-card,
.claim-history-section {
    padding: 1rem;
}

.claim-history-card__header,
.claim-history-section__title {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

    .claim-history-card__eyebrow,
    .claim-history-section__title p {
        color: #1675b2;
    }

    .claim-history-card h3,
    .claim-history-section__title h3 {
        margin: 0.15rem 0 0;
        color: #243244;
        font-size: 1.05rem;
        font-weight: 700;
    }

.claim-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.75rem;
}

.claim-history-detail {
    min-width: 0;
    padding: 0.8rem;
    border: 1px solid #e5edf5;
    border-radius: 0.85rem;
    background-color: #fbfdff;
}

.claim-history-detail--full {
    margin-top: 0.85rem;
}

.claim-history-detail span,
.claim-history-text-panel span {
    display: block;
    margin-bottom: 0.25rem;
    color: #667085;
    font-size: 0.78rem;
    font-weight: 700;
}

.claim-history-detail strong {
    display: block;
    color: #243244;
    font-size: 0.95rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.claim-history-review {
    display: inline-block;
    margin-top: 0.35rem;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    background-color: #fff8db;
    color: #8a5d00;
    font-size: 0.75rem;
    font-weight: 700;
}

.claim-history-map-card {
    overflow: hidden;
}

.claim-history-map {
    width: 100%;
    height: 320px;
    border-radius: 0.9rem;
    border: 1px solid #dfe7f0;
    z-index: 2;
}

.claim-history-map-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
    color: #667085;
    font-size: 0.8rem;
}

.claim-history-empty {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1rem;
    border: 1px solid #ffe08a;
    border-radius: 0.9rem;
    background-color: #fff8db;
    color: #7a5b00;
}

    .claim-history-empty p {
        margin: 0;
    }

.claim-history-text-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.claim-history-text-panel {
    min-width: 0;
    padding: 0.9rem;
    border: 1px solid #e5edf5;
    border-radius: 0.85rem;
    background-color: #fbfdff;
}

.claim-history-text-panel--full {
    grid-column: 1 / -1;
}

.claim-history-text-panel p {
    margin: 0;
    color: #243244;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.claim-history-state {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.claim-history-state__card {
    width: min(520px, 100%);
    padding: 1.5rem;
    border: 1px solid #d8e2ec;
    border-radius: 1rem;
    background-color: #ffffff;
    text-align: center;
}

.claim-history-state__card--warning {
    border-color: #ffe08a;
    background-color: #fffdf5;
}

.claim-history-state__card--danger {
    border-color: #fecdca;
    background-color: #fffafa;
}

.claim-history-state__icon {
    display: inline-flex;
    margin-bottom: 0.75rem;
    color: #1675b2;
    font-size: 1.6rem;
}

.claim-history-state__card--warning .claim-history-state__icon {
    color: #b7791f;
}

.claim-history-state__card--danger .claim-history-state__icon {
    color: #b42318;
}

.claim-history-state h3 {
    margin: 0 0 0.35rem;
    color: #243244;
    font-size: 1.15rem;
    font-weight: 700;
}

.claim-history-state p {
    margin: 0;
    color: #667085;
}

@media (max-width: 767.98px) {
    .claim-history-hero {
        flex-direction: column;
    }

    .claim-history-hero__actions {
        justify-content: flex-start;
        min-width: 0;
    }

    .claim-history-text-grid {
        grid-template-columns: 1fr;
    }

    .claim-history-map {
        height: 240px;
    }
}

@media print {
    .claim-history-hero__actions,
    .popup,
    .modal-overlay-alert,
    .modal-overlay-confirmation {
        display: none !important;
    }

    .claim-history-page {
        gap: 0.75rem;
    }

    .claim-history-hero {
        color: #000000;
        background: #ffffff;
        border: 1px solid #d8e2ec;
    }

        .claim-history-hero h2 {
            color: #000000;
        }

    .claim-history-hero__eyebrow,
    .claim-history-hero__meta {
        color: #333333;
    }

    .claim-history-card,
    .claim-history-section {
        break-inside: avoid;
    }
}

/* =========================================
   RICAMBI LIST
========================================= */

.ricambi-panel {
    border: 1px solid #d8e2ec;
    border-radius: 1rem;
    background-color: #ffffff;
    overflow: hidden;
}

.ricambi-panel__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    border-bottom: 1px solid #e5edf5;
    background-color: #fbfdff;
}

.ricambi-panel__eyebrow {
    margin: 0;
    color: #1675b2;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ricambi-panel__header h4 {
    margin: 0.15rem 0 0.2rem;
    color: #243244;
    font-size: 1.05rem;
    font-weight: 700;
}

.ricambi-panel__header span {
    color: #667085;
    font-size: 0.86rem;
}

.ricambi-panel__header .stato-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
}

.ricambi-table-wrap {
    margin: 0;
}

.ricambi-table {
    margin-bottom: 0;
}

    .ricambi-table thead th {
        border-top: 0;
        color: #475467;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .ricambi-table tbody td {
        vertical-align: middle;
        color: #243244;
    }

    .ricambi-table tfoot th {
        border-top: 1px solid #d8e2ec;
        background-color: #fbfdff;
    }

.ricambi-row--editable {
    cursor: pointer;
}

    .ricambi-row--editable:hover {
        background-color: #f6fbff;
    }

.ricambi-review-badge {
    margin-top: 0.2rem;
    font-weight: 700;
}

.ricambi-empty {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 1rem;
    padding: 1rem;
    border: 1px solid #d8e2ec;
    border-radius: 0.9rem;
    background-color: #fbfdff;
    color: #667085;
}

.ricambi-empty--warning {
    border-color: #ffe08a;
    background-color: #fff8db;
    color: #7a5b00;
}

.ricambi-empty p {
    margin: 0;
}

.popup--ricambi > .ricambio-modal {
    width: min(860px, 96vw);
}

.ricambio-modal .stato-modal__body {
    min-height: auto;
}

.ricambio-modal .stato-section {
    margin-bottom: 1rem;
}

.ricambio-modal .stato-section--last {
    margin-bottom: 0;
}

.ricambio-field-hint {
    display: block;
    margin-top: 0.35rem;
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.3;
}

@media (max-width: 767.98px) {
    .ricambi-panel__header {
        flex-direction: column;
    }

        .ricambi-panel__header .stato-btn {
            width: 100%;
            justify-content: center;
        }

    .popup--ricambi > .ricambio-modal {
        width: 100%;
    }
}

/* =========================================
   ESTIMO
========================================= */

.estimo-panel {
    border: 1px solid #d8e2ec;
    border-radius: 1rem;
    background-color: #ffffff;
    overflow: hidden;
}

.estimo-panel__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    border-bottom: 1px solid #e5edf5;
    background-color: #fbfdff;
}

.estimo-panel__eyebrow {
    margin: 0;
    color: #1675b2;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.estimo-panel__header h4 {
    margin: 0.15rem 0 0.2rem;
    color: #243244;
    font-size: 1.05rem;
    font-weight: 700;
}

.estimo-panel__header span {
    color: #667085;
    font-size: 0.86rem;
}

.estimo-panel__total {
    min-width: 190px;
    padding: 0.8rem 1rem;
    border: 1px solid #d8e2ec;
    border-radius: 0.9rem;
    background-color: #ffffff;
    text-align: right;
}

    .estimo-panel__total span {
        display: block;
        color: #667085;
        font-size: 0.78rem;
        font-weight: 700;
    }

    .estimo-panel__total strong {
        display: block;
        color: #1675b2;
        font-size: 1.35rem;
        font-weight: 800;
    }

    .estimo-panel__total small {
        display: block;
        margin-top: 0.15rem;
        color: #8a5d00;
        font-size: 0.76rem;
        font-weight: 700;
    }

.estimo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
}

.estimo-card {
    padding: 0.9rem;
    border: 1px solid #e5edf5;
    border-radius: 0.9rem;
    background-color: #fbfdff;
}

.estimo-card__head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.35rem;
}

    .estimo-card__head span {
        color: #667085;
        font-size: 0.78rem;
        font-weight: 700;
    }

    .estimo-card__head em {
        padding: 0.18rem 0.45rem;
        border-radius: 999px;
        background-color: #fff8db;
        color: #8a5d00;
        font-size: 0.68rem;
        font-style: normal;
        font-weight: 700;
    }

.estimo-card strong {
    display: block;
    color: #243244;
    font-size: 1.25rem;
    font-weight: 800;
}

.estimo-card p {
    margin: 0.2rem 0 0;
    color: #667085;
    font-size: 0.82rem;
}

.estimo-card small {
    display: block;
    margin-top: 0.35rem;
    color: #8a5d00;
    font-size: 0.75rem;
    font-weight: 700;
}

.estimo-table-wrap {
    padding: 0 1rem 1rem;
}

.estimo-table {
    margin-bottom: 0;
}

    .estimo-table thead th {
        border-top: 0;
        color: #475467;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .estimo-table tbody td {
        color: #243244;
        vertical-align: middle;
    }

    .estimo-table tfoot th {
        border-top: 1px solid #d8e2ec;
        background-color: #fbfdff;
    }

.estimo-table__grand-total {
    color: #1675b2;
    font-size: 1.05rem;
}

.estimo-empty {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 1rem;
    padding: 1rem;
    border: 1px solid #d8e2ec;
    border-radius: 0.9rem;
    background-color: #fbfdff;
    color: #667085;
}

.estimo-empty--warning {
    border-color: #ffe08a;
    background-color: #fff8db;
    color: #7a5b00;
}

.estimo-empty p {
    margin: 0;
}

@media (max-width: 767.98px) {
    .estimo-panel__header {
        flex-direction: column;
    }

    .estimo-panel__total {
        width: 100%;
        text-align: left;
    }
}

/* =========================================
   ALLEGATI LIST
========================================= */

.allegati-panel {
    border: 1px solid #d8e2ec;
    border-radius: 1rem;
    background-color: #ffffff;
    overflow: hidden;
}

.allegati-panel__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    border-bottom: 1px solid #e5edf5;
    background-color: #fbfdff;
}

.allegati-panel__eyebrow {
    margin: 0;
    color: #1675b2;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.allegati-panel__header h4 {
    margin: 0.15rem 0 0.2rem;
    color: #243244;
    font-size: 1.05rem;
    font-weight: 700;
}

.allegati-panel__header span {
    color: #667085;
    font-size: 0.86rem;
}

.allegati-upload {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.allegati-file-label {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-width: 170px;
    justify-content: center;
    margin: 0;
}

.allegati-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.55rem;
    padding: 0.55rem 1rem;
    border: 1px solid #ced4da;
    border-radius: 0.75rem;
    background-color: #ffffff;
    color: #475467;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

    .allegati-file-btn:hover,
    .allegati-file-btn:focus {
        border-color: #1675b2;
        background-color: #f4f8fc;
        color: #1675b2;
        text-decoration: none;
    }

    .allegati-file-btn i,
    .allegati-file-btn span {
        position: relative;
        z-index: 1;
    }

.allegati-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.allegati-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.allegati-upload .stato-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    margin: 0;
}

.allegati-type-select {
    width: 400px;
    min-width: 250px;
}   

.allegati-validation {
    margin: 1rem 1rem 0;
    padding: 0.75rem 0.9rem;
    border: 1px solid #fecdca;
    border-radius: 0.85rem;
    background-color: #fff3f2;
    color: #b42318;
    font-size: 0.9rem;
    font-weight: 700;
}

.allegati-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 0.9rem;
    padding: 1rem;
}

.allegato-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid #e5edf5;
    border-radius: 0.95rem;
    background-color: #fbfdff;
    overflow: hidden;
}

.allegato-card__preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    background-color: #f4f8fc;
    color: #1675b2;
    text-decoration: none;
}

    .allegato-card__preview:hover {
        text-decoration: none;
    }

    .allegato-card__preview img {
        width: 100%;
        height: 150px;
        object-fit: cover;
    }

    .allegato-card__preview .thumbnail-icon-doc {
        font-size: 2.2rem;
    }

.allegato-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.85rem;
}

.allegato-card__title {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: flex-start;
}

    .allegato-card__title strong {
        color: #243244;
        font-size: 0.92rem;
        font-weight: 700;
        overflow-wrap: anywhere;
    }

.allegato-card__lock {
    flex: 0 0 auto;
    color: #8a5d00;
}

.allegato-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    color: #667085;
    font-size: 0.78rem;
}

.allegato-card__delete {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 0.65rem;
    font-size: 0.82rem;
}

.allegati-empty {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 1rem;
    padding: 1rem;
    border: 1px solid #d8e2ec;
    border-radius: 0.9rem;
    background-color: #fbfdff;
    color: #667085;
}

.allegati-empty--warning {
    border-color: #ffe08a;
    background-color: #fff8db;
    color: #7a5b00;
}

.allegati-empty p {
    margin: 0;
}

@media (max-width: 767.98px) {
    .allegati-panel__header {
        flex-direction: column;
    }

    .allegati-upload {
        width: 100%;
        justify-content: stretch;
    }

        .allegati-upload .stato-btn,
        .allegati-file-btn,
        .allegati-type-select {
            width: 100%;
            justify-content: center;
        }

    .allegati-grid {
        grid-template-columns: 1fr;
    }
}

.allegati-upload-fields {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.allegati-upload-fields--busy {
    opacity: 0.75;
}

    .allegati-upload-fields--busy .allegati-file-btn {
        pointer-events: none;
    }

.allegati-progress {
    width: 100%;
    min-width: 260px;
}

    .allegati-progress small {
        display: block;
        margin-top: 0.35rem;
        color: #667085;
        font-size: 0.78rem;
    }

/* =========================================
   STATI CLAIM LIST
========================================= */

.stati-claim-panel {
    border: 1px solid #d8e2ec;
    border-radius: 1rem;
    background-color: #ffffff;
    overflow: hidden;
}

.stati-claim-panel__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    border-bottom: 1px solid #e5edf5;
    background-color: #fbfdff;
}

.stati-claim-panel__eyebrow {
    margin: 0;
    color: #1675b2;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stati-claim-panel__header h4 {
    margin: 0.15rem 0 0.2rem;
    color: #243244;
    font-size: 1.05rem;
    font-weight: 700;
}

.stati-claim-panel__header span {
    color: #667085;
    font-size: 0.86rem;
}

.stati-claim-panel__header .stato-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
}

.stati-claim-empty {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 1rem;
    padding: 1rem;
    border: 1px solid #d8e2ec;
    border-radius: 0.9rem;
    background-color: #fbfdff;
    color: #667085;
}

.stati-claim-empty--warning {
    border-color: #ffe08a;
    background-color: #fff8db;
    color: #7a5b00;
}

.stati-claim-empty p {
    margin: 0;
}

.stati-claim-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem;
}

.stati-claim-item {
    display: grid;
    grid-template-columns: 2.4rem 1fr;
    gap: 0.85rem;
}

.stati-claim-item__marker {
    display: flex;
    justify-content: center;
    padding-top: 0.35rem;
}

    .stati-claim-item__marker span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.15rem;
        height: 2.15rem;
        border: 1px solid #d8e2ec;
        border-radius: 999px;
        background-color: #ffffff;
        color: #1675b2;
    }

.stati-claim-item__content {
    min-width: 0;
    padding: 0.9rem;
    border: 1px solid #e5edf5;
    border-radius: 0.95rem;
    background-color: #fbfdff;
}

.stati-claim-item--current .stati-claim-item__content {
    border-color: #b9ddff;
    background-color: #f6fbff;
}

.stati-claim-item--warning .stati-claim-item__content {
    border-color: #ffe08a;
    background-color: #fff8db;
}

.stati-claim-item__top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.7rem;
}

.stati-claim-item__date {
    margin: 0;
    color: #667085;
    font-size: 0.78rem;
    font-weight: 700;
}

.stati-claim-item h5 {
    margin: 0.15rem 0 0;
    color: #243244;
    font-size: 1rem;
    font-weight: 800;
}

.stati-claim-item__user {
    display: inline-block;
    margin-top: 0.2rem;
    color: #667085;
    font-size: 0.78rem;
}

.stati-claim-item__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
}

.stati-claim-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.48rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
}

.stati-claim-badge--warning {
    background-color: #fff8db;
    color: #8a5d00;
    border: 1px solid #ffe08a;
}

.stati-claim-badge--success {
    background-color: #ecfdf3;
    color: #027a48;
    border: 1px solid #abefc6;
}

.stati-claim-badge--info {
    background-color: #eff8ff;
    color: #175cd3;
    border: 1px solid #b2ddff;
}

.stati-claim-description {
    color: #243244;
    font-size: 0.9rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.stati-claim-internal-note {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border: 1px dashed #d8e2ec;
    border-radius: 0.75rem;
    background-color: #ffffff;
    color: #475467;
}

    .stati-claim-internal-note strong {
        display: block;
        margin-bottom: 0.3rem;
        color: #243244;
        font-size: 0.78rem;
    }

.stati-claim-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

    .stati-claim-flags span {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        padding: 0.28rem 0.55rem;
        border-radius: 999px;
        background-color: #fff8db;
        color: #8a5d00;
        font-size: 0.75rem;
        font-weight: 700;
    }

.stati-claim-item__actions {
    margin-top: 0.75rem;
}

    .stati-claim-item__actions .btn {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        border-radius: 0.65rem;
        font-size: 0.82rem;
    }

.popup--stati-claim > .stato-claim-modal {
    width: min(1080px, 96vw);
}

.stato-claim-modal .stato-modal__body {
    min-height: auto;
}

.stato-claim-modal .stato-section {
    margin-bottom: 1rem;
}

.stato-claim-modal .stato-section--last {
    margin-bottom: 0;
}

.stato-claim-richtext {
    min-height: 8rem;
}

.stati-claim-inline-warning {
    padding: 0.75rem 0.9rem;
    border: 1px solid #ffe08a;
    border-radius: 0.85rem;
    background-color: #fff8db;
    color: #7a5b00;
    font-size: 0.9rem;
    font-weight: 700;
}

@media (max-width: 767.98px) {
    .stati-claim-panel__header {
        flex-direction: column;
    }

        .stati-claim-panel__header .stato-btn {
            width: 100%;
            justify-content: center;
        }

    .stati-claim-item {
        grid-template-columns: 1fr;
    }

    .stati-claim-item__marker {
        justify-content: flex-start;
        padding-top: 0;
    }

    .stati-claim-item__top {
        flex-direction: column;
    }

    .stati-claim-item__badges {
        justify-content: flex-start;
    }

    .popup--stati-claim > .stato-claim-modal {
        width: 100%;
    }
}

/* =========================================
   MACCHINA HISTORY PAGE
========================================= */

.macchina-history-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.macchina-history-hero,
.macchina-history-card,
.macchina-history-tabs-card {
    border: 1px solid #d8e2ec;
    border-radius: 1rem;
    background-color: #ffffff;
}

.macchina-history-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem;
    background: #525d6c;
    color: #ffffff;
}

.macchina-history-hero__main {
    min-width: 0;
}

.macchina-history-hero__eyebrow,
.macchina-history-card__eyebrow {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.macchina-history-hero__eyebrow {
    color: rgba(255, 255, 255, 0.72);
}

.macchina-history-hero h2 {
    margin: 0.25rem 0 0.6rem;
    color: #ffffff;
    font-size: 1.65rem;
    font-weight: 700;
}

.macchina-history-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.9rem;
}

.macchina-history-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.macchina-history-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.macchina-history-badge--success {
    background-color: rgba(18, 183, 106, 0.18);
    color: #d1fadf;
    border: 1px solid rgba(18, 183, 106, 0.35);
}

.macchina-history-badge--info {
    background-color: rgba(132, 202, 255, 0.18);
    color: #d1e9ff;
    border: 1px solid rgba(132, 202, 255, 0.35);
}

.macchina-history-badge--muted {
    background-color: rgba(255, 255, 255, 0.12);
    color: #e5eef8;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.macchina-history-hero__actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.6rem;
    min-width: max-content;
}

    .macchina-history-hero__actions .stato-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
    }

.macchina-history-card {
    padding: 1rem;
}

.macchina-history-card__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.macchina-history-card__eyebrow {
    color: #1675b2;
}

.macchina-history-card h3 {
    margin: 0.15rem 0 0;
    color: #243244;
    font-size: 1.05rem;
    font-weight: 700;
}

.macchina-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.75rem;
}

.macchina-history-detail {
    min-width: 0;
    padding: 0.8rem;
    border: 1px solid #e5edf5;
    border-radius: 0.85rem;
    background-color: #fbfdff;
}

    .macchina-history-detail span {
        display: block;
        margin-bottom: 0.25rem;
        color: #667085;
        font-size: 0.78rem;
        font-weight: 700;
    }

    .macchina-history-detail strong {
        display: block;
        color: #243244;
        font-size: 0.95rem;
        font-weight: 700;
        overflow-wrap: anywhere;
    }

.macchina-history-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}

.macchina-history-kpi {
    padding: 0.9rem;
    border: 1px solid #e5edf5;
    border-radius: 0.9rem;
    background-color: #fbfdff;
}

    .macchina-history-kpi span {
        display: block;
        color: #667085;
        font-size: 0.78rem;
        font-weight: 700;
    }

    .macchina-history-kpi strong {
        display: block;
        margin-top: 0.2rem;
        color: #1675b2;
        font-size: 1.45rem;
        font-weight: 800;
    }

.macchina-history-tabs-card {
    overflow: hidden;
}

.macchina-history-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-bottom: 1px solid #e5edf5;
    background-color: #fbfdff;
}

.macchina-history-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid #d8e2ec;
    border-radius: 0.75rem;
    background-color: #ffffff;
    color: #475467;
    font-weight: 700;
    line-height: 1.2;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

    .macchina-history-tab:hover,
    .macchina-history-tab:focus {
        border-color: #1675b2;
        background-color: #f4f8fc;
        color: #1675b2;
    }

.macchina-history-tab--active {
    border-color: #1675b2;
    background-color: #eff8ff;
    color: #1675b2;
}

.macchina-history-tab span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0.05rem 0.4rem 0 0.4rem;
    border-radius: 999px;
    background-color: #eef2f6;
    color: #475467;
    font-size: 0.72rem;
    font-weight: 800;
}

.macchina-history-tab--active span {
    background-color: #1675b2;
    color: #ffffff;
}

.macchina-history-tab-content {
    padding: 1rem;
}

.macchina-history-state {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.macchina-history-state__card {
    width: min(520px, 100%);
    padding: 1.5rem;
    border: 1px solid #d8e2ec;
    border-radius: 1rem;
    background-color: #ffffff;
    text-align: center;
}

.macchina-history-state__card--warning {
    border-color: #ffe08a;
    background-color: #fffdf5;
}

.macchina-history-state__card--danger {
    border-color: #fecdca;
    background-color: #fffafa;
}

.macchina-history-state__icon {
    display: inline-flex;
    margin-bottom: 0.75rem;
    color: #1675b2;
    font-size: 1.6rem;
}

.macchina-history-state__card--warning .macchina-history-state__icon {
    color: #b7791f;
}

.macchina-history-state__card--danger .macchina-history-state__icon {
    color: #b42318;
}

.macchina-history-state h3 {
    margin: 0 0 0.35rem;
    color: #243244;
    font-size: 1.15rem;
    font-weight: 700;
}

.macchina-history-state p {
    margin: 0;
    color: #667085;
}

@media (max-width: 767.98px) {
    .macchina-history-hero {
        flex-direction: column;
    }

    .macchina-history-hero__actions {
        justify-content: flex-start;
        min-width: 0;
    }

        .macchina-history-hero__actions .stato-btn {
            width: 100%;
            justify-content: center;
        }

    .macchina-history-tabs {
        flex-direction: column;
    }

    .macchina-history-tab {
        width: 100%;
        justify-content: center;
    }

    .macchina-history-tab-content {
        padding: 0.75rem;
    }
}

/* =========================================
   CLAIM LIST
========================================= */

.claim-list-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.claim-list-search {
    position: relative;
    width: min(620px, 100%);
}

    .claim-list-search .oi {
        position: absolute;
        top: 50%;
        left: 0.85rem;
        transform: translateY(-50%);
        color: #667085;
        font-size: 0.9rem;
        pointer-events: none;
    }

    .claim-list-search .material-symbols-rounded {
        position: absolute;
        top: 50%;
        left: 0.85rem;
        transform: translateY(-50%);
        color: #667085;
        font-size: 0.9rem;
        pointer-events: none;
    }

.claim-list-search__input {
    padding-left: 2.35rem;
    min-height: 2.55rem;
    border-radius: 0.75rem;
    border-color: #d8e2ec;
}

.claim-list-state {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1rem;
    border: 1px solid #d8e2ec;
    border-radius: 0.9rem;
    background-color: #fbfdff;
    color: #667085;
}

    .claim-list-state p {
        margin: 0;
    }

@media (max-width: 767.98px) {
    .claim-list-toolbar {
        justify-content: stretch;
    }

    .claim-list-search {
        width: 100%;
    }
}

/* =========================================
   CLAIM LIST COMPACT
========================================= */

.claim-list-compact .data-table {
    table-layout: fixed;
}

    .claim-list-compact .data-table th,
    .claim-list-compact .data-table td {
        /*padding: 0.65rem 0.75rem;*/
        vertical-align: middle;
    }

.claim-list-compact .claim-col-id {
    width: 7%;
    white-space: nowrap;
}

.claim-list-compact .claim-col-cliente {
    width: 22%;
}

.claim-list-compact .claim-col-data {
    width: 11%;
    white-space: nowrap;
}

.claim-list-compact .claim-col-gestione {
    width: 18%;
}

.claim-list-compact .claim-col-stato {
    text-align: center !important;
    width: 12%;
}

.claim-list-compact .claim-col-macchina {
    width: 16%;
}

.claim-list-compact .claim-col-azioni {
    width: 12%;
    white-space: nowrap;
}

.claim-main {
    color: #243244;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.claim-sub {
    margin-top: 0.15rem;
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.claim-status {
    display: inline-flex;
    text-align: center !important;
    align-items: center;
    max-width: 100%;
    padding: 0.22rem 0.5rem;
    border: 1px solid #d8e2ec;
    border-radius: 20px;
    background-color: #fbfdff;
    color: #243244;
    font-size: 0.78rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.claim-status-service {
    display: inline-flex;
    text-align: center !important;
    align-items: center;
    max-width: 100%;
    padding: 0.22rem 0.5rem;
    /*border: 1px solid #d8e2ec;*/
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.claim-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.35rem;
    flex-wrap: nowrap;
}

    .claim-actions .btn {
        width: 2.1rem;
        height: 2.1rem;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

.claim-row-detail td {
    padding: 0 !important;
    background-color: #fbfdff;
}

.claim-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.65rem;
    padding: 0.85rem;
    border-top: 1px solid #e5edf5;
}

.claim-detail-item {
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid #e5edf5;
    border-radius: 0.8rem;
    background-color: #ffffff;
}

    .claim-detail-item span {
        display: block;
        margin-bottom: 0.2rem;
        color: #667085;
        font-size: 0.74rem;
        font-weight: 700;
    }

    .claim-detail-item strong {
        display: block;
        color: #243244;
        font-size: 0.9rem;
        overflow-wrap: anywhere;
    }

@media (max-width: 767.98px) {
    .claim-list-compact .data-table {
        display: block;
        background-color: transparent;
        box-shadow: none;
    }

        .claim-list-compact .data-table thead {
            display: none;
        }

        .claim-list-compact .data-table tbody,
        .claim-list-compact .data-table tr,
        .claim-list-compact .data-table td {
            display: block;
            width: 100% !important;
        }

    .claim-list-compact .claim-row {
        margin-bottom: 0.75rem;
        border: 1px solid #d8e2ec;
        border-radius: 1rem;
        background-color: #ffffff;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(8, 31, 63, 0.08);
    }

        .claim-list-compact .claim-row td {
            padding: 0.55rem 0.8rem;
            border-bottom: 0;
        }

            .claim-list-compact .claim-row td[data-label]::before {
                content: attr(data-label);
                display: block;
                margin-bottom: 0.15rem;
                color: #667085;
                font-size: 0.72rem;
                font-weight: 700;
            }

    .claim-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .claim-row-detail {
        margin-top: -0.6rem;
        margin-bottom: 0.75rem;
    }

    .claim-detail-grid {
        grid-template-columns: 1fr;
        border: 1px solid #d8e2ec;
        border-top: 0;
        border-radius: 0 0 1rem 1rem;
    }

    .claim-list-compact .claim-col-stato {
        text-align: unset !important;
    }

    .claim-status {
        text-align: unset !important;
    }
}

/* =========================================
   SERVICE BULLETINS LIST
========================================= */

.service-bulletins-list-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.service-bulletins-list-search {
    position: relative;
    width: min(520px, 100%);
}

    .service-bulletins-list-search .oi {
        position: absolute;
        top: 50%;
        left: 0.85rem;
        transform: translateY(-50%);
        color: #667085;
        font-size: 0.9rem;
        pointer-events: none;
    }

.service-bulletins-list-search__input {
    padding-left: 2.35rem;
    min-height: 2.55rem;
    border-radius: 0.75rem;
    border-color: #d8e2ec;
}

.service-bulletins-list-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 0.65rem;
    border: 1px solid #d8e2ec;
    border-radius: 999px;
    background-color: #fbfdff;
    color: #667085;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

    .service-bulletins-list-filter strong {
        color: #243244;
    }

.service-bulletins-list-state,
.service-bulletins-list-empty {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1rem;
    border: 1px solid #d8e2ec;
    border-radius: 0.9rem;
    background-color: #fbfdff;
    color: #667085;
}

    .service-bulletins-list-state p,
    .service-bulletins-list-empty p {
        margin: 0;
    }

.service-bulletins-list-match {
    margin-top: 0.2rem;
    color: #667085;
    font-size: 0.76rem;
}

.service-bulletins-list-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.8rem;
    height: 1.8rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background-color: #eff8ff;
    color: #1675b2;
    font-size: 0.8rem;
    font-weight: 800;
}

@media (max-width: 767.98px) {
    .service-bulletins-list-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .service-bulletins-list-search {
        width: 100%;
    }

    .service-bulletins-list-filter {
        justify-content: center;
        width: 100%;
    }
}
/* =========================================
   PERMESSI KATO PAGE
========================================= */

.permessi-kato-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.permessi-kato-hero,
.permessi-kato-card,
.permessi-kato-state {
    border: 1px solid #d8e2ec;
    border-radius: 1rem;
    background-color: #ffffff;
}

.permessi-kato-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem;
    background: #525d6c;
    color: #ffffff;
}

.permessi-kato-hero__main {
    min-width: 0;
}

.permessi-kato-hero__eyebrow {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.permessi-kato-hero h3 {
    margin: 0.25rem 0 0.45rem;
    color: #ffffff;
    font-size: 1.45rem;
    font-weight: 700;
}

.permessi-kato-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.92rem;
    line-height: 1.45;
}

.permessi-kato-hero__stats {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: flex-end;
    gap: 0.65rem;
    min-width: max-content;
}

.permessi-kato-stat {
    min-width: 120px;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0.9rem;
    background-color: rgba(255, 255, 255, 0.08);
}

.permessi-kato-stat span {
    display: block;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
    font-weight: 700;
}

.permessi-kato-stat strong {
    display: block;
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 800;
}

.permessi-kato-card {
    margin-bottom: 1rem;
}

.permessi-kato-card--permissions {
    min-height: 100%;
}

.permessi-kato-card__head {
    justify-content: space-between;
}

.permessi-kato-card__title {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.permessi-kato-mini-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.permessi-kato-mini-stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid #d8e2ec;
    border-radius: 999px;
    background-color: #fbfdff;
    color: #667085;
    font-size: 0.76rem;
    font-weight: 700;
}

.permessi-kato-mini-stats strong {
    color: #1675b2;
}

.permessi-kato-search {
    position: relative;
}

.permessi-kato-search .oi {
    position: absolute;
    top: 50%;
    left: 0.85rem;
    transform: translateY(-50%);
    color: #667085;
    font-size: 0.9rem;
    pointer-events: none;
}

.permessi-kato-search__input {
    padding-left: 2.35rem;
}

.permessi-kato-field-hint {
    display: block;
    margin-top: 0.35rem;
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.3;
}

.permessi-kato-user-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1rem;
    padding: 0.9rem;
    border: 1px solid #d8e2ec;
    border-radius: 0.95rem;
    background-color: #fbfdff;
}

.permessi-kato-user-card span,
.permessi-kato-user-card small {
    display: block;
    color: #667085;
    font-size: 0.78rem;
    font-weight: 700;
}

.permessi-kato-user-card strong {
    display: block;
    color: #243244;
    font-size: 1rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.permessi-kato-user-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid #e5edf5;
}

.permessi-kato-user-card__meta strong {
    color: #1675b2;
    font-size: 1.2rem;
}

.permessi-kato-permission-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.permessi-kato-permission-summary > div {
    padding: 0.85rem;
    border: 1px solid #e5edf5;
    border-radius: 0.9rem;
    background-color: #fbfdff;
}

.permessi-kato-permission-summary span {
    display: block;
    color: #667085;
    font-size: 0.78rem;
    font-weight: 700;
}

.permessi-kato-permission-summary strong {
    display: block;
    color: #1675b2;
    font-size: 1.35rem;
    font-weight: 800;
}

.permessi-kato-group {
    margin-bottom: 1rem;
}

.permessi-kato-group__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.permessi-kato-group__head h4 {
    margin: 0;
    color: #243244;
    font-size: 0.96rem;
    font-weight: 800;
}

.permessi-kato-group__head span {
    color: #667085;
    font-size: 0.78rem;
    font-weight: 700;
}

.permessi-kato-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.75rem;
}

.permessi-kato-permission {
    padding: 0.9rem;
    border: 1px solid #e5edf5;
    border-radius: 0.95rem;
    background-color: #fbfdff;
}

.permessi-kato-permission--view {
    border-color: #b2ddff;
    background-color: #f5fbff;
}

.permessi-kato-permission--edit {
    border-color: #abefc6;
    background-color: #f6fef9;
}

.permessi-kato-permission__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.permessi-kato-permission__head strong {
    display: block;
    color: #243244;
    font-size: 0.92rem;
    font-weight: 800;
}

.permessi-kato-permission__head small {
    display: block;
    margin-top: 0.2rem;
    color: #667085;
    font-size: 0.72rem;
    overflow-wrap: anywhere;
}

.permessi-kato-permission__checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.permessi-kato-check {
    min-height: 2.6rem;
    padding: 0.65rem;
}

.permessi-kato-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 800;
    white-space: nowrap;
}

.permessi-kato-badge--success {
    border: 1px solid #abefc6;
    background-color: #ecfdf3;
    color: #027a48;
}

.permessi-kato-badge--info {
    border: 1px solid #b2ddff;
    background-color: #eff8ff;
    color: #175cd3;
}

.permessi-kato-badge--warning {
    border: 1px solid #ffe08a;
    background-color: #fff8db;
    color: #8a5d00;
}

.permessi-kato-badge--muted {
    border: 1px solid #d8e2ec;
    background-color: #ffffff;
    color: #667085;
}

.permessi-kato-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e5edf5;
}

.permessi-kato-btn--secondary {
    border-color: #cfd8e3;
    background-color: #ffffff;
    color: #475467;
}

.permessi-kato-btn--secondary:hover,
.permessi-kato-btn--secondary:focus {
    border-color: #1675b2;
    background-color: #f4f8fc;
    color: #1675b2;
}

.permessi-kato-empty,
.permessi-kato-state {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1rem;
    color: #667085;
}

.permessi-kato-empty {
    border: 1px solid #d8e2ec;
    border-radius: 0.9rem;
    background-color: #fbfdff;
}

.permessi-kato-empty--compact {
    margin-top: 0.85rem;
    padding: 0.8rem;
}

.permessi-kato-empty p,
.permessi-kato-state p {
    margin: 0;
}

.permessi-kato-empty strong {
    display: block;
    color: #243244;
    font-size: 0.95rem;
    font-weight: 800;
}

.permessi-kato-state--warning {
    border-color: #ffe08a;
    background-color: #fffdf5;
    color: #7a5b00;
}

@media (max-width: 991.98px) {
    .permessi-kato-hero {
        flex-direction: column;
    }

    .permessi-kato-hero__stats {
        justify-content: flex-start;
        min-width: 0;
    }

    .permessi-kato-stat {
        min-width: 0;
        flex: 1 1 150px;
    }
}

@media (max-width: 767.98px) {
    .permessi-kato-card__head {
        flex-direction: column;
    }

    .permessi-kato-mini-stats,
    .permessi-kato-actions {
        width: 100%;
        justify-content: stretch;
    }

    .permessi-kato-actions {
        flex-direction: column-reverse;
    }

    .permessi-kato-actions .stato-btn {
        width: 100%;
    }

    .permessi-kato-permission__head,
    .permessi-kato-group__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .permessi-kato-permission__checks {
        grid-template-columns: 1fr;
    }
}


/* =========================================
   HOME DASHBOARD
========================================= */

.home-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.home-hero,
.home-widget {
    border: 1px solid #d8e2ec;
    border-radius: 1rem;
    background-color: #ffffff;
}

.home-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem;
    background: #525d6c;
    color: #ffffff;
}

.home-hero--public {
    max-width: 920px;
}

.home-hero__main {
    min-width: 0;
}

.home-hero__eyebrow,
.home-widget__eyebrow {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-hero__eyebrow {
    color: rgba(255, 255, 255, 0.72);
}

.home-hero h1 {
    margin: 0.25rem 0 0.55rem;
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 800;
}

.home-hero p {
    max-width: 780px;
    margin: 0.35rem 0 0;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.45;
}

.home-transition {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.85rem;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.home-transition--success {
    border: 1px solid rgba(18, 183, 106, 0.35);
    background-color: rgba(18, 183, 106, 0.18);
    color: #d1fadf;
}

.home-transition--muted {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background-color: rgba(255, 255, 255, 0.12);
    color: #e5eef8;
}

.home-transition--warning {
    border: 1px solid rgba(255, 224, 138, 0.45);
    background-color: rgba(255, 248, 219, 0.14);
    color: #fff8db;
}

.home-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.home-widget {
    min-width: 0;
    overflow: hidden;
}

.home-widget__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e5edf5;
    background-color: #fbfdff;
}

.home-widget__eyebrow {
    color: #1675b2;
}

.home-widget__header h3 {
    margin: 0.15rem 0 0.2rem;
    color: #243244;
    font-size: 1.05rem;
    font-weight: 800;
}

.home-widget__header span {
    font-size: 0.86rem;
}


.home-widget__list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1rem;
}

.home-widget__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.85rem;
    border: 1px solid #e5edf5;
    border-radius: 0.9rem;
    background-color: #fbfdff;
    color: #243244;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.home-widget__item:hover,
.home-widget__item:focus {
    border-color: #1675b2;
    background-color: #f6fbff;
    color: #1675b2;
    text-decoration: none;
}

.home-widget__item-main {
    min-width: 0;
}

.home-widget__item-main strong {
    display: block;
    color: inherit;
    font-size: 0.92rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.home-widget__item-main small {
    display: block;
    margin-top: 0.2rem;
    color: #667085;
    font-size: 0.76rem;
    font-weight: 700;
}

.home-widget__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.55rem;
    border-radius: 999px;
    background-color: #eff8ff;
    color: #1675b2;
    font-size: 0.82rem;
    font-weight: 800;
    flex: 0 0 auto;
}

.home-widget__badge--warning {
    border: 1px solid #ffe08a;
    background-color: #fff8db;
    color: #8a5d00;
}

.home-widget__state {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 1rem;
    padding: 1rem;
    border: 1px solid #d8e2ec;
    border-radius: 0.9rem;
    background-color: #fbfdff;
    color: #667085;
}

.home-widget__state--warning {
    border-color: #ffe08a;
    background-color: #fff8db;
    color: #7a5b00;
}

.home-widget__state p {
    margin: 0;
}

@media (max-width: 991.98px) {
    .home-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .home-hero {
        flex-direction: column;
    }

    .home-hero h1 {
        font-size: 1.45rem;
    }
}

.span-title-button {
    gap: 10px;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
}

.title-page-space {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* =========================================
   DEALER STATUS
========================================= */

.dealer-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.28rem 0.62rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
}

.dealer-status__icon {
    font-size: 17px;
    line-height: 1;
    font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20;
}

.dealer-status--active {
    border-color: #abefc6;
    background-color: #ecfdf3;
    color: #027a48;
}

.dealer-status--inactive {
    border-color: #e4e7ec;
    background-color: #f9fafb;
    color: #667085;
}

.dealer-status--notcompiled {
    border-color: #787c83;
    background-color: #a0a4a8;
    color: #ffffff;
}

.dealer-status--bozza {
    border-color: #ffc107;
    background-color: #ffc10736;
    color: #785d06;
}

.dealer-status--blocked {
    border-color: #fecdca;
    background-color: #fff3f2;
    color: #b42318;
}

.dealer-status--muted {
    border-color: #e4e7ec;
    background-color: #f9fafb;
    color: #667085;
}

.dealer-row {
    position: relative;
}

.dealer-row--blocked td:first-child {
    box-shadow: inset 4px 0 0 #d92d20;
}

.dealer-row--inactive td:first-child {
    box-shadow: inset 4px 0 0 #98a2b3;
}

/* =========================================
   DEALER STATE SELECTOR
========================================= */

.dealer-state-selector {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.dealer-state-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    min-height: 100%;
    padding: 0.95rem;
    border: 1px solid #dfe7f0;
    border-radius: 0.95rem;
    background-color: #fbfcfe;
    color: #243244;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

    .dealer-state-option:hover {
        border-color: #b8c7d8;
        background-color: #f6f9fc;
    }

.dealer-state-option--selected {
    border-color: rgb(8, 31, 63);
    background-color: #eef4fa;
    box-shadow: inset 0 0 0 1px rgb(8, 31, 63);
}

.dealer-state-option .material-symbols-rounded {
    margin-bottom: 0.2rem;
    color: #1675b2;
    font-size: 26px;
    font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

.dealer-state-option strong {
    color: #243244;
    font-size: 0.92rem;
    font-weight: 800;
}

.dealer-state-option small {
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.35;
}

.dealer-block-reason {
    margin-top: 1rem;
    padding: 0.95rem;
    border: 1px solid #fecdca;
    border-radius: 0.95rem;
    background-color: #fffafa;
}

.dealer-field-hint {
    display: block;
    margin-top: 0.35rem;
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.3;
}

@media (max-width: 767.98px) {
    .dealer-state-selector {
        grid-template-columns: 1fr;
    }
}
/* =========================================
   IDENTITY PAGES
========================================= */

.identity-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    background-color: #f5f7fa;
    color: #243244;
}

.identity-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #d8e2ec;
    background-color: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 14px rgba(8, 31, 63, 0.08);
}

.identity-header__inner {
    width: min(1180px, calc(100% - 2rem));
    min-height: 4.25rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.identity-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    color: rgb(8, 31, 63);
    text-decoration: none;
}

.identity-brand:hover,
.identity-brand:focus {
    color: rgb(8, 31, 63);
    text-decoration: none;
}

.identity-brand img {
    display: block;
    width: auto;
    max-width: 150px;
    height: 2.6rem;
    object-fit: contain;
}

.identity-brand span {
    padding-left: 0.75rem;
    border-left: 1px solid #d8e2ec;
    color: #667085;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.identity-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.85rem;
    min-width: 0;
}

.identity-language {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem;
    border: 1px solid #d8e2ec;
    border-radius: 999px;
    background-color: #f8fafc;
}

.identity-language a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    min-height: 2rem;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    color: #667085;
    font-size: 0.76rem;
    font-weight: 800;
    text-decoration: none;
}

.identity-language a:hover,
.identity-language a:focus {
    color: #1675b2;
    text-decoration: none;
}

.identity-language a.active {
    background-color: rgb(8, 31, 63);
    color: #ffffff;
}

.identity-user-nav {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.identity-user-nav form {
    margin: 0;
}

.identity-nav-link,
.identity-nav-button {
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    background-color: transparent;
    color: #475467;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.15;
    text-decoration: none;
    cursor: pointer;
}

.identity-nav-link:hover,
.identity-nav-link:focus,
.identity-nav-button:hover,
.identity-nav-button:focus {
    border-color: #d8e2ec;
    background-color: #f4f8fc;
    color: #1675b2;
    text-decoration: none;
    outline: none;
}

.identity-nav-link--primary {
    border-color: #dd9933;
    background-color: #dd9933;
    color: #ffffff;
}

.identity-nav-link--primary:hover,
.identity-nav-link--primary:focus {
    border-color: #c7892c;
    background-color: #c7892c;
    color: #ffffff;
}

.identity-main {
    width: 100%;
    flex: 1 0 auto;
    display: flex;
    justify-content: center;
    padding: 2.25rem 1rem;
}

.identity-page {
    width: min(100%, 980px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.identity-card {
    width: 100%;
    overflow: hidden;
    border: 1px solid #d8e2ec;
    border-radius: 1.15rem;
    background-color: #ffffff;
    box-shadow: 0 12px 30px rgba(8, 31, 63, 0.10);
}

.identity-card--wide {
    max-width: 980px;
}

.identity-card--register {
    max-width: 900px;
}

.identity-card--compact {
    max-width: 620px;
}

.identity-card--status {
    max-width: 600px;
}

.identity-card__header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.35rem 1.5rem;
    background-color: #525d6c;
    color: #ffffff;
}

.identity-card__icon {
    width: 2.85rem;
    height: 2.85rem;
    flex: 0 0 2.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0.85rem;
    background-color: rgba(255, 255, 255, 0.10);
    color: #ffffff;
}

.identity-card__icon .material-symbols-rounded {
    font-size: 1.55rem;
}

.identity-card__eyebrow {
    margin: 0 0 0.2rem;
    color: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.identity-card__header h1 {
    margin: 0;
    color: #ffffff;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.25;
}

.identity-card__header p:last-child {
    max-width: 700px;
    margin: 0.35rem 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
    line-height: 1.45;
}

.identity-card__body {
    padding: 1.5rem;
}

.identity-grid {
    display: grid;
    gap: 1.25rem;
}

.identity-grid--split {
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
}

.identity-form {
    min-width: 0;
}

.identity-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.identity-field {
    min-width: 0;
    margin-bottom: 1rem;
}

.identity-form-grid .identity-field {
    margin-bottom: 0;
}

.identity-field--full {
    grid-column: 1 / -1;
}

.identity-field .stato-label {
    margin-bottom: 0.45rem;
}

.identity-field .validation-message {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    line-height: 1.35;
}

.identity-validation:empty {
    display: none;
}

.identity-validation {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid #fecdca;
    border-radius: 0.85rem;
    background-color: #fff3f2;
    color: #b42318;
    font-size: 0.86rem;
}

.identity-validation ul {
    margin: 0;
    padding-left: 1.15rem;
}

.identity-check {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 1rem;
    color: #475467;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
}

.identity-check input {
    width: 1rem;
    height: 1rem;
    accent-color: rgb(8, 31, 63);
}

.identity-submit {
    width: 100%;
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 0.75rem;
    font-weight: 800;
}

.identity-submit--auto {
    width: auto;
    min-width: 180px;
}

.identity-links {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5edf5;
}

.identity-links--single {
    align-items: center;
}

.identity-links a,
.identity-secondary-link {
    color: #1675b2;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
}

.identity-links a:hover,
.identity-links a:focus,
.identity-secondary-link:hover,
.identity-secondary-link:focus {
    color: #0f5f92;
    text-decoration: underline;
}

.identity-help {
    min-width: 0;
    padding: 1.1rem;
    border: 1px solid #dfe7f0;
    border-radius: 1rem;
    background-color: #f8fafc;
}

.identity-help__icon {
    margin-bottom: 0.75rem;
    color: #1675b2;
    font-size: 2rem;
}

.identity-help .identity-card__eyebrow {
    color: #1675b2;
}

.identity-help h2 {
    margin: 0 0 0.55rem;
    color: #243244;
    font-size: 1.05rem;
    font-weight: 800;
}

.identity-help p {
    margin: 0 0 0.65rem;
    color: #667085;
    font-size: 0.86rem;
    line-height: 1.5;
}

.identity-help__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.3rem;
    color: #1675b2;
    font-size: 0.84rem;
    font-weight: 800;
}

.identity-form-note,
.identity-status {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 0.95rem;
    border-radius: 0.85rem;
    font-size: 0.84rem;
    line-height: 1.45;
}

.identity-form-note {
    margin-top: 1rem;
    border: 1px solid #b2ddff;
    background-color: #eff8ff;
    color: #175cd3;
}

.identity-form-note p,
.identity-status p {
    margin: 0;
}

.identity-status {
    margin-bottom: 1rem;
}

.identity-status--success {
    border: 1px solid #abefc6;
    background-color: #ecfdf3;
    color: #027a48;
}

.identity-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1.15rem;
    border-top: 1px solid #e5edf5;
}

.identity-status-page {
    padding: 2rem 1.5rem;
    text-align: center;
}

.identity-status-page__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
    border-radius: 999px;
    font-size: 2.1rem;
}

.identity-status-page--success .identity-status-page__icon {
    border: 1px solid #abefc6;
    background-color: #ecfdf3;
    color: #027a48;
}

.identity-status-page--warning .identity-status-page__icon {
    border: 1px solid #ffe08a;
    background-color: #fff8db;
    color: #8a5d00;
}

.identity-status-page .identity-card__eyebrow {
    color: #1675b2;
}

.identity-status-page h1 {
    margin: 0 0 0.65rem;
    color: #243244;
    font-size: 1.45rem;
    font-weight: 800;
}

.identity-status-page > p:not(.identity-card__eyebrow) {
    max-width: 460px;
    margin: 0 auto 1.25rem;
    color: #667085;
    line-height: 1.55;
}

.identity-footer {
    flex: 0 0 auto;
    border-top: 1px solid #d8e2ec;
    background-color: #ffffff;
}

.identity-footer__inner {
    width: min(1180px, calc(100% - 2rem));
    min-height: 3.5rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #667085;
    font-size: 0.78rem;
}

.identity-footer a {
    color: #1675b2;
    font-weight: 700;
}

@media (max-width: 767.98px) {
    .identity-header__inner {
        min-height: 4rem;
        width: min(100% - 1.25rem, 1180px);
    }

    .identity-brand img {
        max-width: 118px;
        height: 2.2rem;
    }

    .identity-brand span,
    .identity-user-nav__name {
        display: none;
    }

    .identity-header__actions {
        gap: 0.4rem;
    }

    .identity-nav-link,
    .identity-nav-button {
        width: 2.45rem;
        min-width: 2.45rem;
        height: 2.45rem;
        padding: 0;
        overflow: hidden;
        font-size: 0;
    }

    .identity-nav-link .material-symbols-rounded,
    .identity-nav-button .material-symbols-rounded {
        font-size: 19px;
    }

    .identity-main {
        padding: 1rem 0.65rem;
    }

    .identity-card {
        border-radius: 1rem;
    }

    .identity-card__header {
        padding: 1.1rem;
    }

    .identity-card__header h1 {
        font-size: 1.25rem;
    }

    .identity-card__body {
        padding: 1rem;
    }

    .identity-grid--split,
    .identity-form-grid {
        grid-template-columns: 1fr;
    }

    .identity-field--full {
        grid-column: auto;
    }

    .identity-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .identity-submit--auto {
        width: 100%;
    }

    .identity-secondary-link {
        text-align: center;
    }

    .identity-footer__inner {
        width: min(100% - 1.25rem, 1180px);
        flex-direction: column;
        justify-content: center;
        gap: 0.2rem;
        padding: 0.75rem 0;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .identity-language a {
        min-width: 2rem;
        padding-left: 0.4rem;
        padding-right: 0.4rem;
    }

    .identity-user-nav {
        gap: 0.25rem;
    }

    .identity-card__icon {
        width: 2.45rem;
        height: 2.45rem;
        flex-basis: 2.45rem;
    }
}

.identity-validation.validation-summary-valid {
    display: none;
}

.identity-validation.validation-summary-errors {
    display: block;
}

.identity-status-page--danger .identity-status-page__icon {
    border: 1px solid #fecdca;
    background-color: #fff3f2;
    color: #b42318;
}

.identity-status-page__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

@media (max-width: 575.98px) {
    .identity-status-page {
        padding: 1.5rem 1rem;
    }

    .identity-status-page__actions,
    .identity-status-page__actions .identity-submit--auto {
        width: 100%;
    }
}

/* ============================================================
   STEP 01 v1.3 - SINGLE APP BAR + RESPONSIVE BRAND ASSET

   SOSTITUISCE COMPLETAMENTE il blocco:
   - STEP 01 v1.2 - SINGLE RESPONSIVE APP BAR

   Rimuovere il precedente blocco Step 01 dal fondo di site.css
   e aggiungere questo.
   ============================================================ */

:root {
    --kc-sidebar-width: 250px;
    --kc-appbar-height: 4rem;
    --kc-brand-navy: #081f3f;
    --kc-brand-orange: #dd9933;
    --kc-shell-surface: #525d6c;
    --kc-page-bg: #f5f7fa;
    --kc-surface: #ffffff;
    --kc-border: #d8e2ec;
    --kc-text: #243244;
    --kc-text-muted: #667085;
}

html,
body {
    min-height: 100%;
}

body {
    background-color: var(--kc-page-bg);
}

.main,
.content {
    min-width: 0;
}

.height-buttone {
    height: 43.19px;
}

/* ------------------------------------------------------------
   BRAND BASE
   Il markup usa <picture>: il browser sceglie automaticamente
   logo completo o icon-only in base al media attribute.
   ------------------------------------------------------------ */
.navmenu-brand {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    min-width: 0;
    height: 3rem;
    overflow: visible;
}

.navmenu-logo-picture {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    height: 3rem;
    line-height: 0;
}

.navmenu-logo {
    display: block;
    width: auto;
    height: auto;
    max-height: 3rem;
    object-fit: contain;
    border-radius: 0;
}

/* ============================================================
   DESKTOP >= 1200
   ============================================================ */
@media (min-width: 1200px) {
    .navmenu-top-row,
    .main-top-row {
        min-height: var(--kc-appbar-height);
        height: var(--kc-appbar-height);
    }

    .navmenu-top-row {
        padding: 0 1.25rem;
        justify-content: center;
        background-color: #ffffff;
    }

    .main-top-row {
        position: sticky;
        top: 0;
        left: auto;
        right: auto;
        width: auto;
        padding: 0 1.5rem;
        border-bottom: 1px solid var(--kc-border);
        background-color: #ffffff;
        z-index: 3;
    }

    .navmenu-brand {
        width: auto;
        max-width: 190px;
    }

    .navmenu-logo {
        max-width: 165px;
    }

    .navmenu-toggler-custom {
        display: none;
    }
}

/* ============================================================
   TABLET / COMPACT 768 - 1199
   Logo completo + account nella stessa barra.
   ============================================================ */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .navmenu-brand {
        width: auto;
        max-width: 150px;
    }

    .navmenu-logo {
        max-width: 132px;
    }
}

/* ============================================================
   COMPACT SHELL < 1200
   ============================================================ */
@media (max-width: 1199.98px) {
    .sidebar {
        position: sticky;
        top: 0;
        height: var(--kc-appbar-height);
        overflow: visible;
        z-index: 1000;
    }

    .navmenu-top-row {
        position: relative;
        top: 0;
        min-height: var(--kc-appbar-height);
        height: var(--kc-appbar-height);
        padding: 0 1rem;
        justify-content: space-between;
        border-bottom: 1px solid var(--kc-border);
        background-color: #ffffff;
        z-index: 1002;
    }

    .navmenu-brand {
        z-index: 1;
    }

    .navmenu-toggler-custom {
        display: inline-flex;
        width: 2.75rem;
        height: 2.75rem;
        min-width: 2.75rem;
        border-radius: 0.65rem;
        z-index: 2;
    }

    /*
     * La barra account condivide visivamente la stessa fascia
     * del NavMenu e non genera una seconda riga.
     */
    .main-top-row {
        position: fixed;
        top: 0;
        left: 10rem;
        right: 4.4rem;
        width: auto;
        min-width: 0;
        min-height: var(--kc-appbar-height);
        height: var(--kc-appbar-height);
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        z-index: 1003;
        pointer-events: none;
        align-items: center;
        justify-content: flex-end;
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

        .main-top-row > *,
        .main-top-row select,
        .main-top-row button,
        .main-top-row a {
            pointer-events: auto;
        }

        /*
     * Le utility Bootstrap ml/mr presenti nel markup sono utili
     * sul desktop, ma su una singola app bar compatta consumano
     * spazio prezioso.
     */
        .main-top-row .ml-3,
        .main-top-row .ml-2,
        .main-top-row .mr-2 {
            margin-left: 0 !important;
            margin-right: 0 !important;
        }

        .main-top-row .insieme {
            margin: 0;
        }

    .content.px-4 {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
}

.main-top-row select[name="newlang"] {
    width: 4.3rem;
    min-width: 4.3rem;
    max-width: 4.3rem;
}

/* ============================================================
   PHONE / SMALL TABLET < 768
   Il <picture> passa all'asset icon-only.
   ============================================================ */
@media (max-width: 767.98px) {

    .popup > .lavagna > form {
        height: 100%;
    }

    .navmenu-top-row {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }

    .navmenu-brand {
        width: 3rem;
        max-width: 3rem;
        min-width: 3rem;
        flex: 0 0 3rem;
        height: 3rem;
        overflow: visible;
    }

    .navmenu-logo-picture {
        width: 3rem;
        height: 3rem;
        align-items: center;
        justify-content: center;
    }

    .navmenu-logo {
        width: 2.65rem;
        height: 2.65rem;
        max-width: 2.65rem;
        max-height: 2.65rem;
        object-fit: contain;
        border-radius: 0.35rem;
    }

    .navmenu-toggler-custom {
        width: 2.65rem;
        height: 2.65rem;
        min-width: 2.65rem;
    }

    /*
     * Grazie all'icona dedicata la zona account può iniziare
     * molto prima rispetto alla v1.2.
     */
    .main-top-row {
        left: 4.25rem;
        right: 3.75rem;
        gap: 0.35rem;
    }

        .main-top-row select[name="profile"] {
            width: auto;
            min-width: 0;
            max-width: 20rem;
            text-overflow: ellipsis;
        }

        .main-top-row select[name="newlang"] {
            width: 4.3rem;
            min-width: 4.3rem;
            max-width: 4.3rem;
            padding-left: 0.45rem;
            padding-right: 1.45rem;
        }

        .main-top-row .btn,
        .main-top-row button {
            white-space: nowrap;
        }

    .content.px-4 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* ============================================================
   PHONE COMPACT <= 575
   ============================================================ */
@media (max-width: 575.98px) {
    .main-top-row {
        left: 4rem;
        right: 3.65rem;
        gap: 0.25rem;
    }

        .main-top-row select[name="profile"] {
            width: auto;
            max-width: 11.5rem;
        }

        .main-top-row select[name="newlang"] {
            width: 4.3rem;
            min-width: 4.3rem;
            max-width: 4.3rem;
        }

        .main-top-row .btn-primary {
            padding-left: 0.65rem;
            padding-right: 0.65rem;
        }

    .content.px-4 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

@media (max-width: 420px) {
    .main-top-row {
        left: 3.85rem;
        right: 3.55rem;
    }

        .main-top-row select[name="profile"] {
            width: auto;
            max-width: 10rem;
        }

        .main-top-row select[name="newlang"] {
            width: 4.3rem;
            min-width: 4.3rem;
            max-width: 4.3rem;
        }

        .main-top-row .btn-primary {
            padding-left: 0.55rem;
            padding-right: 0.55rem;
            font-size: 0.82rem;
        }
}

@media (max-width: 390px) {
        .main-top-row select[name="profile"] {
            width: auto;
            max-width: 7.5rem;
        }
}

@media (max-width: 350px) {
    .main-top-row {
        left: 3.85rem;
        right: 4rem;
    }

    .main-top-row select[name="profile"] {
        width: auto;
        max-width: 5rem;
    }
}

/* ============================================================
   TOUCH / ACCESSIBILITY
   ============================================================ */
@media (pointer: coarse) {
    .navmenu-toggler-custom {
        min-width: 2.75rem;
        min-height: 2.75rem;
    }

    .btn-icon.btn-sm {
        width: 2.75rem;
        height: 2.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .navmenu-toggler-custom,
    .nav-item a {
        transition: none !important;
    }
}




/* =========================================
   EV02 - OPERATIONAL DASHBOARD
   Appendere dopo il blocco HOME DASHBOARD esistente.
========================================= */

.home-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.home-kpi-card {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid #d8e2ec;
    border-radius: 1rem;
    background-color: #ffffff;
}

.home-kpi-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 0.85rem;
    flex: 0 0 auto;
}

.home-kpi-card__icon .material-symbols-rounded {
    font-size: 1.35rem;
}

.home-kpi-card--primary .home-kpi-card__icon {
    background-color: #eef3f8;
    color: #081f3f;
}

.home-kpi-card--warning .home-kpi-card__icon {
    background-color: #fff8db;
    color: #8a5d00;
}

.home-kpi-card--info .home-kpi-card__icon {
    background-color: #eff8ff;
    color: #1675b2;
}

.home-kpi-card--success .home-kpi-card__icon {
    background-color: #ecfdf3;
    color: #23845f;
}

.home-kpi-card__body {
    min-width: 0;
}

.home-kpi-card__label {
    display: block;
    color: #667085;
    font-size: 0.78rem;
    font-weight: 700;
}

.home-kpi-card__value {
    display: block;
    margin-top: 0.05rem;
    color: #243244;
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.15;
}

.home-kpi-card__detail {
    display: block;
    margin-top: 0.2rem;
    color: #667085;
    font-size: 0.74rem;
    line-height: 1.3;
}

.home-dashboard-primary,
.home-dashboard-secondary {
    display: grid;
    gap: 1rem;
    align-items: stretch;
}

.home-dashboard-primary {
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
}

.home-dashboard-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-dashboard-primary > .home-widget,
.home-dashboard-secondary > .home-widget {
    height: 100%;
}

.home-widget__header--analytics {
    align-items: flex-start;
}

.home-widget__header-metric {
    min-width: 5.5rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid #d8e2ec;
    border-radius: 0.75rem;
    background-color: #ffffff;
    text-align: right;
    flex: 0 0 auto;
}

.home-widget__header-metric span {
    display: block;
    color: #667085;
    font-size: 0.68rem;
    font-weight: 700;
}

.home-widget__header-metric strong {
    display: block;
    margin-top: 0.05rem;
    color: #1675b2;
    font-size: 1.15rem;
    font-weight: 800;
}

.home-trend {
    padding: 1rem;
    overflow-x: auto;
}

.home-trend__plot {
    display: grid;
    grid-template-columns: repeat(12, minmax(44px, 1fr));
    gap: 0.55rem;
    min-width: 650px;
    height: 250px;
    align-items: end;
}

.home-trend__column {
    display: grid;
    grid-template-rows: 1.25rem minmax(0, 1fr) 1.25rem;
    gap: 0.35rem;
    height: 100%;
    min-width: 0;
    align-items: end;
}

.home-trend__value {
    align-self: end;
    color: #475467;
    font-size: 0.72rem;
    font-weight: 800;
    text-align: center;
}

.home-trend__bar-track {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 0.65rem 0.65rem 0.25rem 0.25rem;
    background: linear-gradient(to bottom, #f5f8fb 0%, #eef3f8 100%);
    overflow: hidden;
}

.home-trend__bar-fill {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--home-trend-height, 0%);
    min-height: 0.35rem;
    border-radius: 0.55rem 0.55rem 0.2rem 0.2rem;
    background-color: #1675b2;
}

.home-trend__bar-fill--empty {
    min-height: 0;
    background-color: transparent;
}

.home-trend__label {
    color: #667085;
    font-size: 0.66rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.home-breakdown-grid {
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.home-breakdown-grid--double {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-breakdown-section {
    min-width: 0;
    padding: 0.85rem;
    border: 1px solid #e5edf5;
    border-radius: 0.9rem;
    background-color: #fbfdff;
}

.home-breakdown-section__head {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.home-breakdown-section__head > .material-symbols-rounded {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.65rem;
    background-color: #eff8ff;
    color: #1675b2;
    font-size: 1.05rem;
    flex: 0 0 auto;
}

.home-breakdown-section__head strong {
    display: block;
    color: #243244;
    font-size: 0.86rem;
    font-weight: 800;
}

.home-breakdown-section__head small {
    display: block;
    margin-top: 0.1rem;
    color: #667085;
    font-size: 0.7rem;
    line-height: 1.3;
}

.home-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.home-breakdown-item {
    min-width: 0;
}

.home-breakdown-item__line {
    display: flex;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.25rem;
    color: #475467;
    font-size: 0.76rem;
}

.home-breakdown-item__line span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-breakdown-item__line strong {
    color: #243244;
    font-weight: 800;
    flex: 0 0 auto;
}

.home-breakdown-item__track {
    height: 0.45rem;
    border-radius: 999px;
    background-color: #e9eff5;
    overflow: hidden;
}

.home-breakdown-item__fill {
    width: var(--home-breakdown-width, 0%);
    height: 100%;
    border-radius: inherit;
    background-color: #1675b2;
}

.home-widget__badge-icon {
    margin-right: -2px;
    margin-bottom: 4px;
}

@media (max-width: 1199.98px) {
    .home-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-dashboard-primary {
        grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.9fr);
    }

    .home-breakdown-grid--double {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .home-dashboard-primary,
    .home-dashboard-secondary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .home-kpi-card {
        padding: 0.9rem;
    }

    .home-widget__header--analytics {
        flex-direction: column;
    }

    .home-widget__header-metric {
        width: 100%;
        text-align: left;
    }

    .home-trend {
        padding: 0.85rem;
    }

    .home-trend__plot {
        min-width: 620px;
        height: 220px;
    }
}

@media (max-width: 575.98px) {
    .home-kpi-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .home-kpi-card {
        align-items: center;
    }

    .home-kpi-card__value {
        font-size: 1.5rem;
    }

    .home-breakdown-grid {
        padding: 0.85rem;
    }
}



/* =========================================
   EV04 - WARRANTY UI & EXPIRY
   Appendere in fondo al site.css corrente.
========================================= */


.home-kpi-card--danger .home-kpi-card__icon {
    background-color: #fef3f2;
    color: #b42318;
}

.macchina-history-badge--warning {
    gap: 0.3rem;
    background-color: rgba(255, 224, 138, 0.16);
    color: #fff3c4;
    border: 1px solid rgba(255, 224, 138, 0.42);
}

.macchina-history-badge--danger {
    gap: 0.3rem;
    background-color: rgba(240, 68, 56, 0.16);
    color: #fee4e2;
    border: 1px solid rgba(240, 68, 56, 0.38);
}

    .macchina-history-badge--warning .material-symbols-rounded,
    .macchina-history-badge--danger .material-symbols-rounded {
        font-size: 1rem;
    }

.warranty-home-card {
    min-width: 0;
}

.warranty-home-card__header {
    align-items: flex-start;
}

.warranty-home-card__action {
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    border-radius: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
}

.warranty-home-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 1rem;
}

.warranty-home-metric {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    padding: 0.8rem;
    border: 1px solid #e5edf5;
    border-radius: 0.85rem;
    background-color: #fbfdff;
}

    .warranty-home-metric > .material-symbols-rounded {
        width: 2.15rem;
        height: 2.15rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 0.7rem;
        flex: 0 0 2.15rem;
        font-size: 1.15rem;
    }

    .warranty-home-metric small,
    .warranty-home-metric strong {
        display: block;
    }

    .warranty-home-metric small {
        color: #667085;
        font-size: 0.7rem;
        font-weight: 700;
    }

    .warranty-home-metric strong {
        margin-top: 0.05rem;
        color: #243244;
        font-size: 1.2rem;
        font-weight: 800;
    }

.warranty-home-metric--success > .material-symbols-rounded {
    background-color: #ecfdf3;
    color: #027a48;
}

.warranty-home-metric--warning > .material-symbols-rounded {
    background-color: #fff8db;
    color: #8a5d00;
}

.warranty-home-metric--danger > .material-symbols-rounded {
    background-color: #fef3f2;
    color: #b42318;
}

.warranty-home-metric--info > .material-symbols-rounded {
    background-color: #eff8ff;
    color: #1675b2;
}

@media (max-width: 991.98px) {
    .warranty-home-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .warranty-home-card__header {
        flex-direction: column;
    }

    .warranty-home-card__action {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .warranty-home-metrics {
        grid-template-columns: 1fr;
        padding: 0.85rem;
    }
}

