@import url("aps/jquery-ui.custom.min.css");

/*@import url('https://fonts.googleapis.com/css?family=Noto+Sans');*/
@font-face {
    font-family: 'Noto Sans';
    font-style: normal;
    font-weight: 400;
    src: url('../../css/noto-sans-v7-latin-ext-regular.eot'); /* IE9 Compat Modes */
    src: local('Noto Sans'), local('NotoSans'), url('../../css/noto-sans-v7-latin-ext-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
    url('../../css/noto-sans-v7-latin-ext-regular.woff2') format('woff2'), /* Super Modern Browsers */
    url('../../css/noto-sans-v7-latin-ext-regular.woff') format('woff'), /* Modern Browsers */
    url('../../css/noto-sans-v7-latin-ext-regular.ttf') format('truetype'), /* Safari, Android, iOS */
    url('../../css/noto-sans-v7-latin-ext-regular.svg#NotoSans') format('svg'); /* Legacy iOS */
}

:root {
    /* =========================================
     1. APKAPPA Core Colors
     ========================================= */

    --apk-blue: #0056b3;
    --apk-primary-hover: #0b5ed7;
    --apk-secondary-hover: #5c636a;
    --apk-success-hover: #157347;
    --apk-info-hover: #31d2f2;
    --apk-warning-hover: #ffca2c;
    --apk-danger-hover: #bb2d3b;
    --apk-light-hover: #d3d4d5;
    --apk-dark-hover: #424649;
    --apk-table-header-bg-color: #e5eaf1;
    --apk-table-header-font-size: 12pt;
    --apk-table-header-color: #000000;
    --apk-table-styler-bg-color: #E7EBEE;
    --apk-table-padding: 5px;
    --apk-table-bg-color: #FFFFFF;
    --apk-table-border: 1px solid #B0BEC5;
    --apk-table-border-radius: 8px;
    --apk-table-box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    --apk-mobile-breakpoint: 1020px;
    /* =========================================
     2. Bootstrap Italia Theme Colors
        (valori derivati da bootstrap-italia v2.18.0 / bootstrap v5.2.3, differenti dai colori classici di Bootstrap)
     ========================================= */
    /* primary  - hsl(210, 100%, 40%) */
    --apk-primary: #0066cc;
    --apk-primary-light: #b3d7ff; /* hsl(210, 100%, 85%) */
    --apk-primary-dark: #004080; /* hsl(210, 100%, 25%) */
    /* secondary - hsl(210, 17%, 44%) */
    --apk-secondary: #5d7083;
    --apk-secondary-light: #d3d9df; /* hsl(210, 17%, 85%) */
    --apk-secondary-dark: #354b55; /* hsl(210, 17%, 25%) */
    /* success  - hsl(160, 100%, 25%) */
    --apk-success: #007f55;
    --apk-success-light: #b3ffe4; /* hsl(160, 100%, 85%) */
    --apk-success-dark: #004d33; /* hsl(160, 100%, 15%) */
    /* danger   - hsl(350, 60%, 50%) */
    --apk-danger: #cc334d;
    --apk-danger-light: #f5c2cb; /* hsl(350, 60%, 85%) */
    --apk-danger-dark: #661926; /* hsl(350, 60%, 25%) */
    /* warning  - hsl(36, 100%, 30%) */
    --apk-warning: #995c00;
    --apk-warning-light: #ffe0b3; /* hsl(36, 100%, 85%) */
    --apk-warning-dark: #4d2e00; /* hsl(36, 100%, 15%) */
    /* white    - hsl(0, 0%, 100%) */
    --apk-white: #ffffff;
    /* black    - hsl(0, 0%, 0%) */
    --apk-black: #000000;
    /* base-light - grigio-azzurro standard per sfondi */
    --apk-base-light: #f8fafc;
    /* grayscale - scala di grigi bootstrap-italia (H0 S0%) */
    --apk-100: #f5f5f5; /* hsl(0, 0%, 96%) */
    --apk-200: #e6e6e6; /* hsl(0, 0%, 90%) */
    --apk-300: #d4d4d4; /* hsl(0, 0%, 83%) */
    --apk-400: #a3a3a3; /* hsl(0, 0%, 64%) */
    --apk-500: #737373; /* hsl(0, 0%, 45%) */
    --apk-600: #525252; /* hsl(0, 0%, 32%) */
    --apk-700: #404040; /* hsl(0, 0%, 25%) */
    --apk-800: #262626; /* hsl(0, 0%, 15%) */
    --apk-900: #1a1a1a; /* hsl(0, 0%, 10%) */
    
    /* font size rem */
    --apk-fs-7: 0.9rem;
    --apk-fs-8: 0.75rem;
}

/****** TEMPLATE *******/

body {
    font-family: 'Noto Sans', sans-serif;
    font-size: 14px;
}

footer {
    font-size: initial;
}

fieldset, .fieldsetlike {
    margin-bottom: 6px;
    background-color: #eceff1;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),0 1px 5px 0 rgba(0,0,0,0.12),0 3px 1px -2px rgba(0,0,0,0.1);
    padding: 10px 8px 5px 8px;
    height: auto !important; /* Annulla le altezze fisse dei fieldset */
    margin-top: 0.3rem;
    margin-bottom: 0.6rem;
}

    fieldset:after {
        clear: both;
    }

    fieldset > legend {
        float: left;
        font-size: 1em;
        font-weight: bold;
        margin-top: -10px;
        margin-bottom: 5px;
        color: #333;
        border-bottom: 1px solid #bbb;
        padding-top: 0.3rem;
    }

    fieldset select {
        display: block;
        font-size: 1em;
        padding-left: 0.18em;
        border: 1px solid Gray;
        -moz-border-radius: 2px;
        -webkit-border-radius: 2px;
        -khtml-border-radius: 2px;
        border-radius: 2px;
    }

    fieldset.alert {
        /*Bootstrap override*/
        padding: 10px 8px 5px 8px;
        color: red;
        font-weight: bold
    }

label {
    font-weight: normal;
    display: inline-table;
    margin: 0.3rem;
}

    label input {
        display: block;
    }

    label span {
        display: block;
    }

    label select {
        display: block;
        min-height: 26px;
    }

    label textarea {
        display: block;
    }

.inputdisabled {
    cursor: auto;
    background-color: #f5f5f5 !important;
    color: #333;
}

.inputreadonly {
    background-color: #f5f5f5 !important;
    color: #333;
}

.elenco td {
    vertical-align: top;
    height: 100%;
}



label input[type="text"] {
    padding: 2px 5px;
    font-size: 1em;
    color: #333;
    background-color: #fff;
    background-image: none;
    border: 1px solid #888;
    border-radius: 4px;
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
    -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
}

    label input[type="text"]:disabled {
        cursor: auto;
        background-color: #f5f5f5;
        color: #333;
    }

input[type="text"] {
    padding: 2px 5px;
    font-size: 1em;
    color: #333;
    background-color: #fff;
    background-image: none;
    border: 1px solid #888;
    border-radius: 4px;
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
    -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
}

    input[type="text"]:disabled {
        cursor: auto;
        background-color: #f5f5f5;
        color: #333;
    }

label select, #bottombar select {
    padding: 1px 5px;
    font-size: 1em;
    color: #333;
    background-color: #fff;
    background-image: none;
    border: 1px solid #888;
    border-radius: 4px;
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
    -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
}

label textarea {
    padding: 2px 5px;
    font-size: 1em;
    color: #333;
    background-color: #fff;
    background-image: none;
    border: 1px solid #888;
    border-radius: 4px;
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
    -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
}

div#buttonbar .buttonspacer {
    width: 2.5em;
    overflow: visible;
    /*Necessario per garantire la larghezza di tag vuoti */
    border: 1px solid transparent;
}
/* IE6 Hack */
*html div#buttonbar .buttonspacer {
    border-color: white;
    filter: chroma(color=white);
}

.panel-default {
    box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),0 1px 5px 0 rgba(0,0,0,0.12),0 3px 1px -2px rgba(0,0,0,0.1);
}

#titlebar, #buttonbar, #tabbar, #bottombar {
    background-color: #64b5f6;
}

#titlebar {
    padding-top: 5px;
    box-shadow: 0px 0px 5px #000000;
    -webkit-box-shadow: 0px 0px 5px #000000;
    -moz-box-shadow: 0px 0px 5px #000000;
    border-color: transparent;
}

    #titlebar input[type="image"], #titlebar a > img {
        vertical-align: bottom;
    }

    #titlebar input[type="image"], #titlebar a > img, #buttonbar input[type="image"] {
        padding: 2px;
    }

        #titlebar input[type="image"]:hover, #titlebar a > img:hover, #buttonbar input[type="image"]:hover {
            border-radius: 25%;
            box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),0 1px 5px 0 rgba(0,0,0,0.12),0 3px 1px -2px rgba(0,0,0,0.1);
        }

        #titlebar input[type="image"]:hover, #titlebar a > img:hover {
            background-color: #ffffff;
        }

        #buttonbar input[type="image"]:hover {
            background-color: #93c21e;
        }

.titlehome {
    vertical-align: bottom;
}

.titoloscheda {
    font-size: 22px;
    color: #FFFFFF;
}

#buttonbar .alert {
    position: absolute;
    z-index: 999;
    width: 100%;
}

