/*
 * Compatibilità AdminLTE 2 / Bootstrap 3 sopra AdminLTE 3 / Bootstrap 4.
 * Riproduce l'aspetto di AdminLTE 2 (skin-blue) e rimappa le classi BS3 ancora usate nelle view
 * (box, pull-*, col-xs-*, col-*-offset-*, panel, label, glyphicon...). Da ridurre man mano che le
 * view vengono migrate al markup Bootstrap 4.
 */

/* --- base: AdminLTE 2 usa 14px, AdminLTE 3 16px --- */
html {
    font-size: 14px;
}

body {
    font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* colori scuriti rispetto ad AdminLTE 2 per un contrasto di almeno 4.5:1 (WCAG AA) */
a {
    color: #2f6f95;
}

a:hover,
a:focus {
    color: #72afd2;
}

.content-wrapper {
    background-color: #ecf0f5;
}

.content-header h1 {
    font-size: 24px;
}

/* --- skin-blue: header --- */
.main-header.navbar {
    background-color: #347aa3;
    border-bottom: 0;
}

.main-header .nav-link,
.main-header .nav-link:hover,
.main-header .nav-link:focus,
.main-header.navbar-dark .navbar-nav .nav-link,
.main-header.navbar-dark .navbar-nav .nav-link:hover,
.main-header.navbar-dark .navbar-nav .nav-link:focus {
    color: #fff;
}

/* voci a destra dell'header (webmail, notifiche, utente) centrate sulla stessa linea */
.main-header .navbar-nav.ml-auto > .nav-item > .nav-link {
    display: flex;
    align-items: center;
}

.main-header .user-menu .user-image {
    margin-top: 0;
}

.main-header .nav-link:hover {
    background-color: #2f6f95;
}

/* --- skin-blue: sidebar --- */
.main-sidebar,
.main-sidebar::before {
    background-color: #222d32;
}

.main-sidebar .brand-link {
    background-color: #2f6f95;
    color: #fff;
    border-bottom: 0 !important;
}

.user-panel .info small,
.user-panel .info small a {
    color: #fff;
    font-size: 11px;
}

.nav-sidebar .nav-link {
    border-radius: 0;
    color: #b8c7ce !important;
    border-left: 3px solid transparent;
}

.nav-sidebar > .nav-item > .nav-link:hover,
.nav-sidebar > .nav-item.menu-open > .nav-link,
.nav-sidebar > .nav-item > .nav-link.active {
    background-color: #1e282c !important;
    color: #fff !important;
    border-left-color: #347aa3;
    box-shadow: none !important;
}

[class*="sidebar-dark-"] .nav-sidebar > .nav-item > .nav-treeview {
    background-color: #2c3b41;
}

/* altezze voci come AdminLTE 2: 44px le principali, 30px le sottovoci */
.nav-sidebar > .nav-item > .nav-link {
    margin-bottom: 0;
    padding: 12px 5px 12px 15px;
}

.nav-sidebar .nav-treeview > .nav-item > .nav-link {
    margin-bottom: 0;
    padding: 5px 5px 5px 20px;
}

/* rientro crescente dei sottomenu annidati come AdminLTE 2 */
.nav-sidebar .nav-treeview .nav-treeview > .nav-item > .nav-link {
    padding-left: 40px;
}

.nav-sidebar .nav-treeview .nav-treeview .nav-treeview > .nav-item > .nav-link {
    padding-left: 60px;
}

.nav-sidebar .nav-link > p > .right {
    top: 50%;
    transform: translateY(-50%);
}

/* AdminLTE 3 ruota la freccia con transform: rotate(), che sostituirebbe il translateY e la sposterebbe in basso */
.nav-sidebar .menu-is-opening > .nav-link > p > .right,
.nav-sidebar .menu-open > .nav-link > p > .right {
    transform: translateY(-50%) rotate(-90deg);
}

/* sidebar larga 230px come AdminLTE 2 (AdminLTE 3: 250px) */
.main-sidebar,
.main-sidebar::before,
.layout-fixed .brand-link {
    width: 230px;
}

/* stesso selettore di AdminLTE 3 (+ :not(.sidebar-collapse)) per vincere sulla specificità */
@media (min-width: 992px) {
    body:not(.sidebar-collapse):not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-top-nav) .content-wrapper,
    body:not(.sidebar-collapse):not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-top-nav) .main-header,
    body:not(.sidebar-collapse):not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-top-nav) .main-footer {
        margin-left: 230px;
    }
}