#tabbar .nav {
    list-style: none;
    color: #FFFFFF;
    text-transform: uppercase;
    font-weight: 500;
    border: 1px solid #ccc;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    background-color: #ffffff;
    box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),0 1px 5px 0 rgba(0,0,0,0.12),0 3px 1px -2px rgba(0,0,0,0.1);
}

    #tabbar .nav .nav-sx {
        padding-right: 0px;
        padding-left: 0px;
    }

    #tabbar .nav .nav-dx {
        padding-right: 0px;
        padding-left: 0px;
        height: 30px;
    }

    #tabbar .nav .custom-action-top {
        margin-top: 4px;
        margin-right: 2px;
    }

    #tabbar .nav ul {
        padding-left: 0px;
    }

        #tabbar .nav ul > li {
            list-style-type: none;
            float: left;
            position: relative;
            display: block;
            background-color: #93c21e;
        }

            #tabbar .nav ul > li:hover {
                background-color: #c7f557;
            }

            #tabbar .nav ul > li > a,
            #bottombar ul > li > a {
                position: relative;
                display: block;
                padding: 5px 20px;
                background-color: #ffffff;
                color: #333;
                text-decoration: none;
                text-wrap: nowrap;
                font-size: 0.9rem;
            }

                #tabbar .nav ul > li > a:hover {
                    position: relative;
                    display: block;
                    padding: 5px 20px 3px 20px;
                    margin-bottom: 2px;
                    background-color: #ffffff;
                    color: #246ab2;
                }


            #tabbar .nav ul > li > span {
                position: relative;
                display: block;
                background-color: #ffffff;
                padding: 5px 20px 3px 20px;
                margin-bottom: 2px;
                color: #246ab2;
                font-weight: bold;
            }


#tabcontent > div > .panel {
    /*margin-top:10px;*/
    background-color: #ffffff;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: 0;
    margin-bottom: 10px;
}

#tabcontent .app {
    padding: 10px;
}

    #tabcontent .app.print > div > fieldset {
        background-color: #93c21e;
    }

        #tabcontent .app.print > div > fieldset > div > fieldset {
            background-color: #c8e6c9;
        }

            #tabcontent .app.print > div > fieldset > div > fieldset.print-box > label {
                margin-left: 0.5rem;
                margin-right: 0.5rem;
            }

#buttonbar {
    padding-top: 2px;
}

#bottombar {
    padding: 10px 0 10px 0;
}

    #bottombar .btn-default {
        background-color: transparent;
        margin: 0 5px 0 5px;
        border: 1px solid transparent;
        color: #fff;
        font-weight: bold;
    }


        #bottombar .btn-default:hover {
            background-color: #93c21e;
            color: #fff;
            font-weight: bold;
            box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),0 1px 5px 0 rgba(0,0,0,0.12),0 3px 1px -2px rgba(0,0,0,0.1);
        }

.btn-toolbar .btn-default {
    color: #333;
    background-color: #fff;
    border-color: #ccc;
}

.btn-toolbar .active {
    color: #333;
    background-color: #e6e6e6;
    background-image: none;
    border-color: #adadad;
}

.btn-default-custom {
    text-transform: none !important;
    color: #333 !important;
    background-color: #fff !important;
    border-color: #ccc !important;
    font-weight: normal !important;
    margin: 0 0 0 0 !important;
    min-width: 200px;
    text-align: left;
}

.btn-group-custom-top .btn-default-custom {
    width: 200px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}

.btn-group-custom-top .dropdown-custom {
    width: 400px;
}

.btn-group-custom-top ul > li > a {
    width: 400px;
    text-transform: none !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}

.btn-caret-custom {
    color: #333 !important;
    background-color: #fff !important;
    border-color: #ccc !important;
    font-weight: normal !important;
    margin: 0 0 0 0 !important;
}

    .btn-caret-custom:hover {
        background-color: #93c21e !important;
        color: #fff !important;
        font-weight: bold !important;
        box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),0 1px 5px 0 rgba(0,0,0,0.12),0 3px 1px -2px rgba(0,0,0,0.1);
    }

.btn-caret-custom-disabled {
    background-color: rgba(204, 204, 204, 1) !important;
    color: black !important;
}

    .btn-caret-custom-disabled:hover {
        background-color: rgba(204, 204, 204, 1) !important;
        color: black !important;
        box-shadow: none !important;
    }

.btn-xs {
    padding: 1px 5px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

.dropdown-custom {
    min-width: 200px;
}

.btn-group-custom ul > li > a:hover {
    background-color: #93c21e !important;
    color: #ffffff !important;
}

.btn-group-custom ul > li > a {
    display: block !important;
    padding: 3px 20px !important;
    min-width: 200px;
    text-transform: none;
    /*clear: both;*/
    /*font-weight: 400;
    line-height: 1.4285;*/
    /*color: #333;*/
    /*white-space: nowrap;*/
}

.btn-default-custom:hover {
    background-color: #93c21e !important;
    color: #fff !important;
    font-weight: bold !important;
    box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),0 1px 5px 0 rgba(0,0,0,0.12),0 3px 1px -2px rgba(0,0,0,0.1);
}

@media (min-width:992px) {
    #bottombar {
        margin-top: -50px;
        padding-top: 50px;
    }
}

.buttonspacer {
    padding: 0 10px 0 0;
}

.ricerca, .elenco, .dettaglio {
    /* rimozione stili cablati */
    height: inherit !important;
    width: inherit !important;
}

.internaltab {
    border: 1px solid #ccc;
    border-bottom: 0;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),0 1px 5px 0 rgba(0,0,0,0.12),0 3px 1px -2px rgba(0,0,0,0.1);
}

    .internaltab ul {
        list-style: none;
        text-transform: uppercase;
        font-weight: 500;
        color: #333;
        align-items: center;
        background-color: #b0bec5;
    }

        .internaltab ul > li {
            float: left;
            position: relative;
            display: block;
            border-right: 1px solid #b0bec5;
        }

            .internaltab ul > li.tabprev {
                border-right: 0;
                background-color: #b0bec5;
            }

            .internaltab ul > li.tabnext {
                background-color: #b0bec5;
            }

            .internaltab ul > li:hover {
                background-color: #93c21e;
            }

            .internaltab ul > li.tabprev:hover, .internaltab ul > li.tabnext:hover, .internaltab ul > li.tablist:hover, .internaltab ul > li.tablist:focus {
                background-color: #b0bec5;
            }

            .internaltab ul > li > a {
                position: relative;
                display: block;
                padding: 7px 20px;
                background-color: #b0bec5;
                color: #333;
                text-decoration: none;
            }

                .internaltab ul > li > a:hover {
                    position: relative;
                    display: block;
                    padding: 5px 20px 3px 20px;
                    margin-bottom: 2px;
                    background-color: #93c21e;
                    color: #ffffff;
                }

            .internaltab ul > li.tabprev > a:hover, .internaltab ul > li.tabnext > a:hover, .internaltab ul > li.tablist > a:hover, .internaltab ul > li.tablist > a:focus {
                background-color: #b0bec5;
                color: #246ab2;
            }


            .internaltab ul > li > span {
                position: relative;
                display: block;
                background-color: #ffffff;
                padding: 5px 20px 3px 20px;
                margin-bottom: 2px;
                color: #246ab2;
                font-weight: bold;
            }

            .internaltab ul > li.tabprev > span, .internaltab ul > li.tabnext > span {
                position: relative;
                top: 0;
                display: block;
                background-color: #b0bec5;
                padding: 7px 20px;
                margin-bottom: 2px;
                color: #333;
            }

            .internaltab ul > li.disabled > span {
                color: #aaa !important;
            }

            .internaltab ul > li.tablist li {
                float: none;
            }

            .internaltab ul > li.tablist ul {
                width: max-content;
                font-size: inherit;
            }

.internaltabborder > fieldset, .internaltabborder > div > fieldset {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.internaltabborder > div {
    /* rimozione stili cablati */
    width: inherit !important;
}

#apsmodal .modal-dialog {
    width: 98%;
    height: calc(100vh - 20px);
    padding: 0;
    margin: 10px auto;
    max-width: 100%;
}

#apsmodal.modalwait .modal-dialog {
    width: 500px;
    height: 180px;
    padding: 0;
    margin: 30vh auto;
}

#apsmodal.modalwaitextended .modal-dialog {
    width: 550px;
    height: 250px;
    padding: 0;
    margin: 30vh auto;
}

#apsmodal.modalwaitextendedconfirm .modal-dialog {
    width: 550px;
    height: 450px;
    padding: 0;
    margin: 15vh auto;
}

#apsmodal .modal-content {
    /*height: 100%;*/
}

#apsmodal .modal-body {
    padding: 5px;
    height: calc(100vh - 20px - 35px);
}

#apsmodal.modalwait .modal-body {
    padding: 5px;
    height: 150px;
}

#apsmodal.modalwaitextended .modal-body {
    padding: 5px;
    height: 220px;
}

#apsmodal.modalwaitextendedconfirm .modal-body {
    padding: 5px;
    height: 420px;
}

#apsmodal .modal-body iframe {
    width: 100%;
    height: 100%;
}

#apsmodal .modal-frame {
    height: 99%;
}

#apsmodal .modal-header {
    /* padding-right: 0px; */
    /* padding-top: 5px; */
    /* height: 25px; */
    padding: 14px;
}

    #apsmodal .modal-header .close {
        /*margin-right: -18px;
    margin-top: -8px;
    font-size: 30px;*/
        opacity: 1;
        padding: 0px;
        width: 24px;
        height: 24px;
    }

        #apsmodal .modal-header .close:hover {
            opacity: 0.5;
        }

        #apsmodal .modal-header .close span {
            font-weight: bold;
        }

        #apsmodal .modal-header .close:hover {
            color: red;
        }

.freespeech {
    font-weight: bold;
    color: #FFFFFF;
}

.hidden {
    display: none !important;
}

.left {
    float: left;
}

.right {
    float: right;
}

.hiddentext {
    display: none !important;
}

#popupMask {
    display: none;
}

#popupContainer {
    display: none;
}

#pbprog {
    display: none;
}

#customactions {
    display: none;
}

@media (min-width: 768px) {
    .apk_select.width2 {
        width: 14em !important;
    }
}

@media (min-width:768px) {
    .width0 {
        width: 4em;
    }

    .width1 {
        width: 6.5em;
    }

    .width105 {
        width: 9em;
    }

    .width2 {
        width: 12em;
    }

    .width3 {
        width: 18em;
    }

    .width4 {
        width: 24em;
    }

    .width5 {
        width: 30em;
    }

    .width6 {
        width: 36em;
    }

    .width7 {
        width: 42em;
    }

    .width8 {
        width: 48em;
    }

    .width9 {
        width: 54em;
    }

    .width10 {
        width: 60em;
    }

    .widthall {
        width: 100%;
    }
}

.inputcalendar {
    /* margin-left: 0px; */
    /* margin-right: 2px; */
    text-decoration: none;
}

    .inputcalendar > svg {
        width: 1.5em;
        height: 1.5em;
        vertical-align: top;
    }

/* The main calendar widget.  div containing a table. */

div.calendar {
    position: relative;
    Z-INDEX: 500;
}

.calendar, .calendar table {
    border: 1px solid;
    font-size: 11px;
    cursor: default;
}

    /* Header part -- contains navigation buttons and day names. */

    .calendar thead .title { /* This holds the current "month, year" */
        background: #fff; /* Pressing it will take you to the current date */
        color: #000;
        font-weight: bold;
        text-align: center;
    }

    .calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
        text-align: center; /* They are the navigation buttons */
    }

    .calendar thead .firstrow .button {
        background: #778;
        color: #fff;
        padding: 2px;
    }

    .calendar thead .firstrow .hilite { /* How do the buttons in header appear when hover */
        background: #eee;
        color: #000;
    }

    .calendar thead .firstrow .active { /* Make the buttons seem like they're pressing */
        padding: 2px 0px 0px 2px;
    }

    .calendar thead .headrow .button {
        background: #eee;
        color: #000;
        padding: 2px;
    }

    .calendar thead .headrow .hilite { /* How do the buttons in header appear when hover */
        background: #778;
        color: #fff;
    }

    .calendar thead .headrow .active { /* Make the buttons seem like they're pressing */
        padding: 2px 0px 0px 2px;
    }

    .calendar thead .daynames {
        background: #778;
    }

        .calendar thead .daynames > td {
            padding: 2px;
        }

        .calendar thead .daynames .hilite { /* How do the buttons in header appear when hover */
            background: #eee;
            color: #000;
        }

        .calendar thead .daynames .active { /* Make the buttons seem like they're pressing */
            padding: 2px 0px 0px 2px;
        }

    .calendar thead .name { /* Cells <TD> containing the day names */
        min-width: 30px;
        color: #fff;
        text-align: center;
    }

    .calendar thead .weekend { /* How a weekend day name shows in header */
        color: #ff6347;
    }

    /* The body part -- contains all the days in month. */

    .calendar tbody .day { /* Cells <TD> containing month days dates */
        background: #fff;
        color: #456;
        padding: 2px 4px 2px 2px;
        text-align: right;
    }

    .calendar tbody .weekend { /* Cells showing weekend days */
        color: #ff6347;
    }

    .calendar tbody .wn { /* Cell showing the number of the week */
        background: #778;
        color: #fff;
    }

    .calendar tbody .today { /* Cell showing selected date */
        color: #64b5f6;
        font-weight: bold;
    }

    .calendar tbody .hilite { /* Hovered cells <TD> */
        background: #64b5f6 !important;
        color: #fff !important;
    }

    .calendar tbody .rowhilite td { /* Cells of the selected row */
        /* background: #eee; */
    }

        .calendar tbody .rowhilite td.wn { /* Cells of the selected row */
            /* background: #eee; */
            /* color: #000000; */
        }

    .calendar tbody td.active { /* Active (pressed) cells <TD> */
        padding: 2px 2px 0px 2px;
    }

    .calendar tbody .selected { /* Cell showing today date */
        background: #64b5f6;
        color: #fff;
        font-weight: bold;
    }

    .calendar tbody .disabled {
        color: #999;
    }

    .calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
        visibility: hidden;
    }

    .calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
        display: none;
    }

    /* The footer part -- status bar and "Close" button */

    .calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
        background: #eee;
        text-align: center;
    }

    .calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
    }

    .calendar tfoot .hilite { /* Hover style for buttons in footer */
    }

    .calendar tfoot .active { /* Active (pressed) style for buttons in footer */
    }

/* Combo boxes (menus that display months/years for direct selection) */

.combo {
    position: absolute;
    display: none;
    top: 0px;
    left: 0px;
    width: 4em;
    background: #eee;
    color: #000;
    border: 1px solid #778;
    font-size: smaller;
}

    .combo .label {
        width: 100%;
        text-align: center;
    }

    .combo .hilite {
        background: #778;
        color: #fff;
    }

    .combo .active {
        background: #778;
        color: #fff;
        font-weight: bold;
    }

/***** WEBCONTROLS *****/

/* compositesearch */
.compositesearch {
    display: inline-flex;
}

    .compositesearch label {
        display: block !important;
    }

        .compositesearch label span input {
            display: inline;
        }

        .compositesearch label span div {
            display: inline-block;
        }

.waylabel {
    display: inline-table !important;
}

    .waylabel > span:before {
        content: "";
        display: block;
    }

    .waylabel > span {
        display: block;
    }

        .waylabel > span input {
            display: inline;
        }

        .waylabel > span select {
            display: inline;
        }

        .waylabel > span > div {
            display: inline-block;
        }

.apsdatagrid {
    background-color: #ffffff;
    width: 100%;
}

    .apsdatagrid > tbody > tr > td {
        padding: 5px;
    }

.apsmaxigrid {
    background-color: #ffffff;
    width: 100%;
}

    .apsmaxigrid > tbody > tr > td {
        /* 	padding: 0px; */
    }

.apsmaxigrid-dr-open > td {
    padding: 5px !important;
}

.apsmaxigrid-dr-close > td {
    padding: 0px !important;
}

.plusminus {
    text-decoration: none;
}

/*sorascrivo il coloro del table-striped*/
.table-striped > tbody > tr:nth-child(2n+1) > td, .table-striped > tbody > tr:nth-child(2n+1) > th {
    background-color: #eaf6ff;
}

.table-hover tbody tr:hover td, .table-hover tbody tr:hover th {
    background-color: #dbf0ff;
}

.HeaderStyle, .headerstyle {
    font-weight: bold;
    text-decoration: none;
}

.apk-datatable .HeaderStyle td > a,
.apk-datatable .headerstyle td > a {
    color: var(--apk-black);
}

.HeaderStyle td > a,
.headerstyle td > a {
    color: #337ab7;
    text-decoration: none;
}


.HeaderStyle td > a:hover,
.headerstyle td > a:hover {
    text-decoration: underline;
}

.ItemStyle, .itemstyle {
    white-space: normal !important;
}

.SelectedItemStyle, .selecteditemstyle {
    white-space: normal !important;
}

.apstreeview {
    display: block;
}

    .apstreeview div {
        float: none;
    }

    .apstreeview span {
        display: inline;
    }

.fieldsettreeview > div {
    float: left;
}

/* NEW VERSION TOOLTIP BOOTSTRAP 5 */
.tooltip-inner {
    max-width: 300px !important;
    font-size: larger !important;
    padding: 5px 10px !important;
}

/* JQUERY TOOLTIP */
.ui-tooltip {
    position: absolute;
    z-index: 3000;
    border: 2px solid #3399CC;
    background-color: #E0ECFF;
    padding: 5px;
    text-align: left;
}

    .ui-tooltip h3, #tooltip div {
        margin: 0;
    }

    .ui-tooltip h3 {
        font-size: 1em;
        font-weight: normal;
    }

/* From bootstrap */
.linkbutton {
    display: inline-block;
    padding: 2px 12px;
    margin: 0 2px 0 2px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-image: none;
    border: 1px solid transparent;
    border-radius: 4px;
}

.linkbutton {
    background-color: #e1e2e1;
    border: 1px solid #888;
}

    .linkbutton a {
        color: #333;
        text-decoration: none;
    }

    .linkbutton:hover {
        background-color: #eee;
        box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),0 1px 5px 0 rgba(0,0,0,0.12),0 3px 1px -2px rgba(0,0,0,0.1);
    }

    .linkbutton a:hover {
        color: #246ab2;
    }

.linkbutton_disable {
    cursor: auto;
}

    .linkbutton_disable:hover {
        background-color: #e1e2e1;
        box-shadow: none;
    }

.ALinkButton {
    color: #333;
    text-decoration: none;
}

    .ALinkButton:hover {
        color: #246ab2;
    }

.apscheckboxlist {
    display: block;
}

    .apscheckboxlist input {
        margin: 4px;
    }

.IconSvgImg {
    width: 24px;
    height: 24px;
}

#stili singoli

.textleft {
    text-align: left;
}

.textright {
    text-align: right;
}

.textcenter {
    text-align: center;
}

.inline {
    display: inline;
}

#ctl00_gestfattureelettronichepadettaglio1_ctl00_fsDati {
    overflow: scroll;
}

.scroll38 {
    overflow: auto;
    height: 100%
}

/*css per editor di testo tiny mce*/
.mce-tinymce mce-container mce-panel {
    display: inline-table !important;
    width: 100% !important;
}

.GridViewScrollHeader th, .GridViewScrollHeader td, .GridViewScrollHeader a {
    font-weight: normal;
    /*white-space: no-wrap;*/

    border-right: 1px solid #e6e6e6;
    border-bottom: 1px solid #e6e6e6;
    vertical-align: center;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 8px;
    border-width: 0px;
    width: 100%;
    color: white;
    text-decoration: none;
    background-color: #3399CC;
}