/* voci a tutta larghezza come AdminLTE 2 (AdminLTE 3 le fissa a 250px - 1rem) */
.main-sidebar .sidebar {
    padding-right: 0;
    padding-left: 0;
}

.sidebar-mini .main-sidebar .nav-link,
.main-sidebar .nav-sidebar .nav-link {
    width: 230px;
}

.main-sidebar .user-panel {
    margin-right: .5rem;
    margin-left: .5rem;
}

.sidebar-mini.sidebar-collapse .main-sidebar:hover,
.sidebar-mini.sidebar-collapse .main-sidebar:hover .brand-link {
    width: 230px;
}

/* intestazione del menu utente */
.user-menu .user-header {
    background-color: #347aa3 !important;
}

.nav-sidebar .nav-treeview .nav-link {
    color: #8aa4af !important;
}

.nav-sidebar .nav-treeview .nav-link:hover,
.nav-sidebar .nav-treeview .nav-link.active {
    background-color: transparent !important;
    color: #fff !important;
    box-shadow: none !important;
}

/* --- pulsanti e form come AdminLTE 2 --- */
.btn {
    border-radius: 3px;
}

.btn-primary { background-color: #347aa3; border-color: #2f6f95; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background-color: #2f6f95; border-color: #204d74; }
.btn-success { background-color: #008749; border-color: #00733e; }
.btn-success:hover, .btn-success:focus, .btn-success:active { background-color: #00733e; border-color: #398439; }
.btn-info { background-color: #00c0ef; border-color: #00acd6; }
.btn-info:hover, .btn-info:focus, .btn-info:active { background-color: #00acd6; border-color: #269abc; }
.btn-danger { background-color: #dd4b39; border-color: #d73925; }
.btn-danger:hover, .btn-danger:focus, .btn-danger:active { background-color: #d73925; border-color: #ac2925; }
.btn-warning { background-color: #f39c12; border-color: #e08e0b; }
.btn-warning:hover, .btn-warning:focus, .btn-warning:active { background-color: #e08e0b; border-color: #d58512; }

.btn-xs {
    padding: 1px 5px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

.btn-flat {
    border-radius: 0;
    box-shadow: none;
    border-width: 1px;
}

.form-control {
    border-radius: 0;
    border-color: #d2d6de;
    box-shadow: none;
}

.form-control:focus {
    border-color: #347aa3;
    box-shadow: none;
}

.help-block {
    display: block;
    margin-top: 5px;
    margin-bottom: 10px;
    color: #737373;
}

.control-label {
    font-weight: 700;
}

.has-feedback {
    position: relative;
}

.form-control-feedback {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    width: 34px;
    height: 34px;
    line-height: 34px;
    text-align: center;
    pointer-events: none;
}

/* .glyphicon (più sotto) imposta position: relative e farebbe finire l'icona sotto il campo */
.has-feedback .form-control-feedback {
    position: absolute;
    top: 0;
    height: calc(2.25rem + 2px);
    line-height: calc(2.25rem + 2px);
    color: #777;
}

.has-feedback .form-control {
    padding-right: 42.5px;
}

/* --- pagina di login come AdminLTE 2 --- */
/* AdminLTE 3 centra il box in verticale con flex: AdminLTE 2 lo mette in alto con margin 7% */
.login-page {
    display: block;
    height: auto;
    background: #d2d6de;
}

.login-box {
    width: 360px;
    margin: 7% auto;
}

@media (max-width: 768px) {
    .login-box {
        width: 90%;
        margin-top: 20px;
    }
}

/* BS4 usa font-weight: bolder, che sopra il 300 del logo dà 400 */
.login-logo b {
    font-weight: 700;
}

.login-logo {
    font-size: 35px;
    text-align: center;
    margin-bottom: 25px;
    font-weight: 300;
}

.login-logo a {
    color: #444;
}

.login-box-body {
    background: #fff;
    padding: 20px;
    border-top: 0;
    color: #666;
}

.login-box-msg {
    margin: 0;
    text-align: center;
    padding: 0 20px 20px 20px;
}

/* bg-gray di AdminLTE 2: in AdminLTE 3 è grigio scuro con color:#fff !important,
   che viene ereditato dal contenuto dei box (es. dettaglio SAL) rendendo il testo invisibile */
.bg-gray,
.bg-gray > a {
    background-color: #d2d6de !important;
    color: #000 !important;
}

/* --- paginazione GridView (LinkPager e kartik): pagina attiva nel colore primario dell'app --- */
.pagination .page-link {
    color: #2f6f95;
}
.pagination .page-item.active .page-link {
    background-color: #347aa3;
    border-color: #347aa3;
    color: #fff;
}

/* --- box di AdminLTE 2 --- */
.box {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    background: #fff;
    border-top: 3px solid #d2d6de;
    border-radius: 3px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .1);
}

.box.box-primary { border-top-color: #347aa3; }
.box.box-info { border-top-color: #00c0ef; }
.box.box-danger { border-top-color: #dd4b39; }
.box.box-warning { border-top-color: #f39c12; }
.box.box-success { border-top-color: #008749; }
.box.box-default { border-top-color: #d2d6de; }

.box.box-solid { border-top: 0; }
.box.box-solid.box-primary { border: 1px solid #347aa3; }
.box.box-solid.box-primary > .box-header { color: #fff; background-color: #347aa3; }
.box.box-solid.box-info { border: 1px solid #00c0ef; }
.box.box-solid.box-info > .box-header { color: #fff; background-color: #00c0ef; }
.box.box-solid.box-danger { border: 1px solid #dd4b39; }
.box.box-solid.box-danger > .box-header { color: #fff; background-color: #dd4b39; }
.box.box-solid.box-success { border: 1px solid #008749; }
.box.box-solid.box-success > .box-header { color: #fff; background-color: #008749; }
.box.box-solid.box-default { border: 1px solid #d2d6de; }
.box.box-solid.box-default > .box-header { color: #444; background-color: #d2d6de; }

.box-header {
    position: relative;
    display: block;
    padding: 10px;
    color: #444;
}

.box-header.with-border {
    border-bottom: 1px solid #f4f4f4;
}

.box-header .box-title {
    display: inline-block;
    margin: 0;
    font-size: 18px;
    line-height: 1;
}

.box-header > .box-tools {
    position: absolute;
    top: 5px;
    right: 10px;
}

.box-body {
    padding: 10px;
    border-radius: 0 0 3px 3px;
}

.box-footer {
    padding: 10px;
    background-color: #fff;
    border-top: 1px solid #f4f4f4;
    border-radius: 0 0 3px 3px;
}

.box-header::after,
.box-body::after,
.box-footer::after {
    display: table;
    clear: both;
    content: "";
}

/* --- tabelle come AdminLTE 2 / Bootstrap 3 --- */
.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
    padding: 8px;
    line-height: 1.42857143;
    border-top: 1px solid #f4f4f4;
}

.table > thead > tr > th {
    border-bottom: 2px solid #f4f4f4;
}

.table-bordered,
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {
    border: 1px solid #f4f4f4;
}

.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td {
    border-bottom-width: 2px;
}

.table-condensed > thead > tr > th,
.table-condensed > tbody > tr > th,
.table-condensed > thead > tr > td,
.table-condensed > tbody > tr > td {
    padding: 5px;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #f9f9f9;
}

.table-hover > tbody > tr:hover {
    background-color: #f5f5f5;
}

/* kartik GridView: intestazione bianca senza sfumatura */
.kv-table-header {
    background: #fff;
}

/* classi di contesto BS3 sulle righe (rowOptions => ['class' => 'success'], ...) */
.table > thead > tr.active > th, .table > tbody > tr.active > td, .table > tbody > tr.active > th { background-color: #f5f5f5; }
.table > thead > tr.success > th, .table > tbody > tr.success > td, .table > tbody > tr.success > th { background-color: #dff0d8; }
.table > thead > tr.info > th, .table > tbody > tr.info > td, .table > tbody > tr.info > th { background-color: #d9edf7; }
.table > thead > tr.warning > th, .table > tbody > tr.warning > td, .table > tbody > tr.warning > th { background-color: #fcf8e3; }
.table > thead > tr.danger > th, .table > tbody > tr.danger > td, .table > tbody > tr.danger > th { background-color: #f2dede; }

/* stesse classi di contesto BS3 sulle singole celle (<td class="danger">) */
.table > thead > tr > th.active, .table > tbody > tr > td.active, .table > tbody > tr > th.active { background-color: #f5f5f5; }
.table > thead > tr > th.success, .table > tbody > tr > td.success, .table > tbody > tr > th.success { background-color: #dff0d8; }
.table > thead > tr > th.info, .table > tbody > tr > td.info, .table > tbody > tr > th.info { background-color: #d9edf7; }
.table > thead > tr > th.warning, .table > tbody > tr > td.warning, .table > tbody > tr > th.warning { background-color: #fcf8e3; }
.table > thead > tr > th.danger, .table > tbody > tr > td.danger, .table > tbody > tr > th.danger { background-color: #f2dede; }

.table-hover > tbody > tr.active:hover > td { background-color: #e8e8e8; }
.table-hover > tbody > tr.success:hover > td { background-color: #d0e9c6; }
.table-hover > tbody > tr.info:hover > td { background-color: #c4e3f3; }
.table-hover > tbody > tr.warning:hover > td { background-color: #faf2cc; }
.table-hover > tbody > tr.danger:hover > td { background-color: #ebcccc; }

/* card kartik (DetailView/GridView 'type' => ...) con i colori dei panel-* di BS3 */
.card.border-primary { border-color: #337ab7 !important; }
.card > .card-header.bg-primary { background-color: #337ab7 !important; color: #fff !important; }
.card.border-info { border-color: #bce8f1 !important; }
.card > .card-header.bg-info { background-color: #d9edf7 !important; color: #31708f !important; border-color: #bce8f1; }
.card.border-success { border-color: #d6e9c6 !important; }
.card > .card-header.bg-success { background-color: #dff0d8 !important; color: #3c763d !important; border-color: #d6e9c6; }
.card.border-warning { border-color: #faebcc !important; }
.card > .card-header.bg-warning { background-color: #fcf8e3 !important; color: #8a6d3b !important; border-color: #faebcc; }
.card.border-danger { border-color: #ebccd1 !important; }
.card > .card-header.bg-danger { background-color: #f2dede !important; color: #a94442 !important; border-color: #ebccd1; }

.card > .card-header.bg-info .card-title,
.card > .card-header.bg-success .card-title,
.card > .card-header.bg-warning .card-title,
.card > .card-header.bg-danger .card-title {
    color: inherit;
}

/* --- panel di Bootstrap 3 --- */
.panel {
    margin-bottom: 20px;
    background-color: #fff;
    border: 1px solid transparent;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
}

.panel-default { border-color: #ddd; }

.panel-heading {
    padding: 10px 15px;
    border-bottom: 1px solid transparent;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}

.panel-default > .panel-heading {
    color: #333;
    background-color: #f5f5f5;
    border-color: #ddd;
}

.panel-title {
    margin: 0;
    font-size: 16px;
}

.panel-body {
    padding: 15px;
}

/* --- in BS3 la .row non è flex: i figli senza col-* occupano tutta la riga --- */
.row > :not([class*="col-"]) {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 7.5px;
    padding-left: 7.5px;
}

/* --- logo centrato come AdminLTE 2 --- */
.main-sidebar .brand-link {
    text-align: center;
    font-size: 20px;
}

/* --- utility Bootstrap 3 --- */
.pull-right { float: right !important; }
.pull-left { float: left !important; }
.center-block { display: block; margin-right: auto; margin-left: auto; }
.img-responsive { display: block; max-width: 100%; height: auto; }
.nav-stacked { flex-direction: column; }
.hidden { display: none !important; }

@media (max-width: 575.98px) {
    .hidden-xs { display: none !important; }
}

.caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 2px;
    vertical-align: middle;
    border-top: 4px dashed;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

.label {
    display: inline;
    padding: .2em .6em .3em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .25em;
}

.label-default { background-color: #d2d6de; color: #444; }
.label-primary { background-color: #347aa3; }
.label-success { background-color: #008749; }
.label-info { background-color: #00c0ef; }
.label-warning { background-color: #f39c12; }
.label-danger { background-color: #dd4b39; }

.bg-red { background-color: #dd4b39 !important; color: #fff !important; }
.bg-green { background-color: #008749 !important; color: #fff !important; }
.bg-light-blue { background-color: #347aa3 !important; color: #fff !important; }
.bg-blue-active { background-color: #005384 !important; color: #fff !important; }
.img-circle { border-radius: 50%; }

/* --- widget-user-2 di AdminLTE 2 (schede dettaglio risorsa/dipendente/consulente/cliente/fornitore) --- */
.box.box-widget { border-top: 0; }
.box-footer.no-padding { padding: 0; }
.widget-user-2 .widget-user-header {
    padding: 20px;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}
.widget-user-2 .widget-user-image > img {
    float: left;
    width: 65px;
    height: auto;
}
.widget-user-2 .widget-user-username,
.widget-user-2 .widget-user-desc,
.widget-user-2 .widget-user-header > p { margin-left: 75px; }
.widget-user-2 .widget-user-username {
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 25px;
    font-weight: 300;
}
.widget-user-2 .widget-user-desc { margin-top: 0; }
.widget-user-2 .widget-user-header > p { margin-bottom: 0; }
.widget-user-2 .widget-user-header::after { content: ""; display: table; clear: both; }
.nav-stacked > li { border-bottom: 1px solid #f4f4f4; margin: 0; }
.nav-stacked > li > a {
    display: block;
    padding: 10px 15px;
    border-left: 3px solid transparent;
    border-radius: 0;
    color: #444;
}
.nav-stacked > li > a:hover { background: #f7f7f7; color: #444; text-decoration: none; }
.text-yellow { color: #f39c12 !important; }

/* --- glyphicon rimappate su Font Awesome 6 --- */
.glyphicon {
    position: relative;
    top: 1px;
    display: inline-block;
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 900;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
}

.glyphicon-trash::before { content: "\f1f8"; }
.glyphicon-eye-open::before { content: "\f06e"; }
.glyphicon-plus::before { content: "\f067"; }
.glyphicon-minus::before { content: "\f068"; }
.glyphicon-pencil::before { content: "\f303"; }
.glyphicon-remove::before { content: "\f00d"; }
.glyphicon-ok::before { content: "\f00c"; }
.glyphicon-pause::before { content: "\f04c"; }
.glyphicon-paperclip::before { content: "\f0c6"; }
.glyphicon-file::before { content: "\f15b"; }
.glyphicon-time::before { content: "\f017"; }
.glyphicon-euro::before { content: "\f153"; }
.glyphicon-envelope::before { content: "\f0e0"; }
.glyphicon-user::before { content: "\f007"; }
.glyphicon-th-list::before { content: "\f00b"; }
.glyphicon-chevron-left::before { content: "\f053"; }
.glyphicon-chevron-right::before { content: "\f054"; }
.glyphicon-tasks::before { content: "\f0ae"; }
.glyphicon-star-empty::before { content: "\f005"; font-weight: 400; }
.glyphicon-search::before { content: "\f002"; }
.glyphicon-lock::before { content: "\f023"; }
.glyphicon-exclamation-sign::before { content: "\f06a"; }
.glyphicon-cloud-download::before { content: "\f0ed"; }
.glyphicon-check::before { content: "\f14a"; }
.glyphicon-bullhorn::before { content: "\f0a1"; }
/* usate dalle voci di menu salvate nel DB (colonna menu.data) */
.glyphicon-calendar::before { content: "\f133"; }
.glyphicon-export::before { content: "\f56e"; }
.glyphicon-import::before { content: "\f56f"; }
.glyphicon-flash::before { content: "\f0e7"; }
.glyphicon-hdd::before { content: "\f0a0"; }
.glyphicon-info-sign::before { content: "\f05a"; }
.glyphicon-list::before { content: "\f03a"; }
.glyphicon-signal::before { content: "\f012"; }
.glyphicon-star::before { content: "\f005"; }
.glyphicon-tag::before { content: "\f02b"; }
.glyphicon-wrench::before { content: "\f0ad"; }
.glyphicon-home::before { content: "\f015"; }
.glyphicon-cog::before { content: "\f013"; }
.glyphicon-folder-open::before { content: "\f07c"; }
.glyphicon-print::before { content: "\f02f"; }
.glyphicon-download::before,
.glyphicon-download-alt::before { content: "\f019"; }
.glyphicon-upload::before { content: "\f093"; }
.glyphicon-refresh::before { content: "\f021"; }
.glyphicon-edit::before { content: "\f044"; }
.glyphicon-list-alt::before { content: "\f022"; }
.glyphicon-briefcase::before { content: "\f0b1"; }
.glyphicon-shopping-cart::before { content: "\f07a"; }
.glyphicon-stats::before { content: "\f080"; }
.glyphicon-book::before { content: "\f02d"; }

/* frecce di ordinamento della GridView (site.css usava il font Glyphicons):
   stesse icone delle GridView Kartik (fa-sort-amount-down-alt / fa-sort-amount-up) */
a.asc::after,
a.desc::after {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

a.asc::after { content: "\f884"; }
a.desc::after { content: "\f161"; }

.sort-numerical a.asc::after,
.sort-ordinal a.asc::after { content: "\f884"; }
.sort-numerical a.desc::after,
.sort-ordinal a.desc::after { content: "\f161"; }

/* --- griglia Bootstrap 3: col-xs-* e col-*-offset-* (breakpoint BS4) --- */
.col-xs-1 { position: relative; width: 100%; padding-right: 7.5px; padding-left: 7.5px; flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-xs-2 { position: relative; width: 100%; padding-right: 7.5px; padding-left: 7.5px; flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-xs-3 { position: relative; width: 100%; padding-right: 7.5px; padding-left: 7.5px; flex: 0 0 25%; max-width: 25%; }
.col-xs-4 { position: relative; width: 100%; padding-right: 7.5px; padding-left: 7.5px; flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-xs-5 { position: relative; width: 100%; padding-right: 7.5px; padding-left: 7.5px; flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-xs-6 { position: relative; width: 100%; padding-right: 7.5px; padding-left: 7.5px; flex: 0 0 50%; max-width: 50%; }
.col-xs-7 { position: relative; width: 100%; padding-right: 7.5px; padding-left: 7.5px; flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-xs-8 { position: relative; width: 100%; padding-right: 7.5px; padding-left: 7.5px; flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-xs-9 { position: relative; width: 100%; padding-right: 7.5px; padding-left: 7.5px; flex: 0 0 75%; max-width: 75%; }
.col-xs-10 { position: relative; width: 100%; padding-right: 7.5px; padding-left: 7.5px; flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-xs-11 { position: relative; width: 100%; padding-right: 7.5px; padding-left: 7.5px; flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-xs-12 { position: relative; width: 100%; padding-right: 7.5px; padding-left: 7.5px; flex: 0 0 100%; max-width: 100%; }
@media (min-width: 576px) {
    .col-sm-offset-0 { margin-left: 0; }
    .col-sm-offset-1 { margin-left: 8.333333%; }
    .col-sm-offset-2 { margin-left: 16.666667%; }
    .col-sm-offset-3 { margin-left: 25%; }
    .col-sm-offset-4 { margin-left: 33.333333%; }
    .col-sm-offset-5 { margin-left: 41.666667%; }
    .col-sm-offset-6 { margin-left: 50%; }
    .col-sm-offset-7 { margin-left: 58.333333%; }
    .col-sm-offset-8 { margin-left: 66.666667%; }
    .col-sm-offset-9 { margin-left: 75%; }
    .col-sm-offset-10 { margin-left: 83.333333%; }
    .col-sm-offset-11 { margin-left: 91.666667%; }
}
@media (min-width: 768px) {
    .col-md-offset-0 { margin-left: 0; }
    .col-md-offset-1 { margin-left: 8.333333%; }
    .col-md-offset-2 { margin-left: 16.666667%; }
    .col-md-offset-3 { margin-left: 25%; }
    .col-md-offset-4 { margin-left: 33.333333%; }
    .col-md-offset-5 { margin-left: 41.666667%; }
    .col-md-offset-6 { margin-left: 50%; }
    .col-md-offset-7 { margin-left: 58.333333%; }
    .col-md-offset-8 { margin-left: 66.666667%; }
    .col-md-offset-9 { margin-left: 75%; }
    .col-md-offset-10 { margin-left: 83.333333%; }
    .col-md-offset-11 { margin-left: 91.666667%; }
}
@media (min-width: 992px) {
    .col-lg-offset-0 { margin-left: 0; }
    .col-lg-offset-1 { margin-left: 8.333333%; }
    .col-lg-offset-2 { margin-left: 16.666667%; }
    .col-lg-offset-3 { margin-left: 25%; }
    .col-lg-offset-4 { margin-left: 33.333333%; }
    .col-lg-offset-5 { margin-left: 41.666667%; }
    .col-lg-offset-6 { margin-left: 50%; }
    .col-lg-offset-7 { margin-left: 58.333333%; }
    .col-lg-offset-8 { margin-left: 66.666667%; }
    .col-lg-offset-9 { margin-left: 75%; }
    .col-lg-offset-10 { margin-left: 83.333333%; }
    .col-lg-offset-11 { margin-left: 91.666667%; }
}

/* --- form inline di kartik con BS4: ActiveField aggiunge col-12 (pensato per BS5) e manda a capo ogni campo --- */
@media (min-width: 576px) {
    .form-inline.kv-form-bs4 > .form-group.col-12 {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
        padding-left: 0;
        padding-right: 0;
        margin-right: .5rem;
        margin-bottom: .5rem;
    }
}
.form-inline.kv-form-bs4 textarea {
    min-height: 0;
}

/* --- colonne senza .row: in BS3 erano float e si affiancavano comunque, in BS4 servono un contenitore flex.
       I figli che non sono colonne prendono tutta la riga, come i blocchi in BS3 --- */
.box-body:has(> [class*="col-"]:not(.form-group)),
.box-footer:has(> [class*="col-"]:not(.form-group)) {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}
.box-body:has(> [class*="col-"]:not(.form-group)) > :not([class*="col-"]),
.box-footer:has(> [class*="col-"]:not(.form-group)) > :not([class*="col-"]) {
    flex: 0 0 100%;
    max-width: 100%;
}

/* --- popover di kartik Editable: il .popover di BS4 (display: block, caricato dopo) vince sul display: none
       di .popover-x e lo lascia sempre aperto. Apertura e chiusura usano lo style inline del Modal --- */
.popover.popover-x {
    display: none;
}

/* la tendina delle Select2 è appesa al body con z-index 1056: dentro un popover di Editable (1065) finiva sotto il popover */
body > .select2-container--open .select2-dropdown {
    z-index: 1066;
}

/* --- riquadri chiudibili di AdminLTE 2 (il click è gestito in js/index.js) --- */
.box.collapsed-box > .box-body,
.box.collapsed-box > .box-footer {
    display: none;
}

.box-header .btn-box-tool {
    padding: 5px;
    font-size: 12px;
    background: transparent;
    color: #97a0b3;
}

/* bianco solo sui box solid colorati: sul box-solid semplice (sfondo bianco) il pulsante sparirebbe */
.box.box-solid.box-primary > .box-header .btn-box-tool,
.box.box-solid.box-info > .box-header .btn-box-tool,
.box.box-solid.box-danger > .box-header .btn-box-tool,
.box.box-solid.box-success > .box-header .btn-box-tool {
    color: #fff;
}

.no-padding { padding: 0 !important; }
.margin-bottom { margin-bottom: 20px; }

/* voce attiva delle nav-pills verticali (cartelle della mailbox) */
.nav-stacked > li.active > a {
    border-left-color: #347aa3;
    font-weight: 600;
    color: #444;
}

/* --- tendine di notifiche e messaggi nell'header --- */
/* lista scrollabile: senza altezza massima la tendina esce dallo schermo e nasconde il link "Mostra tutte" */
.dropdown-scroll {
    max-height: 300px;
    overflow-y: auto;
}

/* AdminLTE 3 forza white-space: normal sui <p> di .dropdown-menu-lg, annullando .text-truncate */
.dropdown-menu-lg p.text-truncate,
.dropdown-menu-lg p.notifica-riga {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-menu-lg .notifica-testo,
.dropdown-menu-lg .notifica-riga {
    min-width: 0;
}

.dropdown-menu-lg .notifica-icona {
    width: 20px;
    margin: 3px 10px 0 0;
    color: #347aa3;
    text-align: center;
}

.dropdown-menu-lg .notifica-non-letta {
    background-color: #edf4fa;
}

/* icone dell'header (webmail, notifiche): icona e contatore più grandi */
.main-header .nav-icona-header > .fa {
    font-size: 1.4rem;
}

.main-header .nav-icona-header > .navbar-badge {
    font-size: .8rem;
    font-weight: 600;
    padding: 2px 5px;
    top: 4px;
    right: 2px;
}

/* placeholder delle Select2: il #999 dei temi Kartik non raggiunge il contrasto 4.5:1 (classe ripetuta per superarne la specificità) */
.select2-container.select2-container .select2-selection .select2-selection__placeholder {
    color: #6c757d;
}