.GridViewScrollHeader th, .GridViewScrollHeader td {
    padding: 5px;
}

.GridViewScrollItem td {
    white-space: nowrap;
    border-right: 1px solid #e6e6e6;
    border-bottom: 1px solid #e6e6e6;
    background-color: #FFFFFF;
    color: #444444;
}

.GridViewScrollItemFreeze td {
    font-family: Arial, Helvetica, sans-serif;
    text-align: left;
    border-width: 0px;
    width: 100%;
    color: white;
    text-decoration: none;
    background-color: #3399CC;
    white-space: nowrap;
    border-bottom: 1px solid transparent;
    height: 38px;
}

.GridViewScrollFooterFreeze td {
    white-space: nowrap;
    border-right: 1px solid #e6e6e6;
    border-top: 1px solid #e6e6e6;
    border-bottom: 1px solid #e6e6e6;
    font-family: Arial, Helvetica, sans-serif;
    /*font-size: 10px;*/
    height: 38px;
    color: white;
    text-decoration: none;
    background-color: #3399CC;
    padding: 5px;
}


/*** APSTracker BEGIN ***/

.progress-tracker {
    display: flex;
    margin: 15px auto;
    padding: 0;
    list-style: none;
}

.progress-step {
    flex: 1 1 0%;
    margin: 0;
    padding: 0;
    min-width: 24px;
}

    .progress-step:last-child .progress-marker::after {
        display: none;
    }

.progress-link {
    display: block;
    position: relative;
}

.progress-marker {
    display: block;
    position: relative;
}

    .progress-marker::before {
        content: attr(data-text);
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        z-index: 20;
        width: 36px;
        height: 36px;
        padding-bottom: 2px;
        border-radius: 50%;
        transition: background-color, border-color;
        transition-duration: 0.3s;
    }

    .progress-marker::after {
        content: "";
        display: block;
        position: absolute;
        z-index: 1;
        top: 16px;
        right: -12px;
        width: 100%;
        height: 4px;
        transition: background-color 0.3s, background-position 0.3s;
    }

.progress-text {
    display: block;
    padding: 8px 8px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-title {
    margin-top: 0;
    font-size: inherit;
}

.aps_tracker .progress-step {
    cursor: pointer;
}

.aps_tracker.no-pointer-events .progress-step, .progress-step.is-disabled {
    pointer-events: none;
    cursor: none;
}

.progress-step .progress-text {
    color: var(--bs-dark);
}

.progress-step.is-active .progress-title {
    color: var(--bs-primary);
    font-weight: bold;
}

.progress-step.is-failed .progress-title {
    color: var(--bs-danger);
    font-weight: bold;
}

.progress-step.is-validated .progress-title {
    color: var(--bs-success);
    font-weight: bold;
}

.progress-step.is-disabled .progress-title {
    color: var(--bs-secondary);
    font-weight: normal;
}

.progress-step .progress-marker {
    color: #fff;
}

    .progress-step .progress-marker::before {
        background-color: #b6b6b6;
    }

    .progress-step .progress-marker::after {
        background-color: #b6b6b6;
    }

.progress-step.is-active .progress-marker::before {
    background-color: #4aaefe;
    border: solid 4px #fff;
}

.progress-step.is-active .progress-marker::before {
    box-shadow: 0 0 0 1px #4aaefe;
}

.progress-step.is-active.is-complete .progress-marker::before {
    box-shadow: 0 0 0 1px var(--bs-primary);
}

.progress-step.is-active.is-failed .progress-marker::before {
    box-shadow: 0 0 0 1px var(--bs-danger);
}

.progress-step.is-active.is-validated .progress-marker::before {
    box-shadow: 0 0 0 1px var(--bs-success);
}

.progress-step.is-active.is-disabled .progress-marker::before {
    box-shadow: 0 0 0 1px var(--bs-secondary);
}

.progress-step.is-complete .progress-marker::before, .progress-step.is-complete .progress-marker::after {
    background-color: var(--bs-primary);
}

.progress-step.is-validated .progress-marker::before, .progress-step.is-validated .progress-marker::after {
    background-color: var(--bs-success);
}

.progress-step.is-failed .progress-marker::before, .progress-step.is-failed .progress-marker::after {
    background-color: var(--bs-danger);
}

.progress-step.is-disabled .progress-marker::before {
    background-color: #b6b6b6;
    border: solid 2px #3C3D3A;
    color: #3C3D3A;
}

.progress-step.is-disabled .progress-marker::after {
    background-color: #b6b6b6;
}

.progress-step:hover .progress-marker::before {
    background-color: var(--apk-secondary-hover);
}

.progress-step.is-complete:hover .progress-marker::before, .progress-step.is-active:hover .progress-marker::before {
    background-color: var(--apk-primary-hover);
}

.progress-step.is-failed:hover .progress-marker::before {
    background-color: var(--apk-danger-hover);
}

.progress-step.is-validated:hover .progress-marker::before {
    background-color: var(--apk-success-hover);
}

.progress-tracker--text .progress-step:last-child, .progress-tracker--center .progress-step:last-child, .progress-tracker--right .progress-step:last-child {
    flex-grow: 1;
}

.progress-tracker--center {
    text-align: center;
}

    .progress-tracker--center .progress-marker::before, .progress-tracker--center .progress-text--dotted::before {
        margin-left: auto;
        margin-right: auto;
    }

    .progress-tracker--center .progress-marker::after {
        right: -50%;
    }


@keyframes scale-up {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0);
    }

    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

.anim--large .progress-link::before, .anim--large .progress-link::after {
    width: 48px;
    height: 48px;
}

.anim--path .progress-marker::after {
    background-image: linear-gradient(to right, #b6b6b6 50%, #868686 50%);
    background-size: 200% 100%;
    background-position: 0% 100%;
    transition: background-position 0.3s ease-out;
}

.progress-step.is-complete .anim--path .progress-marker::after {
    background-position: -100% 100%;
}

.anim--path .progress-step.is-complete .progress-marker::after {
    background-position: -100% 100%;
}

[dir=rtl] .progress-marker::after {
    right: auto;
    left: -12px;
}

[dir=rtl] .progress-tracker--center .progress-marker::after {
    left: -50%;
}

.container-left {
    margin-left: 0;
    padding-left: 0;
    width: auto;
}

/*** APSTracker END ***/

/*Bordo campi obbligatori*/
.requiredfield {
    border-bottom: 2px solid #f62d03 !important;
}

/* DataGrid */
.table:not(.apk-datatable) {
    --bs-table-hover-bg: none;
}

.table {
    --bs-table-striped-bg: none;
    --bs-table-color: none;
    --bs-table-striped-color: none;
}

.table-hover > tbody > tr:hover > * {
    --bs-table-color-state: none;
}

.DG_PagerCellPageLink {
    text-decoration: none;
}

a {
    text-decoration: none;
}

/* BEGIN: SELECT FILTERABLE */

.apk_select {
    font-weight: normal;
    display: inline-table;
    margin: 0.3rem;
    position: relative;
}

    .apk_select label {
        margin-bottom: 0;
        margin-left: 0;
    }

    .apk_select .input-group input {
        padding: 1px 5px;
        font-size: 1em;
        color: #333;
        height: 26px;
        background-color: #fff;
        background-image: none;
        border: 1px solid #888;
        border-radius: 4px;
        -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
        box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
        -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
        -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
        transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
        border-right: 0;
    }

    .apk_select.disabled .input-group input, .apk_select.disabled .input-group .input-group-text {
        background-color: #f5f5f5 !important;
    }


    .apk_select .input-group span {
        cursor: pointer;
    }

.input-group:focus-within .input-group-text {
    border: 0;
    border-radius: 0 !important;
}

.input-group-text {
    background-color: #fff;
    border-left: 0;
    border-color: #888;
    padding: 1px !important;
}

.input-group:focus-within {
    outline: -webkit-focus-ring-color auto 1px;
}

.apk_select .input-group > input:focus, .apk_select .input-group > input:focus-visible {
    outline: unset;
    border: 1px #fff solid;
}

.apk_select .input-group > input {
    flex: 1;
    cursor: pointer;
}


.apk-dropdown-opts {
    color: #000;
    background-color: #fff;
    padding: 1px;
    position: absolute;
    min-width: 100%;
    width: max-content;
    z-index: 99999;
}

    .apk-dropdown-opts.drop-up {
        border: 1px solid var(--bs-gray-700);
        border-bottom: 0;
    }

    .apk-dropdown-opts:not(.drop-up) {
        border: 1px solid var(--bs-gray-700);
        border-top: 0;
    }

    .apk-dropdown-opts input {
        margin-top: 3px;
        margin-bottom: 2px;
        padding: 2px 10px;
    }

    .apk-dropdown-opts > span {
        background-color: #fff;
        margin: 1px;
        padding: 1px 5px;
        cursor: pointer;
    }

        .apk-dropdown-opts > span:hover,
        .apk-dropdown-opts > span:focus {
            background-color: var(--bs-primary);
            color: #fff;
        }

        .apk-dropdown-opts > span:focus-visible {
            outline: none !important;
        }

        .apk-dropdown-opts > span.selected {
            font-weight: bold;
        }

        .apk-dropdown-opts > span.disabled {
            background-color: #eee !important;
            color: var(--bs-gray-700);
            margin: 1px;
            cursor: not-allowed;
            font-style: italic;
        }

            .apk-dropdown-opts > span.disabled:hover {
                font-weight: normal;
            }

/* END SELECT FILTERABLE */

/*** container transparent - start ***/
.container-transparent {
    background-color: transparent;
    border: 0;
    box-shadow: none;
}

    /* Shadow ONLY on top */
    .container-transparent.border-top {
        border-radius: 0;
        border-top: 1px solid #b0bec5 !important;
    }

    .container-transparent.border-top-shadow {
        border-radius: 0;
        border-top: 3px solid #b0bec5 !important;
        /* X-offset: 0
		   Y-offset: -5px (moves it up)
		   Blur: 5px
		   Spread: -5px (pulls the sides in so they are hidden)
		   inner and outer shadows
		*/
        box-shadow: 0 -5px 5px -5px rgba(0, 0, 0, 0.4), inset 0 5px 5px -5px rgba(0, 0, 0, 0.4);
    }

    /* Shadow ONLY on bottom */
    .container-transparent.border-bottom {
        border-radius: 0;
        border-bottom: 1px solid #b0bec5 !important;
    }

    .container-transparent.border-bottom-shadow {
        border-radius: 0;
        border-bottom: 3px solid #b0bec5 !important;
        /* X-offset: 0
		   Y-offset: 5px (moves it down)
		   Blur: 5px
		   Spread: -5px (pulls the sides in)
		   inner and outer shadows
		*/
        box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.4), inset 0 -5px 5px -5px rgba(0, 0, 0, 0.4);
    }

    /* Combined: Both shadows active */
    .container-transparent.border-top-shadow.border-bottom-shadow {
        box-shadow: 0 -5px 5px -5px rgba(0, 0, 0, 0.4), 0 5px 5px -5px rgba(0, 0, 0, 0.4), inset 0 5px 5px -5px rgba(0, 0, 0, 0.4), inset 0 -5px 5px -5px rgba(0, 0, 0, 0.4);
    }
/*** container transparent - end ***/

/*** base-sections-container - START ***/
/* --- Tabella Differenze --- */
.base-sections-container .diff-table-container {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.base-sections-container .diff-header-row {
    display: grid;
    grid-template-columns: 180px 1fr 1fr;
    gap: 15px;
    background: #f8fafc;
    padding: 10px 15px;
    border-bottom: 2px solid #cbd5e1;
    font-weight: bold;
    color: #475569;
    font-size: 0.85rem;
}

.base-sections-container .diff-data-row {
    display: grid;
    grid-template-columns: 180px 1fr 1fr;
    gap: 15px;
    padding: 6px 15px;
    border-bottom: 1px solid #e2e8f0;
    border-left: 4px solid transparent;
    align-items: center;
}

    .base-sections-container .diff-data-row:last-child {
        border-bottom: none;
    }

.base-sections-container .diff-col-prop {
    word-break: break-word;
}

.base-sections-container .diff-input-full {
    width: 100% !important;
    box-sizing: border-box;
    margin: 0;
    border: 1px solid #ccc;
    padding: 4px;
    border-radius: 4px;
}

.base-sections-container .diff-data-row.unchanged {
    opacity: 0.7;
}

.base-sections-container .diff-data-row.changed .diff-old input {
    text-decoration: line-through;
    color: #991b1b;
    border-color: #fca5a5;
}

.base-sections-container .diff-data-row.changed .diff-new input {
    color: #166534;
    border-color: #86efac;
    font-weight: bold;
}

/* --- Accordion (Stile Small/Flat) --- */
.base-sections-container-accordion {
    border-bottom: 1px solid #cbd5e1;
    background: transparent;
    margin: 0;
}

    .base-sections-container-accordion:not(.closed) > .base-sections-container-accordion-header {
        background: #d2e5ed !important;
    }

.base-sections-container-accordion-inner:not(.closed) > .base-sections-container-accordion-header {
    background: #fff !important;
    height: 40px;
}

.base-sections-container-accordion:not(.closed) > .base-sections-container-accordion-header h4 {
    color: #0056b3 !important;
}

.base-sections-container-accordion-inner > .base-sections-container-accordion-header h5 {
    font-weight: bold;
}

.base-sections-container-accordion-inner:not(.closed) > .base-sections-container-accordion-header h5 {
    color: #0056b3 !important;
}

.base-sections-container-accordion-header {
    padding: 10px 10px;
    height: 43px;
    background: #fff;
    cursor: pointer;
    color: #0056b3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background-color 0.2s;
}

    .base-sections-container-accordion-header:hover {
        background: #f8fafc;
    }

    .base-sections-container-accordion-header span {
        font-weight: 600;
        font-size: 1rem;
    }

.base-sections-container-accordion-body {
    padding: 5px 10px;
    display: block;
    overflow-x: auto;
    background: #fff;
    border-radius: 4px;
}

.base-sections-container-accordion.closed .base-sections-container-accordion-body {
    display: none;
}

.base-sections-container-accordion h5 {
    font-size: 1.1rem;
}

.base-sections-container-accordion.closed h4, .base-sections-container-accordion.closed h5 {
    color: #000 !important;
}

.base-sections-container-accordion-icon {
    transition: transform 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.base-sections-container-accordion.closed > .base-sections-container-accordion-header > .base-sections-container-accordion-icon svg {
    fill: #000;
}

.base-sections-container-accordion:not(.closed) > .base-sections-container-accordion-header > .base-sections-container-accordion-icon svg {
    fill: #000;
}

.base-sections-container-accordion.closed .base-sections-container-accordion-icon {
    transform: rotate(180deg);
}

.base-sections-container-accordion-inner {
    padding: 10px;
    border-radius: 4px;
}

    .base-sections-container-accordion-inner > .base-sections-container-accordion-header {
        height: 40px !important;
    }

/* Regole CSS specifiche per gli accordion interni */
.base-sections-container-accordion .base-sections-container-accordion {
    padding-left: 15px;
}

    .base-sections-container-accordion .base-sections-container-accordion:last-child {
        border-bottom: none;
    }

/*** base-sections-container - END ***/

/*** apk-sidebar-index - START ***/

.apk-sidebar-index fieldset {
    background-color: transparent;
}

/* --- Layout Sidebar Specifico --- */
.apk-sidebar-index-layout {
    position: relative;
    display: flex;
    align-items: flex-start;
    overflow: hidden;
    border: #ddd solid 1px;
    border-radius: 4px;
    box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),0 1px 5px 0 rgba(0,0,0,0.12),0 3px 1px -2px rgba(0,0,0,0.1);
    background: #f8fafc;
}

.apk-sidebar-index-drawer-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    height: 100%;
}

/* Stessi stili della timeline ma senza il padding per i pallini */
.apk-sidebar-index-drawer {
    background-color: #f8fafc;
    border: none;
    transition: all 0.3s ease;
    height: 100%;
    overflow-y: auto;
    flex: 1;
    min-width: 0;
}

.apk-sidebar-index-toggle-handle {
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-left: none;
    width: 22px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    color: #363e4a;
    margin-top: 16px;
    font-size: 0.75rem;
    box-shadow: 2px 0 4px rgba(0,0,0,0.03);
    transition: background-color 0.2s;
}

    .apk-sidebar-index-toggle-handle:hover {
        background-color: #e2e8f0;
        color: #1e293b;
    }

/* Aggiunto position: relative per permettere il corretto calcolo dell'offsetTop in JS */
.apk-sidebar-index-details {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    height: 100%;
    padding: 0 20px;
    position: relative;
}

/* --- Voci della Sidebar --- */
.apk-sidebar-index-link-item {
    display: block;
    font-size: 1rem;
    padding: 8px 15px;
    text-decoration: none;
    color: #000;
    border-bottom: 1px solid #cbd5e1;
    transition: background-color 0.2s;
    border-left: 4px solid transparent;
    background-color: white;
}

    .apk-sidebar-index-link-item:last-child {
    }

    .apk-sidebar-index-link-item:hover {
        background-color: #e2e8f0;
    }

    .apk-sidebar-index-link-item.active {
        border-left-color: #0056b3;
        background-color: #fff;
        color: #0056b3;
        font-weight: 600
    }

/*Sotto ai 1200px di larghezza rimpicciolisco il font della sidebar*/
@media (max-width: 1200px) {
    .apk-sidebar-index-link-item {
        font-size: 0.8rem !important;
        padding: 8px 10px;
    }
}

@media (max-width: var(--apk-mobile-breakpoint)) {
    .apk-sidebar-index-layout {
        position: relative;
    }

    .apk-sidebar-index-drawer-container {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 100;
        width: 100%;
    }

    .apk-sidebar-index-drawer {
        width: 82vw !important;
        flex: none !important;
    }
}

.apk-back-to-top {
    position: absolute;
    bottom: 80px;
    right: 25px;
    width: 45px;
    height: 45px;
    background-color: var(--apk-blue);
    color: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    cursor: pointer;
    display: none; /* Nascosto di default */
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 1050;
    transition: background-color 0.2s;
}

/*** apk-sidebar-index - END ***/

/*** apk-master-details - START ***/

/* --- Layout Principale --- */
.apk-master-details-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    padding: 10px 0px;
    height: 85vh;
    overflow: hidden;
    background: #f8fafc;
}

.apk-master-details-details {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    height: 100%;
    padding-right: 10px;
}

/* --- Left Drawer (Timeline + Handle) --- */
.apk-master-details-drawer-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    height: 100%;
}

.apk-master-details-timeline {
    width: 100%;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 10px 0 10px 15px;
    transition: all 0.3s ease;
    height: 100%;
    overflow-y: auto;
}

.apk-master-details-toggle-handle {
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-left: none;
    width: 22px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 0 8px 8px 0;
    color: #64748b;
    margin-top: 40px;
    font-size: 0.75rem;
    box-shadow: 2px 0 4px rgba(0,0,0,0.03);
    transition: background-color 0.2s;
}

    .apk-master-details-toggle-handle:hover {
        background-color: #e2e8f0;
        color: #1e293b;
    }

/* --- Timeline (Lista Sinistra) --- */
.apk-master-details .timeline-track {
    position: relative;
    padding-top: 15px;
    padding-left: 24px;
    padding-right: 15px;
}

    .apk-master-details .timeline-track::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-bottom: 8px solid #cbd5e1;
    }

    .apk-master-details .timeline-track::after {
        content: '';
        position: absolute;
        top: 8px;
        bottom: 0;
        left: 5px;
        width: 2px;
        background-color: #cbd5e1;
    }

.apk-master-details .timeline-item {
    display: block;
    position: relative;
    padding: 12px 15px;
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

    .apk-master-details .timeline-item::before {
        content: '';
        position: absolute;
        top: 18px;
        left: -24px;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background-color: #fff;
        border: 2px solid #94a3b8;
        z-index: 2;
        transition: all 0.2s ease;
    }

    .apk-master-details .timeline-item::after {
        content: '';
        position: absolute;
        top: 28px;
        bottom: -30px;
        left: -19px;
        width: 2px;
        background-color: #cbd5e1;
        z-index: 1;
    }

    .apk-master-details .timeline-item:last-child::after {
        display: none;
    }

    .apk-master-details .timeline-item:hover {
        border-color: #cbd5e1;
        cursor: pointer;
    }

.apk-master-details .timeline-date {
    font-size: 0.8rem;
    color: #64748b;
    display: block;
}

.apk-master-details .timeline-tipo {
    font-weight: 600;
    color: #1e293b;
    margin-top: 4px;
    display: block;
    font-size: 0.9rem;
}

.apk-master-details .timeline-item.active {
    border-color: #3b82f6;
    background-color: #f0f7ff;
}

    .apk-master-details .timeline-item.active::before {
        border-color: #3b82f6;
        background-color: #3b82f6;
    }

@media (max-width: var(--apk-mobile-breakpoint)) {
    .apk-master-details-layout {
        position: relative; /* Contenitore base per l'assoluto */
    }

    .apk-master-details-drawer-container {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 100; /* La fa 'volare' sopra al pannello di destra */
        width: 100%;
    }

    .apk-master-details-timeline {
        width: 100vw !important; /* Occupa tutta la larghezza dello schermo... */
        max-width: calc(100% - 22px); /* ...meno lo spazio vitale per la maniglia */
        flex: none !important; /* Annulla il flex in linea del C# */
    }
}

/*** apk-master-details - END ***/

/*** APSButtonsList BEGIN ***/
.apk-buttons-list {
    display: inline-block;
}

    .apk-buttons-list .apk-buttons-list-label {
        border-bottom: 1px solid currentColor;
        margin-bottom: 5px;
    }

    .apk-buttons-list:not(.text-end) .apk-buttons-list-container .btn {
        margin-right: 5px;
    }

    .apk-buttons-list.text-end .apk-buttons-list-container .btn {
        margin-left: 5px;
    }
/*** APSButtonsList END ***/

/*** APSHeaderCard BEGIN ***/
.apk-header-card {
    display: inline-block;
    vertical-align: top;
    margin: 5px 5px 10px 0px;
}

    .apk-header-card.block {
        display: block;
    }

    .apk-header-card .apk-header-card-title {
        font-weight: bold;
        margin-bottom: 7px;
    }

    .apk-header-card .apk-header-card-subtitle {
        margin-bottom: 7px;
    }

    .apk-header-card .apk-buttons-list {
        display: block;
    }
/*** APSHeaderCard END ***/

/*** APSDataTable BEGIN ***/
/* Padding applicato a tutte le celle della tabella */
table.apk-datatable.table-striped > tbody > tr > td {
    padding: var(--apk-table-padding);
    vertical-align: middle;
}

/* Gestione dell'header */
table.apk-datatable.table-striped > tbody > .headerstyle > td,
table.apk-datatable.table-striped > tbody > .HeaderStyle > td,
table.apk-datatable.table-striped > tbody > .HeaderStyle > th,
table.apk-datatable.table-striped > tbody > .headerstyle > th {
    background-color: var(--apk-table-header-bg-color);
    font-weight: bold;
    font-size: var(--apk-table-header-font-size);
    color: var(--apk-table-header-color);
}

table.apk-datatable.table-striped tbody tr.headerstyle:hover td,
table.apk-datatable.table-striped tbody tr.headerstyle:hover th,
table.apk-datatable.table-striped tbody tr.HeaderStyle:hover td,
table.apk-datatable.table-striped tbody tr.HeaderStyle:hover th {
    background-color: var(--apk-table-header-bg-color);
}

/* Sovrascrivo il colore delle righe del corpo della tabella */
table.apk-datatable.table-striped > tbody > tr > td,
table.apk-datatable.table-striped > tbody > tr > th {
    background-color: var(--apk-table-bg-color);
}

/*Questo per gestire il caso di griglia cliccabile*/
table.apk-datatable.table-hover tbody tr:hover {
    background-color: var(--apk-100);
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    position: relative;
}

    /* Rendi lo sfondo delle celle trasparente al passaggio del mouse, altrimenti copriranno il colore della riga */
    table.apk-datatable.table-hover tbody tr:hover td,
    table.apk-datatable.table-hover tbody tr:hover th {
        background-color: transparent;
        box-shadow: none !important;
        border-bottom-color: transparent;
    }
/*Gestione riga dello styler, ordinamento*/
table.apk-datatable.table-striped > tbody > tr.PagerStyle > td,
table.apk-datatable.table-striped > tbody > tr.PagerStyle > th {
    background-color: var(--apk-table-styler-bg-color);
}

table.apk-datatable.table-striped tbody tr.PagerStyle:hover td,
table.apk-datatable.table-striped tbody tr.PagerStyle:hover th {
    background-color: var(--apk-table-styler-bg-color);
}

table.apk-datatable.table-striped {
    border-collapse: separate !important;
    border: var(--apk-table-border);
    border-radius: var(--apk-table-border-radius);
    box-shadow: var(--apk-table-box-shadow);
}
/*** APSDataTable END ***/

/*** APSHeader BEGIN ***/
.apk-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.apk-header .apk-header-infos {
    flex: 1 1 auto;
    min-width: 0;
}

.apk-header .apk-header-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
}

.apk-header .btn-group-sm > .btn, .apk-header .btn-sm {
    --bs-btn-padding-x: 0.75rem;
    --bs-btn-padding-y: 0.375rem;
    --bs-btn-font-size: 1rem;
    --bs-btn-border-radius: var(--bs-border-radius);
}

/*** APSHeader END ***/

/*** APSGoogleMap BEGIN ***/
.apk-google-map-wrapper { 
    position: relative; 
    width: 100%; 
    margin-top: 10px; 
}

.apk-google-map-canvas {
    height: 100%;
    width: 100%;
}

.apk-google-map-toolbar {
    background-color: white;
    border: 2px solid #fff;
    border-radius: 2px;
    box-shadow: 0 1px 4px -1px rgba(0,0,0,0.3);
    padding: 0 5px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    height: 40px;
    cursor: pointer;
}

.apk-google-map-btn {
    display: flex; 
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    text-decoration: none;
    padding: 4px;
    border-radius: 2px;
    background: transparent;
    border: none;
    width: 30px;
    height: 30px;
}

    .apk-google-map-btn:hover {
        background-color: #eee;
        color: #333;
    }

    .apk-google-map-btn.active {
        background-color: #007bff;
        color: #ffffff;
    }

.apk-google-map-legend-panel {
    background-color: white; 
    border: 2px solid #fff; 
    padding: 10px;
    border-radius: 2px; 
    box-shadow: 0 1px 4px -1px rgba(0,0,0,0.3);
    font-family: Roboto, Arial, sans-serif; 
    display: none;
    min-width: 250px; /* Increased width for sliders */
    max-height: 60%;
    overflow-y: auto;
    overflow-x: hidden;
    margin-right: 10px;
    margin-top: 10px;
}

/* Row Layout */
.apk-google-map-layer-row {
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    margin-bottom: 8px; 
    font-size: 13px;
}

    .apk-google-map-layer-row.indented {
        margin-left: 20px;
    }

.apk-google-map-layer-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
    margin-top: 5px;
    font-size: 13px;
    font-weight: bold;
    background: #f0f0f0;
    padding: 4px 6px;
    border-radius: 3px;
}

.apk-google-map-layer-label {
    display: flex;
    align-items: center;
    flex-grow: 1;
    cursor: pointer;
}

    .apk-google-map-layer-label input[type='checkbox'] {
        margin-right: 8px;
        width: 16px;
        height: 16px;
        cursor: pointer;
    }

.apk-google-map-layer-slider {
    width: 70px;
    margin-left: 10px;
    cursor: pointer;
}

.apk-google-map-iw-btn {
    cursor: pointer;
    border: 1px solid #ccc;
    padding: 5px 10px;
    border-radius: 3px;
    background: #fff;
    margin: 0 2px;
}

.apk-google-map-iw-save {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.apk-google-map-iw-undo {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}
/*** APSGoogleMap END ***/

/* =========================================================================
   BOOTSTRAP ITALIA THEME OVERRIDES
   Sovrascrive le utility di Bootstrap classico (text/bg/border/icon + btn)
   usando le variabili --apk-* definite nel :root.
   Stesso approccio di bootstrap-italia: override delle classi native.
   ========================================================================= */

/* ---------- Text colors ---------- */
.text-primary { color: var(--apk-primary) !important; }
.text-secondary { color: var(--apk-secondary) !important; }
.text-success { color: var(--apk-success) !important; }
.text-danger { color: var(--apk-danger) !important; }
.text-warning { color: var(--apk-warning) !important; }
.text-white { color: var(--apk-white) !important; }
.text-black { color: var(--apk-black) !important; }
.text-base-light { color: var(--apk-base-light) !important; }

/* text - varianti light/dark */
.text-primary-light { color: var(--apk-primary-light) !important; }
.text-primary-dark { color: var(--apk-primary-dark) !important; }
.text-secondary-light { color: var(--apk-secondary-light) !important; }
.text-secondary-dark { color: var(--apk-secondary-dark) !important; }
.text-success-light { color: var(--apk-success-light) !important; }
.text-success-dark { color: var(--apk-success-dark) !important; }
.text-danger-light { color: var(--apk-danger-light) !important; }
.text-danger-dark { color: var(--apk-danger-dark) !important; }
.text-warning-light { color: var(--apk-warning-light) !important; }
.text-warning-dark { color: var(--apk-warning-dark) !important; }

/* text - scala di grigi */
.text-100 { color: var(--apk-100) !important; }
.text-200 { color: var(--apk-200) !important; }
.text-300 { color: var(--apk-300) !important; }
.text-400 { color: var(--apk-400) !important; }
.text-500 { color: var(--apk-500) !important; }
.text-600 { color: var(--apk-600) !important; }
.text-700 { color: var(--apk-700) !important; }
.text-800 { color: var(--apk-800) !important; }
.text-900 { color: var(--apk-900) !important; }

/* ---------- Background colors ---------- */
.bg-primary { background-color: var(--apk-primary) !important; }
.bg-secondary { background-color: var(--apk-secondary) !important; }
.bg-success { background-color: var(--apk-success) !important; }
.bg-danger { background-color: var(--apk-danger) !important; }
.bg-warning { background-color: var(--apk-warning) !important; }
.bg-white { background-color: var(--apk-white) !important; }
.bg-black { background-color: var(--apk-black) !important; }
.bg-base-light { background-color: var(--apk-base-light) !important; }

/* bg - varianti light/dark */
.bg-primary-light { background-color: var(--apk-primary-light) !important; }
.bg-primary-dark { background-color: var(--apk-primary-dark) !important; }
.bg-secondary-light { background-color: var(--apk-secondary-light) !important; }
.bg-secondary-dark { background-color: var(--apk-secondary-dark) !important; }
.bg-success-light { background-color: var(--apk-success-light) !important; }
.bg-success-dark { background-color: var(--apk-success-dark) !important; }
.bg-danger-light { background-color: var(--apk-danger-light) !important; }
.bg-danger-dark { background-color: var(--apk-danger-dark) !important; }
.bg-warning-light { background-color: var(--apk-warning-light) !important; }
.bg-warning-dark { background-color: var(--apk-warning-dark) !important; }

/* bg - scala di grigi */
.bg-100 { background-color: var(--apk-100) !important; }
.bg-200 { background-color: var(--apk-200) !important; }
.bg-300 { background-color: var(--apk-300) !important; }
.bg-400 { background-color: var(--apk-400) !important; }
.bg-500 { background-color: var(--apk-500) !important; }
.bg-600 { background-color: var(--apk-600) !important; }
.bg-700 { background-color: var(--apk-700) !important; }
.bg-800 { background-color: var(--apk-800) !important; }
.bg-900 { background-color: var(--apk-900) !important; }

/* ---------- Border colors ---------- */
.border-primary { border-color: var(--apk-primary) !important; }
.border-secondary { border-color: var(--apk-secondary) !important; }
.border-success { border-color: var(--apk-success) !important; }
.border-danger { border-color: var(--apk-danger) !important; }
.border-warning { border-color: var(--apk-warning) !important; }
.border-white { border-color: var(--apk-white) !important; }
.border-black { border-color: var(--apk-black) !important; }
.border-base-light { border-color: var(--apk-base-light) !important; }

/* border - varianti light/dark */
.border-primary-light { border-color: var(--apk-primary-light) !important; }
.border-primary-dark { border-color: var(--apk-primary-dark) !important; }
.border-secondary-light { border-color: var(--apk-secondary-light) !important; }
.border-secondary-dark { border-color: var(--apk-secondary-dark) !important; }
.border-success-light { border-color: var(--apk-success-light) !important; }
.border-success-dark { border-color: var(--apk-success-dark) !important; }
.border-danger-light { border-color: var(--apk-danger-light) !important; }
.border-danger-dark { border-color: var(--apk-danger-dark) !important; }
.border-warning-light { border-color: var(--apk-warning-light) !important; }
.border-warning-dark { border-color: var(--apk-warning-dark) !important; }

/* border - scala di grigi */
.border-100 { border-color: var(--apk-100) !important; }
.border-200 { border-color: var(--apk-200) !important; }
.border-300 { border-color: var(--apk-300) !important; }
.border-400 { border-color: var(--apk-400) !important; }
.border-500 { border-color: var(--apk-500) !important; }
.border-600 { border-color: var(--apk-600) !important; }
.border-700 { border-color: var(--apk-700) !important; }
.border-800 { border-color: var(--apk-800) !important; }
.border-900 { border-color: var(--apk-900) !important; }

/* ---------- Icon colors (SVG fill) ---------- */
.icon-primary { fill: var(--apk-primary) !important; }
.icon-secondary { fill: var(--apk-secondary) !important; }
.icon-success { fill: var(--apk-success) !important; }
.icon-danger { fill: var(--apk-danger) !important; }
.icon-warning { fill: var(--apk-warning) !important; }
.icon-white { fill: var(--apk-white) !important; }
.icon-black { fill: var(--apk-black) !important; }
.icon-base-light { fill: var(--apk-base-light) !important; }

/* icon - varianti light/dark */
.icon-primary-light { fill: var(--apk-primary-light) !important; }
.icon-primary-dark { fill: var(--apk-primary-dark) !important; }
.icon-secondary-light { fill: var(--apk-secondary-light) !important; }
.icon-secondary-dark { fill: var(--apk-secondary-dark) !important; }
.icon-success-light { fill: var(--apk-success-light) !important; }
.icon-success-dark { fill: var(--apk-success-dark) !important; }
.icon-danger-light { fill: var(--apk-danger-light) !important; }
.icon-danger-dark { fill: var(--apk-danger-dark) !important; }
.icon-warning-light { fill: var(--apk-warning-light) !important; }
.icon-warning-dark { fill: var(--apk-warning-dark) !important; }

/* icon - scala di grigi */
.icon-100 { fill: var(--apk-100) !important; }
.icon-200 { fill: var(--apk-200) !important; }
.icon-300 { fill: var(--apk-300) !important; }
.icon-400 { fill: var(--apk-400) !important; }
.icon-500 { fill: var(--apk-500) !important; }
.icon-600 { fill: var(--apk-600) !important; }
.icon-700 { fill: var(--apk-700) !important; }
.icon-800 { fill: var(--apk-800) !important; }
.icon-900 { fill: var(--apk-900) !important; }

/* font size rem */
.fs-7 {
    font-size: var(--apk-fs-7) !important;
}

.fs-8 {
    font-size: var(--apk-fs-8) !important;
}

/* ---------- Buttons (solid) ---------- */
.btn-primary {
    color: var(--apk-white);
    background-color: var(--apk-primary);
    border-color: var(--apk-primary);
}

    .btn-primary:hover,
    .btn-primary:focus,
    .btn-primary:active,
    .btn-primary.active {
        color: var(--apk-white);
        background-color: var(--apk-primary-dark);
        border-color: var(--apk-primary-dark);
    }

.btn-secondary {
    color: var(--apk-white);
    background-color: var(--apk-secondary);
    border-color: var(--apk-secondary);
}

    .btn-secondary:hover,
    .btn-secondary:focus,
    .btn-secondary:active,
    .btn-secondary.active {
        color: var(--apk-white);
        background-color: var(--apk-secondary-dark);
        border-color: var(--apk-secondary-dark);
    }

.btn-success {
    color: var(--apk-white);
    background-color: var(--apk-success);
    border-color: var(--apk-success);
}

    .btn-success:hover,
    .btn-success:focus,
    .btn-success:active,
    .btn-success.active {
        color: var(--apk-white);
        background-color: var(--apk-success-dark);
        border-color: var(--apk-success-dark);
    }

.btn-danger {
    color: var(--apk-white);
    background-color: var(--apk-danger);
    border-color: var(--apk-danger);
}

    .btn-danger:hover,
    .btn-danger:focus,
    .btn-danger:active,
    .btn-danger.active {
        color: var(--apk-white);
        background-color: var(--apk-danger-dark);
        border-color: var(--apk-danger-dark);
    }

.btn-warning {
    color: var(--apk-white);
    background-color: var(--apk-warning);
    border-color: var(--apk-warning);
}

    .btn-warning:hover,
    .btn-warning:focus,
    .btn-warning:active,
    .btn-warning.active {
        color: var(--apk-white);
        background-color: var(--apk-warning-dark);
        border-color: var(--apk-warning-dark);
    }

/* ---------- Buttons (outline) ---------- */
.btn-outline-primary {
    color: var(--apk-primary);
    border-color: var(--apk-primary);
    background-color: transparent;
}

    .btn-outline-primary:hover,
    .btn-outline-primary:focus,
    .btn-outline-primary:active,
    .btn-outline-primary.active {
        color: var(--apk-white);
        background-color: var(--apk-primary);
        border-color: var(--apk-primary);
    }

.btn-outline-secondary {
    color: var(--apk-secondary);
    border-color: var(--apk-secondary);
    background-color: transparent;
}

    .btn-outline-secondary:hover,
    .btn-outline-secondary:focus,
    .btn-outline-secondary:active,
    .btn-outline-secondary.active {
        color: var(--apk-white);
        background-color: var(--apk-secondary);
        border-color: var(--apk-secondary);
    }

.btn-outline-success {
    color: var(--apk-success);
    border-color: var(--apk-success);
    background-color: transparent;
}

    .btn-outline-success:hover,
    .btn-outline-success:focus,
    .btn-outline-success:active,
    .btn-outline-success.active {
        color: var(--apk-white);
        background-color: var(--apk-success);
        border-color: var(--apk-success);
    }

.btn-outline-danger {
    color: var(--apk-danger);
    border-color: var(--apk-danger);
    background-color: transparent;
}

    .btn-outline-danger:hover,
    .btn-outline-danger:focus,
    .btn-outline-danger:active,
    .btn-outline-danger.active {
        color: var(--apk-white);
        background-color: var(--apk-danger);
        border-color: var(--apk-danger);
    }

.btn-outline-warning {
    color: var(--apk-warning);
    border-color: var(--apk-warning);
    background-color: transparent;
}

    .btn-outline-warning:hover,
    .btn-outline-warning:focus,
    .btn-outline-warning:active,
    .btn-outline-warning.active {
        color: var(--apk-white);
        background-color: var(--apk-warning);
        border-color: var(--apk-warning);
    }

/* ---------- Buttons light/dark (solid) ---------- */
/* Le tinte -light sono chiare (L 85%): testo scuro per contrasto.
   Le tinte -dark sono scure (L 15-25%): testo bianco per contrasto. */

.btn-primary-light {
    color: var(--apk-primary-dark);
    background-color: var(--apk-primary-light);
    border-color: var(--apk-primary-light);
}

    .btn-primary-light:hover,
    .btn-primary-light:focus,
    .btn-primary-light:active,
    .btn-primary-light.active {
        color: var(--apk-white);
        background-color: var(--apk-primary);
        border-color: var(--apk-primary);
    }

.btn-primary-dark {
    color: var(--apk-white);
    background-color: var(--apk-primary-dark);
    border-color: var(--apk-primary-dark);
}

    .btn-primary-dark:hover,
    .btn-primary-dark:focus,
    .btn-primary-dark:active,
    .btn-primary-dark.active {
        color: var(--apk-white);
        background-color: var(--apk-primary);
        border-color: var(--apk-primary);
    }

.btn-secondary-light {
    color: var(--apk-secondary-dark);
    background-color: var(--apk-secondary-light);
    border-color: var(--apk-secondary-light);
}

    .btn-secondary-light:hover,
    .btn-secondary-light:focus,
    .btn-secondary-light:active,
    .btn-secondary-light.active {
        color: var(--apk-white);
        background-color: var(--apk-secondary);
        border-color: var(--apk-secondary);
    }

.btn-secondary-dark {
    color: var(--apk-white);
    background-color: var(--apk-secondary-dark);
    border-color: var(--apk-secondary-dark);
}

    .btn-secondary-dark:hover,
    .btn-secondary-dark:focus,
    .btn-secondary-dark:active,
    .btn-secondary-dark.active {
        color: var(--apk-white);
        background-color: var(--apk-secondary);
        border-color: var(--apk-secondary);
    }

.btn-success-light {
    color: var(--apk-success-dark);
    background-color: var(--apk-success-light);
    border-color: var(--apk-success-light);
}

    .btn-success-light:hover,
    .btn-success-light:focus,
    .btn-success-light:active,
    .btn-success-light.active {
        color: var(--apk-white);
        background-color: var(--apk-success);
        border-color: var(--apk-success);
    }

.btn-success-dark {
    color: var(--apk-white);
    background-color: var(--apk-success-dark);
    border-color: var(--apk-success-dark);
}

    .btn-success-dark:hover,
    .btn-success-dark:focus,
    .btn-success-dark:active,
    .btn-success-dark.active {
        color: var(--apk-white);
        background-color: var(--apk-success);
        border-color: var(--apk-success);
    }

.btn-danger-light {
    color: var(--apk-danger-dark);
    background-color: var(--apk-danger-light);
    border-color: var(--apk-danger-light);
}

    .btn-danger-light:hover,
    .btn-danger-light:focus,
    .btn-danger-light:active,
    .btn-danger-light.active {
        color: var(--apk-white);
        background-color: var(--apk-danger);
        border-color: var(--apk-danger);
    }

.btn-danger-dark {
    color: var(--apk-white);
    background-color: var(--apk-danger-dark);
    border-color: var(--apk-danger-dark);
}

    .btn-danger-dark:hover,
    .btn-danger-dark:focus,
    .btn-danger-dark:active,
    .btn-danger-dark.active {
        color: var(--apk-white);
        background-color: var(--apk-danger);
        border-color: var(--apk-danger);
    }

.btn-warning-light {
    color: var(--apk-warning-dark);
    background-color: var(--apk-warning-light);
    border-color: var(--apk-warning-light);
}

    .btn-warning-light:hover,
    .btn-warning-light:focus,
    .btn-warning-light:active,
    .btn-warning-light.active {
        color: var(--apk-white);
        background-color: var(--apk-warning);
        border-color: var(--apk-warning);
    }

.btn-warning-dark {
    color: var(--apk-white);
    background-color: var(--apk-warning-dark);
    border-color: var(--apk-warning-dark);
}

    .btn-warning-dark:hover,
    .btn-warning-dark:focus,
    .btn-warning-dark:active,
    .btn-warning-dark.active {
        color: var(--apk-white);
        background-color: var(--apk-warning);
        border-color: var(--apk-warning);
    }

/* ---------- Buttons light/dark (outline) ---------- */
/* Outline: testo = colore della tinta, hover riempie con la tinta.
   Per -light (sfondo chiaro all'hover) il testo hover resta scuro. */

.btn-outline-primary-light {
    color: var(--apk-primary-dark);
    border-color: var(--apk-primary-light);
    background-color: transparent;
}

    .btn-outline-primary-light:hover,
    .btn-outline-primary-light:focus,
    .btn-outline-primary-light:active,
    .btn-outline-primary-light.active {
        color: var(--apk-primary-dark);
        background-color: var(--apk-primary-light);
        border-color: var(--apk-primary-light);
    }

.btn-outline-primary-dark {
    color: var(--apk-primary-dark);
    border-color: var(--apk-primary-dark);
    background-color: transparent;
}

    .btn-outline-primary-dark:hover,
    .btn-outline-primary-dark:focus,
    .btn-outline-primary-dark:active,
    .btn-outline-primary-dark.active {
        color: var(--apk-white);
        background-color: var(--apk-primary-dark);
        border-color: var(--apk-primary-dark);
    }

.btn-outline-secondary-light {
    color: var(--apk-secondary-dark);
    border-color: var(--apk-secondary-light);
    background-color: transparent;
}

    .btn-outline-secondary-light:hover,
    .btn-outline-secondary-light:focus,
    .btn-outline-secondary-light:active,
    .btn-outline-secondary-light.active {
        color: var(--apk-secondary-dark);
        background-color: var(--apk-secondary-light);
        border-color: var(--apk-secondary-light);
    }

.btn-outline-secondary-dark {
    color: var(--apk-secondary-dark);
    border-color: var(--apk-secondary-dark);
    background-color: transparent;
}

    .btn-outline-secondary-dark:hover,
    .btn-outline-secondary-dark:focus,
    .btn-outline-secondary-dark:active,
    .btn-outline-secondary-dark.active {
        color: var(--apk-white);
        background-color: var(--apk-secondary-dark);
        border-color: var(--apk-secondary-dark);
    }

.btn-outline-success-light {
    color: var(--apk-success-dark);
    border-color: var(--apk-success-light);
    background-color: transparent;
}

    .btn-outline-success-light:hover,
    .btn-outline-success-light:focus,
    .btn-outline-success-light:active,
    .btn-outline-success-light.active {
        color: var(--apk-success-dark);
        background-color: var(--apk-success-light);
        border-color: var(--apk-success-light);
    }

.btn-outline-success-dark {
    color: var(--apk-success-dark);
    border-color: var(--apk-success-dark);
    background-color: transparent;
}

    .btn-outline-success-dark:hover,
    .btn-outline-success-dark:focus,
    .btn-outline-success-dark:active,
    .btn-outline-success-dark.active {
        color: var(--apk-white);
        background-color: var(--apk-success-dark);
        border-color: var(--apk-success-dark);
    }

.btn-outline-danger-light {
    color: var(--apk-danger-dark);
    border-color: var(--apk-danger-light);
    background-color: transparent;
}

    .btn-outline-danger-light:hover,
    .btn-outline-danger-light:focus,
    .btn-outline-danger-light:active,
    .btn-outline-danger-light.active {
        color: var(--apk-danger-dark);
        background-color: var(--apk-danger-light);
        border-color: var(--apk-danger-light);
    }

.btn-outline-danger-dark {
    color: var(--apk-danger-dark);
    border-color: var(--apk-danger-dark);
    background-color: transparent;
}

    .btn-outline-danger-dark:hover,
    .btn-outline-danger-dark:focus,
    .btn-outline-danger-dark:active,
    .btn-outline-danger-dark.active {
        color: var(--apk-white);
        background-color: var(--apk-danger-dark);
        border-color: var(--apk-danger-dark);
    }

.btn-outline-warning-light {
    color: var(--apk-warning-dark);
    border-color: var(--apk-warning-light);
    background-color: transparent;
}

    .btn-outline-warning-light:hover,
    .btn-outline-warning-light:focus,
    .btn-outline-warning-light:active,
    .btn-outline-warning-light.active {
        color: var(--apk-warning-dark);
        background-color: var(--apk-warning-light);
        border-color: var(--apk-warning-light);
    }

.btn-outline-warning-dark {
    color: var(--apk-warning-dark);
    border-color: var(--apk-warning-dark);
    background-color: transparent;
}

    .btn-outline-warning-dark:hover,
    .btn-outline-warning-dark:focus,
    .btn-outline-warning-dark:active,
    .btn-outline-warning-dark.active {
        color: var(--apk-white);
        background-color: var(--apk-warning-dark);
        border-color: var(--apk-warning-dark);
    }
